Extended instructions
9.7 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
469
After execution, the STATE parameter contains the error state of each I/O device as a bit list
(for the assigned LADDR and MODE).
Table 9- 158 Condition codes
8091 LADDR does not exist.
LADDR does not address an I/O system.
8093 Invalid data type assigned for STATE parameter: Valid data types are (Bool, Byte, Word, or
Dword), or an array of (Bools, Bytes, Words, or Dwords)
DeviceStates instruction not supported by the CPU for this LADDR.
8452 The complete state data is too large for the assigned STATE parameter. The STATE buffer
contains a partial result.
DeviceStates example configurations
PROFIBUS example
The PROFIBUS example consists of the following:
● 16 PROFIBUS devices named "DPSlave_10" through "DPSlave_25"
● The 16 PROFIBUS devices use PROFIBUS addresses 10 through 25, respectively.
● Each slave device is configured with multiple I/O modules.
● The first four bytes of the returned STATE parameter information is displayed.
Example 1:
Normal operation with
no errors
Example 2:
PROFIBUS slave de-
vice DPSlave_12 with
single module pulled
Example 3:
PROFIBUS slave
device DPSlave_12
disconnected
1: Device configuration
0x01FC_FF03 0x01FC_FF03 0x01FC_FF03
The following four tables show a binary breakdown of the four bytes of data that are being
analyzed: