'***************************************************************************
'Galil Motion Control Sample DMC Code
'***************************************************************************
'Description:
'Cycle motion back and forth in continous loop with trippoints AI, AD, AM
'***************************************************************************
#cycle    ;'label
PR 10000  ;'distance
SP 20000  ;'initial speed
AC 100000 ;'acceleration
DC 100000 ;'deceleration
AI 1      ;'wait for start pulse
BG A       ;'start motion
AD 6000   ;'wait until X moves 6000 counts
SP 10000  ;'change the speed
AM A       ;'wait for completion of move
WT 100    ;'wait 100 msec
PR -10000 ;'reverse motion
SP 20000  ;'return speed
BG A       ;'start motion
AM A       ;'wait for end of motion
JP #cycle ;'repeat the cycle
EN        ;'end