beautypg.com

NORD Drivesystems BU0550 User Manual

Page 35

background image

3 AWL (Instruction List, IL)

BU 0550 GB-0813

35

3.2.4.9

SHR

Bit-wise right shift of the accumulator. Here, the contents of the accumulator are shifted n times to the right.
The bits which are pushed out are lost.

BOOL

BYTE

INT

DINT

Possible data types

X

X

X

Commands

Explanation

LD 175

Loads the value 1010_1111

SHR 2

The contents of the accumulator are shifted 2x to the
right

ST Value1

Saves the value 0010_1011 in Value1

Table 36 SHR

3.2.4.10 S and R

Setting and resetting of a boolean variable if the result of the previous link (the AE) was TRUE.

BOOL

BYTE

INT

DINT

Possible data types

X

Commands

Explanation

LD TRUE

Loads the AE with TRUE

S Var1

VAR1 is set as TRUE

R Var1

VAR1 is set as FALSE

Table 37 S and R

3.2.4.11 XOR and XOR(

Bit-wise "Exclusive OR" link between the AE/Accumulator and one or two variables or constants. The first
value is in the AE/Accumulator, the second is loaded with the command or is inside the bracket. Up to 6
bracket levels are possible.

The values to be linked must belong to the same type of variable.

BOOL

BYTE

INT

DINT

Possible data types

X

X

X

X

Commands

Explanation

LD 2#0000_1111

XOR 2#0011_1010

XOR link between 2 constants

Accu = 2#0011_0101

LD 170

Link between a constant and 2 variables.

XOR Var1, Var2

Accu = 170d XOR Var1 XOR Var2

LD Var1

XOR ( Var2

AE/Accu = Var1 XOR ( Var2 OR Var3 )

OR Var3

)

Table 38 XOR or XOR(

AE/Accu

Operand

Result

0

0

0

0

1

1

1

0

1

1

1

0