Function hint, Precautions, Sample program – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 160: 2 instructions
2 Instructions
2-124
CP1E CPU Unit Instructions Reference Manual(W483)
Function
Hint
The same DIST(080) instruction can be used to distribute the source word to various words in the data
area by changing the value of Of.
Precautions
Be sure that the offset does not exceed the end of the data area, i.e., Bs and Bs+Of are in the same
data area.
Sample program
When CIO 0.00 is ON in this example, the contents of D100 will be copied to D210 (D200 + 10) if the
contents of D300 is 10 (0A hexadecimal). The contents of D100 can be copied to other words by chang-
ing the offset in D300.
DIST(080) copies S to the destination word
calculated by adding Of to Bs.
n
n
S
Bs+n
Of
Bs
DIST
D100
D200
D300
0.00
S:D100
Bs:D200
D201
D210
S
Copied by DIST(080).
Offset +10 words
4-digit hexadecimal
Bs
Of
Of:
D300
0 0 0 A