Delta Electronics DVP15MC11T Operation Manual page 202

Table of Contents

Advertisement

B it 7
In
1
0
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if
any input variable is omitted. But the output variable is allowed to omit.
The value of Out is the same as In when the value of Num is 0.
The number of bits by which the bits of data are rotated to the right is equal to the value of Num
MOD In when the value of Num is greater than the number of bits of the value of In.
For example, if the data type of In is BYTE, the value of out when Num=USINT#1 is the same for
when Num=USINT#9.
Programming Example
The data types of ROR_In and ROR_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is BYTE and the value of Out1 is 32805 when
ROR_EN is TRUE.
The variable table and program
Variable name
ROR_EN
ROR_In
ROR_Num
Out1
Illustration of the example
ROR_I n
B it 15
Out 1
1
Num=2 , s hift ed b y two bits righ t
B it0
1
1
0
1
0
1
RO R_EN
ROR_In
RO R_ Nu m
Bit15
0
0
0
0
0
0
0
0
0
0
0
0
,
ROR_Num= 3 rotat ed by three b it s t o the right
Bit 7
0
1
1
0
1
1
Data type
BOOL
UINT
USINT
UINT
1
ROR
E N
ENO
I n
O ut
Out 1
Nu m
0
0
0
0
0
1
1
0
0
1
0
0
1
0
Chapter 8 Logic Instructions
Bit 0
0
1
Out
Current value
TRUE
300
3
32805
Bit0
0
0
1
1
B it0
1
8-131
8_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents