09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Basic</strong> <strong>Characteristics</strong> <strong>RAPID</strong> Backward execution<br />

10 Backward execution<br />

A program can be executed backwards one instruction at a time. The following general<br />

restrictions are valid for backward execution:<br />

10.1 Backward handlers<br />

- The instructions IF, FOR, WHILE and TEST cannot be executed backwards.<br />

- It is not possible to step backwards out of a routine when reaching the beginning<br />

of the routine.<br />

Procedures may contain a backward handler that defines the backward execution of a<br />

procedure call.<br />

The backward handler is really a part of the procedure and the scope of any routine data<br />

also comprises the backward handler of the procedure.<br />

Example: PROC MoveTo ()<br />

MoveL p1,v500,z10,tool1;<br />

MoveL p2,v500,z10,tool1;<br />

MoveL p3,v500,z10,tool1;<br />

BACKWARD<br />

MoveL p3,v100,z10,tool1;<br />

MoveL p2,v100,z10,tool1;<br />

MoveL p1,v100,z10,tool1;<br />

ENDPROC<br />

When the procedure is called during forward execution, the following occurs:<br />

PROC MoveTo ()<br />

.. MoveL p1,v500,z10,tool1;<br />

MoveTo; MoveL p2,v500,z10,tool1;<br />

.. MoveL p3,v500,z10,tool1;<br />

BACKWARD<br />

MoveL p3,v100,z10,tool1;<br />

MoveL p2,v100,z10,tool1;<br />

MoveL p1,v100,z10,tool1;<br />

ENDPROC<br />

<strong>RAPID</strong> Reference Manual 5-37

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

Saved successfully!

Ooh no, something went wrong!