Manual

Table Of Contents
Interface Functions 52
Doc.Id. HMSI-216-117
CM CANopen Module for SIMATIC S7-1200
Doc.Rev. 1.00
8.2.4 Get Diagnostic Information
Input Parameters
Output Parameters
Description
If a diagnostic message, related to the Transparent CAN network status, is active, information on the
cause of the message can be read by using the RDREC function block to issue a request to record
number 0092h. You will receive the information in the parameter RECORD in the response.
Contents of Parameter RECORD
The parameter RECORD holds all diagnostic information, as described in the table below.
Error Codes
Name Data type Description
REQ Bool Starts the function. Has to be set to TRUE for one scan cycle.
ID HW_IO Logical address of the CANopen module.
INDEX Byte, Dint, Int, Sint, Uint, Usint, Word Data record number. Should be set to 0092h.
MLEN Byte, Usint, Usint Length in bytes of the data to be read. The value should cor-
respond to the length of the data area in RECORD.
Name Data type Description
BUSY Bool The reading process is not yet complete, if this parameter is set to TRUE.
VALID Bool If set to TRUE, new data record was received and is valid.
ERROR Bool If TRUE, an error occurred during the reading process.
STATUS Dword Block status or error information, see “Message Error Codes” on page 60.
LEN Uint Length of the data that is read.
RECORD Variant Destination area for the read data, see table below for contents.
The user has to ensure that the data area is able to hold all data.
Offset Data type Description Definition
0 Uint16 Number of Errors Current number of errors in the module
2 Uint16 Diagnostic Error 1 Error code, see “Error Codes” on page 52
4 Uint16 Data length Error 1 Length of additional information
6 - Unit16 Additional error infor-
mation
Additional information for Error 1
... ... ... Additional errors with the same structure as Error 1.
Error
Code
Description Definition Additional Information
3 BUSOFF error The CAN controller of the CM CANopen has reached a
BUS OFF state, e.g. due to a bad network connection or
a faulty baud rate.
10 Transparent CAN
event
When running Transparent CAN mode this diagnostic is
triggered by an event in the CM CANopen module.
See “Transparent CAN Status
Field” on page 53 for additional
error information in the status
field.