![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h/sysmac-c200h_operation-manual_742423136.webp)
123
5-13
Data Shifting
All of the instructions described in this section are used to shift data, but in
differing amounts and directions. The first shift instruction, SFT(10), shifts an
execution condition into a shift register; the rest of the instructions shift data
that is already in memory.
5-13-1
SHIFT REGISTER – SFT(10)
St: Starting word
IR, AR, HR, LR
E: End word
IR, AR, HR, LR
Operand Data Areas
Ladder Symbol
I
P
SFT(10)
St
E
R
E must be greater than or equal to St, and St and E must be in the same
data area.
If a bit address in one of the words used in a shift register is also used in an
instruction that controls individual bit status (e.g., OUT, KEEP(11)), an error
(“COIL DUPL”) will be generated when program syntax is checked on the
Programming Console or another Programming Device. The program, how-
ever, will be executed as written. See Example 2: Controlling Bits in Shift
Registers for a programming example that does this.
SFT(10) is controlled by three execution conditions, I, P, and R. If SFT(10) is
executed and 1) execution condition P is ON and was OFF the last execu-
tion, and 2) R is OFF, then execution condition I is shifted into the rightmost
bit of a shift register defined between St and E, i.e., if I is ON, a 1 is shifted
into the register; if I is OFF, a 0 is shifted in. When I is shifted into the regis-
ter, all bits previously in the register are shifted to the left and the leftmost bit
of the register is lost.
Execution
condition I
Lost
data
E
St+1, St+2, ...
St
The execution condition on P functions like a differentiated instruction, i.e., I
will be shifted into the register only when P is ON and was OFF the last time
SFT(10) was executed. If execution condition P has not changed or has gone
from ON to OFF, the shift register will remain unaffected.
St designates the rightmost word of the shift register; E designates the left-
most. The shift register includes both of these words and all words between
them. The same word may be designated for St and E to create a 16-bit (i.e.,
1-word) shift register.
When execution condition R goes ON, all bits in the shift register will be
turned OFF (i.e., set to 0) and the shift register will not operate until R goes
OFF again.
Flags
There are no flags affected by SFT(10).
Limitations
Description
Data Shifting
Section 5-13
Содержание SYSMAC C200H
Страница 1: ...OPERATION MANUAL C200H CPU01 E 03 E 11 E SYSMAC Programmable Controllers Cat No W130 E1 05 ...
Страница 2: ...C200H Programmable Controllers CPU01 E 03 E 11 E Operation Manual Revised June 2003 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 8: ...TABLE OF CONTENTS ix Glossary 345 Index 363 Revision History 369 ...
Страница 342: ...336 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage ...
Страница 374: ...Cat No W130 E1 05 C200H Programmable Controllers CPU01 E 03 E 11 E OPERATION MANUAL ...