IAI America XSEL-KX User Manual
Page 114
![background image](/manuals/350295/114/background.png)
98
Part 4 Commands
WTXX (Wait for I/O port, flag)
Extension condition
(LD, A, O, AB, OB)
Input condition
(I/O, flag)
Command, declaration
Output
(Output, flag)
Command,
declaration
Operand 1
Operand 2
Optional
Optional
WTXX
I/O, flag
(Time)
TU
[Function]
Wait for the I/O port or flag specified in operand 1 to turn ON/OFF.
The program can be aborted after the specified time by setting the time in operand 2.
The setting range is 0.01 to 99 seconds.
The output will turn ON upon elapse of the specified time (only when operand 2 is specified).
(Note)
Local flags cannot be specified in operand 1.
WTXX
ON
Wait for the applicable I/O port or flag to turn ON.
OF
Wait for the applicable I/O port or flag to turn OFF.
[Example 1]
WTON
15
Wait for input port 15 to turn ON.
[Example 2]
WTOF
308
10
Wait for 10 seconds for output port 308 to turn OFF.
[Example 3]
LET
1
600
Assign 600 to variable 1.
WTON
*1
Wait for the content of variable 1 (flag 600) to turn ON.
[Example 4]
LET
1
8
Assign 8 to variable 1.
LET
2
5
Assign 5 to variable 2.
WTOF
*1
*2
Wait for the content of variable 2 (5 seconds) for the
content of variable 1 (input port 8) to turn OFF.