Danaher Motion
06/2005
Appendix A
S
AMPLE
A
UTOSETUP
P
ROGRAM
Below is an example auto setup program. This sample covers several pages.
You do not need to understand the program in detail at this point but you
should familiarize yourself with the structure.
REMOVING THE SINGLE QUOTES IN THE FOLLOWING CODE CAUSES THE
PROGRAM TO ENABLE THE DRIVES AND GENERATE MOTION COMMANDS!
BE PREPARED FOR THE MACHINE TO MOVE!
ENABLING THE SYSTEM WITHOUT PROPER TUNING MAY CAUSE
UNEXPECTED MOTION! BE CERTAIN YOUR SYSTEM IS TUNED PROPERLY!
SEE THE SERVOSTAR
®
MC INSTALLATION MANUAL FOR MORE
INFORMATION.
rem -------------------------------------------------------------
rem TASK....: C:\Program Files\KMTG Motion Suite\BASIC
Moves\Projects\Junk2\Junk2.prg
rem AUTHOR..: <Name of Author Here>
rem TIME....: <Time of Creation Here>
rem PURPOSE.: Main Project File
rem -------------------------------------------------------------
rem Declare Variables Here
Dim Shared sample_int as Long
Dim Shared sample_real as Double
rem -------------------------------------------------------------
rem Main Task Begins Here
rem -------------------------------------------------------------
Program
Attach A1 'Attach to axes
Call AxisSetup 'Set up all axes
Call SercosSetup 'Bring up SERCOS ring
rem Auto generated sample program starts here
rem Sample program--remove single quote marks at beginning of
rem lines to run program
' Sys.En = on 'Enable the system
' A1.En = on 'Enable Axis A1
' A1.StartType = Immediate
' Sleep 1000 'Sleep one second
Continued on next page……….
M-SS-005-03 Rev
E
167