Hi Gene, 
In this reply I've pasted the 3 axis HAL information below.  I realize now I'm 
not the john you were referring to but maybe this will help?
John Dammeyer

> From: Gene Heskett [mailto:ghesk...@shentel.net]
> 
> I'm still having tuning problems with this thing.
> 
> Reading thru your doc it finally dawned on me that you are tuning a
> velocity mode servo, while what I had cobbled up was a position mode.
> 
> Trying to fix my hal file to work with velocity has been an even bigger
> headache.
> 
> So here I am, hat in hand, wanting to see your .hal files section showing
> how its hooked up to be a velocity mode servo.
> 
> Thanks John.
> 
> Cheers, Gene Heskett
#*******************
#  AXIS Y
#*******************
setp   pid.y.Pgain     [AXIS_1]P
setp   pid.y.Igain     [AXIS_1]I
setp   pid.y.Dgain     [AXIS_1]D
setp   pid.y.bias      [AXIS_1]BIAS
setp   pid.y.FF0       [AXIS_1]FF0
setp   pid.y.FF1       [AXIS_1]FF1
setp   pid.y.FF2       [AXIS_1]FF2
setp   pid.y.deadband  [AXIS_1]DEADBAND
setp   pid.y.maxoutput [AXIS_1]MAX_OUTPUT
setp   pid.y.error-previous-target true
#setp   pid.y.maxerror .0005

net y-index-enable  <=> pid.y.index-enable
net y-enable        =>  pid.y.enable
net y-pos-cmd       =>  pid.y.command
#net y-vel-cmd       =>  pid.y.command-deriv
net y-pos-fb        =>  pid.y.feedback
net y-output        =>  pid.y.output

# Step Gen signals/setup
setp   hm2_7i92.0.stepgen.01.dirsetup        [AXIS_1]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [AXIS_1]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [AXIS_1]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [AXIS_1]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [AXIS_1]STEP_SCALE
setp   hm2_7i92.0.stepgen.01.step_type        0
setp   hm2_7i92.0.stepgen.01.control-type     1
setp   hm2_7i92.0.stepgen.01.maxaccel         [AXIS_1]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.01.maxvel           [AXIS_1]STEPGEN_MAXVEL

# ---closedloop stepper signals---
net y-pos-cmd    <= axis.1.motor-pos-cmd
net y-vel-cmd    <= axis.1.joint-vel-cmd
net y-output     => hm2_7i92.0.stepgen.01.velocity-cmd
net y-pos-fb     <= hm2_7i92.0.stepgen.01.position-fb
net y-pos-fb     => axis.1.motor-pos-fb
net y-enable     <= axis.1.amp-enable-out
net y-enable     => hm2_7i92.0.stepgen.01.enable

net min-home-y => axis.1.home-sw-in
net min-home-y => axis.1.neg-lim-sw-in
net max-x-y-min-z => axis.1.pos-lim-sw-in


#*******************
#  AXIS Z
#*******************
setp   pid.z.Pgain     [AXIS_2]P
setp   pid.z.Igain     [AXIS_2]I
setp   pid.z.Dgain     [AXIS_2]D
setp   pid.z.bias      [AXIS_2]BIAS
setp   pid.z.FF0       [AXIS_2]FF0
setp   pid.z.FF1       [AXIS_2]FF1
setp   pid.z.FF2       [AXIS_2]FF2
setp   pid.z.deadband  [AXIS_2]DEADBAND
setp   pid.z.maxoutput [AXIS_2]MAX_OUTPUT
setp   pid.z.error-previous-target true
#setp   pid.z.maxerror .0005

net z-index-enable  <=> pid.z.index-enable
net z-enable        =>  pid.z.enable
net z-pos-cmd       =>  pid.z.command
#net z-vel-cmd       =>  pid.z.command-deriv
net z-pos-fb        =>  pid.z.feedback
net z-output        =>  pid.z.output

# Step Gen signals/setup
setp   hm2_7i92.0.stepgen.02.dirsetup        [AXIS_2]DIRSETUP
setp   hm2_7i92.0.stepgen.02.dirhold         [AXIS_2]DIRHOLD
setp   hm2_7i92.0.stepgen.02.steplen         [AXIS_2]STEPLEN
setp   hm2_7i92.0.stepgen.02.stepspace       [AXIS_2]STEPSPACE
setp   hm2_7i92.0.stepgen.02.position-scale  [AXIS_2]STEP_SCALE
setp   hm2_7i92.0.stepgen.02.step_type        0
setp   hm2_7i92.0.stepgen.02.control-type     1
setp   hm2_7i92.0.stepgen.02.maxaccel         [AXIS_2]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.02.maxvel           [AXIS_2]STEPGEN_MAXVEL

# ---closedloop stepper signals---
net z-pos-cmd    <= axis.2.motor-pos-cmd
net z-vel-cmd    <= axis.2.joint-vel-cmd
net z-output     => hm2_7i92.0.stepgen.02.velocity-cmd
net z-pos-fb     <= hm2_7i92.0.stepgen.02.position-fb
net z-pos-fb     => axis.2.motor-pos-fb
net z-enable     <= axis.2.amp-enable-out
net z-enable     => hm2_7i92.0.stepgen.02.enable

net max-home-z => axis.2.home-sw-in
net max-x-y-min-z => axis.2.neg-lim-sw-in
net max-home-z => axis.2.pos-lim-sw-in

#*******************
#  AXIS A
#*******************
setp   pid.a.Pgain     [AXIS_3]P
setp   pid.a.Igain     [AXIS_3]I
setp   pid.a.Dgain     [AXIS_3]D
setp   pid.a.bias      [AXIS_3]BIAS
setp   pid.a.FF0       [AXIS_3]FF0
setp   pid.a.FF1       [AXIS_3]FF1
setp   pid.a.FF2       [AXIS_3]FF2
setp   pid.a.deadband  [AXIS_3]DEADBAND
setp   pid.a.maxoutput [AXIS_3]MAX_OUTPUT
setp   pid.a.error-previous-target true
#setp   pid.a.maxerror .0005

net a-index-enable  <=> pid.a.index-enable
net a-enable        =>  pid.a.enable
net a-pos-cmd       =>  pid.a.command
#net a-vel-cmd       =>  pid.a.command-deriv
net a-pos-fb        =>  pid.a.feedback
net a-output        =>  pid.a.output

# Step Gen signals/setup
setp   hm2_7i92.0.stepgen.03.dirsetup        [AXIS_3]DIRSETUP
setp   hm2_7i92.0.stepgen.03.dirhold         [AXIS_3]DIRHOLD
setp   hm2_7i92.0.stepgen.03.steplen         [AXIS_3]STEPLEN
setp   hm2_7i92.0.stepgen.03.stepspace       [AXIS_3]STEPSPACE
setp   hm2_7i92.0.stepgen.03.position-scale  [AXIS_3]STEP_SCALE
setp   hm2_7i92.0.stepgen.03.step_type        0
setp   hm2_7i92.0.stepgen.03.control-type     1
setp   hm2_7i92.0.stepgen.03.maxaccel         [AXIS_3]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.03.maxvel           [AXIS_3]STEPGEN_MAXVEL

# ---closedloop stepper signals---
net a-pos-cmd    <= axis.3.motor-pos-cmd
net a-vel-cmd    <= axis.3.joint-vel-cmd
net a-output     => hm2_7i92.0.stepgen.03.velocity-cmd
net a-pos-fb     <= hm2_7i92.0.stepgen.03.position-fb
net a-pos-fb     => axis.3.motor-pos-fb
net a-enable     <= axis.3.amp-enable-out
net a-enable     => hm2_7i92.0.stepgen.03.enable




_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to