CANOpen Easy Getting Started_Data Objects (PDO) and Service Data Objects (SDO)

CANopen is a high-level communication protocol based on the Controller Area Network (CAN). Many people think that it is difficult to learn the protocol. It seems that it is a cloud in the fog. Will make the CANOpne protocol no longer so mysterious, taking you through the first threshold of learning the path of CANOpen.

When CANopen is applied, the configuration information and application information to be transferred are placed in the process data object (PDO) and the service data object (SDO). These objects are the same size as the baskets that sell fruit on the market, but the stuff (application data) is different, as shown in Figure 1. This is the basic protocol stipulated in the CiA301 protocol - "the basket", and the sub-protocol of CiA4xx or the user-defined object is the thing in the "clam".

CANOpen Easy Getting Started_Data Objects (PDO) and Service Data Objects (SDO)

The difference between PDO and SDO communication is that PDO belongs to the process data, that is, one-way transmission, and does not need to receive the node to respond to the CAN message to confirm, in terms of communication terminology, it belongs to the "production consumption" model. as shown in picture 2.

The SDO belongs to the service data, and has the address (Node-ID) of the designated receiving node, and the designated receiving node needs to respond to the CAN message to confirm that it has received. If the timeout is not confirmed, the sending node will resend the original message. This type of communication is a common "server client" communication model, which we usually call polling.

For the assignment of message IDs for PDO and SDO, in order to reduce the configuration effort of the network, CANopen predefines a mandatory default identifier (CAN-ID) allocation table, which is based on the 11-bit CAN-ID standard. Frame format. It is divided into a 4-bit function code (FuncTIon-ID) and a 7-bit node number (Node-ID).

The CAN-ID is also commonly referred to as COB-ID (communication object number) in CANopen. So we can distinguish between two confusing names:

COB-ID: CommunicaTIon Object IdenTIfier, which is the message frame ID of a communication object in CANopen, that is, the 11-bit ID of the CAN message. Represents a communication meaning.

Node-ID: Node ID number, which is the node address in the CANopen network. CANopen specifies a logical maximum of 128 nodes, so the Node-ID is up to 128 (7 bits).

The COB-ID and the Node-ID are not necessarily related, but in the Process Data Object (PDO) and Service Data Object (SDO), the COB-ID contains the Node-ID.
Since the input and output of each CANopen node need to be distinguished, the PDO is divided into TPDO (transmit PDO) and (receive RPDO), and the transmit and receive are referenced to the CANopen slave node (if the CAN master is the opposite). TPDO and RPDO have 4 data objects respectively (such as TPDO has TPDO1, TPDO2, TPDO3, TPDO4; RPDO has RPDO1, RPDO2, RPDO3, RPDO4), and each data object is a CAN packet encapsulation, as shown in Table 1. These are the containers for data transceiving. As shown in Figure 1, the fruit baskets are ready for the user, depending on what the user puts in the fruit.

The SDO is relatively simple and fixed. The CAN frame ID of the "question" SDO that initiates the communication is 600h + node-ID, where the Node-ID is the requested node address, and the node being asked should "answer" the SDO CAN. The frame ID is 580h + node-ID. Generally in the CANopen network, only the NMT host can initiate SDO communication for node parameter configuration or key parameter transmission. Of course, the slave node can also initiate SDO communication to other slave nodes.

As shown in Table 1. Pre-defined packets for CANopen are classified into PDO messages and SDO messages. Users must remember!

CANOpen Easy Getting Started_Data Objects (PDO) and Service Data Objects (SDO)

The XGate-COP10 embedded CANOPEN slave module is a CANopen slave communication module developed by ZLG Zhiyuan Electronics with independent intellectual property rights. The CANopen slave protocol stack code has been integrated internally, and the communication with XGate-COP10 can be realized by a simple serial communication protocol, and the serial communication protocol standard C file is provided, so that the existing equipment has the CANopen communication capability at the fastest speed. .

CANOpen Easy Getting Started_Data Objects (PDO) and Service Data Objects (SDO)

Home appliance parts

gree , https://www.greegroups.com

This entry was posted in on