6 addressing operators, 1 adr, 2 contents operator – Lenze DDS v2.3 User Manual
Page 282: 7 call operator, 1 cal, Contents operator, Drive plc developer studio

Drive PLC Developer Studio
IEC 61131-3 Operators
12-12
l
DDS EN 2.3
12.6
Addressing operators
12.6.1
ADR
Addressing function
ADR
returns the data memory address of its argument in a DWORD. The determined address can be
assigned to a pointer within the project.
Examples
IL
ST
FBD
LD
var1
ADR
ST
pt
12.6.2
Contents operator
A pointer is de-referenced by means of the contents operator ^ behind the pointer identifier.
Examples
IL
Declaration
ST
Declaration
FBD
pt:POINTER TO INT;
var:int1:INT;
vat_int2:INT
Implementation
LD
var_int1
ADR
ST
pt
LD
pt^
ST
var_int2
pt:POINTER TO INT;
var_int1:INT;
var_int2:INT;
Implementation
pt := ADR(var_int1);
var_int2:=pt^;
12.7
Call operator
12.7.1
CAL
Calling up a function block
CAL
is used to call up the instance of a function block in IL.
The name of the instance of a function block is followed by the assignment of the input variables of
the function block in parentheses.
Example:
Calling up the instance Inst of a function block with the input variables
Par1
,
Par2
set to 0 or TRUE.
CAL INST(PAR1 := 0, PAR2 := TRUE)
Show/Hide Bookmarks