IAI America ASEL User Manual

Page 136

Advertising
background image

Part 2 Programs

Chapter 3 Explanation of Commands

114

Part 2 Programs

z

WT†† (Wait for I/O port, flag)

Command, declaration

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command,

declaration

Operand 1

Operand 2

Output

(Output, flag)

Optional

Optional

WT††

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) A local flag cannot be entered in operand 1.

WT††

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 307

10

Wait for 10 seconds for output port 307 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.

Advertising