ROR (rotate right)

The ROR instruction rotates the DINT type input by NbR bits to right in a circular form and fills the bits on the left with the bits that are rotated.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
ROR
ROR
ROR
ROR parameters
Parameter
Parameter Type
Data Type
Description
EN
Input
BOOL
When set to true, the instruction is enabled.
  • TRUE: Execute the current computation.
  • FALSE: There is no computation.
Applies to ladder diagram programs.
IN
Input
DINT
Any integer value.
NbR
Input
DINT
Number of 1-bit rotations (in set [1..31]).
ROR
Output
DINT
Right rotated value. There is no effect if NbR <= 0.
ENO
Output
BOOL
Enables output. Applies to ladder diagram programs.

ROR examples

ROR function block diagram example
ROR function block diagram example
ROR ladder diagram example
ROR ladder diagram example
ROR structured text example
ROR structured text example
(* ST Equivalence: *) result := ROR (register, 1); (* register = 2#0100_1101_0011_0101 *) (* result = 2#1010_0110_1001_1010 *)
Results
Results
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal