5 mux, 5 comparison operators, 1 gt – Lenze DDS v2.3 User Manual

Page 280: Drive plc developer studio

Advertising
background image

Drive PLC Developer Studio

IEC 61131-3 Operators

12-10

l

DDS EN 2.3

12.4.5

MUX

Multiplexer

OUT := MUX(K, IN0,...,INn)

means:

OUT := INk.

IN0

, ... ,

INn

and

OUT

can be of any type.

K

must be of type BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT or UDINT.

MUX

selects the

K

th value from a number of values. If K is greater than the number of other

inputs (n), the last value will be passed on (INn).

Examples
IL

ST

FBD

LD

0

MUX 30,40,50,60,70,80
ST

Var1

(* Var1 = 30 *)

Tip!

For runtime optimization, the system now computes the expression attached to the input side of
INk

. Contrary to this, simulation computes all branches.

12.5

Comparison operators

Types:

The operands of the following comparison operators can be of type BOOL, BYTE, WORD, DWORD,
SINT

, USINT, INT, UINT, DINT, UDINT, REAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and

STRING

.

12.5.1

GT

Greater than

A Boolean operator with the result TRUE if the first operand is greater than the second operand.

Examples
IL

ST

FBD

LD

20

GT

30

ST

Var1

(* Var1 = FALSE *)

Var1 := 20 > 30;

Show/Hide Bookmarks

Advertising