![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_742030402.webp)
362
Data Shift Instructions
Section 3-9
Description
When the execution condition on the shift input changes from OFF to ON, all
the data from St to E is shifted to the left by one bit (from the rightmost bit to
the leftmost bit), and the ON/OFF status of the data input is placed in the
rightmost bit.
Flags
Precautions
The results will not be predictable if two SFT(010) instructions are used with
overlapping shift registers. All words in the range ST to E must be used in only
one SFT(010) instruction.
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.
When St and E are designated indirectly using index registers and the actual
addresses in I/O memory are not within memory areas for data, an error will
occur and the Error Flag will turn ON.
Examples
Shift Register Exceeding 16 Bits
The following example shows a 48-bit shift register using words CIO 0128 to
CIO 0130. A 1-s clock pulse is used so that the execution condition produced
by CIO 000005 is shifted into a 3-word register between CIO 012800 and
CIO 013015 every second.
3-9-2
REVERSIBLE SHIFT REGISTER: SFTR(084)
Purpose
Creates a shift register that shifts data to either the right or the left.
E
Status of data input
for each shift input
Lost
St+1, St+2, ...
St
Name
Label
Operation
Error Flag
ER
ON if the indirect IR address for St and E is not in the CIO,
AR, HR, or WR data areas.
OFF in all other cases.
E: CIO 0130
CIO 0129
CIO 0128
(1-s clock)
Reset
Shift input
Data input
Lost
Contents of
CIO 000005
St+1:
St:
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...