Nozzle crashes before print starts.

  • I have struggled through a plethora of issues in getting this thing set up over the last couple of months and I have hit another hurdle when trying to do my first print on the DuetWifi.

    I have S3D setup to run the following script before printing

      G28 ; home all axes
      G32 ; bed level compensation

    It runs through this script but as soon as it starts printing it plunges down into the bed and crashed the nozzle into the bed.

    First thing I checked was G31 in config.g

    G31 X0 Y0 Z-0.1 P100			 ; Define Probe location

    It's a Precision Peizo Orion so Z offset is configured as per their setup manual.

    Next thing I check was the Z offset in S3D, It's set to 1mm above the bed for testing so should have tonnes of clearance.

    S3D Screenshot

    Next I checked the bed.g file, although I cannot see any offset option.

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ; generated by RepRapFirmware Configuration Tool on Sat Jul 21 2018 13:51:16 GMT+1200 (New Zealand 
    Standard Time)
    M561 ; clear any bed transform
    G28  ; home all axes
    ; Probe the bed at 5 points
    G30 P0 X15 Y25 H5 Z-99999
    G30 P1 X15 Y285 H5 Z-99999
    G30 P2 X320 Y285 H5 Z-99999
    G30 P3 X320 Y25 H5 Z-99999
    G30 P4 X160 Y150 H5 Z-99999

    What am I missing? There has to be an overruling setting somewhere right?

  • This post is deleted!

  • Do you have a config override file?

    If you do check to see if it has any bed offsets saved there. If it does comment them out an see if it solves the issue and let me know.

  • Hey, Yeah it seems I do have a config-override.g
    It contains the following.

    ; This is a system-generated file - do not edit
    ; Heater model parameters
    M307 H0 A344.9 C1651.9 D5.9 S1.00 V25.1 B0
    M307 H1 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H2 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H3 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H4 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H5 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H6 A340.0 C140.0 D5.5 S1.00 V0.0 B0
    M307 H7 A340.0 C140.0 D5.5 S1.00 V0.0 B0

    Shouldn't have any effect right?

  • Nope that looks good. Can you post your full config?

  • Here is the full config.g

    ; Configuration file for Duet WiFi (firmware version 1.20 or newer)
    ; executed by the firmware on start-up
    ; generated by RepRapFirmware Configuration Tool on Sat Jul 21 2018 13:51:16 GMT+1200 (New Zealand Standard Time)
    ; General preferences
    G90                               ; Send absolute coordinates...
    M83                               ; ...but relative extruder moves
    M667 S1                           ; Select CoreXY mode
    ; Network
    M550 PLinBot                      ; Set machine name
    M552 S1                           ; Enable network
    M587 S"ASUS" P"Fe7awrEpMade2race" ; Configure access point. You can delete this line once connected
    M586 P0 S1                        ; Enable HTTP
    M586 P1 S0                        ; Disable FTP
    M586 P2 S0                        ; Disable Telnet
    ; Drives
    M569 P0 S1                        ; Drive 0 goes forwards
    M569 P1 S1                        ; Drive 1 goes forwards
    M569 P2 S1                        ; Drive 2 goes forwards
    M569 P3 S1                        ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1           ; Configure microstepping with interpolation
    M92 X80 Y80 Z2395 E849           ; Set steps per mm
    M566 X900 Y900 Z100 E120           ; Set maximum instantaneous speed changes (mm/min)
    M203 X12000 Y12000 Z800 E1200       ; Set maximum speeds (mm/min)
    M201 X500 Y500 Z100 E250          ; Set accelerations (mm/s^2)
    M906 X800 Y800 Z800 E800 I30      ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30                           ; Set idle timeout
    M574 X1 Y1 S3			  ; set endstops to use motor stall
    M915 X Y S3 R0			  ; set sensitivity to +3 unfiltered
    ; Axis Limits
    M208 X0 Y5 Z0 S1                  ; Set axis minima
    M208 X351 Y315 Z305 S0            ; Set axis maxima
    ; Endstops
    M574 Z1 S0                        ; Set active low endstops
    ; Z-Probe
    M574 Z1 S2				 ; Use zprobe and home to Z Min.
    M558 P8 I1 H5 F400 T9000                 ; Use piezo digital probe type, invert the signal, probe from 5mm height, probe at 300mm/min, travel between probe points at 6000mm/min.
    G31 X0 Y0 Z-0.1 P100			 ; Define Probe location
    M557 X10:340 Y35:300 S50		 ; Define mesh grid
    ; Heaters
    M307 H0 B0 S1.00                  ; Disable bang-bang mode for the bed heater and set PWM limit
    M305 P0 T100000 B4138 C0 R4700    ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120                      ; Set temperature limit for heater 0 to 120C
    M305 P1 T100000 B4138 C0 R4700    ; Set thermistor + ADC parameters for heater 1
    M143 H1 S300                      ; Set temperature limit for heater 1 to 300C
    ; Fans
    M106 P0 S0.3 I0 F500 H-1          ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S0.5 I0 F500 H1 T45       ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on
    M106 P2 S0.5 I0 F500 H1 T45       ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned on
    ; Tools
    M563 P0 D0 H1                     ; Define tool 0
    G10 P0 X0 Y0 Z0                   ; Set tool 0 axis offsets
    G10 P0 R0 S0                      ; Set initial tool 0 active and standby temperatures to 0C
    ; Automatic saving after power loss is not enabled
    ; Custom settings are not configured

  • This post is deleted!

  • This post is deleted!

  • Start of Gcode i am trying to print.

    ; G-Code generated by Simplify3D(R) Version 4.0.1
    ; Aug 11, 2018 at 6:07:58 PM
    ; Settings Summary
    ;   processName,LinBot
    ;   applyToModels,xyzCalibration_cube
    ;   profileName,LinBot
    ;   profileVersion,2018-08-11 16:32:03
    ;   baseProfile,Default
    ;   printMaterial,PLA
    ;   printQuality,Medium
    ;   printExtruders,
    ;   extruderName,Primary Extruder
    ;   extruderToolheadNumber,0
    ;   extruderDiameter,1
    ;   extruderAutoWidth,1
    ;   extruderWidth,1.2
    ;   extrusionMultiplier,1
    ;   extruderUseRetract,1
    ;   extruderRetractionDistance,1
    ;   extruderExtraRestartDistance,0
    ;   extruderRetractionZLift,0
    ;   extruderRetractionSpeed,1800
    ;   extruderUseCoasting,0
    ;   extruderCoastingDistance,0.2
    ;   extruderUseWipe,0
    ;   extruderWipeDistance,5
    ;   primaryExtruder,0
    ;   layerHeight,0.2
    ;   topSolidLayers,3
    ;   bottomSolidLayers,3
    ;   perimeterOutlines,3
    ;   printPerimetersInsideOut,1
    ;   startPointOption,2
    ;   startPointOriginX,0
    ;   startPointOriginY,0
    ;   sequentialIslands,0
    ;   spiralVaseMode,0
    ;   firstLayerHeightPercentage,90
    ;   firstLayerWidthPercentage,100
    ;   firstLayerUnderspeed,0.5
    ;   useRaft,0
    ;   raftExtruder,0
    ;   raftTopLayers,3
    ;   raftBaseLayers,2
    ;   raftOffset,3
    ;   raftSeparationDistance,0.14
    ;   raftTopInfill,100
    ;   aboveRaftSpeedMultiplier,0.3
    ;   useSkirt,1
    ;   skirtExtruder,0
    ;   skirtLayers,1
    ;   skirtOutlines,20
    ;   skirtOffset,40
    ;   usePrimePillar,0
    ;   primePillarExtruder,999
    ;   primePillarWidth,12
    ;   primePillarLocation,7
    ;   primePillarSpeedMultiplier,1
    ;   useOozeShield,0
    ;   oozeShieldExtruder,999
    ;   oozeShieldOffset,2
    ;   oozeShieldOutlines,1
    ;   oozeShieldSidewallShape,1
    ;   oozeShieldSidewallAngle,30
    ;   oozeShieldSpeedMultiplier,1
    ;   infillExtruder,0
    ;   internalInfillPattern,Rectilinear
    ;   externalInfillPattern,Rectilinear
    ;   infillPercentage,20
    ;   outlineOverlapPercentage,15
    ;   infillExtrusionWidthPercentage,100
    ;   minInfillLength,5
    ;   infillLayerInterval,1
    ;   internalInfillAngles,45,-45
    ;   overlapInternalInfillAngles,0
    ;   externalInfillAngles,45,-45
    ;   generateSupport,0
    ;   supportExtruder,0
    ;   supportInfillPercentage,30
    ;   supportExtraInflation,0
    ;   supportBaseLayers,0
    ;   denseSupportExtruder,0
    ;   denseSupportLayers,0
    ;   denseSupportInfillPercentage,70
    ;   supportLayerInterval,1
    ;   supportHorizontalPartOffset,0.3
    ;   supportUpperSeparationLayers,1
    ;   supportLowerSeparationLayers,1
    ;   supportType,0
    ;   supportGridSpacing,4
    ;   maxOverhangAngle,45
    ;   supportAngles,0
    ;   temperatureName,Primary Extruder,Heated Bed
    ;   temperatureNumber,0,1
    ;   temperatureSetpointCount,1,1
    ;   temperatureSetpointLayers,1,1
    ;   temperatureSetpointTemperatures,210,60
    ;   temperatureStabilizeAtStartup,1,1
    ;   temperatureHeatedBed,0,1
    ;   temperatureRelayBetweenLayers,0,0
    ;   temperatureRelayBetweenLoops,0,0
    ;   fanLayers,1
    ;   fanSpeeds,0
    ;   blipFanToFullPower,0
    ;   adjustSpeedForCooling,1
    ;   minSpeedLayerTime,15
    ;   minCoolingSpeedSlowdown,20
    ;   increaseFanForCooling,0
    ;   minFanLayerTime,45
    ;   maxCoolingFanSpeed,100
    ;   increaseFanForBridging,0
    ;   bridgingFanSpeed,100
    ;   use5D,1
    ;   relativeEdistances,0
    ;   allowEaxisZeroing,1
    ;   independentExtruderAxes,0
    ;   includeM10123,0
    ;   stickySupport,1
    ;   applyToolheadOffsets,0
    ;   gcodeXoffset,0
    ;   gcodeYoffset,0
    ;   gcodeZoffset,1
    ;   overrideMachineDefinition,1
    ;   machineTypeOverride,0
    ;   strokeXoverride,340
    ;   strokeYoverride,310
    ;   strokeZoverride,305
    ;   originOffsetXoverride,0
    ;   originOffsetYoverride,0
    ;   originOffsetZoverride,0
    ;   homeXdirOverride,-1
    ;   homeYdirOverride,-1
    ;   homeZdirOverride,-1
    ;   flipXoverride,1
    ;   flipYoverride,1
    ;   flipZoverride,1
    ;   toolheadOffsets,0,0|0,0|0,0|0,0|0,0|0,0
    ;   overrideFirmwareConfiguration,0
    ;   firmwareTypeOverride,RepRap (Marlin/Repetier/Sprinter)
    ;   GPXconfigOverride,r2
    ;   baudRateOverride,115200
    ;   overridePrinterModels,0
    ;   printerModelsOverride
    ;   startingGcode,G28 ; home all axes,G32 S2 ; bed level compensation
    ;   layerChangeGcode,
    ;   retractionGcode,
    ;   toolChangeGcode,
    ;   endingGcode,G1 E-5 F300,M104 S0 ; turn off extruder,M140 S0 ; turn off bed,M84 ; disable motors
    ;   exportFileFormat,gcode
    ;   celebration,0
    ;   celebrationSong,Random Song
    ;   postProcessing,
    ;   defaultSpeed,4200
    ;   outlineUnderspeed,0.5
    ;   solidInfillUnderspeed,0.8
    ;   supportUnderspeed,1
    ;   rapidXYspeed,4800
    ;   rapidZspeed,1002
    ;   minBridgingArea,50
    ;   bridgingExtraInflation,0
    ;   bridgingExtrusionMultiplier,1
    ;   bridgingSpeedMultiplier,1
    ;   useFixedBridgingAngle,0
    ;   fixedBridgingAngle,0
    ;   applyBridgingToPerimeters,0
    ;   filamentDiameters,1.75|1.75|1.75|1.75|1.75|1.75
    ;   filamentPricesPerKg,46|46|46|46|46|46
    ;   filamentDensities,1.25|1.25|1.25|1.25|1.25|1.25
    ;   useMinPrintHeight,0
    ;   minPrintHeight,0
    ;   useMaxPrintHeight,0
    ;   maxPrintHeight,0
    ;   useDiaphragm,0
    ;   diaphragmLayerInterval,20
    ;   robustSlicing,1
    ;   mergeAllIntoSolid,0
    ;   onlyRetractWhenCrossingOutline,1
    ;   retractBetweenLayers,1
    ;   useRetractionMinTravel,0
    ;   retractionMinTravel,3
    ;   retractWhileWiping,0
    ;   onlyWipeOutlines,1
    ;   avoidCrossingOutline,0
    ;   maxMovementDetourFactor,3
    ;   toolChangeRetractionDistance,12
    ;   toolChangeExtraRestartDistance,-0.5
    ;   toolChangeRetractionSpeed,600
    ;   externalThinWallType,0
    ;   internalThinWallType,2
    ;   thinWallAllowedOverlapPercentage,10
    ;   singleExtrusionMinLength,1
    ;   singleExtrusionMinPrintingWidthPercentage,50
    ;   singleExtrusionMaxPrintingWidthPercentage,200
    ;   singleExtrusionEndpointExtension,0.2
    ;   horizontalSizeCompensation,0
    M106 S0
    M140 S60
    M190 S60
    M104 S210 T0
    M109 S210 T0
    G28 ; home all axes
    G32 S2 ; bed level compensation
    G92 E0
    G1 E1.0000 F1800
    G1 Z1.180 F1002
    ; process LinBot
    ; layer 1, Z = 0.180
    ; tool H0.200 W1.200
    ; skirt
    G1 X100.162 Y115.176 F4800
    G1 E0.0000 F540
    G92 E0
    G1 X130.176 Y85.162 E4.2353 F1965
    G1 X138.777 Y81.600 E5.1642
    G1 X201.223 Y81.600 E11.3951
    G1 X209.824 Y85.162 E12.3239
    G1 X239.838 Y115.176 E16.5592
    G1 X243.400 Y123.777 E17.4881
    G1 X243.400 Y186.223 E23.7190
    G1 X239.838 Y194.824 E24.6479
    G1 X209.824 Y224.838 E28.8832
    G1 X201.223 Y228.400 E29.8120
    G1 X138.777 Y228.400 E36.0429
    G1 X130.176 Y224.838 E36.9718
    G1 X100.162 Y194.824 E41.2071
    G1 X96.600 Y186.223 E42.1360
    G1 X96.600 Y123.777 E48.3669
    G1 X100.162 Y115.176 E49.2957
    G1 X101.180 Y115.856 F4800
    G92 E0
    G1 X130.856 Y86.180 E4.1877 F1965
    G1 X139.016 Y82.800 E5.0689
    G1 X200.984 Y82.800 E11.2522
    G1 X209.144 Y86.180 E12.1334
    G1 X238.820 Y115.856 E16.3211
    G1 X242.200 Y124.016 E17.2023
    G1 X242.200 Y185.984 E23.3856
    G1 X238.820 Y194.144 E24.2668
    G1 X209.144 Y223.820 E28.4545
    G1 X200.984 Y227.200 E29.3357
    G1 X139.016 Y227.200 E35.5190
    G1 X130.856 Y223.820 E36.4002
    G1 X101.180 Y194.144 E40.5879
    G1 X97.800 Y185.984 E41.4691

  • Moderator

    Your z steps per mm looks really weird.


    Is that correct?

  • @phaedrux

    0.9deg stepper on a 5:1 pulley so yeah it's pretty high.

    Have calibrated it using manual movements via the machine control and digital vernier calipers and it appears correct.

  • Moderator

    @ajcraig99 I'll take your word for it. It was the only thing that jumped out at me as looking off in your config.

  • @phaedrux
    No I appreciate the response, most of the issues I have run into have been user error, this one might very well be too!

  • administrators

    1. Take the H5 parameters out of all the G30 commands in bed.g. They will cause the firmware to think that Z=0 is 5mm below the bed.

    2. I don't see an S parameter on the final G30 command in bed.g.

    3. How are you homing Z? Please post homeall.g and homez.g.

  • @dc42

    Thankyou, H5 removed from bed.g I think this came from the auto configuration tool.

    I don't understand the S parameter, have read through the wiki again but from what I can see, leaving it blank is correct?

    The value of the S parameter specifies what computation to perform. If the value is -1 then the Z offsets of all the 
    points probed are printed, but no calibration is done. If the value is zero or not present, then this specifies that the 
    number of factors to be calibrated is the same as the number of points probed. Otherwise, the value indicates the 
    number of factors to be calibrated, which must be no greater than the number of points probed.

    Here is homez.g - Should this all be replaced with just a single line saying G30?

    G91               ; relative positioning
    G1 Z5 F6000 S2    ; lift Z relative to current position
    G1 S1 Z-295 F1800 ; move Z down until the switch triggers
    G92 Z-0.1         ; set Z position to trigger height
    G1 Z10 F500       ; lift Z relative to current position

  • administrators

    For bed levelling using multiple independent Z leadscrews (which is what I think you are trying to do), the S parameter on the final G30 command should be equal to the number of Z leadscrews. See the wiki page about this type of bed levelling.

    I would be very surprised if configtool added nonzero H parameters to thew G30 commands. So far as i can see, it only ever adds H0. Perhaps you got confused with the H parameter in the M558 command, which is the dive height and is typically set to 5mm?

  • @dc42 No I have a single stepper driving 2x leadscrews, they are just sharing a GT2 belt. So the S parameter should be blank?

    Yes I might have confused it with M558, I was playing around quite a bit trying to get the Piezo working ( which still isn't working perfectly.

  • administrators

    @ajcraig99 said in Nozzle crashes before print starts.:

    @dc42 No I have a single stepper driving 2x leadscrews, they are just sharing a GT2 belt. So the S parameter should be blank?

    In that case, I suggest you use mesh bed compensation instead (G29). See It's more powerful than the old 3, 4 and 5-point levelling that used bed.g and G32.

    If you have manual bed levelling screws then you can use G32 and bed.g to probe and tell you what adjustments to make to them, so as to get the bed as level as you can before you run mesh bed compensation. See

  • Well it seems G29 is a whole other can of worms that I don't have the patience for tonight.

    Error: Z probe already triggered before probing move started

    Will try again tomorrow.

  • Moderator

    @ajcraig99 said in Nozzle crashes before print starts.:

    Here is homez.g - Should this all be replaced with just a single line saying G30?

    Yes, the way you have it would be correct if using an endstop. To use the probe, you would move the head into position and then use G30 to seek Z0.

  • Moderator

    @ajcraig99 said in Nozzle crashes before print starts.:

    Error: Z probe already triggered before probing move started

    Do you have a deployprobe.g and retractprobe.g in the sys folder? What is in them?

  • No delploy or retract files in my directory from what I can see.

    I fixed homez.g but found I would get the same false trigger error unless I added a 1 sec delay before G30 if I had an XY travel before G30, If the nozzle was already in the XY position and didn't have to travel, it would work without the delay.

    So it seems I am getting false readings from the Piezo as a mechanical issue caused by XY movement?

    the same happens with G29, if it's already in the first XY position, it will do the first probe, move to the second and then false trigger the moment it goes to probe.

    I have the precision piezo orion which only has one adjustment pot which I will continue to play with but can I force a P500 delay before any probing move in G29 or is that a bit hacky?

    Working homez.g

    ; homez.g
    ; called to home the Z axis
    G91                        ; relative positioning
    G1 Z5 F6000 S2             ; lift Z relative to current position
    G1 X50 Y50                 ; Move to probe pos
    G4 P1000                   ; Wait 1 second
    G30                        ; Probe Z

    Non working homez.g

    ; homez.g
    ; called to home the Z axis
        G91                        ; relative positioning
        G1 Z5 F6000 S2             ; lift Z relative to current position
        G1 X50 Y50                 ; Move to probe pos
        G30                        ; Probe Z

  • Moderator

    You can try adding an R value to your M558 command to add a pause before probing starts. Try M558 R1 to add one second delay.

  • Awesome, making progress! Thanks to @dc42 the 5mm plunge should be fixed and thanks to @Phaedrux the Piezo seems to be working properly now. I will try another test print and report back.

    I am hoping it can compensate for the sag in my bed.


  • Success! Thankyou so much for everyones help!

    Now I move onto print settings.


Log in to reply