Omron C200HE ユーザーズマニュアル

ページ / 564
183
Flags
ER:
N is not BCD between 0000 and 2000.
S and S+N or D and D+N are not in the same data area.
Indirectly addressed DM word is non-existent. (Content of 
DM word is
not BCD, or the DM area boundary has been exceeded.)
5-16-5
DATA EXCHANGE – XCHG(73)
E1: Exchange word 1
IR, SR, AR, DM, HR, TC, LR
E2: Exchange word 2
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
XCHG(73)
E1
E2
@XCHG(73)
E1
E2
Description
When the execution condition is OFF, XCHG(73) is not executed. When the
execution condition is ON, XCHG(73) exchanges the content of E1 and E2.
E2
E1
If you want to exchange content of blocks whose size is greater than 1 word, use
work words as an intermediate buffer to hold one of the blocks using XFER(70)
three times.
Flags
ER:
Indirectly addressed DM word is non-existent. (Content of 
DM word is
not BCD, or the DM area boundary has been exceeded.)
5-16-6
SINGLE WORD DISTRIBUTE – DIST(80)
S: Source data
IR, SR, AR, DM, HR, TC, LR, #
DBs: Destination base word
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
C: Control word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
DIST(80)
S
DBs
C
@DIST(80)
S
DBs
C
Limitations
C must be a BCD. If C
6655, DBs must be in the same data area as DBs+C. If
C
9000, DBs must be in the same data area as DBs+C–9000.
Description
Depending on the value of C, DIST(80) will operate as a data distribution instruc-
tion or stack instruction. If C is between 0000 and 6655, DIST(80) will operate as
a data distribution instruction and copy the content of S to DBs+C. If the leftmost
digit of C is 9, DIST(80) will operate as a stack instruction and create a stack with
the number of words specified in the rightmost 3 digits of C.
Precautions
Stack operation will be unreliable if the specified stack length is different from the
length specified in the last execution of DIST(80) or COLL(81).
When the execution condition is OFF, DIST(80) is not executed. When the
execution condition is ON, DIST(80) copies the content of S to DBs+C, i.e.,C is
added to DBs to determine the destination word.
2
DBs + C
3 4 5
2
S
3 4 5
Data Distribution Operation
(C=0000 to 6655)
Data Movement
Section 5-16