Iord - Omron C200HW-PRM21 Operation Manuals

Profibus-dp master unit
Table of Contents

Advertisement

IORD

6-3

IORD

Reply in input mailbox
Input mailbox clear
EQ-flag
ER-flag
76
The ladder symbols for IORD are shown below.
IORD (-)
C
Control code
value:
#0000
S
Source information
value:
Combination of the unit number of the Master Unit and the message
length (number of words in BCD).
IR n+4 can be used as source information. If a message is posted in
the input mailbox, this IR word will contain the correct information for
retrieval of the full message.
D
First destination word
value:
The address of the first word of the PLC data area to where the
message from the Input mailbox is to be transferred.
The IORD instruction should not be executed unconditionally. IORD should
only be executed when there is a reply message in the Input mailbox. The
status of the Input mailbox is indicated by status bit IR n+2.13 (Reply in input
mailbox). If this bit is set, an IORD instruction should be executed to remove
the response from the Input mailbox. This will prevent the Input mailbox from
filling up.
An IORD instruction should not be executed in the PLC cycle after an 'Input
mailbox clear' command is issued. As the 'Input mailbox clear' command (IR
n.02) will not be executed until after the I/O refresh, the status of IR n+2.13
will be updated in the next I/O refresh.
It is not recommended to execute two IORD instructions per PLC cycle
because the status of IR n+2.13 is not valid anymore after executing the first
IORD instruction.
The EQ-flag in the PLC will indicate the result of execution of the IORD
instruction. If this flag is set, the message was transferred successfully from
the Input mailbox to the specified PLC data area. It is advised to always check
this flag, especially in the cases described above when an 'Input mailbox
clear' command has been issued, or when more than one IORD instruction is
programmed to be executed in one PLC cycle.
The ER-flag in the PLC will report on syntax errors made in the IORD
instruction itself. It is not necessary to check this flag; if a syntax error is
made, the EQ-flag will also indicate that the transfer was not successful.
C
S
D
Message length (001 ~ 128)
Section 6-3
@IORD (-)
C
S
D
Unit number (0 ~ F)

Advertisement

Table of Contents
loading

Table of Contents