DMC-1000
Chapter 6 Programming Motion
•
71
DX[I]=XPOS[I+1]-XPOS[I] Calculate
difference
I=I+1
Update loop counter
JP#LOOP2,I<500
Continue looping until DX is full
#PLAYBK
Routine to play back motion that was recorded
SHX Servo
Here
WT1000
Wait 1 sec (1000 msec)
CMX
Specify contour mode on X axis
DT2
Set contour data rate to be 2 msec
I=0
Set array index to 0
#LOOP3
Subroutine to execute contour points
CD DX[I];WC
Contour data command; Wait for next contour point
I=I+1 Update
index
JP#LOOP3,I<500
Continue until all array elements have been executed
DT0
Set contour update rate to 0
CD0
Disable the contour mode (combination of DT0 and CD0)
EN End
program
For additional information about automatic array capture, see Chapter 7, Arrays.
Stepper Motor Operation
When configured for stepper motor operation, several commands are interpreted differently than from
servo mode. The following describes operation with stepper motors.
Specifying Stepper Motor Operation
In order to command stepper motor operation, the appropriate stepper mode jumpers must be installed.
See chapter 2 for this installation.
Stepper motor operation is specified by the command MT. The argument for MT is as follows:
2 specifies a stepper motor with active low step output pulses
-2 specifies a stepper motor with active high step output pulses
2.5
specifies a stepper motor with active low step output pulses and reversed direction
-2.5 specifies a stepper motor with active high step output pulse and reversed direction
Stepper Motor Smoothing
The command, KS, provides stepper motor smoothing. The effect of the smoothing can be thought of
as a simple Resistor-Capacitor (single pole) filter. The filter occurs after the motion profiler and has
the effect of smoothing out the spacing of pulses for a more smooth operation of the stepper motor.
Use of KS is most applicable when operating in full step or half step operation. KS will cause the step
pulses to be delayed in accordance with the time constant specified.
When operating with stepper motors, you will always have some amount of stepper motor smoothing,
KS. Since this filtering effect occurs after the profiler, the profiler may be ready for additional moves
before all of the step pulses have gone through the filter. It is important to consider this effect since
steps may be lost if the controller is commanded to generate an additional move before the previous
move has been completed. See the discussion below,
Monitoring Generated Pulses vs Commanded
Pulses
.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com