
@;A9I@*+'"&$'()*
Section 4-3
$%(
Example ladder program
Refer to the following structure for the ladder program if you want to use the IOWR-
instruction. For an overview of the supported IOWR-instructions and how to set
the C-, S- and D-operands, refer to 4-5
"Supported IOWR/IORD-Instructions"
.
The Data Transfer Busy bit (CIO n+19, bit 02) is ON when the Unit is busy com-
pleting an IOWR/IORD-instruction or being initialised. When this bit is OFF the
Unit is ready to execute the IOWR-instruction. When data is transferred using
IOWR, the Global Error flag (CIO n+19, bit 00), the ER Flag, and the Equals Flag
can be used to check whether the transfer has been completed successfully. If the
ER flag is set after completion of the IOWR instruction, the PC CPU unit has
detected an error (refer to Programming Manual of the PC CPU unit used for more
information on the ER flag). If the Equals Flag is not set after completion of the
IOWR instruction, the Unit was busy or the Unit has detected an error. The Data
Transfer Completion bit (CIO n+19, bit 03) is toggled every time that data transfer
is completed. The Global Error bit (CIO n+19, bit 00) turns ON when the Unit
detects any error that causes this bit to be set (refer to 5-2
).
Note
1. If you omit to include the Data Transfer Busy bit (CIO n+19, bit 02) in the ladder
instruction and you start issuing an IOWR-instruction while another IOWR/
IORD-instruction is in progress the ER-flag turns ON. Therefore, to guarantee
correct execution of IOWR-instructions, you should always use the ladder dia-
gram structure as shown above.
2. While the Data Transfer Busy bit (CIO n+19, bit 02) is ON, e.g. due to long
IOWR data processing inside the unit or due to a unit restart, the response time
to the CIO output words, e.g. Gate Open, is extended. In all cases, after the
Data Transfer Busy bit has turned OFF, the CIO output words will be processed
immediately. In case of IOWR data processing, the CIO output words may
already be processed while the Data Transfer Busy flag is ON.
IOWR(223)
C
S
D
R1
Start
Data Transfer Busy
CIO n+ 19 (bit 02)
=
Data Transfer Completion
DIFU(13) R2
DIFD(14) R3
CIO n+ 19 (bit 03)
R2
R3
Global Error
CIO n+ 19 (bit 00)
R4
Set ( C/S/D) data ready
before executing
IOWR-instruction
Data has been
successfully written
Error
W902-E2-03.book Seite 125 Donnerstag, 7. Oktober 2004 2:06 14
Summary of Contents for CS1W-CT021
Page 1: ...OPERATION MANUAL High speed Counter Units CS1W CT021 CS1W CT041 Cat No W902 E2 03...
Page 3: ...W902 E2 03 book Seite iv Donnerstag 7 Oktober 2004 2 06 14...
Page 5: ...W902 E2 03 book Seite vi Donnerstag 7 Oktober 2004 2 06 14...
Page 39: ...W902 E2 03 book Seite 24 Donnerstag 7 Oktober 2004 2 06 14...
Page 59: ...A 2 Section 2 3 W902 E2 03 book Seite 44 Donnerstag 7 Oktober 2004 2 06 14...
Page 155: ...4 Section 4 6 W902 E2 03 book Seite 140 Donnerstag 7 Oktober 2004 2 06 14...
Page 199: ...G W902 E2 03 book Seite 184 Donnerstag 7 Oktober 2004 2 06 14...