Data Exchange - Xchg(73); Single Word Distribute - Dist(80) - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Data Movement Instructions
5-18-5 DATA EXCHANGE – XCHG(73)
Limitations
Description
Flags
5-18-6 SINGLE WORD DISTRIBUTE – DIST(80)
Limitations
Description
Single-word Distribution
Ladder Symbols
XCHG(73)
E1
E2
DM 6144 to DM 6655 cannot be used for E1 or E2.
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.
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.
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
Ladder Symbols
DIST(80)
S
DBs
C
C must be BCD.
DM 6144 to DM 6655 cannot be used for DBs or C.
DIST(80) can be used for single-word distribution or for a stack operation
depending on the content of the control word, C.
When bits 12 to 15 of C=0 to 8, DIST(80) can be used for a single word dis-
tribute operation. The entire contents of C specifies an offset, Of.
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+Of, i.e.,
Of is added to DBs to determine the destination word.
Note DBs and DBs+Of must be in the same data area and cannot be between
DM 6144 and DM 6655.
Example
The following example shows how to use DIST(80) to copy #00FF to HR 10 +
Of. The content of LR 10 is #3005, so #00FF is copied to HR 15 (HR 10 + 5)
when IR 00000 is ON.
@XCHG(73)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
E1
E2
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
E1
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
@DIST(80)
DBs: Destination base word
S
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
DBs
C
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Section 5-18
Operand Data Areas
E1: Exchange word 1
E2: Exchange word 2
E2
Operand Data Areas
S: Source data
C: Control word (BCD)
273

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents