Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Description

This function checks the current error state and updates the object directory. The EMCY message is transmitted, if the error is detected for the first time. The given manufacturer specific fields are optional, e.g. the pointer may be 0 to set all manufacturer specific values to 0.

Prototype

void COEmcySet(CO_EMCY *emcy, CPU_INT08U err, CO_EMCY_USR *usr);

ParameterDescription
emcy pointer to the EMCY object
err EMCY error identifier in User EMCY table
usr manufacturer specific fields in EMCY history and/or EMCY message

Returned Value

none

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 demonstrates the detection of an emergency event APP.EMCY_2 within the application of the CANopen node AppNode. The specific user information data for this event is: 0x1234567890.

Note: The specific user information data field is optional. If not used, the last parameter during calling COEmcySet() can be 0 (zero). The emergency identifier APP_EMCY.2 must be defined within the application specific configuration. See CANopen Config Manual for details.

  • No labels