User guide
➄
Basic 6250 Features
81
Step 4
Define the DOPATH Subroutine.
> DEF DOPATH Begin definition of the subroutine called DOPATH
- HOM11 Move both axes to the home position (absolute counters set to zero)
- A5Ø,5Ø Set up the acceleration
- V3,3 Set up the velocity
- DATPTR1,1,1 Select data program #1 (DATP1) as the current active data program,
and set the data pointer to the first data element. Increment the data
pointer one element after every data assignment with the DAT
command. If you wanted to move only axis 1 down the taught path,
you would set the increment (third integer) to a 2, thus accessing
only the axis 1 stored positions.
- REPEAT Set up a repeat/until loop
- D(DAT1),(DAT1) The position of axis 1 and axis 2 are recalled into the distance
command
- GO11 Move to the position
- T.5 Wait for 0.5 seconds
- UNTIL(DPTR=1) Repeat the loop until the data pointer wraps around to data element
#1
(all data elements have been read)
- HOM11 Move both axes back to the home position
- END End definition of the subroutine called DOPATH
Step 5
Define the MAIN Program (Include SETUP, TEACH, and DOPATH).
> DEF MAIN Begin definition of the program called MAIN
- SETUP Execute the subroutine called SETUP
- TEACH Execute the subroutine called TEACH
- DOPATH Execute the subroutine called DOPATH
- END End definition of the program called MAIN
Step 6
Run the MAIN Program and Teach the Positions with the Joystick.
1. Enter the MAIN command to execute the teach mode program and set the joystick's axis
select input to high.
2. Use the joystick to move to the position to be taught.
3. Once in position, activate the joystick release input to teach the positions. Two positions
(one for each axis) are taught each time you activate the joystick release input.
4. Repeat steps 2 and 3 for the remaining four teach locations. After triggering the joystick
release input the fifth time, the 6201 will home the axes, repeat the path that was taught,
and then return both axes to the home position.