ROL (Rotation Left)
Rotates the DINT type input by NbR bits to the left in a circular form and fills the bits on the right with the bits that are rotated.


Arguments | |||
---|---|---|---|
IN | IN | DINT | Any integer value |
NbR | NbR | DINT | Number of 1 bit rotations (in set [1..31]) |
ROL | Q | DINT | Left rotated value no effect if NbR <= 0 |
Example
(* FBD Program using "ROL" Function *)

(* ST Equivalence: *)
result := ROL (register, 1); (* register = 2#0100_1101_0011_0101*) (* result = 2#1001_1010_0110_1010*)
Provide Feedback