Omron CJ - INSTRUCTIONS Reference Manual page 1159

Table of Contents

Advertisement

Note In C-series PLCs, the SINGLE WORD DISTRIBUTE (DIST) instruction will cause the Error Flag to go ON if the content
of an indirectly addressed DM word (*DM) is not BCD, or the DM area boundary is exceeded. DISTC(566) will not cause
the Error Flag to go ON in these cases.
Function
Data Distribution Operation
DISTC(566) copies S to the destination word calculated by adding Of to Bs.
S is copied to:
Bs + Of
S
Stack Push Operation
When the leftmost digit (bits 12 to 15) of Of is 9 BCD, DISTC(566) operates a stack from Bs to Bs+Of-
9000. The destination base address (Bs) contains the stack pointer and the rest of the words in the
stack contain the stack data.
DISTC(566) copies S to the destination word calculated by adding the stack pointer (content of Bs) + 1
to address Bs.
S is copied to:
Bs + stack pointer + 1.
S
Bs+ +1
Bs+(m-1)
Each time that the content of S is copied to a word in the stack data area, the stack pointer in Bs is
automatically incremented by +1.
Note Once DISTC(566) has been executed with Stack Push Operation to allocate a stack area, always specify the
same length stack area in subsequent DISTC(566) instructions. Operation will be unreliable if a different
stack area size is specified in later DISTC(566) instructions.
Hint
• Use COLLC(567) to read stack data from the stack area.
• The same DISTC(566) instruction can be used to distribute the source word to various words in the
data area by changing the value of Of.
Precaution
• Be sure that the offset or stack size specified by Of does not exceed the end of the data area when
added to Bs.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Bs
Of
Bs+n
Stack area
Stack
Bs
pointer
Bs+1
m words
Stack
data area
9
m
Of
Size of
stack area
3. Instructions
3
1121

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents