Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

embedded_systems:protocols:canopen:start [2021-06-14 15:34] – angelegt Moritz Lammerichembedded_systems:protocols:canopen:start [2021-06-14 16:02] (aktuell) Moritz Lammerich
Zeile 16: Zeile 16:
 | PDO | "Process Data Object", PDOs allow efficient transfer of multiple objects in a signle CAN message. CanOpen allows for a maximum of 512 PDOs per Node, however most devices will limit it to 4 (more info, see below) | | PDO | "Process Data Object", PDOs allow efficient transfer of multiple objects in a signle CAN message. CanOpen allows for a maximum of 512 PDOs per Node, however most devices will limit it to 4 (more info, see below) |
 | SDO | "Service Data Object": provides mechanism to access a node's entire object dictionary. (more info, see below) | | SDO | "Service Data Object": provides mechanism to access a node's entire object dictionary. (more info, see below) |
 +
 +
 +===== PDO vs SDO =====
 +
 +==== PDOs ====
 +
 +PDOs are designed for the efficient transport of cyclic data.
 +For example, a motor drive may be configured to send the current velocity and position ever 10ms, so that a speed controller running on the computer/PLC can use a PID controller in a control loop to accurately control the position of the motor.
 +Likewise, that computer may send out the updated target velocity and position in a PDO so that the drive can update its internal values.
 +
 +This means there are 2 types of PDO: RxPDOs ("Receive PDOs") and TxPDOs ("Transmit PDOs"), the difference being that a node sends TxPDOs and receives RxPDOs.
 +Note that RX and TX are from the perspective of the node.
 +This leads to the somewhat counter intuitive behavior of receiving TxPDOs and sending RxPDOs when using a CanOpen Master stack.
 +To change a slave's (e.g. motor drive) control word as a PDO, that PDO needs to be configured as an RxPDO, since the drive will receive the control word we send.
 +Likewise, to receive it's status word as a PDO, it needs to be configured as a TxPDO, since the drive will be sending it.
 +
 +PDOs are designed to be sent cyclically, butt that is not a necessity.
 +PdOs sends can be triggered by a timer (e.g. every 100ms) of "Change of State (CoS)" Detection, where the PDO is only sent when its data changes (hence "change of state detection").
 +When CoS is used, an inhibit time may be configured to stop rapid data changes (and the resulting PDO transmits) to blokc other messages from getting through.
 +
 +==== SDOs ====
 +
 +SDOs present a less efficient but more flexible way of accessing a node's object.
 +In contrast to PDOs, SDOs need not be configured beforehand and can be used to access a node's entire object dictionary.
 +It is a client-server based transaction, whereby the client requests an object and the server responds to a given request.
 +SDOs are limited to 4 bytes per message, but larger amounts of data are segmented and transmitted over multiple messages.
 +Also, SDOs are synchronous, meaning that each transfer is accompanied by an acknowledgement from the other party.