Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 1115

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Sample program
Data Collection Operation
The leftmost byte of D200 is 0, so COLLC(567) performs the Data Collection Operation.
When CIO 0.00 is ON in the following example, the contents of D110 (D100 + 10) will be copied to
D300 if the content of D200 is 10 (0010 BCD). The contents of other words can be copied to D300 by
changing the offset in D200.
0.00
COLLC
Bs
D100
Of
D200
D300
D
FIFO Stack Operation
The leftmost byte of Of is 9, so COLLC(567) performs the FIFO Stack Operation.
When CIO 0.00 is ON in the following example, COLLC(567) allocates a 10 word stack area (since the
rightmost 3 digits of Of are #010) between D100 and D109. At the same time, the contents of D101 (Bs
+1) are copied to D300. Finally, the stack pointer is decremented by 1.
0.00
COLLC
D100
Bs
#9010
Of
D
LIFO Stack Operation
The leftmost byte of Of is 8, so COLLC(567) performs the LIFO Stack Operation.
When CIO 0.00 is ON in the following example, COLLC(567) allocates a 10 word stack area (since the
rightmost 3 digits of Of are #010) between D100 and D109. At the same time, the contents of the
source word (D100 + stack pointer) are copied to D300. Finally, the stack pointer is decremented by 1.
0.00
COLLC
Bs
D100
#8010
Of
D
1078
Bs:
D100
D101
D110
Allocated stack
Stack area
D100
D101
D102
D300
D109
Allocated stack
Stack area
D100
D101
D102
D300
D109
Offset +10 words
Copied by COLLC(567).
Of 9
010
After 1
FIFO
Stack area
Read
Stack
0 0 0 2
pointer
1 2 3 4
Stack
5 6 7 8
data area
D300
Of 8
010
After 1
LIFO
Stack area
Read
Stack
0 0 0 2
pointer
1 2 3 4
Stack
5 6 7 8
data area
D300
CS/CJ/NSJ Series Instructions Reference Manual (W474)
D200
0
0
1
0
4-digit BCD
D300
st
nd
execution
After 2
execution
Stack area
0 0 0 0
0 0 0 1
5 6 7 8
5 6 7 8
1 2 3 4
st
nd
execution
After 2
execution
Stack area
0 0 0 0
0 0 0 1
1 2 3 4
1 2 3 4
5 6 7 8

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents