Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1308

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Model Conversion Instructions (Unit Ver. 3.0 or Later)
Flags
Precautions
Examples
DISTC
S
Bs
Of
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 Use COLLC(567) to read stack data from the stack area.
Name
Error Flag
ER
Equals Flag
=
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.
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.
Be sure that the offset or stack size specified by Of does not exceed the end
of the data area when added to Bs.
Data Distribution Operation
The leftmost byte of D00300 is 0, so DISTC(566) performs the Data Distribu-
tion Operation.
When CIO 000000 is ON in the following example, the contents of D00100 will
be copied to D00210 (D00200 + 10) if the content of D00300 is 0010 BCD.
The content of D00100 can be copied to other words by changing the offset in
D00300.
S: D00100
Bs:
D00210
Stack Push Operation
The leftmost byte of Of is 9, so DISTC(566) performs the Stack Push Opera-
tion.
When CIO 000000 is ON in the following example, DISTC(566) allocates a 10
word stack area (since the rightmost 3 digits of Of are #010) between D00200
and D00209. At the same time, the contents of D00100 will be copied to the
word calculated by adding D00200 + stack pointer +1. Finally, the stack
pointer is incremented by +1.
Label
ON if Stack Push Operation is specified, but the stack
pointer data in Bs is not BCD.
ON if Stack Push Operation is specified and the stack
pointer indicates a word that exceeds the stack data area.
ON if the source data is 0000.
OFF in all other cases.
Copied by DISTC(566).
Offset +10 words
Section 3-35
Operation
Of:
0 0 1 0
4-digit BCD
1269

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents