#4
Edit Routine – Editrtn.txt (Cont.)
DO
' Wait for a keypress.
Keypress=INCHAR(2)
LOOP WHILE Keypress=0
IF Keypress=13 THEN
' Go edit value if key press
CLRLINE 3
' is the ENTER key.
CLRLINE 4
DISP 4,5,"Edit Value"
GOSUB GetValue
END IF
IF keypress<>27 THEN
' Repeat until ESC key
GOTO Get_Distance
' is pressed
Distance=value
RETURN
MENU Routine (Menu.txt)
' The following subroutine will print a selection Menu on the screen.
' 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.
Menu_Display:
DISP 1,1,"F1-Dist. F3-Repeat"
DISP 2,1,"F2-Speed F4-Exec." ' The DISP command prints the items in
DISP 3,1,"Up Arrow -Jog(+)"
' quotes on the screen of the ELTERM 24.
DISP 4,1,"Dwn Arrow-Jog(-)"
RETURN
Sample Program - Eltrmsmp.tsk
#INCLUDE C:\MCPI\Elterm24.inc
' The INCLUDE statement allows the user to use the SE BASIC
' control commands for the ELTERM 24. When using the #INCLUDE
' command, the user must specify the location of the Elterm24.inc file.
INTEGER Keypress,row,col,colnew,x,y,repeat
REAL value,newvalue,min,max,motorspeed,distance
STRING
fmt$,line2$,NewValue$
' NOTE: Variable declaration is only needed when using the
' MCPI software. This is not necessary on the MCPI-MA software.
BEGIN:
CURSOR_OFF
' This section turns off the cursor and
FLUSH_RX_BUFFER
' clears the screen of the ELTERM 24. It
all
CLRSCRN
' also gets rid of any junk characters that
' might be in the receive buffer
StockCheck.com