WEINTEK V1.00 Using CANopen Slave Driver User Manual

V1.00 Using CANopen Slave Driver

Specifications

  • Product Name: CAN Bus User Manual
  • Driver Type: CANopen Slave Driver
  • Version: V1.00

Product Usage Instructions

1. SDO Communication

An important property of CANopen device is the Object Dictionary
(OD), which stores configuration and process data for all types of
devices. Service Data Objects (SDO) can be used for direct access
to CANopen devices. SDO allows reading and writing Object
Dictionary entries using their Index and Subindex as defined in the
OD. SDO is commonly used to access parameters of the CANopen
device.

Using SDO to Read or Write CANopen Device Parameters:

  • SDO can directly read or write a specific address.
  • In EasyBuilder Pro, select the desired data type (8bit, 16bit,
    or 32 bit) and enter appropriate Index and Subindex values.
  • For example, to read Index=2200, Subindex=01, 16bit data, enter
    220001 in SDO_16bit device type.
  • Note: Subindex is not required; use 00 when not specified.

2. PDO Communication

In CANopen protocol, Process Data Object (PDO) facilitates data
exchange. PDO allows copying data from its Object Dictionary into
the data field of PDO for transmission or reception. PDO is
suitable for dynamic data changes.

Using PDO to Read or Write CANopen Device Parameters:

  • PDO is divided into Receive PDO (RPDO) and Transmit PDO
    (TPDO).
  • RPDO transfers data to PLC, while TPDO receives data from
    PLC.

3. TPDO Reading and RPDO Writing

Each PDO contains 8 bytes of data. Use PDO device type for
reading or writing 16bit or 32bit data, and PDO(Byte) device type
for byte data.

Address Mapping of PDO Data Field:

Illustration of the address mapping of PDO data field in
EasyBuilder Pro.

4. RPDO Reading

To monitor and write data to RPDO address on HMI conveniently,
RPDO can read data in Object Dictionary via SDO in EasyBuilder Pro.
Define the data mapping in RPDO’s setting page to display the data
on HMI.

FAQ

Q: How can I access CANopen device parameters using SDO?

A: To access CANopen device parameters using SDO, select the
desired data type and enter the appropriate Index and Subindex
values in EasyBuilder Pro.

Q: What is the purpose of PDO in CANopen communication?

A: PDO facilitates data exchange by copying data from the Object
Dictionary into the data field for transmission or reception in
CANopen communication.

“`

CAN Bus User Manual
Using CANopen Slave Driver
V1.00

Table of Contents
1. SDO Communication…………………………………………………………………………………..1 2. PDO Communication ………………………………………………………………………………….1 3. TPDO Reading and RPDO Writing …………………………………………………………………2 4. RPDO Reading……………………………………………………………………………………………3 5. CANopen Communication Parameter Settings……………………………………………….4

Using CANopen Slave Driver

1. SDO Communication
An important property of CANopen device, Object Dictionary (OD) is a table which stores the configuration and process data for all types of device. For direct access to CANopen devices, Service Data Objects (SDO) can be used. With SDO, Object Dictionary entries can be read and written with their Index + Subindex as defined in the OD. Generally speaking, SDO is used to access the parameters of the CANopen device.

write

HMI

SDO

CANopen device parameter

(Index+Subindex)

read

Use SDO to read or write CANopen device parameters.

SDO can directly read or write a specific address. In EasyBuilder Pro, to access data by SDO, select the desired data type (8bit, 16bit, or 32 bit), and enter appropriate Index and Subindex values. For example, to read Index=2200, Subindex=01, 16bit data, please enter 220001 in SDO_16bit device type.
Please Note that Subindex is not a required parameter. When subindex is not specified, use 00.
2. PDO Communication
In CANopen protocol, Process Data Object (PDO) is another way for data exchange. The data to be transmitted or received from its Object Dictionary can be copied into the data field of PDO. In this manner, HMI, by communicating with PDO, can read or write data in Object Dictionary. Generally speaking, PDO is better suited for data that changes dynamically.
On PLC, PDO is divided into two types: Receive PDO (RPDO) and Transmit PDO (TPDO). However, for HMI, RPDO transfers data to PLC, and TPDO receives data from PLC.
1

Using CANopen Slave Driver

write

RPDO HMI
TPDO read

CANopen device address

Use PDO to read or write CANopen device parameters.

3. TPDO Reading and RPDO Writing
Each PDO contains 8 bytes of data. To read or write a 16bit or 32bit data, use PDO device type; for byte data, use PDO(Byte) device type. The following figure illustrates the address mapping of PDO data field in EasyBuilder Pro.

Address (16bit, 32bit)
PDO (8 byte)

0

1

2

3

01 02 03 04 05 06 07 08

Address(byte)

0 1 2 3 4 5 6 7

In accessing PDO data, one should select device types and addresses according to PDO data composition. Take TPDO_1, which contains data as follows: 16bit, 8bit, 8bit, and 32bit, as an example as shown in the following figure.

Address (16bit, 32bit)
TPDO_1

0 16bit

1 8b 8b

2

3

32bit

Address(byte )

0 1 2 3 4 5 6 7

To display the data on HMI, the following device types are used in EasyBuilder Pro:
2

Using CANopen Slave Driver TPDO_1[0], TPDO_1(Byte)[2], TPDO_1(Byte)[3], TPDO_1[2]. The number enclosed in [ ] indicates the address.
4. RPDO Reading
In order to monitor and write data to RPDO address on HMI more conveniently (for example, when using a Numeric object), in EasyBuilder Pro, RPDO is allowed to read data in Object Dictionary via SDO. Please define the data mapping in Object Dictionary in RPDO’s setting page. The HMI will display the data in RPDO via SDO read process. In the RPDO’s setting, the mapping should include: Index, Subindex and data length, as shown in the following figure.
3

Using CANopen Slave Driver
5. CANopen Communication Parameter Settings
General Parameters: Protocol & Node ID
CAN Bus 2.0a: Node ID (range: 1 – 0xFF). The command sent from TPDO/RPDO is selected by Function Code + Node ID. For example, TPDO1: Function Code = 0x180 Node ID = 0x01 The command sent to read TPDO1 would be: 0x180 + 0x01 = 0x181 CAN Bus 2.0b: The command sent from TPDO/RPDO is selected by Function Code + Node ID. For example, 0x10001800 + 0x01 = 0x10011800 Baud rate Set to the same baud rate as the CANopen device. Communication Parameters: Send NMT START command Initializes CANopen network. The device will enter operational state. Update time and Cycle communication mode (TPDO) Update time: When using a device that sends signals periodically, if no new data has been received
4

Using CANopen Slave Driver

by the HMI within the Update Time, the HMI will send a read command.

t

t The device sends a message every

100 ms. If the update time is set to

100 ms

150 ms, and the message is not sent when reaching 150 ms, the HMI will

100 ms send a read request.

HMI

CANopen Device

150 ms

Cycle communication mode: When using a device that sends out signals periodically and doesn’t accept HMI command, please select this option. The HMI will not send read requests.

t

t

HMI

100 ms

CANopen Device

100 ms

……

5

Documents / Resources

WEINTEK V1.00 Using CANopen Slave Driver [pdf] User Manual
V1.00, V1.00 Using CANopen Slave Driver, V1.00, Using CANopen Slave Driver, Slave Driver, Driver

References

Leave a comment

Your email address will not be published. Required fields are marked *