101BExtended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
284
System Manual, 11/2011, A5E02486680-05
After execution, the STATE parameter contains the error state of each I/O device as a bit list
(for the specified LADDR and MODE).
The data type used for the STATE parameter can be any bit type (Bool, Byte, Word, or
DWord) or an array of a bit type.
Table 8- 107 Condition codes
RET_VAL (W#16#...)
Description
0
No error
8091
LADDR does not exist.
8092
LADDR does not address an I/O system.
80Bx
DeviceStates instruction not supported by the CPU for this LADDR.
8452
The complete state data is too large for STATE. The STATE parameter contains a partial
result.
8.5.3
ModuleStates instruction
Table 8- 108 ModuleStates instruction
LAD / FBD
SCL
Description
ret_val := ModuleStates(
laddr:=_word_in_,
mode:=_uint_in,
state:=_variant_inout);
Retrieves the I/O module operational states of
I/O devices. This information corresponds with
the STEP 7 diagnostics view.
Table 8- 109 Data types for the parameters
Parameter and type
Data type
Description
LADDR
IN
HW_IOSYSTEM
Logical address (Identifier for the I/O device)
MODE
IN
UInt
Status type:
1: Configured modules
2: Defective modules
3: Deactivated modules
4: Existing modules