EasyManua.ls Logo

Siemens S7-1200 - Modulestates Example Configurations

Siemens S7-1200
1028 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Extended instructions
8.5 Diagnostics (PROFINET or PROFIBUS)
S7-1200 Programmable controller
354 System Manual, 03/2014, A5E02486680-AG
Parameter and type
Data type
Description
RET_VAL
OUT
Int
Status (condition code)
STATE
1
InOut Variant 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.
1
A maximum of 128 bits can be assigned. The number of bits required is dependent on your I/O module usage.
Table 8- 131 Condition codes
RET_VAL ( W#16#...)
Description
0
No error
8091
Module identified by LADDR does not exist.
8092
Module identified by LADDR does not address an I/O device.
8093 Invalid data type for STATE parameter: Valid data types are (Bool, Byte, Word, or Dword), or
an array of (Bools, Bytes, Words, or Dwords).
80Bx
ModuleStates instruction not supported by this CPU for this LADDR.
8452 The complete state data is too large for the assigned STATE parameter. The STATE buffer
contains a partial result.
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.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals