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.

To make sure that all references to routines and data are correct, use the command File:<br />

Check Program. If the program has been changed in the robot, it can be stored on<br />

diskette again and processed or stored in a PC.<br />

1.4 Examples<br />

The following shows examples of what routines look like in text format.<br />

%%%<br />

VERSION: 1<br />

LANGUAGE: ENGLISH<br />

%%%<br />

MODULE main<br />

VAR intnum process_int ;<br />

! Demo of <strong>RAPID</strong> program<br />

PROC main()<br />

MoveL p1, v200, fine, gun1;<br />

ENDPROC<br />

TRAP InvertDo12<br />

! Trap routine for TriggInt<br />

TEST INTNO<br />

CASE process_int:<br />

InvertDO do12;<br />

DEFAULT:<br />

TPWrite “Unknown trap , number=”\Num:=INTNO;<br />

ENDTEST<br />

ENDTRAP<br />

LOCAL FUNC num MaxNum(num t1, num t2)<br />

IF t1 > t2 THEN<br />

RETURN t1;<br />

ELSE<br />

RETURN t2;<br />

ENDIF<br />

ENDFUNC<br />

ENDMODULE<br />

1.5 Making your own instructions<br />

In order to make programming easier, you can customize your own instructions. These<br />

are created in the form of normal routines, but, when programming and test-running,<br />

function as instructions:<br />

- They can be taken from the instruction pick list and programmed as normal<br />

instructions.<br />

- The complete routine will be run during step-by-step execution.<br />

11-4 <strong>RAPID</strong> Reference Manual

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

Saved successfully!

Ooh no, something went wrong!