Modulestates Example Configurations - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
Extended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
Parameter and type
RET_VAL
OUT
STATE
InOut
1
A maximum of 128 bits can be assigned. The number of bits required is dependent on your I/O module usage.
1
Table 8- 131 Condition codes
RET_VAL ( W#16#...)
0
8091
8092
8093
80Bx
8452
8.5.5.1

ModuleStates 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 example uses the LADDR parameter of PROFIBUS slave "DPSlave_12" which
contains a head module, a power module, and two I/O modules.
● The first four bytes of the returned STATE parameter information is displayed.
354
Data type
Int
Variant
Description
No error
Module identified by LADDR does not exist.
Module identified by LADDR does not address an I/O device.
Invalid data type for STATE parameter: Valid data types are (Bool, Byte, Word, or Dword), or
an array of (Bools, Bytes, Words, or Dwords).
ModuleStates instruction not supported by this CPU for this LADDR.
The complete state data is too large for the assigned STATE parameter. The STATE buffer
contains a partial result.
Description
Status (condition code)
Buffer that receives the error status of each module: The data type
you use 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 module position.
This slot addressing is TRUE for PROFIBUS and PROFINET.
For example, for an ET 200S with a head module, power
module, and a pair of I/O modules, Bit 1 in the first Byte
correlates to the head module, Bit 2 to the power module, and
Bits 3 and 4 to the I/O modules, respectively.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Table of Contents
loading

Table of Contents