137
Writing Data with IOWR
Section 5-4
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 instruc-
tion and start operation.
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 processed (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
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
R5
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
202001
Summary of Contents for CJ1W-C113 - REV 02-2008
Page 2: ...CJ1W NC113 213 413 133 233 433 Position Control Units Operation Manual Revised February 2008 ...
Page 3: ...iv ...
Page 13: ...xiv ...
Page 15: ...xvi ...
Page 19: ...xx ...
Page 27: ...xxviii Conformance to EC Directives 6 ...
Page 43: ...16 Control System Principles Section 1 7 ...
Page 47: ...20 Basic Procedures Section 2 ...
Page 139: ...112 Examples of Parameter Settings Section 4 9 ...
Page 173: ...146 Transferring Data with CX Position Section 5 7 ...
Page 223: ...196 Sample Program Section 7 7 ...
Page 259: ...232 Sample Program Section 8 10 ...
Page 293: ...266 Easy Backup Function Ver 2 0 or later Section 9 11 ...
Page 369: ...342 Reading Error Information with CX Position Section 11 8 ...
Page 385: ...358 Common Parameter Area Appendix C ...