![Omron CS1W-NC113 - REV 02-2008 Manual Download Page 129](http://html1.mh-extra.com/html/omron/cs1w-nc113-rev-02-2008/cs1w-nc113-rev-02-2008_manual_742370129.webp)
5-4
Section
Writing Data with IOWR
117
Example: Sending 200 Words of Speed and Position Data and Starting
Operation
The following ladder program can be used to transfer 100 words (50 items) of
speed data and 100 words (50 items) of position data using the IOWR instruction
and start operation.
IOWR
#112C
D00500
#00640002
R1
R2
R3
=
Set the address (112C Hex)
for the X-axis speed.
Set the beginning word of the
transfer source where the
speed data is set.
DIFU R1 (work bit)
Set the destination unit number
(2) and the number of transfer
words (100 = 64 Hex).
OUT R3 (work bit)
OUT R2 (work bit)
IOWR
#11F4
D00600
#00640002
R3
R4
R5
=
Set the address (11F4 Hex)
for the X-axis position.
Set the beginning word of the
transfer source where the
position data is set.
OUT R5 (work bit)
OUT R4 (work bit)
START
Set the destination unit number
(2) and the number of transfer
words (100 = 64 Hex).
DIFU
R1
Write switch
MOV
#0000
D00216
R3
202000
202001
Sequence Number Enable
Sets #0 for the
sequence number.
Unit: NC113
Unit number: 2
Beginning word of operating
data area: D00200
Busy Flag
200213
In the above ladder diagram, when the first IOWR instruction is executed, the
Equals Flag turns ON and, at the same time, the data is transferred to the PCU.
At the PCU, this data is first stored in the receive buffer. After this, the next IOWR
instruction is executed. Because the data in the receive buffer has not been pro-
cessed (i.e., to check that the data items are within the respective ranges and
write the data to the data area), the Equals Flag, which is the completion flag for
the IOWR instruction, does not turn ON. Therefore, the second IOWR instruction
Summary of Contents for CS1W-NC113 - REV 02-2008
Page 1: ...CS1W NC113 213 413 133 233 433 Position Control Units ...
Page 2: ...iv ...
Page 4: ...vi ...