Extended instructions
9.7 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
474 System Manual, V4.2, 09/2016, A5E02486680-AK
You can use the ModuleStates instruction to return the status of all of the modules in a
PROFIBUS or PROFINET station.
Table 9- 167 ModuleStates instruction
laddr:=_word_in_,
mode:=_uint_in,
state:=_variant_inout);
ModuleStates retrieves the operational states
of I/O modules. After execution, the STATE
parameter contains the error state of each I/O
module in a bit list (for the assigned LADDR
and MODE). This information corresponds
with the module status seen in the STEP 7
diagnostics view.
The LADDR input of ModuleStates uses is a
hardware identifier of a distributed I/O station
and not of the head module itself. The hard-
ware identifier can be found by selecting the
entire station in the network view and then
looking in the hardware identifier section un-
der properties. It can also be found by looking
for "Hw_Device" and "Hw_DpSlave" data
types in the system constants tab in the PLC