11 operator list, 1 dds-integrated iec operators, Drive plc developer studio – Lenze DDS v2.3 User Manual

Page 267

Advertising
background image

Drive PLC Developer Studio

IEC 61131-3 Operators

11-1

l

DDS EN 2.3

11

Operator list

The table below lists the operators in ST and IL with the modifiers available in IL.

Column Operator IL displays only the line, using the operator.

Prerequisite:
The first required operator must have been loaded in the preceding line (e. g. LD in)

Column Mod.IL lists the modifiers available in IL.

C

The instruction will be carried out only if the result of the preceding expression is TRUE.

N

For JMPC, CALC, RETC The instruction will be carried out only if the result of the preceding expression is FALSE.

N

Otherwise Negation of the operand (not of the accumulator).

(

Parentheses frame operator; the operation in front will be executed only after the right parenthesis has been reached.

11.1

DDS-integrated IEC operators

Operator ST

Operator IL

Mod.IL

Meaning

String frame (e.g. ’string1’)

..
[ ]

Array: Representation of the array range (e.g. ARRAY[0..3] OF
INT)

:

Separator between operand and type in the declaration (e.g.
var1 : INT;)

;

Closing instruction (e.g. a:=var1;)

^

Dereference pointer (e.g. pointer1^)

LD var1

N

Load value of var1 into the accumulator

:=

ST var1

N

Save current result at operand position var1

S boolvar

Set Boolean operand boolvar to TRUE exactly if the current
result is TRUE

R boolvar

Set Boolean operand to FALSE exactly if the current result is
TRUE

JMP label

CN

Jump to label

<Program name>

CAL prog1

CN

Call program prog1

<Instance name>

CAL inst1

CN

Call function block instance inst1

<Fktname>(vx, vy,..)

<Fktname> vx, vy

CN

Call function and transfer variables vx, vy

RETURN

RET

CN

Exit organization unit and, if necessary, return to calling unit.

(

Value following the parenthesis is taken as the operand, the
preceding operation is put on hold until the right parenthesis is

reached

)

Evaluate operation on hold

AND

AND

N,(

Bit-by-bit AND

OR

OR

N,(

Bit-by-bit OR

XOR

XOR

N,(

Bit-by-bit exclusive OR

NOT

NOT

Bit-by-bit NOT

+

ADD

(

Addition

-

SUB

(

Subtraction

*

MUL

(

Multiplication

/

DIV

(

Division

>

GT

(

Greater than

>=

GE

(

Greater than/equal to

=

EQ

(

Equal to

<>

NE

(

Not equal to

<=

LE

(

Less than/equal to

Show/Hide Bookmarks

Advertising