3. Instructions
308
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Precautions
• Do not use more than one SFT(010) instructions with overlapping shift words. The results will not be
dependable.
• St and E must be in the same data area.
• The bit data shifted out of the shift register is discarded.
• When the reset input turns ON, all bits in the shift register from the rightmost designated word (St) to
the leftmost designated word (E) will be reset (i.e., set to 0). The reset input takes priority over other
inputs.
• St must be less than or equal to E, but even when St is set to greater than E an error will not occur
and one word of data in St will be shifted.
Example Programming
z Shift Register Exceeding 16 Bits
The following example shows a 48-bit shift register using words CIO 128 to CIO 130. A 1-s clock pulse
is used so that the execution condition produced by CIO 0.05 is shifted into a 3-word register between
CIO 128.00 and CIO 130.15 every second.
i
E: 130CH 129CH 128CH
1s (1-s clock)
Reset
Shift input
Data input
Lost
Contents of
0.05
St+1: St:
0.05
0.06