4 ror, Drive plc developer studio – Lenze DDS v2.3 User Manual

Page 277

Advertising
background image

Drive PLC Developer Studio

IEC 61131-3 Operators

12-7

l

DDS EN 2.3

12.3.4

ROR

Rotating the bits of an operand to the right

Example IL:
LD 2#1001_0011

ROR 3

ST Var1

A:= ROR (IN, N)

ST Var1

(* Var1 = #0111_0010 *)

IN

is rotated by one bit position to the right N times, with the bit being on the extreme right being

reinserted from the left.

Tip!

The number of bits for the arithmetic operation is specified by the data type of input variable IN. A
constant is considered as the lowest-order data type. The data type of the output variable has no
effect on the arithmetic operation.

Show/Hide Bookmarks

Advertising