CANopen Master Documentation
Version 6.06.04
|
The add-on module Safety allows the integration of the SRDO service as specified in EN 50525-5.
CANopen defines communication profiles based on ISO 11898-1. The basic profiles are defined in EN 50325-4. The SRCP (Safety-related communication profile and protocols, i.e. CANopen Safety) is based on the basic profiles in EN 50325-4 and the SCL (Safety Communication Layer, EN 61784–3) specification.
The SRCP is based on the producer/consumer model. The pairing of producers and consumers is an important part of the relationship that provides the high integrity needed for SRLD (Safety-related logical device). The SCL is specified using SR (Safety-related) data objects (SRDOs). These objects are serving as the interface between the SR application objects and the link layer connections. An SRDO ensures the integrity of the safety data transfers.
The module version is defined by COM_SAFETY_VERSION_MAJOR and COM_SAFETY_VERSION_MINOR.
The module is configured by setting of the following symbols inside the com_conf.h
file:
COM_SRDO_NUMBER | number of supported SRDOs |
COM_SRDO_TRM_FIFO_SIZE | FIFO size for transmission of SRDOs |
Use the header file com_safety.h
to get access to the Add-on Safety API.
In order to configure the objects of a SR device the following commands have to be executed:
Please note that all these steps have to be executed in Pre-Operational state of the SR device. All functions which access the object dictionary of the SR device via SDO (e.g. ComSafetyGetConfiguration(), etc.) are non-blocking, hence the application has to wait until the SDO data transfer has finished before the next command can be executed. This can be achieved either by implementation of an application specific FSA using the ComObjectEventReady() event or by polling the status value of ComSafetyGetSdoStatus().
The following code example depicts the configuration procedure.
com_safety.h | CANopen Safety add-on module |