P3: Basic PLC Program for SINUMERIK 840D sl
13.15 Programming tips with STEP 7
Basic Functions
Function Manual, 09/2011, 6FC5397-0BP40-2BA0
1081
Example 2: Transfer an ANY parameter constructed earlier to another FB (FC)
An ANY parameter that has already been compiled must be transferred to another FB (FC). This can be done
only by means of an ANY stored in VAR_TEMP.
Code
Comment
FUNCTIONBLOCK FB 100
VAR_INPUT
DBNumber: INT ;
DBOffset : INT ;
Data type: INT ;
Number: INT ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L
P##Temp_addr;
LAR1 ;
//Retrieve pointer from VAR_TEMP
L
B#16#10;
//ANY identifier
T
LB [AR1,P#0.0];
L
Data type;
T
LB [AR1,P#1.0];
L
Amount;
T
LW [AR1,P#2.0];
L
DBNumber;
T
LW [AR1,P#4.0];
L
DBOffset;
SLD 3;
//Offset is a bit offset
T
LD [AR1,P#6.0];
CALL FB 101, DB 100
(ANYPAR := #Temp_addr);
//ANYPAR is data type ANY
Содержание SINUMERIK 828D Turning
Страница 34: ...Basic Functions 34 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 146: ...A3 Axis Monitoring Protection Zones 2 6 Data lists Basic Functions 146 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 328: ...F1 Travel to fixed stop 6 5 Data lists Basic Functions 328 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 816: ...K2 Axis Types Coordinate Systems Frames 10 9 Data lists Basic Functions 816 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1198: ...P4 PLC for SINUMERIK 828D 14 6 Function interface Basic Functions 1198 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1752: ...Appendix 20 2 Overview Basic Functions 1752 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...
Страница 1774: ...Glossary Basic Functions 1774 Function Manual 09 2011 6FC5397 0BP40 2BA0 ...