Omron CJ - INSTRUCTIONS Reference Manual page 1160

Table of Contents

Advertisement

3. Instructions
Example Programming
Data Distribution Operation
The leftmost byte of D300 is 0, so DISTC(566) performs the Data Distribution Operation.
When CIO 0.00 is ON in the following example, the contents of D100 will be copied to D210 (D200 +
10) if the content of D300 is 0010 BCD. The content of D100 can be copied to other words by changing
the offset in D300.
0.00
DISTC
S
Bs
Of
Stack Push Operation
The leftmost byte of Of is 9, so DISTC(566) performs the Stack Push Operation.
When CIO 0.00 is ON in the following example, DISTC(566) allocates a 10 word stack area (since the
rightmost 3 digits of Of are #010) between D200 and D209. At the same time, the contents of D100 will
be copied to the word calculated by adding D200 + stack pointer +1. Finally, the stack pointer is
incremented by +1.
0.00
DISTC
D100
S
Bs
D200
#9010
Of
1122
S: D100
D100
D200
Bs: D200
D300
D201
D210
0 0 0 F
S: D100
Allocated stack
Stack area
Bs: D200
D201
D209
Copied by DISTC(566).
Offset +10 words
010
Of 9
After 1
Stack
Push
Stack area
Stack
# 0 0 0 1
pointer
0 0 0 F
Stack
data area
CS/CJ/NSJ Series Instructions Reference Manual (W474)
0 0 1 0
Of: D300
4-digit BCD
st
nd
execution
After 2
execution
Stack area
# 0 0 0 2
0 0 0 F
0 0 0 F

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents