Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
petmakris committed Jan 29, 2024
1 parent 3d4be1e commit 6f99396
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
47 changes: 24 additions & 23 deletions config/hal/20-spindle.hal
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
addf spindle.on.or servo-thread
addf spindle.off.or servo-thread
addf spindle.on.or servo-thread
addf spindle.off.or servo-thread

addf spindle.encoder.update-counters base-thread
addf spindle.encoder.capture-position servo-thread
setp spindle.encoder.position-scale 4
setp spindle.encoder.position-scale 6

addf spindle.near servo-thread
addf spindle.near servo-thread
setp spindle.counter-mode true
setp spindle.near.scale 1.03
setp spindle.near.scale 1.05

net maho-inputs.spindle-cw <= spindle.0.reverse
net maho-inputs.spindle-ccw <= spindle.0.forward
net maho-inputs.spindle-cw <= spindle.0.reverse
net maho-inputs.spindle-ccw <= spindle.0.forward

net spindle.position <= spindle.encoder.position => spindle.0.revs
net spindle.position <= spindle.encoder.position => spindle.0.revs

net spindle.velocity <= spindle.encoder.velocity
net spindle.velocity => spindle.0.speed-in
net spindle.velocity => spindle.near.in2
net spindle.velocity <= spindle.encoder.velocity
net spindle.velocity => spindle.0.speed-in
net spindle.velocity => spindle.near.in2

net spindle.phase-a <= hm2_7i97.0.inmux.00.input-12 => spindle.encoder.phase-A
net spindle.commanded-speed <= spindle.0.speed-out-rps-abs => spindle.near.in1
net spindle.at-speed <= spindle.near.out => spindle.0.at-speed

net spindle.is-on => whb.halui.spindle.is-on
net spindle.phase-a <= hm2_7i97.0.inmux.00.input-12 => spindle.encoder.phase-A
net spindle.commanded-speed <= spindle.0.speed-out-rps-abs => spindle.near.in1
net spindle.at-speed <= spindle.near.out => spindle.0.at-speed

net buttons.set-spindle-on => spindle.on.or.in0
net pendant.spindle.on <= whb.halui.spindle.start => spindle.on.or.in1
net spindle.set-on <= spindle.on.or.out => halui.spindle.0.start
net spindle.is-on => whb.halui.spindle.is-on

net buttons.set-spindle-off => spindle.off.or.in0
net pendant.spindle.off <= whb.halui.spindle.stop => spindle.off.or.in1
net spindle.set-off <= spindle.off.or.out => halui.spindle.0.stop
net buttons.set-spindle-on => spindle.on.or.in0
net pendant.spindle.on <= whb.halui.spindle.start => spindle.on.or.in1
net spindle.set-on <= spindle.on.or.out => halui.spindle.0.start

net pendant.spindle.forward <= whb.halui.spindle.forward => halui.spindle.0.forward
net pendant.spindle.reverse <= whb.halui.spindle.reverse => halui.spindle.0.reverse
net buttons.set-spindle-off => spindle.off.or.in0
net pendant.spindle.off <= whb.halui.spindle.stop => spindle.off.or.in1
net spindle.set-off <= spindle.off.or.out => halui.spindle.0.stop

net pendant.spindle.forward <= whb.halui.spindle.forward => halui.spindle.0.forward
net pendant.spindle.reverse <= whb.halui.spindle.reverse => halui.spindle.0.reverse


# net pendant.spindle.increase whb.halui.spindle.increase halui.spindle.0.increase
Expand Down
4 changes: 3 additions & 1 deletion config/panel.hal
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
net panel.feed-override.value => pyvcp.feed-override
net panel.spindle-speed => pyvcp.spindle-speed

net spindle.velocity => pyvcp.spindle-speed

net panel.jog-speed => pyvcp.jog-speed

0 comments on commit 6f99396

Please sign in to comment.