Omron C200HW-PRM21 Operation Manuals page 91

Profibus-dp master unit
Table of Contents

Advertisement

IOWR
Output mailbox full
EQ-flag
ER-flag
Example
The IOWR instruction should not be executed unconditionally. The Output
mailbox is not always able to receive and process a new message. Status bit
IR n+2.12 indicates the status of the Output mailbox at the moment of the last
I/O refresh (1 = Output mailbox full). It is good practice to only execute the
IOWR instruction when IR n+2.12 is not set. It should be noted that this IR bit
is only updated during the I/O refresh and thus the status of this bit is not valid
anymore after executing an IOWR instruction in the PLC program. Therefore
it is recommended not to execute the IOWR instruction more than once per
PLC cycle.
The EQ-flag in the PLC will indicate the result of execution of the IOWR
instruction. If this flag is set, the message was transferred successfully to the
Output mailbox. If this flag is not set, either the Output mailbox was full, or the
RUN-bit (IR n.00) was not set, or the DP communication was disabled (IR
n.01). In all cases the message was not transferred to the Output mailbox. It
is advised to always check the EQ-flag.
The ER-flag in the PLC will report on syntax errors made in the IOWR
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.
An example of the use of the IOWR instruction is shown below.
IR 112.12
IOWR (-)
DM0000
255.06
EQ_FLAG
In the example above, the Unit number setting is assumed to be '1'.
The IOWR instruction is only executed when the 'Output mailbox full' bit is not
set. It transfers 8 words starting from DM0000 to the Output mailbox of the
Master Unit with Unit setting 1.
The ERROR output bit is set when the IOWR transfer was not successful.
#0000
#1008
ERROR
Section 6-2
75

Advertisement

Table of Contents
loading

Table of Contents