14.01.2015 Views

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

Gemini GV6K and Gemini GT6K Programmer's Guide

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.

Step 4<br />

Define the DOPATH Subroutine.<br />

DEF DOPATH ; Begin definition of the subroutine called DOPATH<br />

HOM1<br />

; Move to the home position<br />

; (absolute counters set to zero)<br />

A5Ø<br />

; Set up the acceleration<br />

V3<br />

; Set up the velocity<br />

DATPTR1,1,1 ; Select data program #1 (DATP1) as the current active<br />

; data program, <strong>and</strong> set the data pointer to the first<br />

; data element. Increment the data pointer one element<br />

; after every data assignment with the DAT comm<strong>and</strong>.<br />

REPEAT<br />

; Set up a repeat/until loop<br />

D(DAT1) ; The position is recalled into<br />

; the distance comm<strong>and</strong><br />

GO<br />

; Move to the position<br />

T.5 ; Wait for 0.5 seconds<br />

UNTIL(DPTR=1) ; Repeat the loop until the data pointer wraps around<br />

; to data element #1 (all data elements have been read)<br />

HOM1<br />

; Move back to the home position<br />

END<br />

; End definition of the subroutine called DOPATH<br />

Step 5<br />

Define the MAIN Program (Include SETUP, TEACH, <strong>and</strong> DOPATH).<br />

DEF MAIN ; Begin definition of the program called MAIN<br />

SETUP<br />

; Execute the subroutine called SETUP<br />

TEACH<br />

; Execute the subroutine called TEACH<br />

DOPATH<br />

; Execute the subroutine called DOPATH<br />

END<br />

; End definition of the program called MAIN<br />

Step 6<br />

Run the MAIN Program <strong>and</strong> Teach the Positions with the Joystick.<br />

1. Enter the MAIN comm<strong>and</strong> to execute the teach application program.<br />

2. 2. Use the joystick to move to the position to be taught.<br />

3. Once in position, activate the joystick release input to teach the positions.<br />

4. Repeat steps 2 <strong>and</strong> 3 for the remaining nine teach locations. After triggering the<br />

joystick release input the tenth time, the controller will home the motor, repeat the<br />

path that was taught, <strong>and</strong> then return to the home position.<br />

114 Gem6K Series Programmer’s <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!