EasyManua.ls Logo

Mitsubishi RV-2AJ - Before Starting Robot Use; How to Use Instruction Manuals

Mitsubishi RV-2AJ
12 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3.2.2 Subroutines
Example program Pr2 demonstrates how to use GOSUB and return.
P10 = P1 ‘P10 is set to P1
GOSUB *PICKUP ‘call subroutine *PICKUP
P10 = P2 ‘P10 is set to P2
GOSUB *PLACE ‘call subroutine *PLACE
END ‘end of program
*PICKUP ‘subroutine *PICKUP
MVS P10,-50
…..HCLOSE 1….. ‘incomplete subroutine
RETURN ‘end of subroutine *PICKUP
*PLACE
MVS P10,-50
….HOPEN 1…….. ‘incomplete subroutine
RETURN
Pr2: subroutine for pick and place
3.2.3 External input
Example program Pr3 demonstrates the use of the external inputs. The robot has 16
I/O lines. For example if bit 8 is connected to a light beam that monitors a conveyor
belt. If an object comes along the robot picks it up.
*LOOP
MOV PREST ‘Move to a position above the conveyor belt
‘ready to grab object that may come along
WAIT M_IN ( 8 ) = 0 ‘Waits for the input signal bit 8 to turn OFF
‘(light beam has been interrupted by the object)
GOSUB *PICKUP ‘calls subroutine which could pick up the object
GOSUB *PUTSOMEWHERE
GOTO *LOOP
Pr3: External input
RV-2AJ Robot Programming LAB NOTES Version 0.6 Nov 2005
9

Other manuals for Mitsubishi RV-2AJ

Related product manuals