Optional parameters for CANopen provide additional support

CANopen features mandatory, conditional, and optional parameters. However, the device still has to behave as specified even if the optional parameters aren’t implemented to ensure interoperability.

By Holger Zeltwanger May 21, 2016

CANopen features mandatory, conditional, and optional parameters. However, the device still has to behave as specified even if the optional parameters aren’t implemented.

CANopen features mandatory, conditional, and optional parameters for application layers. The mandatory parameters specified in the CiA 301 application layer have to be implemented. Some parameters are conditional. For example, if the user implements process data object (PDO) communication parameters the corresponding PDO mapping parameters also have to be provided. Optional functioning parameters also may be supported if they follow the specification. Optional parameters in CANopen devices, applications, and interface profiles follow the same interpretation. 

Check default value attribute

If the default value attribute is "none" or "manufacturer-specific," the device behaves as the user wants. If this attribute has a specified value, the product needs to follow this specification. For example, the error behavior parameter (index 1029h) is an array-type object that specifies the local NMT finite state automaton (FSA) transitions in case of severe errors, and it is optional.

Sub-index 1 (communication error) is another optional parameter that specifies a default value of "00h" (data type: Unsigned8). This means that the device must transit into NMT pre-operational state when the severe error occurs. Severe errors include heartbeat events or bus-off conditions of the CAN controller. If this object is not implemented, the device must behave as specified: It shall transit into the specified NMT state. The system designer can configure another behavior only when it is implemented.

In CiA 401, which is a CANopen device profile for generic input/output (I/O) modules, the "polarity digital input 8-bit" parameter (index 6002h) is optional. The default value is specified as 00h meaning inputs are not inverted. This means it is not allowed to provide an input inversion function if this object is not implemented. In the case of CiA 401, this is also clearly described in the profile specification: "If an optional parameter is not implemented, the device shall behave as specified in the default value attribute." 

Mandatory, if not implemented

Other profile specifications don’t mention this explicitly. Nevertheless, optional parameters with dedicated default values determine the device’s behavior. For example, CiA 402 (CANopen device profile for drives and motion control) specifies for the "quick stop option code" parameter (index 605Ah), which has a default value of "+2" meaning "slow down on quick stop ramp and transit into switch-on-disabled." This behavior is mandatory, even if the parameter is not implemented. It is not allowed to behave differently.

CANopen devices must behave as specified in the default value after power-on, and any optional parameters must follow suit. Optional does not mean your device may behave any way. Optional parameters are not allowed to implement a congruent functionality using manufacturer-specific parameters. This would decrease the interoperability of CANopen devices as a result.

Holger Zeltwanger is managing director, CAN in Automation (CiA). CAN in Automation is a CFE Media content partner. Edited by Chris Vavra, production editor, Control Engineering, CFE Media, cvavra@cfemedia.com.

ONLINE extra

See additional stories from CAN in Automation linked below.