EasyManuals Logo

IDEC OpenNet series User Manual

IDEC OpenNet series
427 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 #192 background imageLoading...
Page #192 background image
13: BIT SHIFT / ROTATE INSTRUCTIONS
OPENNET CONTROLLER USERS MANUAL 13-9
ROTLC (Rotate Left with Carry)
Valid Operands
For the valid operand number range, see page 6-2.
Internal relays M0 through M2557 can be designated as S1. Special internal relays cannot be designated as S1.
The quantity of bits to rotate can be 1 through 15 for the word data type, or 1 through 31 for the double-word data type.
Since the ROTLC instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction
should be used as required.
Valid Data Types
When a bit operand such as Q (output), M (internal relay), or R (shift register) is designated as the source, 16 points (word
data type) or 32 points (double-word data type) are used.
When a word operand such as D (data register) or L (link register) is designated as the source, 1 point (word data type) or
2 points (double-word data type) are used.
Operand Function I Q M R T C D L Constant Repeat
S1 (Source 1) Data for bit rotation X X —— XX ——
bits Quantity of bits to rotate ————————1-15, 1-31
W (word) I (integer) D (double word) L (long)
X X
When input is on, the 16- or 32-bit data designated by S1 and a carry (special
internal relay M8003) are rotated to the left by the quantity of bits designated
by operand bits.
The last bit status rotated out of the source operand is set to a carry (M8003),
and the carry status is set to the LSB of the source operand.
ROTLC(*) S1
*****
bits
**
0Before rotation: 1 0 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
1After rotation: 1 100 10 0 1 1 0 001 0 1
CY
M8003
MSB LSB
S1
1
Rotate to the left
• Data Type: Word (bits to rotate = 1)
0
Before rotation:
1 0 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
1
After rotation:
00 1010 1 0 1 1 1101 0 0
CY
M8003
MSB LSB
S1
Rotate to the left
10 1010 1 0 1 1 1101 0 0
1 0 1010 1 0 1 1 1101 0 0
• Data Type: Double Word (bits to rotate = 1)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

IDEC OpenNet series Specifications

General IconGeneral
BrandIDEC
ModelOpenNet series
CategoryController
LanguageEnglish

Related product manuals