#%
APPENDIX A: PROGRAMMING ROUTINES
The following routines have been provided on the enclosed 3.5" floppy disk.
Jog Routine - Jogrtn.txt
' The following subroutine will Jog the motor. This subroutine can be
' incorporated into a program, once a certain key is pressed, this
' subroutine can be called on to jog the motor. For reference,
' it is recommended that the user refer to the sample program
' "eltrmsmp.tsk" to see how this subroutine is used in a program.
JOG_Forward:
CLRSCRN
' Print to the Display
DISP 2,1,"Jogging Forward"
' motor status.
DISP 4,1,"Push <Esc> to STOP"
JOG=1
' Start jog cycle.
DO
' Wait until the escape
Keypress=INCHAR(2)
' Key is pressed.
LOOP WHILE Keypress<>27
STOP
' Stop jog cycle
RETURN
Getvalue Routine - Getvalue.txt
' This is a sample Getvalue subroutine used for data entry such as Distance
' or Speed. This subroutine can be used as a guide for writing a user specific
' subroutine. As a suggestion, refer to the sample program "eltrmsmp.tsk"
' to see how this subroutine is used in a program. The following
' items are necessary when customizing a routine:
'
1.) Declaration of variables (except on MCPI-MA)
'
-INTEGER row,col,keypress,x,y
'
-REAL value,min,max,NewValue
'
-STRING$ fmt$,NewValue$
'
2.) Predefined variables.(row,col,min,max)
'
'
-row=?
'
-col=?
'
-max=?
'
-min=?
'
-value=?
'
Hint: These values are set in the routine that calls
'
this subroutine. Refer to editrtn.txt.
StockCheck.com