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.

• Create a new system module where you can place your routines that will function as<br />

instructions. Alternatively, you can place them in the USER system module.<br />

• Create a routine in this system module with the name that you want your new<br />

instruction to be called. The arguments of the instruction are defined in the form of<br />

routine parameters. Note that the name of the parameters will be displayed in the<br />

window during programming and should therefore be given names that the user will<br />

understand.<br />

• Place the routine in one of the Most Common pick lists.<br />

• If the instruction is to behave in a certain way during backward program execution,<br />

this can be done in the form of a backward handler. If there is no such handler, it will<br />

not be possible to get past the instruction during backward program execution (see<br />

Chapter 13 in this manual - <strong>Basic</strong> <strong>Characteristics</strong>). A backward handler can be<br />

entered using the command Routine: Add Backward Handler from the Program<br />

Routines window.<br />

• Test the routine thoroughly so that it works with different types of input data<br />

(arguments).<br />

• Change the module attribute to NOSTEPIN. The complete routine will then be run<br />

during step-by-step execution. This attribute, however, must be entered off-line.<br />

Example: To make the gripper easier to handle, two new instructions are made,<br />

GripOpen and GripClose. The output signal’s name is given to the instruction’s<br />

argument, e.g. GripOpen gripper1.<br />

MODULE My_instr (SYSMODULE, NOSTEPIN)<br />

PROC GripOpen (VAR signaldo Gripper)<br />

Set Gripper;<br />

WaitTime 0.2;<br />

ENDPROC<br />

PROC GripClose (VAR signaldo Gripper)<br />

Reset Gripper;<br />

WaitTime 0.2;<br />

ENDPROC<br />

ENDMODULE<br />

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

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

Saved successfully!

Ooh no, something went wrong!