COEmcyCnt
Description
This function returns the number of currently detected EMCY errors.
Prototype
CPU_INT16S COEmcyCnt(CO_EMCY *emcy);
Parameter | Description |
---|---|
emcy | pointer to the EMCY object |
Returned Value
>=0 the number of detected EMCY errors
<0 an error is detected inside of this function
Additional Information
This function can be removed from the CANopen device by disabling the emergency support with the configuration CO_EMCY.N
.
Example
The following example calculates the current number of detected emergency events within the application of the CANopen node AppNode.
CPU_INT16S emcy; : emcy = COEmcyCnt (&(AppNode.Emcy)); if (emcy < 0) { /* error handling */ } else { /* emcy holds number of detected emergencies */ } :