Siemens SIMATIC S7-1200 Manual page 66

Easy book
Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

PLC concepts made easy
4.4 Memory areas, addressing and data types
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 4- 5
Overlay of a byte with a Boolean array
7
6
AT[0]
AT[1]
Another example is a DWord tag overlaid with a Struct:
The overlay types can be addressed directly in the program logic:
LAD
66
5
4
AT[2]
AT[3]
FBD
3
2
AT[4]
AT[5]
SCL
IF #AT[1] THEN
...
END_IF;
IF (#DW1_Struct.S1 =
W#16#000C) THEN
...
END_IF;
out1 := #DW1_Struct.S2;
1
0
AT[6]
AT[7]
Easy Book
Manual, 03/2014, A5E02486774-AF

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents