Siemens SINUMERIK 840D sl Function Manual page 1258

Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Detailed description
2.14 Programming tips with STEP 7
FUNCTIONBLOCK FB 100
P##Addr1;
L
+AR2;
P##Temp_addr;
L
LAR1 ;
DID [AR2,P#0.0];
L
LD [AR1,P#0.0];
T
DID [AR2,P#4.0];
L
LD [AR1,P#4.0];
T
DIW [AR2,P#8.0];
L
LW [AR1,P#8.0];
T
CALL FB 101, DB 100
(ANYPAR := #Temp_addr);
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
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 =
P##Temp_addr;
L
LAR1 ;
B#16#10;
L
LB [AR1,P#0.0];
T
Data type;
L
LB [AR1,P#1.0];
T
Amount;
L
LW [AR1,P#2.0];
T
DBNumber;
L
LW [AR1,P#4.0];
T
DBOffset;
L
274
Comment
//Add ANY start addresses
//Retrieve pointer from VAR_TEMP
//Transfer pointer value to VAR_TEM
//ANYPAR is data type ANY
Comment
//Retrieve pointer from VAR_TEMP
//ANY identifier
Basic logic functions: PLC Basic program powerline (P3 pl)
Function Manual, 11/2006, 6FC5397-0BP10-2BA0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840di slSinumerik 840dSinumerik 840diSinumerik 810dSinumerik 840d powerlineSinumerik 840de powerline ... Show all

Table of Contents