Hope posting this does not offend anyone, but here is the .hal file edited.
I commented out the old mode 0 lines and added in the mode 2 lines based on
my interpretation of the section 7 HAL documentation.  Is there some other
file that I need to change or are all my troubles in these changes?

I have marked in bold type the changes

Thanks, Jim C

------------------- .HAL ------------------------------

# Generated by stepconf at Sun Jan 20 16:30:40 2008
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD
servo_period_nsec=[EMCMOT]SERVO_PERIOD
traj_period_nsec=[EMCMOT]SERVO_PERIOD key=[EMCMOT]SHMEM_KEY
num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg=0x378
setp parport.0.reset-time 5000
# loadrt stepgen step_type=0,0,0
loadrt stepgen step_type=2,2,2 ctrl_type=v,v,v
loadrt pwmgen output_type=0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf pwmgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
addf pwmgen.update servo-thread

net spindle-cmd <= motion.spindle-speed-out => pwmgen.0.value
net spindle-enable <= motion.spindle-on => pwmgen.0.enable
net spindle-pwm <= pwmgen.0.pwm
setp pwmgen.0.pwm-freq 0.0
setp pwmgen.0.scale 1166.66666667
setp pwmgen.0.offset -133.333333333
net spindle-cw <= motion.spindle-forward

net probe-in => motion.probe-input
net estop-out => parport.0.pin-01-out
# net xstep => parport.0.pin-02-out
net xphase-A => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
# net xdir => parport.0.pin-03-out
net xphase-B => parport.0.pin-03-out
# net ystep => parport.0.pin-04-out
net yphase-A => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
# net ydir => parport.0.pin-05-out
net yphase-B => parport.0.pin-05-out
# net zstep => parport.0.pin-06-out
net zphase-A => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
# net zdir => parport.0.pin-07-out
net zphase-B => parport.0.pin-07-out
# net astep => parport.0.pin-08-out
net aphase-A => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
# net adir => parport.0.pin-09-out
net aphase-B => parport.0.pin-09-out
net spindle-cw => parport.0.pin-14-out
net spindle-pwm => parport.0.pin-16-out

net both-home-x <= parport.0.pin-10-in
net both-home-y <= parport.0.pin-11-in
net both-home-z <= parport.0.pin-12-in
net both-home-a <= parport.0.pin-13-in
net probe-in <= parport.0.pin-15-in

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 50000
# setp stepgen.0.stepspace 10000
# setp stepgen.0.dirhold 70000
# setp stepgen.0.dirsetup 70000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
# net xstep <= stepgen.0.step
net xphase-A <= stepgen.0.phase-A
# net xdir <= stepgen.0.dir
net xphase-B <= stepgen.0.phase-B
net xenable axis.0.amp-enable-out => stepgen.0.enable
net both-home-x => axis.0.home-sw-in
net both-home-x => axis.0.neg-lim-sw-in
net both-home-x => axis.0.pos-lim-sw-in

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 50000
# setp stepgen.1.stepspace 10000
# setp stepgen.1.dirhold 70000
# setp stepgen.1.dirsetup 70000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
# net ystep <= stepgen.1.step
net yphase-A <= stepgen.1.phase-A
# net ydir <= stepgen.1.dir
net yphase-B <= stepgen.1.phase-B
net yenable axis.1.amp-enable-out => stepgen.1.enable
net both-home-y => axis.1.home-sw-in
net both-home-y => axis.1.neg-lim-sw-in
net both-home-y => axis.1.pos-lim-sw-in

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 50000
# setp stepgen.2.stepspace 10000
# setp stepgen.2.dirhold 70000
# setp stepgen.2.dirsetup 70000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
# net zstep <= stepgen.2.step
net zphase-A <= stepgen.2.phase-A
# net zdir <= stepgen.2.dir
net zphase-B <= stepgen.2.phase-B
net zenable axis.2.amp-enable-out => stepgen.2.enable
net both-home-z => axis.2.home-sw-in
net both-home-z => axis.2.neg-lim-sw-in
net both-home-z => axis.2.pos-lim-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-out => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare =>
iocontrol.0.tool-prepared


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to