CANopen Bootloader Documentation
Version 4.10.00
Loading...
Searching...
No Matches
cbl_emcy.h File Reference

Detailed Description

Emergency objects are triggered by the occurrence of a device internal error situation and are transmitted from an emergency producer on the device. Emergency objects are suitable for interrupt type error alerts. An emergency object is transmitted only once per 'error event'. As long as no new errors occur on a device no further emergency objects must be transmitted. The emergency object may be received by zero or more emergency consumers. The reaction on the emergency consumer(s) is not specified.

The emergency service is an optional service of the CANopen Bootloader. It can be enabled/disabled via the symbol CBL_DICT_OBJ_1014. The identifier for the emergency object is fixed to 80h + node-ID for the CANopen Bootloader.

+ Include dependency graph for cbl_emcy.h:

Functions

void CblEmcySend (uint16_t uwEmcyCodeV, uint8_t *pubManCodeV)
 

Function Documentation

◆ CblEmcySend()

void CblEmcySend ( uint16_t  uwEmcyCodeV,
uint8_t *  pubManCodeV 
)
Parameters
[in]uwEmcyCodeVEmergency code
[in]pubManCodeVManufacturer specific code

This function is used to send an emergency message (EMCY). The possible values for uwEmcyCodeV are defined in CiA 301. The parameter pubManCodeV is a pointer to an array of 5 bytes, which can be filled with user defined data. The parameter pubManCodeV can be a NULL pointer, then the customer specific data is set to 0 autonomously.

Example:

uint8_t aubDataT[5];
aubDataT[0] = 0x01;
aubDataT[1] = 0x02;
aubDataT[2] = 0x03;
aubDataT[3] = 0x04;
aubDataT[4] = 0x05;
CblEmcySend(EMCY_ERR_DEV_GENERAL, &aubDataT[0];
void CblEmcySend(uint16_t uwEmcyCodeV, uint8_t *pubManCodeV)