Add Movment inhibit from spindle at speed signal to stop movment on spindown
This commit is contained in:
parent
c577f0de9a
commit
c864c69735
36
3040T.hal
36
3040T.hal
|
@ -1,4 +1,4 @@
|
||||||
#Real Time Modules
|
# Real Time Modules
|
||||||
loadrt [KINS]KINEMATICS
|
loadrt [KINS]KINEMATICS
|
||||||
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_spindles=[TRAJ]SPINDLES
|
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_spindles=[TRAJ]SPINDLES
|
||||||
loadrt hal_parport cfg="0 out"
|
loadrt hal_parport cfg="0 out"
|
||||||
|
@ -8,6 +8,7 @@ loadrt ilowpass count=1
|
||||||
loadrt timedelay count=2
|
loadrt timedelay count=2
|
||||||
loadrt or2 count=3
|
loadrt or2 count=3
|
||||||
loadrt xor2 count=2
|
loadrt xor2 count=2
|
||||||
|
loadrt not count=1
|
||||||
loadrt mux_generic config="bb2"
|
loadrt mux_generic config="bb2"
|
||||||
loadrt dsmono count=1
|
loadrt dsmono count=1
|
||||||
loadrt timedelta count=1
|
loadrt timedelta count=1
|
||||||
|
@ -25,7 +26,7 @@ addf motion-controller servo-thread
|
||||||
addf stepgen.update-freq servo-thread
|
addf stepgen.update-freq servo-thread
|
||||||
addf dsmono.0 servo-thread
|
addf dsmono.0 servo-thread
|
||||||
|
|
||||||
#Pin Assignments
|
# Pin Assignments
|
||||||
net estop-out => parport.0.pin-01-out
|
net estop-out => parport.0.pin-01-out
|
||||||
net xstep => parport.0.pin-02-out
|
net xstep => parport.0.pin-02-out
|
||||||
setp parport.0.pin-02-out-reset 1
|
setp parport.0.pin-02-out-reset 1
|
||||||
|
@ -45,14 +46,14 @@ net min-home-x <= parport.0.pin-11-in-not
|
||||||
net min-home-y <= parport.0.pin-12-in-not
|
net min-home-y <= parport.0.pin-12-in-not
|
||||||
net max-home-z <= parport.0.pin-13-in-not
|
net max-home-z <= parport.0.pin-13-in-not
|
||||||
|
|
||||||
#Probe
|
# Probe
|
||||||
setp dsmono.0.deadtime-ns 50000000
|
setp dsmono.0.deadtime-ns 50000000
|
||||||
net probe-in <= parport.0.pin-15-in-not
|
net probe-in <= parport.0.pin-15-in-not
|
||||||
net probe-in => dsmono.0.in
|
net probe-in => dsmono.0.in
|
||||||
net probe-debounced <= dsmono.0.out
|
net probe-debounced <= dsmono.0.out
|
||||||
net probe-debounced => motion.probe-input
|
net probe-debounced => motion.probe-input
|
||||||
|
|
||||||
#X-Axis
|
# X-Axis
|
||||||
setp stepgen.0.position-scale [JOINT_0]SCALE
|
setp stepgen.0.position-scale [JOINT_0]SCALE
|
||||||
setp stepgen.0.steplen 1
|
setp stepgen.0.steplen 1
|
||||||
setp stepgen.0.stepspace 0
|
setp stepgen.0.stepspace 0
|
||||||
|
@ -67,7 +68,7 @@ net xenable joint.0.amp-enable-out => stepgen.0.enable
|
||||||
net min-home-x => joint.0.home-sw-in
|
net min-home-x => joint.0.home-sw-in
|
||||||
net min-home-x => joint.0.neg-lim-sw-in
|
net min-home-x => joint.0.neg-lim-sw-in
|
||||||
|
|
||||||
#Y-Axis
|
# Y-Axis
|
||||||
setp stepgen.1.position-scale [JOINT_1]SCALE
|
setp stepgen.1.position-scale [JOINT_1]SCALE
|
||||||
setp stepgen.1.steplen 1
|
setp stepgen.1.steplen 1
|
||||||
setp stepgen.1.stepspace 0
|
setp stepgen.1.stepspace 0
|
||||||
|
@ -82,7 +83,7 @@ net yenable joint.1.amp-enable-out => stepgen.1.enable
|
||||||
net min-home-y => joint.1.home-sw-in
|
net min-home-y => joint.1.home-sw-in
|
||||||
net min-home-y => joint.1.neg-lim-sw-in
|
net min-home-y => joint.1.neg-lim-sw-in
|
||||||
|
|
||||||
#Z-Axis
|
# Z-Axis
|
||||||
setp stepgen.2.position-scale [JOINT_2]SCALE
|
setp stepgen.2.position-scale [JOINT_2]SCALE
|
||||||
setp stepgen.2.steplen 1
|
setp stepgen.2.steplen 1
|
||||||
setp stepgen.2.stepspace 0
|
setp stepgen.2.stepspace 0
|
||||||
|
@ -97,9 +98,9 @@ net zenable joint.2.amp-enable-out => stepgen.2.enable
|
||||||
net max-home-z => joint.2.home-sw-in
|
net max-home-z => joint.2.home-sw-in
|
||||||
net max-home-z => joint.2.pos-lim-sw-in
|
net max-home-z => joint.2.pos-lim-sw-in
|
||||||
|
|
||||||
#A-Axis
|
# A-Axis
|
||||||
|
|
||||||
#Absolute
|
# Absolute
|
||||||
setp stepgen.3.position-scale [JOINT_3]SCALE
|
setp stepgen.3.position-scale [JOINT_3]SCALE
|
||||||
setp stepgen.3.steplen 1
|
setp stepgen.3.steplen 1
|
||||||
setp stepgen.3.stepspace 0
|
setp stepgen.3.stepspace 0
|
||||||
|
@ -115,7 +116,7 @@ net apos-fb stepgen.3.position-fb => joint.3.motor-pos-fb
|
||||||
|
|
||||||
net astep <= mux-gen.00.out-bit
|
net astep <= mux-gen.00.out-bit
|
||||||
|
|
||||||
#Velocity
|
# Velocity
|
||||||
setp stepgen.4.position-scale [JOINT_3]SCALE
|
setp stepgen.4.position-scale [JOINT_3]SCALE
|
||||||
setp stepgen.4.steplen 1
|
setp stepgen.4.steplen 1
|
||||||
setp stepgen.4.stepspace 0
|
setp stepgen.4.stepspace 0
|
||||||
|
@ -130,20 +131,20 @@ net astepVel <= stepgen.4.step => mux-gen.00.in-bit-01
|
||||||
net estop-out <= iocontrol.0.user-enable-out
|
net estop-out <= iocontrol.0.user-enable-out
|
||||||
net estop-ext => iocontrol.0.emc-enable-in
|
net estop-ext => iocontrol.0.emc-enable-in
|
||||||
|
|
||||||
#Toolchanger
|
# Toolchanger
|
||||||
loadusr -W hal_manualtoolchange
|
loadusr -W hal_manualtoolchange
|
||||||
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
|
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
|
||||||
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
|
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
|
||||||
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
|
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
|
||||||
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
|
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
|
||||||
|
|
||||||
#CNCExtension
|
# CNCExtension
|
||||||
loadusr -Wn cncextension ./cncextension
|
loadusr -Wn cncextension ./cncextension
|
||||||
|
|
||||||
#Amp enable
|
# Amp enable
|
||||||
net amp-enable halui.machine.is-on => cncextension.wr0
|
net amp-enable halui.machine.is-on => cncextension.wr0
|
||||||
|
|
||||||
#Main Spindle Control
|
# Spindle Control
|
||||||
net spindle-main-fwd spindle.0.forward
|
net spindle-main-fwd spindle.0.forward
|
||||||
net spindle-main-fwd => cncextension.ch0
|
net spindle-main-fwd => cncextension.ch0
|
||||||
net spindle-main-fwd => cncextension.ch2
|
net spindle-main-fwd => cncextension.ch2
|
||||||
|
@ -166,11 +167,16 @@ net spindle-on-timer => or2.0.in0
|
||||||
net spindle-off-timer => or2.0.in1
|
net spindle-off-timer => or2.0.in1
|
||||||
net spindle-main-inhibit <= or2.0.out
|
net spindle-main-inhibit <= or2.0.out
|
||||||
|
|
||||||
|
# Currently not working override for a axis spindle?
|
||||||
addf or2.1 servo-thread
|
addf or2.1 servo-thread
|
||||||
net spindle-1-enable => or2.1.in0
|
net spindle-1-enable => or2.1.in0
|
||||||
net spindle-main-inhibit => or2.1.in1
|
net spindle-main-inhibit => or2.1.in1
|
||||||
net spindle-inhibit <= or2.1.out
|
net spindle-inhibit <= or2.1.out
|
||||||
|
|
||||||
net spindle-main-inhibit => spindle.0.at-speed
|
net spindle-main-inhibit => spindle.0.at-speed
|
||||||
|
net spindle-main-inhibit => not.0.in
|
||||||
|
net spindle-main-inhibit-not <= not.0.out
|
||||||
|
net spindle-main-inhibit-not => motion.feed-inhibit
|
||||||
|
|
||||||
net spindle-position => spindle.0.revs
|
net spindle-position => spindle.0.revs
|
||||||
net spindle-axis-rpm => spindle.0.speed-in
|
net spindle-axis-rpm => spindle.0.speed-in
|
||||||
|
@ -209,7 +215,7 @@ net encoder-counts => axis.x.jog-counts
|
||||||
net encoder-counts => axis.y.jog-counts
|
net encoder-counts => axis.y.jog-counts
|
||||||
net encoder-counts => axis.z.jog-counts
|
net encoder-counts => axis.z.jog-counts
|
||||||
|
|
||||||
#Collisionavoid
|
# Collisionavoid
|
||||||
loadusr -Wn collisionavoid ./collisionavoid
|
loadusr -Wn collisionavoid ./collisionavoid
|
||||||
|
|
||||||
net xpos-abs-cmd joint.0.pos-cmd => collisionavoid.xaxis
|
net xpos-abs-cmd joint.0.pos-cmd => collisionavoid.xaxis
|
||||||
|
@ -217,7 +223,7 @@ net ypos-abs-cmd joint.1.pos-cmd => collisionavoid.yaxis
|
||||||
net zpos-abs-cmd joint.2.pos-cmd => collisionavoid.zaxis
|
net zpos-abs-cmd joint.2.pos-cmd => collisionavoid.zaxis
|
||||||
net collision-stop collisionavoid.stop => halui.estop.activate
|
net collision-stop collisionavoid.stop => halui.estop.activate
|
||||||
|
|
||||||
#Autolevel
|
# Autolevel
|
||||||
loadusr -Wn compensation python3 compensation.py probe-results.txt cubic
|
loadusr -Wn compensation python3 compensation.py probe-results.txt cubic
|
||||||
net xpos-abs-cmd => compensation.x-pos
|
net xpos-abs-cmd => compensation.x-pos
|
||||||
net ypos-abs-cmd => compensation.y-pos
|
net ypos-abs-cmd => compensation.y-pos
|
||||||
|
|
|
@ -16,16 +16,18 @@ net sigIoctlAir iocontrol.0.coolant-mist => xor2.1.in1
|
||||||
net air <= xor2.1.out
|
net air <= xor2.1.out
|
||||||
net air => cncextension.wr2
|
net air => cncextension.wr2
|
||||||
|
|
||||||
# alcohol
|
# Alcohol
|
||||||
net alcohol pyvcp.alcohol-scale-i => cncextension.pwm
|
net alcohol pyvcp.alcohol-scale-i => cncextension.pwm
|
||||||
net alcoholPrime pyvcp.prime-chkbtn => cncextension.pwmPrime
|
net alcoholPrime pyvcp.prime-chkbtn => cncextension.pwmPrime
|
||||||
|
|
||||||
|
# Spindle inhibit
|
||||||
net spindle-inhibit => pyvcp.feed-inhibit-led
|
net spindle-inhibit => pyvcp.feed-inhibit-led
|
||||||
|
|
||||||
addf or2.2 servo-thread
|
addf or2.2 servo-thread
|
||||||
net touchoffall-btn pyvcp.touchoffall-btn => or2.2.in0
|
net touchoffall-btn pyvcp.touchoffall-btn => or2.2.in0
|
||||||
net button1 cncextension.button2 => or2.2.in1
|
net button1 cncextension.button2 => or2.2.in1
|
||||||
|
|
||||||
|
# MDI Commands
|
||||||
net m600 halui.mdi-command-00 <= pyvcp.m600-btn
|
net m600 halui.mdi-command-00 <= pyvcp.m600-btn
|
||||||
net g0x0y0 halui.mdi-command-01 <= pyvcp.x0y0-btn
|
net g0x0y0 halui.mdi-command-01 <= pyvcp.x0y0-btn
|
||||||
net g53g0x0y0z0 halui.mdi-command-02 <= pyvcp.g53g0x0y0z0-btn
|
net g53g0x0y0z0 halui.mdi-command-02 <= pyvcp.g53g0x0y0z0-btn
|
||||||
|
@ -37,7 +39,6 @@ net g53g10l20pin halui.mdi-command-07 <= pyvcp.touchoffpin-btn
|
||||||
net touchofzpin halui.mdi-command-08 <= pyvcp.touchofz-btn
|
net touchofzpin halui.mdi-command-08 <= pyvcp.touchofz-btn
|
||||||
|
|
||||||
# Collisionavoid
|
# Collisionavoid
|
||||||
|
|
||||||
net collision-stop => pyvcp.collision-led
|
net collision-stop => pyvcp.collision-led
|
||||||
net chuck pyvcp.chuck-chkbtn => collisionavoid.chuck
|
net chuck pyvcp.chuck-chkbtn => collisionavoid.chuck
|
||||||
setp pyvcp.chuck-chkbtn.changepin 1
|
setp pyvcp.chuck-chkbtn.changepin 1
|
||||||
|
@ -52,6 +53,7 @@ net alprsy pyvcp.alprsy => pyvcp.alprsyDisp
|
||||||
net alintervl pyvcp.alintervl => pyvcp.alintervlDisp
|
net alintervl pyvcp.alintervl => pyvcp.alintervlDisp
|
||||||
net alheight pyvcp.alheight => pyvcp.alheightDisp
|
net alheight pyvcp.alheight => pyvcp.alheightDisp
|
||||||
|
|
||||||
|
# Jitter display
|
||||||
net jitter <= timedelta.0.jitter
|
net jitter <= timedelta.0.jitter
|
||||||
net jitter => pyvcp.jitter-disp
|
net jitter => pyvcp.jitter-disp
|
||||||
net jitter-reset <= pyvcp.jitter-rst-btn
|
net jitter-reset <= pyvcp.jitter-rst-btn
|
||||||
|
|
Loading…
Reference in a new issue