Get_Diag (Read Diagnostic Information) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Extended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
Table 8- 139 Example 3: PROFINET slave device "et200s_1" is disconnected (cable disconnected or
Byte with value
The modules in slots 1 through 20 (Bits 1 through 20) are all marked as defective since the device is
8.5.6

GET_DIAG (Read diagnostic information) instruction

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 8- 140 GET_DIAG instruction
LAD / FBD
Parameters
The following table shows the parameters of the "GET_DIAG" instruction:
358
power loss) from the PROFINET network. A value of 0xFFFF_1F00 is returned for
MODE 2 (Module defective).
Bit pattern with value
Byte 1 0xFF
Bit 7 1111-1111 Bit 0
Byte 2 0xFF
Bit 15 1111-1111 Bit 8
Byte 3 0x1F
Bit 23 0001-1111 Bit 16
Byte 4 0x00
Bit 31 0000-0000 Bit 24
missing.
MODE 5 (Problem in module) shows the same information as MODE 2 (Module defective).
SCL
ret_val := GET_DIAG(
mode:=_uint_in_,
laddr:=_word_in_,
cnt_diag=>_uint_out_,
diag:=_variant_inout_,
detail:=_variant_inout_);
Notes
Bit 0 is true; data is available.
Description
Reads the diagnostic information from an
assigned hardware device.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents