EasyManuals Logo

IDEC MICRO3 User Manual

IDEC MICRO3
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #170 background imageLoading...
Page #170 background image
13: BIT SHIFT / ROTATE INSTRUCTIONS
USERS MANUAL 13-3
53 ROTL (Rotate Left)
Key Operation
Valid Operands (Standard Processing)
In the high-speed processing mode, data registers for this instruction are limited to D0 through D31.
Since the bit rotate instructions are executed in each scan while input is on, a pulse input from an SOTU or SOTD instruc-
tion should be used as required.
Example: ROTL
Operand Function I Q M T C R D Constant Repeat
S1 (Source 1) Data for bit rotation ——————0-99
bit Quantity of bits to rotate ——————— 1-15
ROTL S1
****
bit
**
When input is on, 16-bit data of the data register designated by S1 is rotated to the
left by the quantity of bits designated by operand bit. The last bit status rotated out
of the data register is set to a carry (special internal relay M303).
Before rotation: 1 0 1010 1 0 1 1 1101 0 0
CY
M303
MSB LSB
S1
When bits to rotate = 1
1After rotation: 0 1010 1 0 1 1 1101 0 0
CY
M303
MSB LSB
S1
1
Rotate to the left
ADV
2 S1
ROTL
( ) : 1bit
5
CC=
3
BPP
Enter operand S1 and the quantity of bits to rotate.
Repeat cannot be designated for bit rotate instructions.
To exit, press the key.
M301
ROTL
REP
**
M301 is the initialize pulse special internal relay.
When MICRO
3
starts operation, the MOV (move) instruction sets 40966 to
data register D10.
Each time input I0 is turned on, 16-bit data of data register D10 is rotated to
the left by 1 bit as designated by operand bit. The status of the MSB is set
to a carry (special internal relay M303).
Before rotation: D10 = 40966
1 1 0000 0 0 0 0 1100 0 0
CY
M303
MSB LSB
D10
After first rotation: D10 = 16397
Bits to rotate = 1
SOTU
I0
MOV S1
40966
D1
D10
S1
D10
bit
1
After second rotation: D10 = 32794
1 0 0 0001 0 0 0 0 0100 1 1
CY
M303
MSB LSB
D10
0 1 0 0000 0 0 0 0 1010 1 0
CY
M303
MSB LSB
D10

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IDEC MICRO3 and is the answer not in the manual?

IDEC MICRO3 Specifications

General IconGeneral
BrandIDEC
ModelMICRO3
CategoryController
LanguageEnglish

Related product manuals