Duet 3 XYZ touch probe & ES button RRF 3.4.4 DWC 3.4.4
-
Hi all,
I am trying to get my Killerbee up and running but have a couple of issues.I am trying to find a way to connect and use my XYZ touch probe but cannot find a way. The DWC 3.4.4 doesnt even seem to have a Probe section in Dashboard.
Does anyone have the code or a plugin to get this working?Also I would like to add an emergency stop button and am happy for this to do a software stop as I have another emergency stop on my power feed in case of bigger issues.
Does anyone know the connection I need to make and the necessary code please?Thanks in advance
Pete
-
@peteupshall Please see https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_connecting and https://docs.duet3d.com/en/User_manual/Tuning/Triggers. I have deleted your other thread because it was equal to this one.
-
Hi,
Thanks for your rapid response.
Emergency stop I am happy to use a macro box as suggested.
The probe link you sent only covers Z probing and I already have this operational. What I wanted was to have my XYZ touch plate operational and canyt currently find a way.
Pete -
@peteupshall It should be possible to use the a Z probe for XY as well, but then you need to change the axis endstop types first. Probably you want to create a custom macro and do the reconfiguration + touch probing in there. See also https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m574-set-endstop-configuration
If you change the axes to use your probe instead of an endstop, I recommend you reset your axis endstops to the defaults from config.g at the beginning of your homing macros, else the machine will only stop when the touch probe is triggered and the actual axis endstops may be ignored.
-
@peteupshall I'm still getting my head around probing my KillerBee machine, but what I can help you with is the emergency stop, but I'm not sure if that's what you really want, if you already have one on the power feed.
With help from this forum, I've installed two physical Pause/Resume buttons in my shed (where the machine is located) which connect (in parallel) to my MB6HC control board. The first press pauses the process, moves the spindle away to a safe point and turns the router off, and the second pause turns the spindle on, moves it back and continues the cut. Note there may be a slight delay in the Pause as the current line of code completes.
Have a look at this thread, to see what I'm talking about and, if you're interested, I'd be happy to post my config files on here for you to look at.
-
@chrishamm That sound like a great addition. Can you send me a wiring diagram and config.g please.
Regards
Pete -
@peteupshall No, I can't, it requires changes to your existing configuration files.
-
@peteupshall
This is how I've configured the Makita as a tool in the config.g file. It's actually operated using this, so it can be turned on and off using code, but there are cheaper options:; Makita and relay configuration M950 R0 C"out1+out7" L0:18000 ; enable router relay on out7 M563 P0 S"Makita" R0 ; assign spindle 0 to tool 0 and name it Makita T0 ; select tool 0
I've also configured the Pause button, like this:
; Pause button M950 J9 C"io0.in" ; create input 9 on io0.in M581 P9 T2 S0 ; invoke trigger 2 active-to-inactive edge is detected on input 9
...and a bit of code to enable an LED indicator:
; Pause LED M950 P8 C"!io0.out" ; create output/server port 8 on inverse io0.out
...and global variables to determine the "state" of the switch and spindle speed:
global PausePress = false global savedSpindleSpeed = 0
These lines of code are all within the config.g file.
With all that configured, here is the pause.g macro (This doesn't actually save the speed setting of the Makita, because you can't, but it is in preparation for when I get a speed controllable spindle, when it will become relevant!
; pause.g M42 P8 S0 ; pause/resume LED off set global.PausePress = !global.PausePress ; toggle the value from whatever it was before set global.savedSpindleSpeed = spindles[0].active ; sets the global variable echo "Spindle speed saved at ", {global.savedSpindleSpeed}, "RPM" ; shows saved spindle speed in the Console G1 Z{max(move.axes[2].userPosition+5,move.axes[2].max-5)} F2400 ; move the Z axis to a safe height G0 X273.5 Y560 ; move XY to a safe place M5 ; turn the spindle off
...and the resume.g macro:
; resume.g M42 P8 S1 ; pause/resume LED off set global.PausePress = !global.PausePress ; toggle the value from whatever it was before if state.currentTool =-1 echo "No tool active. Selecting tool zero" T0 ; select tool zero if state.currentTool >= 0 echo "Spindle state on tool ", state.currentTool, " is ", spindles[state.currentTool].state if {state.currentTool >= 0} & {tools[state.currentTool].spindleRpm >= 0} M3 S{global.savedSpindleSpeed} ; resume saved spindle speed G4 S1 ; wait 1 second to allow the spindle to spin up echo "Spindle speed resumed at " ^ {global.savedSpindleSpeed} ^ "RPM" ; this should show that the setting was successful G0 R1 X0 Y0 ; move X and Y back to saved work XY location G1 R1 Z0 F240 ; move Z slowly down to saved work Z location ; else ; echo "Condition not met. Spindle speed remains at ", tools[state.currentTool].spindleRpm, "RPM"
(I've REM'd out the last two lines, as they're only there to report an issue if there was one. Happily, it all works well.
A lot of this - and I mean a lot - came from @burtonenator, so I can't take too much credit!
For my specific build, and because the LEDs within the non-latching switches were really dim, I installed LEDs and connected them to a separate power supply, so they're more obviously on when the machine is in Pause mode.
Hope this helps
-
@chrishamm Brilliant, thank you.
-
@peteupshall I do XYZ probing on my milling machine.
A - I have a physical endstop for each axis (XYZ) that lets me set a physical origin. These, with config.g settings, are used to set up the physical bounds for the machine.
B - when milling I use the XYZ probing to set the stock origin.
I've considered using XYZ probing to set the physical origin and boundaries but really there's no easy way to do that initial probe automatically without endstops so never bothered setting it up.
There's a writeup in my personal wiki (with script for the probe and results of physical tests) here: http://eadia.com/pmwiki.php?n=Taig.Probing
Mark
My Globals settings for the probe->
; global <new-variable-name> = <expression> ; touchpad center and height global TouchX = 15 global TouchY = 84 global TouchZ = 13.125 ; the touchpad Z offset from ground ; speeds for probing global ProbeFastZ = 400 global ProbeFastXY = 300 global ProbeSlowZ = 200 global ProbeSlowXY = 50
Here's my Z probe code (I use the bed location usually, so) ->
G53 G0 X{global.TouchX} Y{global.TouchY} G30 S-1 ; lower z until the metal probe is hit G10 L20 P2 Z{global.TouchZ} ; Z = 0 + puck height in second coord system G1 Z38 F600 ; raise z one inch
Here's my X probe current code (with a 1/4" bit)
; probe with 1/4" bit m98 P"0:/macros/Finders/FindXPlus.g" d0.25
And the submacro:
var dir = 0 var movs = -2 var multip = -12.7 if {exists(param.S)} set var.dir = param.S if { var.dir == 1 } set var.movs = 2 set var.multip = 12.7 if {exists(param.D)} G91 ; relative moves m585 S{var.dir} X-50 F{global.ProbeFastXY} P0 ; probe until contact X G10 L1 X0 Y0 ; reset the tool offset created by m585 G1 X{var.movs} F{global.ProbeFastXY} ; back off m585 S{var.dir} X-50 F{global.ProbeSlowXY} P0 ; probe until contact X G10 L1 X0 Y0 ; reset the tool offset created by m585 G10 L20 P2 X{param.D * var.multip} ; subtract half the bit diameter G1 X{var.movs} F{global.ProbeFastXY} ; back off G90 ; absolute moves ;G1 X-12 F600 ; back off else M117 FindXGen requires a D(iameter) parameter