Communication and Commands
BA Intellidrive User’s Manual
3-36
Aerotech, Inc.
Version 1.4
3.7.
Sample Programs
The motion commands given above can be placed in program form. The programs can
be written on a PC and uploaded to the BAI through the COM_BAI.exe or
term_bai.exe software. For example, consider the following program named
“TESTPRG.BAI”.
The program will move the axis, set outputs and wait for inputs.
HO
;home the axis
RA .1
;change the ramp time to .1
;seconds
PR AB
;put in absolute mode
LB 50
IN 100000 F45000
;move the motor 100000 user
;units at a feedrate of 45000
;user units/second
OT X01
;Change output 0 to 1, output 1
;to 0
IT 011
;Wait for the inputs to change
;to 011
IN 0
;move the motor back to position
;0 at a feedrate is of 45000
;user units/second (if the
;feedrate is not included in the
;command, the last entered
;feedrate is used
IN 20000 F1000
;move the motor
GS 20
;gosub 20
GT 50
PS
;restart the program from the
;beginning
LB 20
;label 20
IN 34000 F20000
SR
;return from sub routine
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com