EasyManua.ls Logo

Siemens S7-1200 - GET_DIAG (Read Diagnostic Information) Instruction

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
358 System Manual, 03/2014, A5E02486680-AG
Table 8- 139 Example 3: PROFINET slave device "et200s_1" is disconnected (cable disconnected or
power loss) from the PROFINET network. A value of 0xFFFF_1F00 is returned for
MODE 2 (Module defective).
Byte with value
Bit pattern with value
Notes
Byte 1 0xFF
Bit 7 1111-1111 Bit 0
Bit 0 is true; data is available.
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
The modules in slots 1 through 20 (Bits 1 through 20)
are all marked as defective since the device is
missing.
MODE 5 (Problem in module) shows the same information as MODE 2 (Module defective).
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
SCL
Description
ret_val := GET_DIAG(
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.
Parameters
The following table shows the parameters of the "GET_DIAG" instruction:

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals