3. Instructions
Function
When the execution condition of
the shift input bit (bit 14 of C)
changes to ON, all the data from
St to E is moved in the designated
shift direction (designated by bit
12 of C) by 1 bit, and the ON/OFF
status of the data input is placed
in the rightmost or leftmost bit.
The bit data shifted out of the shift
register is placed in the Carry
Flag (CY)
Note
• The above shift operations are applicable when the reset bit (bit 15 of C) is set to OFF.
• When reset (bit 15 of C) turns ON all bits in the shift register, from St to E will be reset (i.e., set to 0).
Sample program
• Shifting Data
If shift input CIO 300.14 goes ON when CIO 0.00 is ON, and the reset bit CIO 300.15 is OFF, words
CIO 100 through CIO 102 will shift one bit in the direction designated by CIO 300.12 (e.g., 1: Right) and
the contents of input bit CIO 300.13 will be shifted into the rightmost bit, CIO 100.00. The contents of
CIO 102.15 will be shifted to the Carry Flag (CY).
0.00
C
St
E
• Resetting Data
If CIO 300.14 is ON when CIO 0.00 is ON, and the reset bit, CIO 300.15, is ON, words CIO 100 through
CIO 102 and the Carry Flag will be reset to OFF.
Controlling Data
Resetting Data
Shifting Data Left (from Rightmost to Leftmost Bit)
Shifting Data Right (from Leftmost to Rightmost Bit
Data
input
302
E
E
Data input
C: 300
Shift direction
Shift input bit: 1
Reset input bit: 0
All bits from St to E and the Carry Flag are set to 0 and
no other data can be received when the reset input bit
(bit 15 of C) is ON.
When the shift input bit (bit 14 of C) is ON, the contents
of the input bit (bit 13 of C) is shifted to bit 00 of the start-
Data
ing word, and each bit thereafter is shifted one bit to the
input
left. The status of bit 15 of the end word is shifted to the
Carry Flag.
When the shift input bit (bit 14 of C) is ON, the contents
of the input bit (bit 13 of C) (I/O) is shifted to bit 15 on the
end word, and each bit thereafter is shifted one bit to the
right. The status of bit 00 of the starting word is shifted to
the Carry Flag.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
St
Data input
St
Shift direction
Data input:
CIO 300.13
Need help?
Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?
Questions and answers