ROR (Rotation Right)
Rotates the DINT type input by NbR bits to the right in a circular form and fills the bits on the left 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]) |
ROR | Q | DINT | Right rotated value no effect if NbR <= 0 |
Example
(* FBD Program using "ROR" Function *)

(* ST Equivalence: *)
result := ROR (register, 2); (* register = 2#0011_0011_0010_1011_0011_0010_1001_1001 *) (* result = 2#0100_1100_1100_1010_1100_1100_1010_0110 *)
Provide Feedback