From 6f9939627fe81aaa2727afee5f4399486ea93a87 Mon Sep 17 00:00:00 2001 From: Petros Makris Date: Mon, 29 Jan 2024 14:36:38 +0200 Subject: [PATCH] updates --- config/hal/20-spindle.hal | 47 ++++++++++++++++++++------------------- config/panel.hal | 4 +++- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/config/hal/20-spindle.hal b/config/hal/20-spindle.hal index 7854d4b..4e6073f 100644 --- a/config/hal/20-spindle.hal +++ b/config/hal/20-spindle.hal @@ -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 diff --git a/config/panel.hal b/config/panel.hal index 48cd833..7dd0b6d 100644 --- a/config/panel.hal +++ b/config/panel.hal @@ -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