ah good point, I just made changes to the pause and resume. I'll give that a try and see what actually happens
Latest posts made by LeapingLamb
-
RE: MPCNC on Duet Wifi -- configuration sanity check
-
set current height as maximum z-height
Hi everyone,
I was wondering if anyone had any advice for me. I have a MPCNC and am using the z-end stop with a touch plate to set a z-height at the beginning of my project. What I am looking for is a way to move the z-height to the highest possible position and tell the duet that it should not go beyond the current height, otherwise it skips steps and ends up drilling deeper than I want.
I have tried G30, which pops up a manual z-height menu where I can select 0. However, is there a different Gcode that sets the z maximum at the current height without me having to click a button? Essentially, I use the touch probe to get the tip of my cutter to a height of 20mm. I would then want to move up the z axis to the highest point it is allowed to go, which would then be up in the 40mm range. Because the bits are different sizes, I would essentially home z to 20 mm with the touch probe, move it up manually then set the z maximum to whatever height I am at. to make it even more interesting, I would also like to use a 6th endstop to do that. I am using a duet 2 wifi with the DWC on RRF 3.2. I have all five drivers and end stops used up, is there a possibility to add another end stop and have a macro that sets the maximum z height when it is triggered?
essentially I want to make it as foolproof as possible to avoid having the machine go through the roof so to speak.
thanks
-
RE: MPCNC on Duet Wifi -- configuration sanity check
because I can't post the actual file, here are the different files you might want to look at:
config.g; Configuration file for Duet WiFi (firmware version 3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:58 GMT-0800 (Pacific Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Phobot 2.0" ; set printer name ;M453 ; Network ;M552 S1 ; enable network M552 S2 ; enable access point M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives ;Drive 2 (Z Motor) = Z ;Drive 1 (Y Motor) = Y ;Drive 0 (X Motor) = X ;Drive 3 (E0 Motor) = Y1 ;Drive 4 (E1 Motor) = X1 M569 P0 S0 ; Drive 0 goes backwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S0 ; Drive 2 goes backwards M569 P3 S0 ; Drive 3 goes backwards M569 P4 S1 ; Drive 4 goes forwards M584 X0:4 Y1:3 Z2 U4 V3 P3 ; Apply custom drive mapping M350 X16 Y16 Z16 U16 V16 I1 ; configure microstepping with interpolation M92 X100.00 Y100.00 U100.00 V100.00 Z400 ; set steps per mm M566 X900.00 Y900.00 U900.00 V900.00 Z12.00 ; Set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 U6000.00 V6000.00 Z180.00 ; Set maximum speeds (mm/min) M201 X500.00 Y500.00 U500.00 V500.00 Z20.00 ; Set accelerations (mm/s^2) M906 X720.00 Y720.00 U720.00 V720.00 Z720.00 I30 ; Set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z-20 U0 V0 S1 ; Set axis minima M208 X500 Y500 Z108 U500 V500 S0 ; Set axis maxima ; Endstops ;M574 X1 S1 C0 ;M574 Y1 S1 C1 ;M574 Z2 S1 C2 ;M574 U1 S1 C4 ;M574 V1 S1 C3 M574 X1 S1 P"!xstop" ; X min active high endstop switch M574 Y1 S1 P"!ystop" ; Y min active high endstop switch M574 Z1 S1 P"!zstop" ; Z min active high endstop switch M574 U1 S1 P"!e1stop" ; U min active high endstop switch M574 V1 S1 P"!e0stop" ; U min active high endstop switch ; Z-Probe M558 P0 H5 F120 T6000 ; Disable Z probe but set dive height, probe speed and travel speed M557 X15:195 Y15:195 S20 ; Define mesh grid ; Heaters M140 H-1 ; Disable heated bed ;M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1 ;M143 H1 S280 ; Set temperature limit for heater 1 to 280C ; Fans ; Tools ;M563 P1 S"XYZ-Probe" ; Define XYZ Touch Probe Tool ;M563 P0 D0 ; Define tool 1 M563 P0 S"Spindle 1" ;definde spindle as a tool M563 P1 S"XYZ-Probe" ; Define XYZ Touch Probe Tool ;M563 P0 D0 ; Define tool 1 M453 C"e0heat" R13300 Q2000 T0 ; enable CNC mode ;M453 C"exp.heater3+exp.heater4+exp.heater5" Q100 ; spindle PWM on heater 3 pin, on/off on heater 4, reverse/forward on heater 5, PWM frequency 100Hz ; Automatic power saving M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss ; Custom settings are not configured
here are the homing files:
homez.g; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:59 GMT-0800 (Pacific Standard Time) G91 ; relative positioning G21 ; Set units to mm G1 H1 Z-500 F1500 ; move quickly to Z axis endstop and stop there (first pass) G92 Z20 ; set height of probe to 15, which is the height of the z touch probe G1 Z3 F2400 ; go back a few mm G1 H1 Z-500 F150 ; move slowly to x axis endstopp once more (second pass) G92 Z20 ; set height of probe to 15, which is the height of the z touch probe G1 Z3 F2400 ; lift z a few mm G90 ; absolute positioning
homex.g
; homex.g ; called to home the X axis ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:59 GMT-0800 (Pacific Standard Time) G91 ; relative positioning G21 ; Set units to mm G1 H2 Z5 F6000 ; lift Z relative to current position M584 X0 P5 ; split x axis G1 H1 X-1500 U-1500 F2400 ; move quickly to X and Y axis endstops and stop there (first pass) G1 X3 U3 F2400 ; go back a few mm G1 H1 X-1500 U-1500 F150 ; move slowly to X and Y axis endstops once more (second pass) M584 X0:4 P3 ; join x axis G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
homey.g
; homey.g ; called to home the Y axis ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:59 GMT-0800 (Pacific Standard Time) G91 ; relative positioning G21 ; Set units to mm M584 Y1 P5 ; split y axis G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Y-1500 V-1500 F2400 ; move quickly to X and Y axis endstops and stop there (first pass) G1 Y3 V3 F500 ; go back a few mm G1 H1 Y-1500 V-1500 F150 ; move slowly to X and Y axis endstops once more (second pass) M584 Y1:3 P3 ; join y axis G1 H2 Z-5 F6000 ; lower Z again G90 ; absolute positioning
homeall.g
; homeall.g ; called to home all axes G91 ; relative positioning G21 ; Set units to mm M584 X0 Y1 P5 ; split x and y axis G1 H1 X-1500 U-1500 F2400 ; move quickly to X and Y axis endstops and stop there (first pass) G1 X3 U3 F2400 ; go back a few mm G1 H1 X-1500 U-1500 F300 ; move slowly to X and Y axis endstops once more (second pass) G1 H1 Y-1500 V-1500 F2400 ; move quickly to X and Y axis endstops and stop there (first pass) G1 Y3 V3 F500 ; go back a few mm G1 H1 Y-1500 V-1500 F150 ; move slowly to X and Y axis endstops once more (second pass) M584 X0:4 Y 1:3 P3 ; join x axis M291 P"get ready to home Z-Axis with touchprobe. Click ok when probe in place" R"Home Z-Axis" S3 G1 H1 Z-500 F1500 ; move quickly to Z axis endstop and stop there (first pass) G92 Z20 ; set height of probe to 15, which is the height of the z touch probe G1 Z3 F2400 ; go back a few mm G1 H1 Z-500 F300 ; move slowly to x axis endstopp once more (second pass) G92 Z20 ; set height of probe to 15, which is the height of the z touch probe G1 Z3 F2400 ; lift z a little G90 ; absolute positioning
Pause.g
; pause.g ; called when a print from SD card is paused ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:59 GMT-0800 (Pacific Standard Time) G91 ; Relative positioning G1 Z5 F180 ; Lift Z to 5mm below the Z maximum G90 ; Absolute positioning M5 ; Turn off the spindle G4 S10 ; Wait for the spindle to stop G1 X0 Y0 F2400 ; Go to X=0 Y=0
resume.g
; resume.g ; called before a print from SD card is resumed ; ; generated by RepRapFirmware Configuration Tool v3.2.2 on Wed Feb 03 2021 22:25:59 GMT-0800 (Pacific Standard Time) M3 R1 ; Restore the spindle speed from before the pause G4 S10 ; Wait for the spindle the get up to speed G1 R1 X0 Y0 Z5 F2400 ; go to 5mm above position of the last print move
you should be able to adjust these to your setup. just be mindful of the end stops and make sure they match your config file. Also, one thing I am trying to figure out is how to set the highest z position. I have had a few instances where my bit was too long and the z-axis moved up to far, skipped a few turns, and then decided it knew where it was. The worm trails it created were amazing I tell you.
-
RE: MPCNC on Duet Wifi -- configuration sanity check
I have set up a duet 2 wifi board with my MPCNC machine. I have just posted my config and homing files if you are interested. MPCNC firmware forum topic
I was able to get a spindle controller moving with the duet. I got my intial review/showcase video and post here if you are interested:
V1 forum topic on my build