Sftl (Shift Left) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

9: S
/ R
HIFT
Introduction
Bit shift instructions are used to shift the data string starting with source device S1 to the left or right by 1 to 15 bits as designated.
The data string can be 1 to 65,535 bits. The result is set to the source device S1 and special internal relay M8003 (carry or
borrow). The LSB or MSB is filled with 0 or 1 as designated.
Bit shift and rotate instructions are used to shift the 16- or 32-bit data string in the designated source device S1 to the left or right
by the quantity of bits designated. The result is set to the source device S1 and special internal relay M8003 (carry or borrow).
The BCD left shift instruction shifts the BCD digits in two consecutive data registers to the left.
The word shift instruction is used to move 16-bit data to a destination data register and shifts down the data of subsequent data
registers as many as designated.

SFTL (Shift Left)

SFTL
*****
S2 = 0, N_B = 16, Bits = 1
Before shift:
After shift:
Valid Devices
Device
S1 (Source 1)
S2 (Source 2)
N_B
Bits
For valid device address ranges, see "Device Addresses" on page 2-1.
Special internal relays cannot be designated as S1.
Since the SFTL instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
I
OTATE
S1
S2
N_B
Bits
*****
*****
CY
MSB
1
0
0
1
M8003
CY
MSB
1
0
0
1
1
M8003
Function
First data for bit shift
Data to shift into the LSB
Number of bits in the data string
Quantity of bits to shift
FC6A S
MICROS
ERIES
MART
NSTRUCTIONS
CY ← S1
When input is on, N_B-bit data string starting with source device S1 is shifted
**
to the left by the quantity of bits assigned by device Bits.
The result is set to source device S1, and the last bit status shifted out is set to
special internal relay M8003 (carry or borrow). Zero or 1 assigned by source
device S2 is set to the LSB.
S1
1
0
1
0
1
1
1
0
Shift to the left
S1
0
1
0 1
1
1
0
0
I
Q
X
X
X
L
P
M
ADDER
ROGRAMMING
S2
LSB
0
1
1
0
0
LSB
1
1
0
0
M
R
T
C
D
P
X
X
X
X
X
X
FC9Y-B1726
ANUAL
Constant
Repeat
0 or 1
1-65,535
1-15
9-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents