CANopen

CANopen is a communication protocol stack and device profile specification for embedded systems used in automation.

The CANopen standard consists of an addressing scheme, several small communication protocols and an application layer defined by a device profile.

The lower level protocol implementing the data link and physical layers is usually Controller Area Network (CAN), although devices using some other means of communication (such as Ethernet Powerlink, EtherCAT) can also implement the CANopen device profile.

The basic CANopen device and communication profiles are given in the CiA 301 specification released by CAN in Automation.

An entry in the object dictionary is defined by: The basic datatypes for object dictionary values such as booleans, integers and floats are defined in the standard (their size in bits is optionally stored in the related type definition, index range 0x0001–0x001F), as well as composite datatypes such as strings, arrays and records (defined in index range 0x0040–0x025F).

Using a low code number for time critical functions ensures the lowest possible delay.

This mapping can however be customized for special purposes (except for NMT and SDO, required for basic communication).

For simple network structures, CANopen supports a predefined allocation of message identifiers.

In a master/slave relationship, one CANopen node is designated as the master, which sends or requests data from the slaves.

The actual node ID, to which the command is meant to, is given in the data part of the message (at the second byte).

The frame format is: CANopen devices are required to make the transition from the state Initializing to Pre-operational automatically during bootup.

A response/reply-style (pull model) protocol, called node guarding, exists for slave monitoring.

The SDO protocol is used for setting and for reading values from the object dictionary of a remote device.

Because the object dictionary values can be larger than the eight bytes limit of a CAN frame, the SDO protocol implements segmentation and desegmentation of longer messages.

However the pre-defined connection set defines an SDO channel which can be used even just after bootup (in the Pre-operational state) to configure the device.

In general, the fixing of the transmission time of synchronous PDO messages coupled with the periodicity of transmission of the Sync Object guarantees that sensor devices may arrange to sample process variables and that actuator devices may apply their actuation in a coordinated fashion.

This is achieved by using the optional high resolution synchronization protocol which employs a special form of timestamp message to adjust the inevitable drift of the local clocks.

The high-resolution timestamp is encoded as unsigned32 with a resolution of 1 microsecond which means that the time counter restarts every 72 minutes.

Electronic Data Sheet (EDS) is a file format, defined in CiA306, that describes the communication behaviour and the object dictionary entries of a device.