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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FSHFD Example<br />

In this example, the follower follows a master that moves in a continuous cycle. Once each<br />

cycle, the master <strong>and</strong> follower both pick parts. The master’s part is detected by a sensor<br />

connected to trigger 1B, <strong>and</strong> the follower’s part is detected by a sensor connected to trigger 1A.<br />

After both parts are detected, they must be aligned. The sensors are mounted 2 inches apart<br />

from each other, so that proper alignment would result in 2 inches of follower travel between<br />

detection of the master's part <strong>and</strong> detection of the follower’s part.<br />

The follower position is sampled when each of the sensors activates. The difference between<br />

the follower positions is compared to the required 2 inches. If the measured difference is<br />

greater than or less than 2 inches, then a shift move to correct the alignment is made. At that<br />

point, the follower will then start tracking the master again. The follower is continually<br />

following the master at a 1:1 ratio.<br />

DEL ALIGN<br />

; Delete program before defining<br />

DEF ALIGN<br />

; Begin definition of program called ALIGN<br />

COMEXC1<br />

; Allow continuous comm<strong>and</strong> execution during motion<br />

FOLMAS1<br />

; The master encoder input is the master<br />

FOLRN1 ; Set follower-to-master ratio numerator to 1<br />

FOLRD1 ; Set follower-to-master ratio denominator to 1<br />

; (ratio set to 1:1)<br />

FOLEN1<br />

; Enable Following mode<br />

MC1<br />

; Enable continuous positioning mode<br />

D+ ; Set direction to positive<br />

GO1<br />

; Start Following master continually<br />

INFNC1-H<br />

; Enable trigger input 1A to latch position of follower<br />

; when the follower's part is detected<br />

INFNC2-H<br />

; Enable trigger input 1B to latch position of follower<br />

; when the master's part is detected<br />

$SYNCLP<br />

; Main loop where synchronizing moves occur<br />

WAIT(TRIG.1=b1 AND TRIG.2=b1)<br />

; Wait for both follower <strong>and</strong> master inputs to occur<br />

VAR10=1PCCA ; Load VAR10 with the follower comm<strong>and</strong>ed position due<br />

; to follower input activation<br />

VAR11=1PCCB ; Load VAR11 with the follower comm<strong>and</strong>ed position due<br />

; to master input activation<br />

VAR12=VAR10-VAR11 ; Load VAR12 with the offset distance<br />

VAR13=VAR12-2 ; Calculate the required shift<br />

FSHFD(VAR13) ; Perform synchronization move of distance in VAR13<br />

JUMP SYNCLP ; Return (jump) to main program loop<br />

END<br />

; End of program<br />

Geared Advance Following<br />

The FGADV comm<strong>and</strong> provides the ability to super-impose an advance or retard on Following<br />

motion. This is the same ability provided by the FSHFD comm<strong>and</strong> (see Performing Phase<br />

Shifts above), except that the super-imposed motion is also geared to master motion. The<br />

FGADV comm<strong>and</strong> has the positive or negative “advance” distance as a parameter, but it<br />

initiates motion instead of simply setting up the distance. The shape of the super-imposed<br />

profile is determined by the FOLMD, FOLRN, <strong>and</strong> FOLRD comm<strong>and</strong>s (just as a normal preset<br />

Following move).<br />

The FGADV comm<strong>and</strong> profile may be delayed with the GOWHEN comm<strong>and</strong>.<br />

A FGADV move may be performed only while the conditions below exist (Following status bit<br />

#23, reported with the FS, TFS, <strong>and</strong> TFSF comm<strong>and</strong>s, indicates that it is “OK to do FGADV<br />

move”):<br />

• Master is specified with a FOLMAS comm<strong>and</strong><br />

• Following is enabled with the FOLEN comm<strong>and</strong><br />

• The follower is either not moving, or moving at constant ratio in continuous mode<br />

(MC1)<br />

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

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

Saved successfully!

Ooh no, something went wrong!