Omron CPM1 - PROGRAMING MANUAL 02-2001 Programming Manual page 428

Hide thumbs Also See for CPM1 - PROGRAMING MANUAL 02-2001:
Table of Contents

Advertisement

Shift Instructions
Example
00000
00001
00002
00003
00004
7-16-10 ASYNCHRONOUS SHIFT REGISTER – ASFT(17)
Limitations
Description
410
CY:
Receives the status of bit 00 of St or bit 15 of E, depending on the shift
direction.
In the following example, IR 00000, IR 00001, IR 00002, and IR 00003 are used
to control the bits of C used in @SFTR(84). The shift register is in DM 0010, and
it is controlled through IR 00004.
20012
20013
20014
20015
@SFTR(84)
200
DM 0010
DM 0011
Ladder Symbols
ASFT(17)
C
St
E
Note ASFT(17) is an expansion instruction for the SRM1(-V2). The function code 17 is
the factory setting and can be changed for the SRM1(-V2) if desired.
St and E must be in the same data area, and E must be greater than or equal to
St.
DM 6144 to DM 6655 cannot be used for St or E.
When the execution condition is OFF, ASFT(17) does nothing and the program
moves to the next instruction. When the execution condition is ON, ASFT(17) is
used to create and control a reversible asynchronous word shift register be-
tween St and E. This register only shifts words when the next word in the register
is zero, e.g., if no words in the register contain zero, nothing is shifted. Also, only
one word is shifted for each word in the register that contains zero. When the
contents of a word are shifted to the next word, the original word's contents are
set to zero. In essence, when the register is shifted, each zero word in the regis-
ter trades places with the next word. (See Example below.)
The shift direction (i.e. whether the "next word" is the next higher or the next low-
er word) is designated in C. C is also used to reset the register. All of any portion
of the register can be reset by designating the desired portion with St and E.
Address
Direction
00000
00001
00002
00003
Status to input
00004
00005
00006
Shift pulse
00007
00008
00009
Reset
@ASFT(17)
C
St
E
Section
Instruction
Operands
LD
00000
OUT
20012
LD
00001
OUT
20013
LD
00002
OUT
20014
LD
00003
OUT
20015
LD
00004
@SFTR(84)
200
DM
0010
DM
0011
Operand Data Areas
C: Control word
IR, SR, AR, DM, HR, LR, #
St: Starting word
IR, SR, AR, DM, HR, LR
E: End word
IR, SR, AR, DM, HR, LR
7-16

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents