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

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

Advertisement

Data Movement Instructions
7-17-7 DATA COLLECT – COLL(81)
Limitations
Description
Data Collection
00001
FIFO Stack Operation
During stack operation, the value of the stack pointer+1 exceeds the
length of the stack.
EQ:
ON when the content of S is zero; otherwise OFF.
Ladder Symbols
COLL(81)
SBs
C
D
C must be BCD.
DM 6144 to DM 6655 cannot be used for D.
COLL(81) can be used for data collection, an FIFO stack operation, or an LIFO
stack operation depending on the content of the control word, C.
When bits 12 to 15 of C=0 to 7, COLL(81) is used for data collection. The entire
contents of C specifies an offset, Of (0000 to 2047 in BCD).
When the execution condition is OFF, COLL(81) is not executed. When the
execution condition is ON, COLL(81) copies the content of SBs + Of to D, i.e., Of
is added to SBs to determine the source word.
Note
1. SBs and SBs+Of must be in the same data area.
2. IR 000 to IR 019 or IR 000 to IR 049 is treated as a different memory area
from IR 200 to IR 255 for the source data area. The entire source data area
must be within one or the other of these areas. An error will occur if words
from both areas are included.
Example
The following example shows how to use COLL(81) to copy the content of
DM 0000+Of to LR 00. The content of 200 is #0005, so the content of DM 0005
(DM 0000 + 5) is copied to LR 00 when IR 00001 is ON.
@COLL(81)
DM 0000
200
LR 00
200
0 0 0
5
When bits 12 to 15 of C=9, COLL(81) can be used for an FIFO stack operation.
The other 3 digits of C specify the number of words in the stack (000 to 999, in
BCD). The content of SBs is the stack pointer.
@COLL(81)
SBs
C
D
Address Instruction
00000
00001
DM 0000
0 0 0
0
DM 0005
0 0 F
F
Section
Operand Data Areas
SBs: Source base word
IR, SR, AR, DM, HR, TC, LR
C: Control word (BCD)
IR, SR, AR, DM, HR, TC, LR, #
D: Destination word
IR, SR, AR, DM, HR, TC, LR
Operands
LD
@DIST(80)
DM
LR
LR 00
0 0 F
F
7-17
00001
0000
200
00
417

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents