DVP15MC11T Operation Manual
8.10.4 ROR
FB/FC
Explanation Applicable model
FC
ROR is used to rotate all bits of a variable or constant by the specified
number of bits to the right and the result is output to Out.
DVP15MC11T
Parameters
Meaning
Description Valid range
In
Data to
rotate
Input
The original data to rotate
to the right
Depends on the data type of the
variable that the input parameter is
Num
Number of
bits
Input
which the bits of data are
Depends on the data type of the
variable that the input parameter is
Out Result Output
bits of the original data by
the number of bits
specified by Num to the
Depends on the data type of the
variable that the output parameter is
connected to.
Boolean
Bit string Integer
Real
number
Time, date
String
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In
●
● ● ● ● ● ● ●
Num
●
The data type of Out must be the same as In.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
ROR is used to rotate all bits of the value of In by the number of bits specified by Num to the right and the
result is output to Out.
Via ROR, the bits shifted out of the right will shift to the null bits in the left one by one. When Num=2, all
bits of the value of In rotates by two bits to the right. The rotation method is that Bit2~Bit7 are shifted to
Bit0~Bit5 respectively, Bit0 is shifted to Bit6 and Bit1 is shifted to Bit7.
8-130