CANopen FD Master Library
Making your systems precise, reliable and high-quality - 5.10.01
Functions
EMCY service

Functions

ComStatus_tv ComEmcyConsEnable (uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t ubEnableV)
 
void ComEmcyConsEventReceive (uint8_t ubNetV, uint8_t ubNodeIdV)
 
ComStatus_tv ComEmcyConsGetData (uint8_t ubNetV, uint8_t ubNodeIdV, uint8_t *pubDataV)
 
ComStatus_tv ComEmcyEnable (uint8_t ubNetV, uint8_t ubEnableV)
 
ComStatus_tv ComEmcyGetId (uint8_t ubNetV, uint32_t *pulIdV)
 
ComStatus_tv ComEmcyGetInhibit (uint8_t ubNetV, uint32_t *pulTimeV)
 

Detailed Description

Emergency (EMCY) 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.

Function Documentation

◆ ComEmcyConsEnable()

ComStatus_tv ComEmcyConsEnable ( uint8_t  ubNetV,
uint8_t  ubNodeIdV,
uint8_t  ubEnableV 
)
Parameters
[in]ubNetV- CANopen Network channel
[in]ubNodeIdV- Node-ID value of CANopen device
[in]ubEnableV- Enable/Disable EMCY service
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure

This function enables (ubEnableV = 1) or disables (ubEnableV = 0) the EMCY consumer service for a Node ID given by ubNodeIdV.

◆ ComEmcyConsEventReceive()

void ComEmcyConsEventReceive ( uint8_t  ubNetV,
uint8_t  ubNodeIdV 
)
Parameters
[in]ubNetV- CANopen Network channel
[in]ubNodeIdV- Node-ID value of CANopen device
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure

The function is called by the CANopen Master stack upon reception of an Emergency message (EMCY). The Emergency message has to be configured by ComEmcyConsEnable() in advance.

◆ ComEmcyConsGetData()

ComStatus_tv ComEmcyConsGetData ( uint8_t  ubNetV,
uint8_t  ubNodeIdV,
uint8_t *  pubDataV 
)
Parameters
[in]ubNetV- CANopen Network channel
[in]ubNodeIdV- Node-ID value of CANopen device
[in]pubDataV- Pointer to data
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure

The functions reads the data of the EMCY message from a CANopen device using the Node-ID value ubNodeIdV. The size of the data buffer is 8 bytes.

◆ ComEmcyEnable()

ComStatus_tv ComEmcyEnable ( uint8_t  ubNetV,
uint8_t  ubEnableV 
)
Parameters
[in]ubNetV- CANopen Network channel
[in]ubEnableV- Enable/Disable EMCY service
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure

This function enables (ubEnableV = 1) or disables (ubEnableV = 0) the EMCY service of the CANopen Master. The EMCY service is enabled by default.

◆ ComEmcyGetId()

ComStatus_tv ComEmcyGetId ( uint8_t  ubNetV,
uint32_t *  pulIdV 
)
Parameters
[in]ubNetV- CANopen Network channel
[out]pulIdV- Pointer to identifier value
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure
See also
ComEmcySetId()

This function reads the identifier value used by the EMCY service.

◆ ComEmcyGetInhibit()

ComStatus_tv ComEmcyGetInhibit ( uint8_t  ubNetV,
uint32_t *  pulTimeV 
)
Parameters
[in]ubNetV- CANopen Network channel
[out]pulTimeV- Pointer to EMCY inhibit time
Returns
eCOM_ERR_NONE on success, negative ComErr_e value on failure
See also
ComEmcySetInhibit()

This function retrieves the inhibit time between two subsequent EMCY messages. The pointer pulTimeV points to a variable that holds the time value in multiples of one microsecond.