Motion Coordinator Technical Reference Manual
Programming 7-17
Command Line Interface
Example Programs
Example 1
start:
TICKS=0
PRINT "Press a key"
WAIT UNTIL KEY
GET k
PRINT "You took ";-TICKS/1000;" seconds"
GOTO start
Example 2
'Set speed then move forward then back:
PRINT "EXAMPLE PROGRAM 2"
SPEED=100
ACCEL=1000
DECEL=1000
MOVE(250)
MOVEABS(0)
STOP
Note that the last line stops the program, not the motion. The first line is a
comment. It has no effect on the program execution.
Example 3
‘Display 16 INPUTS as a row of 1’s and 0’s
REPEAT
FOR i=0 TO 15
IF IN(i)=ON THEN
PRINT "1";
ELSE
PRINT "0";
ENDIF
NEXT i
PRINT CHR (13);
‘Character 13 will do <CR> without linefeed
UNTIL 0