Flags; Precautions When Executing Iord Instruction; Iord Program Example - Omron CS1W-MCH71 Operation Manual

Sysmac cs/cj-series
Hide thumbs Also See for CS1W-MCH71:
Table of Contents

Advertisement

IORD Instruction to Transfer Data
5-3-3

Flags

Name
Symbol
Error Flag
ER
Equals Flag
=
5-3-4

Precautions when Executing IORD Instruction

5-3-5

IORD Program Example

230
ON
• The No. of transferred words in D is not
between 0000 and 0008 Hex.
• The unit number data in D is not between 8000
and 800F Hex.
• The specified CPU Bus Unit does not support
the IORD instruction.
• The specified Unit has a setting error or unit
error.
• The read position data was not in the specified
format or not within acceptable range.
• The specified MC Unit address does not exist.
• The specified No. of position data words trans-
ferred was not a multiple of two.
• The specified No. of system parameter words
transferred was not a multiple of two.
• The value of the MC Unit address plus the
number of transferred words divided by 2
exceeded 27FF Hex (upper position data limit
10240).
• More than 8 words were specified for position
data transfer.
• The IORD instruction was completed success-
fully.
When transferring the data by IORD instruction, make sure to transfer the
data with the total number of transferred words (2 to 8 words). Do not start or
end transferring the data in the middle of the data. Doing so will turn ON the
ER flag.
When performing continuous transfer of data by IORD instruction, make sure
that the Equals Flag is ON before executing the next IORD instruction. For
details, refer to Ladder Program Example on page 233.
This section provides a detailed example of data transfer when the MC Unit is
mounted on a CJ-series PLC and the unit number is set to zero. In this exam-
ple, it is assumed that operands in the IORD and the transferred data are cor-
rect.
When debugging, create a ladder program that refers to the ER flag or the
[Alarm] bit (n+12 words bit 00).
Example 1) Read four position data (PL0456 to PL0459 Hex) in the MC Unit
to the D00100 toD00107.
Position data to be read
PL0456
4567890
PL0457
12345678
− 38765432 →
PL0458
PL0459
123456
• The conditions other than the ones
described on the left.
• The IORD instruction was not com-
pleted normally.
• A previous transfer has not been com-
pleted.
Destination address
D00100 to D00101
D00102 to D00103
D00104 to D00105
D00106 to D00107
Section 5-3
OFF

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Cj1w-mch71

Table of Contents