Siemens SINUMERIK 840Di Function Manual page 1173

Basic machine
Hide thumbs Also See for SINUMERIK 840Di:
Table of Contents

Advertisement

FUNCTIONBLOCK FB 100
CODE_VERSION1
VAR_INPUT
WhichAny : INT ;
Addr1 : ANY ;
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L
WhichAny;
DEC 1;
L
P#10.0;
*I;
LAR2;
L
P##Addr1;
+AR2;
//Add ANY start addresses
L
P##Temp_addr;
LAR1 ;
//Retrieve pointer from VAR_TEMP
L
DID [AR2,P#0.0];
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);
Power Line Basic PLC Program (P3)
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
Note
Address register AR2 is used in the block. However, this register is also used for multi-
instance DBs. For this reason, the relevant FB must not be declared as a multiinstance
DB.
2.14 Useful tips on programming with STEP 7
Comment
//To deactivate multi-instance DB with STEP 7 Version
2 and higher
//Observe predetermined order
//10 bytes per ANY
//Transfer pointer value to VAR_TEM
//ANYPAR is data type ANY
Detailed description
2-261

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents