Skip to main content

Diagnosis in the Application

CANopen State

You can interrogate the state of a local CANopen slave in two different ways in the application:

  • <name in device tree>.State property (3S CANopenDevice library)

  • <name in device tree>.GetDeviceState method (CAA Device Diagnosis library)

    The method does not return a CANopen state, but the information whether the device is running or not. A mapping table between CANopenState and DEVICE_STATE is found in the library documentation of CANopenSlaveStack.

Moreover, the CANopen status can also be set. The following methods are available for this:

  • PowerDown

  • PowerUp

  • Reset

  • ResetCommunication

  • SwitchToOp

  • SwitchToPreop

  • SwitchToStopped

Access to the local object directory

The CANopen Slave provides an interface to access the local object directory (property ObjectDictionary). With this, you can read any object via the application, and for example, access the error register or the predefined error field.

Safety Diagnosis

In the case of Safety, the implicitly created function blocks with the prefix "S_" provide corresponding outputs for diagnosis. With these functions blocks, you can define whether the SRDO communication to a slave is active or whether the safe state has been reached.

Furthermore, the function block also provides inputs to acknowledge errors of an individual slave as well as temporarily deactivate the SRDO communication.

For more information, see: CANRemoteDeviceSafe and CANopenManagerSIL2 (FB)