Vista CNC and 2.9
30 May 2024 18:24 #301875
by milu
Vista CNC and 2.9 was created by milu
I'm kicking myself because I solved this once before, and can't remember how I did it. I have a Vista CNC vc-p4s pendant that mostly works with Linuxcnc 2.9. However, the spindle on button does not. This is the custom hal code for the spindle:
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
If I look at the hal configuration, there is another signal, named spindle-on that turns the spindle on and off when I toggle it. So I know the parallel port works. And the pendant correctly triggers halui.spindle.0.start and halui.spindle.0.stop (they just don't do anything). How would I debug this?
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
If I look at the hal configuration, there is another signal, named spindle-on that turns the spindle on and off when I toggle it. So I know the parallel port works. And the pendant correctly triggers halui.spindle.0.start and halui.spindle.0.stop (they just don't do anything). How would I debug this?
Please Log in or Create an account to join the conversation.
30 May 2024 19:17 #301879
by spumco
Replied by spumco on topic Vista CNC and 2.9
I think you've just got a hal pin/signal mismatch, and not something more serious.
I'd use halshow to see what signal/pin is toggled by the vista python & hal file(s) when the pendant spindle button is pressed.
Once you know what the pendant is trying to do, it's not that bad to get that action to the right output pins. If you report back with what pin or signal gets toggled by the vista button and post your hal files I/we can have a look.
I'd use halshow to see what signal/pin is toggled by the vista python & hal file(s) when the pendant spindle button is pressed.
Once you know what the pendant is trying to do, it's not that bad to get that action to the right output pins. If you report back with what pin or signal gets toggled by the vista button and post your hal files I/we can have a look.
Please Log in or Create an account to join the conversation.
30 May 2024 19:50 #301882
by milu
Replied by milu on topic Vista CNC and 2.9
Pressing the spindle start sequence on the pendant causes spindle.start to illuminate momentarily, and then illuminates spindle-is-on. The spindle stop sequence on the pendant causes spindle.stop to illuminate momentarily, and turns spindle-is-on back to its normal state.
Please Log in or Create an account to join the conversation.
30 May 2024 19:52 #301883
by milu
Replied by milu on topic Vista CNC and 2.9
# 0---vc-p4s Control Pendant
loadusr -W vc-p4s
loadrt and2 names=and2.vc
addf and2.vc servo-thread
# 1---LCD reletive Coordinates
net axis.0.pos-relative halui.axis.x.pos-relative => vc-p4s.axis.0.pos-relative
net axis.1.pos-relative halui.axis.y.pos-relative => vc-p4s.axis.1.pos-relative
net axis.2.pos-relative halui.axis.z.pos-relative => vc-p4s.axis.2.pos-relative
# 2---JOG
net axis.0.jog-en vc-p4s.axis.0.jog-enable => axis.x.jog-enable joint.0.jog-enable
net axis.1.jog-en vc-p4s.axis.1.jog-enable => axis.y.jog-enable joint.1.jog-enable
net axis.2.jog-en vc-p4s.axis.2.jog-enable => axis.z.jog-enable joint.2.jog-enable
net jog-scale vc-p4s.jog-scale => joint.0.jog-scale axis.x.jog-scale
net jog-scale vc-p4s.jog-scale => joint.1.jog-scale axis.y.jog-scale
net jog-scale vc-p4s.jog-scale => joint.2.jog-scale axis.z.jog-scale
net jog-counts vc-p4s.jog-counts => joint.0.jog-counts axis.x.jog-counts
net jog-counts vc-p4s.jog-counts => joint.1.jog-counts axis.y.jog-counts
net jog-counts vc-p4s.jog-counts => joint.2.jog-counts axis.z.jog-counts
net jog.0.cont-plus vc-p4s.jog.0.plus => halui.axis.x.plus halui.joint.0.plus
net jog.0.cont-minus vc-p4s.jog.0.minus => halui.axis.x.minus halui.joint.0.minus
net jog.1.cont-plus vc-p4s.jog.1.plus => halui.axis.y.plus halui.joint.1.plus
net jog.1.cont-minus vc-p4s.jog.1.minus => halui.axis.y.minus halui.joint.1.minus
net jog.2.cont-plus vc-p4s.jog.2.plus => halui.axis.z.plus halui.joint.2.plus
net jog.2.cont-mimus vc-p4s.jog.2.minus => halui.axis.z.minus halui.joint.2.minus
net jog-speed vc-p4s.jog.velocity => halui.axis.jog-speed halui.joint.jog-speed
net motion-in-position motion.in-position => vc-p4s.is-moving
setp axis_0_max_velocity [JOINT_0]MAX_VELOCITY
setp axis_1_max_velocity [JOINT_1]MAX_VELOCITY
setp axis_2_max_velocity [JOINT_2]MAX_VELOCITY
# 3---FOR 4TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.3.pos-relative halui.axis.a.pos-relative => vc-p4s.axis.3.pos-relative
#net axis.3.jog-en vc-p4s.axis.3.jog-enable => axis.a.jog-enable joint.3.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.3.jog-scale axis.a.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.3.jog-counts axis.a.jog-counts
#net jog.3.cont-plus vc-p4s.jog.3.plus => halui.axis.a.plus halui.joint.3.plus
#net jog.3.cont-mimus vc-p4s.jog.3.minus => halui.axis.a.minus halui.joint.3.minus
#setp axis_3_max_velocity [JOINT_3]MAX_VELOCITY
# 4---FOR 5TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.4.pos-relative halui.axis.b.pos-relative => vc-p4s.axis.4.pos-relative
#net axis.4.jog-en vc-p4s.axis.4.jog-enable => axis.b.jog-enable joint.4.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.4.jog-scale axis.b.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.4.jog-counts axis.b.jog-counts
#net jog.4.cont-plus vc-p4s.jog.4.plus => halui.axis.b.plus halui.joint.4.plus
#net jog.4.cont-mimus vc-p4s.jog.4.minus => halui.axis.b.minus halui.joint.4.minus
#setp axis_4_max_velocity [JOINT_4]MAX_VELOCITY
# 5--FOR 6TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.5.pos-relative halui.axis.c.pos-relative => vc-p4s.axis.5.pos-relative
#net axis.5.jog-en vc-p4s.axis.5.jog-enable => axis.c.jog-enable joint.5.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.5.jog-scale axis.c.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.5.jog-counts axis.c.jog-counts
#net jog.5.cont-plus vc-p4s.jog.5.plus => halui.axis.c.plus halui.joint.5.plus
#net jog.5.cont-mimus vc-p4s.jog.5.minus => halui.axis.c.minus halui.joint.5.minus
#setp axis_5_max_velocity [JOINT_5]MAX_VELOCITY
# 6---FEED OVERRIDE
setp halui.feed-override.scale 0.001
net feed-enable vc-p4s.feed-override.count.enable => halui.feed-override.count-enable
net feedrate-counts vc-p4s.feedrate-counts => halui.feed-override.counts
net feed.value halui.feed-override.value => vc-p4s.feed-override.value
# 7---RAPID OVERRIDE
setp halui.rapid-override.scale 0.001
net rapid-enable vc-p4s.rapid-override.count.enable => halui.rapid-override.count-enable
net rapid-counts vc-p4s.rapid-counts => halui.rapid-override.counts
net rapid.value halui.rapid-override.value => vc-p4s.rapid-override.value
# 8---MAX VELOCITY
setp halui.max-velocity.scale 0.001
net max-enable vc-p4s.max-velocity.count.enable => halui.max-velocity.count-enable
net max-counts vc-p4s.max-counts => halui.max-velocity.counts
net max.value halui.max-velocity.value => vc-p4s.max-velocity.value
# 9---SPINDLE OVERRIDE
setp halui.spindle.0.override.scale 0.001
net spindle-enable vc-p4s.spindle-override.count.enable => halui.spindle.0.override.count-enable
net spindle-counts vc-p4s.spindle-counts => halui.spindle.0.override.counts
net spindle.value halui.spindle.0.override.value => vc-p4s.spindle-override.value
# 10---PROGRAM
net program.is-idle halui.program.is-idle => vc-p4s.program.is-idle
net program.is-paused halui.program.is-paused => vc-p4s.program.is-paused
net program.is-running halui.program.is-running => vc-p4s.program.is-running
net program-start-btn halui.mode.auto and2.vc.in0 <= vc-p4s.program.run
net program-run-ok and2.vc.in1 <= halui.mode.is-auto
net remote-program-run halui.program.run <= and2.vc.out
net program.pause vc-p4s.program.pause => halui.program.pause
net program.resume vc-p4s.program.resume => halui.program.resume
net program.stop vc-p4s.program.stop => halui.program.stop
# 11---ZERO
net zero-x vc-p4s.zero-x => halui.mdi-command-05
net zero-y vc-p4s.zero-y => halui.mdi-command-06
net zero-z vc-p4s.zero-z => halui.mdi-command-07
net x-go-to-zero vc-p4s.x-go-to-zero => halui.mdi-command-08
net y-go-to-zero vc-p4s.y-go-to-zero => halui.mdi-command-09
net z-go-to-zero vc-p4s.z-go-to-zero => halui.mdi-command-10
# 12---SPINDLE
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
# 13---E-STOP
net estop vc-p4s.estop.activate => halui.estop.activate
net reset vc-p4s.estop.reset => halui.estop.reset
net estop-is-activated halui.estop.is-activated => vc-p4s.estop.is-activated
# 14---MACHINE
net machine-on vc-p4s.machine.on => halui.machine.on
net machine-off vc-p4s.machine.off => halui.machine.off
net machine-ison halui.machine.is-on => vc-p4s.machine.ison
##### P4-S PENDANT SETTINGS #####
# 15---STEP SIZE, SET 0 TO SKIP
setp stepsize-1 0.0001
# DEFAULT
setp stepsize-2 0.001
setp stepsize-3 0.01
setp stepsize-4 0.1
setp stepsize-5 1
setp stepsize-6 0
setp stepsize-7 0
setp stepsize-8 0
setp stepsize-9 0
loadusr -W vc-p4s
loadrt and2 names=and2.vc
addf and2.vc servo-thread
# 1---LCD reletive Coordinates
net axis.0.pos-relative halui.axis.x.pos-relative => vc-p4s.axis.0.pos-relative
net axis.1.pos-relative halui.axis.y.pos-relative => vc-p4s.axis.1.pos-relative
net axis.2.pos-relative halui.axis.z.pos-relative => vc-p4s.axis.2.pos-relative
# 2---JOG
net axis.0.jog-en vc-p4s.axis.0.jog-enable => axis.x.jog-enable joint.0.jog-enable
net axis.1.jog-en vc-p4s.axis.1.jog-enable => axis.y.jog-enable joint.1.jog-enable
net axis.2.jog-en vc-p4s.axis.2.jog-enable => axis.z.jog-enable joint.2.jog-enable
net jog-scale vc-p4s.jog-scale => joint.0.jog-scale axis.x.jog-scale
net jog-scale vc-p4s.jog-scale => joint.1.jog-scale axis.y.jog-scale
net jog-scale vc-p4s.jog-scale => joint.2.jog-scale axis.z.jog-scale
net jog-counts vc-p4s.jog-counts => joint.0.jog-counts axis.x.jog-counts
net jog-counts vc-p4s.jog-counts => joint.1.jog-counts axis.y.jog-counts
net jog-counts vc-p4s.jog-counts => joint.2.jog-counts axis.z.jog-counts
net jog.0.cont-plus vc-p4s.jog.0.plus => halui.axis.x.plus halui.joint.0.plus
net jog.0.cont-minus vc-p4s.jog.0.minus => halui.axis.x.minus halui.joint.0.minus
net jog.1.cont-plus vc-p4s.jog.1.plus => halui.axis.y.plus halui.joint.1.plus
net jog.1.cont-minus vc-p4s.jog.1.minus => halui.axis.y.minus halui.joint.1.minus
net jog.2.cont-plus vc-p4s.jog.2.plus => halui.axis.z.plus halui.joint.2.plus
net jog.2.cont-mimus vc-p4s.jog.2.minus => halui.axis.z.minus halui.joint.2.minus
net jog-speed vc-p4s.jog.velocity => halui.axis.jog-speed halui.joint.jog-speed
net motion-in-position motion.in-position => vc-p4s.is-moving
setp axis_0_max_velocity [JOINT_0]MAX_VELOCITY
setp axis_1_max_velocity [JOINT_1]MAX_VELOCITY
setp axis_2_max_velocity [JOINT_2]MAX_VELOCITY
# 3---FOR 4TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.3.pos-relative halui.axis.a.pos-relative => vc-p4s.axis.3.pos-relative
#net axis.3.jog-en vc-p4s.axis.3.jog-enable => axis.a.jog-enable joint.3.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.3.jog-scale axis.a.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.3.jog-counts axis.a.jog-counts
#net jog.3.cont-plus vc-p4s.jog.3.plus => halui.axis.a.plus halui.joint.3.plus
#net jog.3.cont-mimus vc-p4s.jog.3.minus => halui.axis.a.minus halui.joint.3.minus
#setp axis_3_max_velocity [JOINT_3]MAX_VELOCITY
# 4---FOR 5TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.4.pos-relative halui.axis.b.pos-relative => vc-p4s.axis.4.pos-relative
#net axis.4.jog-en vc-p4s.axis.4.jog-enable => axis.b.jog-enable joint.4.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.4.jog-scale axis.b.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.4.jog-counts axis.b.jog-counts
#net jog.4.cont-plus vc-p4s.jog.4.plus => halui.axis.b.plus halui.joint.4.plus
#net jog.4.cont-mimus vc-p4s.jog.4.minus => halui.axis.b.minus halui.joint.4.minus
#setp axis_4_max_velocity [JOINT_4]MAX_VELOCITY
# 5--FOR 6TH AXIS, REMOVE # FROM THE FOLLOWING LINES
#net axis.5.pos-relative halui.axis.c.pos-relative => vc-p4s.axis.5.pos-relative
#net axis.5.jog-en vc-p4s.axis.5.jog-enable => axis.c.jog-enable joint.5.jog-enable
#net jog-scale vc-p4s.jog-scale => joint.5.jog-scale axis.c.jog-scale
#net jog-counts vc-p4s.jog-counts => joint.5.jog-counts axis.c.jog-counts
#net jog.5.cont-plus vc-p4s.jog.5.plus => halui.axis.c.plus halui.joint.5.plus
#net jog.5.cont-mimus vc-p4s.jog.5.minus => halui.axis.c.minus halui.joint.5.minus
#setp axis_5_max_velocity [JOINT_5]MAX_VELOCITY
# 6---FEED OVERRIDE
setp halui.feed-override.scale 0.001
net feed-enable vc-p4s.feed-override.count.enable => halui.feed-override.count-enable
net feedrate-counts vc-p4s.feedrate-counts => halui.feed-override.counts
net feed.value halui.feed-override.value => vc-p4s.feed-override.value
# 7---RAPID OVERRIDE
setp halui.rapid-override.scale 0.001
net rapid-enable vc-p4s.rapid-override.count.enable => halui.rapid-override.count-enable
net rapid-counts vc-p4s.rapid-counts => halui.rapid-override.counts
net rapid.value halui.rapid-override.value => vc-p4s.rapid-override.value
# 8---MAX VELOCITY
setp halui.max-velocity.scale 0.001
net max-enable vc-p4s.max-velocity.count.enable => halui.max-velocity.count-enable
net max-counts vc-p4s.max-counts => halui.max-velocity.counts
net max.value halui.max-velocity.value => vc-p4s.max-velocity.value
# 9---SPINDLE OVERRIDE
setp halui.spindle.0.override.scale 0.001
net spindle-enable vc-p4s.spindle-override.count.enable => halui.spindle.0.override.count-enable
net spindle-counts vc-p4s.spindle-counts => halui.spindle.0.override.counts
net spindle.value halui.spindle.0.override.value => vc-p4s.spindle-override.value
# 10---PROGRAM
net program.is-idle halui.program.is-idle => vc-p4s.program.is-idle
net program.is-paused halui.program.is-paused => vc-p4s.program.is-paused
net program.is-running halui.program.is-running => vc-p4s.program.is-running
net program-start-btn halui.mode.auto and2.vc.in0 <= vc-p4s.program.run
net program-run-ok and2.vc.in1 <= halui.mode.is-auto
net remote-program-run halui.program.run <= and2.vc.out
net program.pause vc-p4s.program.pause => halui.program.pause
net program.resume vc-p4s.program.resume => halui.program.resume
net program.stop vc-p4s.program.stop => halui.program.stop
# 11---ZERO
net zero-x vc-p4s.zero-x => halui.mdi-command-05
net zero-y vc-p4s.zero-y => halui.mdi-command-06
net zero-z vc-p4s.zero-z => halui.mdi-command-07
net x-go-to-zero vc-p4s.x-go-to-zero => halui.mdi-command-08
net y-go-to-zero vc-p4s.y-go-to-zero => halui.mdi-command-09
net z-go-to-zero vc-p4s.z-go-to-zero => halui.mdi-command-10
# 12---SPINDLE
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
# 13---E-STOP
net estop vc-p4s.estop.activate => halui.estop.activate
net reset vc-p4s.estop.reset => halui.estop.reset
net estop-is-activated halui.estop.is-activated => vc-p4s.estop.is-activated
# 14---MACHINE
net machine-on vc-p4s.machine.on => halui.machine.on
net machine-off vc-p4s.machine.off => halui.machine.off
net machine-ison halui.machine.is-on => vc-p4s.machine.ison
##### P4-S PENDANT SETTINGS #####
# 15---STEP SIZE, SET 0 TO SKIP
setp stepsize-1 0.0001
# DEFAULT
setp stepsize-2 0.001
setp stepsize-3 0.01
setp stepsize-4 0.1
setp stepsize-5 1
setp stepsize-6 0
setp stepsize-7 0
setp stepsize-8 0
setp stepsize-9 0
Please Log in or Create an account to join the conversation.
30 May 2024 21:31 #301891
by spumco
Replied by spumco on topic Vista CNC and 2.9
I think there's a disconnect between your main hal and the vista hal. The vista has a spindle.is-on signal, but your halshow was spindle-is-on signal.
My guess is that the vista hal file hasn't been updated (by vista) since the multi-spindle changes in LCNC, so spindle pins are usually spindle.0.something.
You'll probably need to add an or2.component to permit the spindle to be started via the GUI, physical button (if present), and the vista pendant.
Can you post your main hal file(s)?
My guess is that the vista hal file hasn't been updated (by vista) since the multi-spindle changes in LCNC, so spindle pins are usually spindle.0.something.
You'll probably need to add an or2.component to permit the spindle to be started via the GUI, physical button (if present), and the vista pendant.
Can you post your main hal file(s)?
Please Log in or Create an account to join the conversation.
31 May 2024 00:35 #301906
by milu
Replied by milu on topic Vista CNC and 2.9
Here's the main hal:# Generated by stepconf 1.1 at Wed May 29 20:10:30 2024
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump 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
net spindle-on => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net astep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net adir => parport.0.pin-09-out
net spindle-cw => parport.0.pin-14-out
net charge-pump => parport.0.pin-16-out
net xenable => parport.0.pin-17-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 25000
setp stepgen.0.dirsetup 25000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 25000
setp stepgen.1.dirsetup 25000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 25000
setp stepgen.2.dirsetup 25000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
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
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt charge_pump
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump 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
net spindle-on => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
net astep => parport.0.pin-08-out
setp parport.0.pin-08-out-reset 1
net adir => parport.0.pin-09-out
net spindle-cw => parport.0.pin-14-out
net charge-pump => parport.0.pin-16-out
net xenable => parport.0.pin-17-out
setp stepgen.0.position-scale [JOINT_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 25000
setp stepgen.0.dirsetup 25000
setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL
net xpos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => joint.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable joint.0.amp-enable-out => stepgen.0.enable
setp stepgen.1.position-scale [JOINT_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 25000
setp stepgen.1.dirsetup 25000
setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL
net ypos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => joint.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable joint.1.amp-enable-out => stepgen.1.enable
setp stepgen.2.position-scale [JOINT_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 25000
setp stepgen.2.dirsetup 25000
setp stepgen.2.maxaccel [JOINT_2]STEPGEN_MAXACCEL
net zpos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => joint.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable joint.2.amp-enable-out => stepgen.2.enable
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
Please Log in or Create an account to join the conversation.
31 May 2024 02:17 #301915
by spumco
Replied by spumco on topic Vista CNC and 2.9
So... as you mentioned in the first post, signal 'spindle-on' is connected to your parport pin, which is what turns the spindle on.
I don't know what's connected to that signal - i.e. what input drives that signal. Perhaps something in your GUI? What GUI are you using?
Can you look in halshow and see what pin is connected to signal 'spindle-on'?
Reason I'm asking is because I think you need an or2 component so that either the vista output or the GUI output can start/stop the spindle. And we need to know what pin is currently driving the signal so we can set up the appropriate or2 logic.
I don't know what's connected to that signal - i.e. what input drives that signal. Perhaps something in your GUI? What GUI are you using?
Can you look in halshow and see what pin is connected to signal 'spindle-on'?
Reason I'm asking is because I think you need an or2 component so that either the vista output or the GUI output can start/stop the spindle. And we need to know what pin is currently driving the signal so we can set up the appropriate or2 logic.
Please Log in or Create an account to join the conversation.
31 May 2024 02:37 #301917
by milu
Replied by milu on topic Vista CNC and 2.9
According to halshow, nothing is connected to spindle-on (although, as you mention spindle-on is connected to parport). I tried something like:
net spindle.start vc-p4s.spindle.start => spindle-on
But it causes linuxcnc to abort on launch because it can't find spindle-on and I don't know any other way to refer to spindle-on.
For what it is worth, even the current setup seems to cause a command to start the spindle to be written to shared memory, and then read back, but nothing happens.
net spindle.start vc-p4s.spindle.start => spindle-on
But it causes linuxcnc to abort on launch because it can't find spindle-on and I don't know any other way to refer to spindle-on.
For what it is worth, even the current setup seems to cause a command to start the spindle to be written to shared memory, and then read back, but nothing happens.
Please Log in or Create an account to join the conversation.
31 May 2024 08:31 - 31 May 2024 08:33 #301931
by Aciera
Replied by Aciera on topic Vista CNC and 2.9
I think you are confusing 'signals' and 'pins'.
With this line you assign the pin 'parport.0.pin-01-out' to a signal named 'spindle-on'
net spindle-on => parport.0.pin-01-out
to connect that signal to another pin you would use:
net spindle-on <= vc-p4s.spindle.start
Note that the '<=' and '=>' are optional and only help the user to see the direction of the information.
[edit]
for more information see section 1.4:
www.linuxcnc.org/docs/html/hal/basic-hal.html
With this line you assign the pin 'parport.0.pin-01-out' to a signal named 'spindle-on'
net spindle-on => parport.0.pin-01-out
to connect that signal to another pin you would use:
net spindle-on <= vc-p4s.spindle.start
Note that the '<=' and '=>' are optional and only help the user to see the direction of the information.
[edit]
for more information see section 1.4:
www.linuxcnc.org/docs/html/hal/basic-hal.html
Last edit: 31 May 2024 08:33 by Aciera.
The following user(s) said Thank You: spumco
Please Log in or Create an account to join the conversation.
31 May 2024 18:59 #301983
by milu
Replied by milu on topic Vista CNC and 2.9
So I changed it to match what I think is your suggestion:
# 12---SPINDLE
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
#net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle-on <= vc-p4s.spindle.start
I assumed this would allow the pendant to turn the spindle on (but maybe not off), but it does neither. Did I get this wrong?
# 12---SPINDLE
net spindle.is-on halui.spindle.0.is-on => vc-p4s.spindle.is-on
#net spindle.start vc-p4s.spindle.start => halui.spindle.0.start
net spindle.stop vc-p4s.spindle.stop => halui.spindle.0.stop
net spindle-on <= vc-p4s.spindle.start
I assumed this would allow the pendant to turn the spindle on (but maybe not off), but it does neither. Did I get this wrong?
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds