Extended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
Table 8- 119 Data types for the parameters
Parameter and type
LADDR
IN
MODE
IN
RET_VAL
OUT
STATE
InOut
1
For PROFIBUS-DP, the length of the status information is 128 bits. For PROFINET I/O, the length is 1024 bits.
1
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 8- 120 Condition codes
RET_VAL (W#16#...)
0
8091
8092
8093
80Bx
8452
348
Data type
HW_IOSYSTEM
UInt
Int
Variant
Description
No error
LADDR does not exist.
LADDR does not address an I/O system.
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.
The complete state data is too large for the assigned STATE parameter. The STATE buffer
contains a partial result.
Description
Logical address: (Identifier for the I/O system)
Supports five modes of operation. The MODE input determines
which data will be returned to the location specified for STATE
information. The modes are as follows:
1: Device configuration active
•
2: Device defective
•
3: Device disabled
•
4: Device exists
•
5: Problem in Device
•
Execution condition code
Buffer that receives the error status of each device: The data type
that you choose for the STATE parameter can be any bit type
(Bool, Byte, Word, or DWord) or an array of a bit type
Bit 0 of the first byte of the returned STATE data is a summary
•
bit. When it is set to TRUE, it indicates that other data is
available.
The data returned by the STATE parameter shows a one-to-
•
one correlation between a bit location and a distributed I/O
address. This device addressing is TRUE for PROFIBUS and
PROFINET. For example, Bit 4 in the first Byte correlates to
PROFIBUS address 4 or PROFINET device number 4.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG