User guide

Chapter 6. Following
205
Trackball Application for Ratio Following Motion
A trackball is a two-axis, two-dimensional positioning device; just as a mouse is used to
position the cursor on a computer screen, a trackball could be used to position an X-Y stage.
In this example, a two-axis trackball is needed which can do fine and coarse positioning of an
X-Y stage. The fine or coarse setting is selected by the user with a two-position switch
connected to programmable input #1 on the 6000 controller. Programmable input #2 on the
6000 controller is used to switch back and forth from trackball to standard point-to-point
positioning mode. Unlocking the stage from the trackball is necessary because of other point-
to-point move requirements elsewhere in the 6000 controller program.
The trackball housing has two encoders mounted at 90 degrees to each other which are driven
by rubber wheels in contact with the ball. The stage is driven by motors and leadscrews.
For one inch of trackball motion to result in one inch of stage motion, the slave-to-master
ratio must be 10-to-1; this will be the ratio for coarse positioning. The fine positioning ratio
will be one tenth of that, or 1-to-1. When programmable input #1 is low, coarse positioning
is selected, and when programmable input #2 goes low, the stage becomes locked to the
trackball. Each change of state of inputs #1 and #2 calls a different subroutine in the 6000
controller program; however, the ratios can only change if the stage is locked to the trackball
positioning mode.
The trackball is initially unlocked and fine positioning is selected.
Program
SCALE1 ; Enable & define scale factors prior to loading program
SCLD4000,4000 ; Slave axes 1 and 2 have 4000 counts per rev
; resolution post-quadrature
SCLV4000,4000 ; Set velocity scaling factors
SCLA4000,4000 ; Set acceleration scaling factors
SCLMAS200,200 ; Master axis 3 and 4 have 200 counts per rev
; resolution post-quadrature
DEL UNLOCK ; Delete program before defining
DEF UNLOCK ; Program that unlocks the stage from the trackball
S11 ; Stop moves
This line is for steppers only
WAIT(1AS.1=B0 AND 2AS.1=B0) ; Wait for motion to stop on both axes
ONIN.2-1 ; Set up input 2 to lock trackball to stage
FOLEN00 ; Stop Following mode
ONP LOCK ; Select LOCK as an ON program
JUMP WAITLP ; Return to main loop
END ; End program definition
DEL LOCK
DEF LOCK ; Program that locks the stage to the trackball
FOLEN11 ; Enable Following on both axis
IF(VAR1=0) ; If in the FINE mode, set ratio to 0.5:1
FOLRN.5,.5
ELSE
FOLRN1.5,1.5 ; If in the COARSE mode, set ratio to 1.5:1
NIF
ONIN.2-0 ; Set up input 2 to unlock trackball from stage
GO11 ; Start following the trackball
ONP UNLOCK ; Select UNLOCK as ON program
JUMP WAITLP ; Return to main loop
END ; End program definition
DEL COARSE
DEF COARSE ; Declare COARSE label
FOLRN1.5,1.5 ; Coarse positioning ratio of 1.5 to 1
GO11 ; Move to begin travel at new ratio
VAR1=1 ; Flag to indicate we are in coarse mode
END ; Return to main loop
(Continued)