7: B
ASIC
I
NSTRUCTIONS
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
7-25
Reverse Shift Register (SFRN)
For reverse shifting, use the SFRN instruction. When SFRN instructions are programmed, two addresses are always
required. The SFRN instructions are entered, followed by a shift register number selected from appropriate device
addresses. The shift register number corresponds to the lowest bit number in a string. The number of bits is the second
required address after the SFRN instructions.
The SFRN instruction requires three inputs. The reverse shift register circuit must be programmed in the following order:
reset input, pulse input, data input, and the SFRN instruction, followed by the last bit and the number of bits.
Structural Diagram
I2
I0
R20
Reset
Data
I1
Pulse
R21
R22
R23
Shift Direction
Last Bit: R20
# of Bits: 7
R24
R25
R26
Note:
Output is initiated only for those bits highlighted in bold print.
Note:
When power is turned off, the statuses of all shift register bits are normally cleared. It is also possible to maintain the statuses
of shift register bits by using the Function Area Settings as required. See page 5-5.
The last bit status output can be programmed directly after the SFRN instruction. In this example, the status of bit R20 is read to out-
put Q0.
Each bit can be loaded using the LOD R# instructions.
For details of reset, pulse, and data inputs, see page 7-23.
Ladder Diagram
I0
I1
SFRN
R20
7
I2
Reset
Pulse
Data
R21
Last Bit
# of Bits
R23
R25
Instruction
Data
LOD
LOD
LOD
SFRN
OUT
LOD
OUT
LOD
OUT
LOD
OUT
I0
I1
I2
R20
7
Q0
R21
Q1
R23
Q2
R25
Q3
Program List
Q0
Q1
Q3
Q2
CPU Type
All-in-One CPU
Slim CPU
Last Bit
R0 to R127
R0 to R255
# of Bits
1 to 128
1 to 256
Caution
For restrictions on ladder programming of shift register instructions, see page 7-32.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]