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.

Program execution<br />

Example<br />

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

The maximum amount of time [s] that program execution waits. If no function key<br />

is depressed within this time, the program continues to execute in the error handler<br />

unless the BreakFlag is used (see below). The constant ERR_TP_MAXTIME can<br />

be used to test whether or not the maximum time has elapsed.<br />

[\DIBreak] (Digital Input Break) Data type: signaldi<br />

The digital signal that may interrupt the operator dialog. If no function key is<br />

depressed when the signal is set to 1 (or is already 1), the program continues to<br />

execute in the error handler, unless the BreakFlag is used (see below). The constant<br />

ERR_TP_DIBREAK can be used to test whether or not this has occurred.<br />

[\BreakFlag] Data type: errnum<br />

A variable that will hold the error code if maxtime or dibreak is used. If this<br />

optional variable is omitted, the error handler will be executed. The constants<br />

ERR_TP_MAXTIME and ERR_TP_ DIBREAK can be used to select the reason.<br />

The information text is always written on a new line. If the display is full of text, this<br />

body of text is moved up one line first. Strings longer than the width of the teach pendant<br />

(40 characters) are split into two lines.<br />

Prompts are written above the appropriate function keys. Keys without prompts are<br />

deactivated.<br />

Program execution waits until one of the activated function keys is depressed.<br />

VAR errnum errvar;<br />

...<br />

TPReadFK reg1, "Go to service position?", "", "", "", "Yes", "No" \MaxTime:= 600<br />

\DIBreak:= di5\BreakFlag:= errvar;<br />

IF reg1 = 4 or OR errvar = ERR_TP_DIBREAK THEN<br />

MoveL service, v500, fine, tool1;<br />

Stop;<br />

END IF<br />

IF errvar = ERR_TP_MAXTIME EXIT;<br />

The robot is moved to the service position if the forth function key ("Yes") is<br />

pressed, or if the input 5 is activated. If no answer is given within 10 minutes, the<br />

execution is terminated.<br />

8-TPReadFK-2 <strong>RAPID</strong> Reference Manual

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

Saved successfully!

Ooh no, something went wrong!