EasyManuals Logo

Siemens Sinumerik 840 sl Function Manual

Siemens Sinumerik 840 sl
2184 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
Page #1258 background imageLoading...
Page #1258 background image
Detailed description
2.14 Programming tips with STEP 7
Basic logic functions: PLC Basic program powerline (P3 pl)
274 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
FUNCTIONBLOCK FB 100 Comment
L
P##Addr1;
+AR2;
//Add ANY start addresses
L
P##Temp_addr;
LAR1 ;
//Retrieve pointer from VAR_TEMP
L
DID [AR2,P#0.0]; //Transfer pointer value to VAR_TEM
T
LD [AR1,P#0.0];
L
DID [AR2,P#4.0];
T
LD [AR1,P#4.0];
L
DIW [AR2,P#8.0];
T
LW [AR1,P#8.0];
CALL FB 101, DB 100
(ANYPAR := #Temp_addr); //ANYPAR is data type ANY
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 Comment
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;

Table of Contents

Other manuals for Siemens Sinumerik 840 sl

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Sinumerik 840 sl and is the answer not in the manual?

Siemens Sinumerik 840 sl Specifications

General IconGeneral
BrandSiemens
ModelSinumerik 840 sl
CategoryControl Unit
LanguageEnglish

Related product manuals