Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 사용자 설명서

제품 코드
6AV6651-7KA01-3AA4
다운로드
페이지 364
PLC concepts made easy 
 
4.4 Memory areas, addressing and data types 
 
Easy Book 
66
 
Manual, 03/2014, A5E02486774-AF 
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 
 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;