09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WaitUntil Waits until a condition is met<br />

Example<br />

Arguments<br />

WaitUntil is used to wait until a logical condition is met; for example, it can wait until<br />

one or several inputs have been set.<br />

WaitUntil di4 = 1;<br />

Program execution continues only after the di4 input has been set.<br />

WaitUntil [\InPos] Cond [\MaxTime] [\TimeFlag]<br />

[\InPos] Data type: switch<br />

If this argument is used, the robot and external axes must have stopped moving<br />

before the condition starts being evaluated.<br />

Cond Data type: bool<br />

The logical expression that is to be waited for.<br />

[\MaxTime] Data type: num<br />

The maximum period of waiting time permitted, expressed in seconds. If this<br />

time runs out before the condition is set, the error handler will be called, if there<br />

is one, with the error code ERR_WAIT_MAXTIME. If there is no error handler,<br />

the execution will be stopped.<br />

[\TimeFlag] (Timeout Flag) Data type: bool<br />

Program execution<br />

The output parameter that contains the value TRUE if the maximum permitted<br />

waiting time runs out before the condition is met. If this parameter is included in<br />

the instruction, it is not considered to be an error if the max. time runs out. This<br />

argument is ignored if the MaxTime argument is not included in the instruction.<br />

If the programmed condition is not met on execution of a WaitUntil instruction, the<br />

condition is checked again every 100 ms.<br />

When the robot is waiting, the time is supervised, and if it exceeds the max time value,<br />

the program will continue if a TimeFlag is specified, or raise an error if it’s not. If a<br />

TimeFlag is specified, this will be set to TRUE if the time is exceeded, otherwise it will<br />

be set to false.<br />

<strong>RAPID</strong> Reference Manual 8-WaitUntil-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!