Diagnosis in the Application
The state of the CAN bus can be interrogated via the CAA Device diagnosis interface. This is done by means of the function block CANbus_Diag
from the library CANbusDevice
. This function block is created implicitly for the CAN bus and can be addressed with the device name in the device tree.
Important
For this function, the device diagnosis has to be enabled.
The library CAA Can Low Level Extern
provides a bus diagnosis on the chip level. In an application with CAN-based fieldbus stacks, it normally should not be necessary to read this. These functions are normally used by the fieldbus stacks and provided to the application in a suitable way (see the chapter of the respective fieldbus). Therefore, the functions are for the most part required only if very special errors are examined or a CAN raw application is written.
The majority of diagnostic information is also displayed in the logger and on the status page of the CANbus.