CANopen Slave Documentation
Version 6.16.04
Loading...
Searching...
No Matches
Add-on Safety

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.

Module version

The module version is defined by COS_SAFETY_VERSION_MAJOR and COS_SAFETY_VERSION_MINOR.

Configuration

The module is configured by setting of the following symbols inside the cos_conf.h file:

COS_SRDO_NUMBER

number of supported SRDOs

Interface to application

The mapping of the SRDOs is accomplished by CosSafetySetMapEntries(), the default mapping of the SRDOs has to be set before the CANopen Slave protocol stack is started.

// example default mapping for SRDO 1
CosSafetySetMapEntries(0, 0, 0x20040108, 0x20240108);
CosSafetySetMapEntries(0, 1, 0x20040208, 0x20240208);
// Now the CANopen stack can be started
@ eCP_BITRATE_500K
Definition canpie.h:677
@ eCP_BITRATE_NONE
Definition canpie.h:642
uint8_t CosMgrStart(uint8_t ubNodeIdV, int32_t slBitrateNomSelV, int32_t slBitrateDatSelV)
uint8_t CosSafetySetMapEntries(uint8_t ubSrdoNumberV, uint8_t ubEntryNumberV, uint32_t ulMapObjectV, uint32_t ulMapObjectInvertedV)

Please note that SRDOs are only able to receive or send process data after the CRC procedure described inside the EN 50525-5 has been executed.

CANopen Safety files

cos_safety.h

CANopen Safety add-on module