65
U s e r I n t e r f a c e S a m p l e
This sample program will ask the user for an absolute axis position, then index
to that position.
PGM 200
VAR POSITION=0
'declare local var POSITION
LBL LOOP
'name the program LOOP
PRINT "Enter an absolute position:";
INPUT POSITION
'wait for user to enter position
MOVA POSITION
'absolute index to POSITION
HOLD 2
'suspend program until motion completes
BR LOOP
'loop to beginning of program
END
PGM
B a c k a n d F o r t h
This program will move 1 revolution in a positive direction, then 1 revolution in
a negative direction, then repeat until the escape key on the terminal keyboard is
pressed.
MUNIT=51200/360
'set munits to degrees
PGM 200
LBL BNF
'label program BNF
MOVR 360
'index re360°
HOLD 2
'suspend program until move completes
MOVR -360
'index relative -360°
HOLD 2
'suspend program until move completes
BR BNF
'loop to beginning of program
END
PGM
B a c k a n d F o r t h P a r t 2
This program will move 1 revolution in a positive direction, print “Forth” to the
terminal display and wait two seconds. It will then turn 1 revolution in a nega-
tive direction, print “Back” to the display, wait two seconds, then repeat until
the escape key is pressed on the terminal keyboard.
MUNIT=51200/360
'set munits to degrees
PGM 200
LBL BNF2
'label program BNF
MOVR 360
'index re360°
HOLD 2
'suspend program until move completes
PRINT "Forth"
DELAY 2000
'delay program 2 seconds
MOVR -360
'index relative -360°
HOLD 2
'suspend program until move completes
PRINT "Back"
DELAY 2000
'delay program 2 seconds
BR BNF2
'loop to beginning of program
END
PGM
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from