IOWR
Section 6-2
75
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 (-)
#0000
DM0000
#1008
255.06
EQ_FLAG
ERROR
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.
Содержание C200HW-PRM21
Страница 1: ...C200HW PRM21 PROFIBUS DP Master Unit OPERATION MANUAL Cat No W349 E2 2...
Страница 2: ......
Страница 3: ......
Страница 4: ......
Страница 5: ...C200HW PRM21 PROFIBUS DP Master Unit Operation Manual Produced May 2000...
Страница 6: ...iv...
Страница 8: ...vi...
Страница 12: ...x...
Страница 66: ...Debug mode Section 4 4 50...
Страница 98: ...Messages Section 6 4 82...
Страница 108: ...Maintenance Section 7 3 92...
Страница 110: ...94...
Страница 112: ...96...
Страница 116: ...100...
Страница 120: ...104...
Страница 124: ......
Страница 126: ...Authorised Distributor Cat No W349 E2 2 Note Specifications subject to change without notice Printed in the Netherlands...