Extended instructions
9.7 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
480 System Manual, V4.2, 09/2016, A5E02486680-AK
GET_DIAG (Read diagnostic information)
Description
You can use the "GET_DIAG" instruction to read out the diagnostic information of a
hardware device. The hardware device is selected with the LADDR parameter. With the
MODE parameter, you select which diagnostic information to read.
Table 9- 178 GET_DIAG instruction
mode:=_uint_in_,
laddr:=_word_in_,
cnt_diag=>_uint_out_,
diag:=_variant_inout_,
detail:=_variant_inout_);
Reads the diagnostic information from an
assigned hardware device.
The following table shows the parameters of the "GET_DIAG" instruction:
Table 9- 179 Data types for the parameters
MODE IN UInt Use the MODE parameter to select which diagnostic data is to be
Hardware ID of the device
Status of the instruction
Number of output diagnostic details
DIAG InOut Variant Pointer to data area for storage of diagnostic information of the se-
DETAILS InOut Variant Pointer to data area for storage of diagnostic details in accordance