Modulestates Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
8.5.5

ModuleStates instruction

You can use the ModuleStates instruction to return the status of all of the modules in a
PROFIBUS or PROFINET station.
Table 8- 129 ModuleStates instruction
LAD / FBD
Table 8- 130 Data types for the parameters
Parameter and type
LADDR
IN
MODE
IN
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
SCL
ret_val := ModuleStates(
laddr:=_word_in_,
mode:=_uint_in,
state:=_variant_inout);
Data type
Description
HW_DEVICE
Logical address (Identifier for the I/O modules)
UInt
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:
8.5 Diagnostics (PROFINET or PROFIBUS)
Description
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
hardware identifier can be found by selecting
the entire station in the network view and then
looking in the hardware identifier section
under properties. It can also be found by
looking for "Hw_Device" and "Hw_DpSlave"
data types in the system constants tab in the
PLC tag table.
1: Module configuration active
2: Module defective
3: Module disabled
4: Module exists
5: Problem in Module
Extended instructions
353
Table of Contents
loading

Table of Contents