EasyManua.ls Logo

Siemens S7-1200 - Accessing a Tag with an at Overlay

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...
PLC concepts
4.4 Data types
S7-1200 Programmable controller
122 System Manual, 03/2014, A5E02486680-AG
Examples
In the PLC tag table, "DW" is a declared tag of type DWORD. The examples show bit, byte,
and word slice access:
LAD
FBD
SCL
Bit access
IF "DW".x11 THEN
...
END_IF;
Byte access
IF "DW".b2 = "DW".b3
THEN
...
END_IF;
Word access
out:= "DW".w0 AND
"DW".w1;
4.4.11
Accessing a tag with an AT overlay
The AT tag overlay allows you to access an already-declared tag of a standard access block
with an overlaid declaration of a different data type. You can, for example, address the
individual bits of a tag of a Byte, Word, or DWord data type with an Array of Bool.
Declaration
To overlay a parameter, declare an additional parameter directly after the parameter that is
to be overlaid and select the data type "AT". The editor creates the overlay, and you can
then choose the data type, struct, or array that you wish to use for the overlay.
Example
This example shows the input parameters of a standard-access FB. The byte tag B1 is
overlaid with an array of Booleans:

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals