Siemens SINUMERIK 840Di Function Manual page 1174

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

Advertisement

Detailed description
2.14 Useful tips on programming with STEP 7
1. An ANY parameter that has already been compiled must be transferred to another FB
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 ;
L
B#16#10;
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);
2.14.4
Multi-instance DB
Multi-instance DB
With version 2 and higher of STEP 7, FBs might have a multi-instance capability, i.e., they
might incorporate multi-instance DBs. The primary characteristic of multi-instance DBs is that
they can be used for various instances of FBs (see STEP 7 documentation), thus allowing
the DB data quantity to be optimized.
Multi-instance DBs should be activated only when they are actually going to be used since
they increase the runtime and code size of the FBs.
2-262
(FC). This can be done only by means of an ANY stored in VAR_TEMP
Comment
//Retrieve pointer from VAR_TEMP
//ANY identifier
//ANYPAR is data type ANY
Function Manual, 08/2005 Edition, 6FC5397-0BP10-0BA0
Power Line Basic PLC Program (P3)

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents