EasyManua.ls Logo

Siemens S7-1200 - Page 123

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
System Manual, 03/2014, A5E02486680-AG
123
Table 4- 42 Overlay of a byte with a Boolean array
7
6
5
4
3
2
1
0
AT[0]
AT[1]
AT[2]
AT[3]
AT[4]
AT[5]
AT[6]
AT[7]
Another example is a DWord tag overlaid with a Struct:
The overlay types can be addressed directly in the program logic:
LAD
FBD
SCL
IF #AT[1] THEN
...
END_IF;
IF (#DW1_Struct.S1 =
W#16#000C) THEN
...
END_IF;
out1 := #DW1_Struct.S2;
Rules
Overlaying of tags is only possible in FB and FC blocks with standard access.
You can overlay parameters for all block types and all declaration sections.
An overlaid parameter can be used like any other block parameter.
You cannot overlay parameters of type VARIANT.
The size of the overlaying parameter must be less than or equal to the size of the overlaid
parameter.
The overlaying variable must be declared immediately after the variable that it overlays
and identified with the keyword "AT".
Lp ph th ch có th thc hin trong các khi FB và FC vi quyn truy cp thông thưng.
Bn có th che ph các tham s cho tt c các loi khi và tt c các phn khai báo.
Tham s chng chéo có th đưc s dng như bt k thông s khi nào khác.
Bn không th che ph các thông s ca loi VARIANT.
Kích thưc ca thông s lp ph phi nh hơn hoc bng kích thưc ca lp ph
tham s.
Biến lp ph phi đưc khai báo ngay lp tc sau biến mà lp ph
đưc xác đnh bng t khóa "AT".
Lp ph th ch có th thc hin trong các khi FB và FC vi quyn truy cp thông thưng.
Bn có th che ph các tham s cho tt c các loi khi và tt c các phn khai báo.
Tham s chng chéo có th đưc s dng như bt k thông s khi nào khác.
Bn không th che ph các thông s ca loi VARIANT.
Kích thưc ca thông s lp ph phi nh hơn hoc bng kích thưc ca lp ph
tham s.
Biến lp ph phi đưc khai báo ngay lp tc sau biến mà lp ph
đưc xác đnh bng t khóa "AT".

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals