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>.Stateproperty (3S CANopenDevicelibrary)<name in device tree>.GetDeviceStatemethod (CAA Device Diagnosislibrary)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:
PowerDownPowerUpResetResetCommunicationSwitchToOpSwitchToPreopSwitchToStopped
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)