Quantcast
Channel: Wecon Technology
Viewing all articles
Browse latest Browse all 170

Protocol——CANBUS

$
0
0

I. General
CAN bus is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other in applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles, but is also used in many other contexts.

II. Protocol select
WECON HMI could support CANBUS protocol, WECON provide “Opencan” to users for CAN frame editing. Please select the OPENCAN protocol for communication. And then click the “OpenCAN setting” to open the setting windows.

2

III. Frame setting
1. ID: set the ID for a CAN frame. It’s hexadecimal type;
2. ID assign: divide ID as PF, PS and SAparts;
3. Frame type: select the frame as standard type or extension type;
4. Frame format: select the frame as data frame or remote frame;
5. Data: set the data part of CAN frame. Two-bits stand for a hexadecimal. Divide by space. The most support 8 bytes data according to CAN definition;
6. Address Edit: set the register address related to the CAN frame. The address is corresponding to the register address in the configuration software. The data are distributed to the address sequent.
7. Interaction: there are two modes for HMI to process information. One is HMI send the frame to device and then the device get the frame and deal with. The other is the device send the frame to HMI. And then HMI get the frame and dealing with.
    Send after receiving: if we select this option, then the HMI will be set as passiveness part. The HMI will response after     getting the CAN frame information. If this is not chosen, the effect is contrary.
    Response mode: include no response, affirm response and data response. No response means device or HMI won’t receive the response;Affirm response means the device or HMI will receive affirmed response;
    Data response: the device or HMI will receive response with data. Need to set the to-be-separated data in the response frame to be stored in the register address.
    Response ID: if the address want to receive data in different frame ID, that need to set this option. Choose “different with sent mode” and type in different ID in the blank behind.

1

Ⅳ. Register address edit interface
1. Current address: display the register type and address set in data access interface
2. Trigger: based on the two operations of register read and write.
If select read, the address read the data in device. The read mode is repeat-sending the frame that customer set.
If select write, the address writes the data on the HMI to the device. The mode is HMI will send the frame to device once when the HMI is done a write operation.
3. Data operation: set the read and write operation in trigger condition.
If the trigger condition is read-operation, we need to set the position and length of data which current address will get.
If the trigger condition is write-operation, there are two situations.
1) If not select “add the write data to frame” option, when customer operate write-operation, the set frame will be
2) If select “add the write data to frame” option, when customer operate write-operation, the program will send the data into the frame with position and length.
Position and length format:
If the register address is bit, then the decimal point is required to express the bit address in the register. For example, 1.1 stands for the first bit of the first byte in the eight-byte frame.
If the register address is byte, then we need only integral number to stand for it. For example, 1 stands for the first
byte in the eight-byte frame. The length unit is byte.
4. Add: add the current setting.
5. Close: close the dialog box.

3


Viewing all articles
Browse latest Browse all 170

Trending Articles