Issues with start g-code



  • I had a nice starting g-code.

    It waits until the bed is heated, then start heating the hotend while home all axis. Then it goes to the corner and waits until the hotend is heated and warn me with a beep when it is done waiting 30s so I can clan the nozzle from oozing before a nice purge line prior to start the printing....

    BUT it does not work anymore with Duet! Please, can someone help me? I could do it with G10 and M116 - it starts heating the hotend immediately instead of waiting for the bed and I do not like it to be so hot for so long.

    My old starg g-code is:

    The bed is already hot, then:

    G28 ; home all axes
    M104 S[first_layer_temperature]; starts hot-end heating (the bed is already hot)
    G29 S1; Load mesh
    G1 X2 Y0 F10000; Goes to the corner
    M109 S[first_layer_temperature]; Waits the hotend to warm up
    M300 S2093 P287 ;warning beep
    G4 P30000 ;Waits 30s
    G1 Z0.2 ; Go to Z0.2
    G92 E0 ;zero the extruded length
    G1 E10 F1000 ; Purge outside bed
    G1 Y60 E9 F1000 ; purge line 1
    G1 Y90 E12.5 F1000; purge line 2
    G92 E0 ;zero the extruded length again

    So, please, can someone help me with a Duet compatible starting g-code?



  • What slicer are you using?

    Can you provide the first 50 lines or so of a sliced gcode file?

    Both Cura and Slic3r will add their own heating commands before the custom gcode section if they don't see a very specific set of temp commands.



  • Hello Phaedrux, thank you!

    I am using Simplify3D and Slic3r PE (but I did not the "dueted" printer test with Slic3r yet). Here are the first lines of gcode up to the start gcode sequence, but they are all commented! Here I am already trying to use M116 to wait for the bed to heat....

    ; G-Code generated by Simplify3D(R) Version 4.0.1 ; Jun 20, 2018 at 7:59:01 PM ; Settings Summary ; processName,Process1 ; applyToModels,calibration ; profileName,35% FHC 2P (modified) ; profileVersion,2018-06-20 19:28:43 ; baseProfile,Default (modified) ; printMaterial,PETG 3DFila ; printQuality,Fast ; printExtruders, ; extruderName,Primary Extruder ; extruderToolheadNumber,0 ; extruderDiameter,0.4 ; extruderAutoWidth,1 ; extruderWidth,0.48 ; extrusionMultiplier,1.05 ; extruderUseRetract,1 ; extruderRetractionDistance,4 ; extruderExtraRestartDistance,-0.2 ; extruderRetractionZLift,0 ; extruderRetractionSpeed,4200 ; extruderUseCoasting,1 ; extruderCoastingDistance,0.2 ; extruderUseWipe,0 ; extruderWipeDistance,5 ; primaryExtruder,0 ; layerHeight,0.3 ; topSolidLayers,3 ; bottomSolidLayers,3 ; perimeterOutlines,2 ; printPerimetersInsideOut,1 ; startPointOption,2 ; startPointOriginX,0 ; startPointOriginY,0 ; sequentialIslands,0 ; spiralVaseMode,0 ; firstLayerHeightPercentage,100 ; firstLayerWidthPercentage,150 ; firstLayerUnderspeed,0.3 ; 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,2 ; skirtOffset,2 ; 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,Full Honeycomb ; externalInfillPattern,Rectilinear ; infillPercentage,35 ; outlineOverlapPercentage,20 ; infillExtrusionWidthPercentage,150 ; minInfillLength,5 ; infillLayerInterval,1 ; internalInfillAngles,0,120,-120 ; overlapInternalInfillAngles,0 ; externalInfillAngles,45,-45 ; generateSupport,0 ; supportExtruder,0 ; supportInfillPercentage,25 ; 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,0 ; temperatureSetpointCount,2,2 ; temperatureSetpointLayers,1,3,1,2 ; temperatureSetpointTemperatures,245,240,75,70 ; temperatureStabilizeAtStartup,0,0 ; temperatureHeatedBed,0,1 ; temperatureRelayBetweenLayers,0,0 ; temperatureRelayBetweenLoops,0,0 ; fanLayers,1 ; fanSpeeds,0 ; blipFanToFullPower,1 ; adjustSpeedForCooling,1 ; minSpeedLayerTime,15 ; minCoolingSpeedSlowdown,20 ; increaseFanForCooling,1 ; minFanLayerTime,25 ; maxCoolingFanSpeed,50 ; increaseFanForBridging,1 ; bridgingFanSpeed,100 ; use5D,1 ; relativeEdistances,1 ; allowEaxisZeroing,1 ; independentExtruderAxes,0 ; includeM10123,0 ; stickySupport,1 ; applyToolheadOffsets,0 ; gcodeXoffset,0 ; gcodeYoffset,0 ; gcodeZoffset,0 ; overrideMachineDefinition,1 ; machineTypeOverride,0 ; strokeXoverride,294 ; strokeYoverride,280 ; strokeZoverride,270 ; 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,M116 H0,G28 ; home all axes,G10 S[first_layer_temperature]; Inicia aquecimento do bico,G29 S1 ; Bed leveling,G1 X2 Y0 F10000; Vai para X2Y0,M116 P0; Aguarda fim do aquecimento do bico,;====================,; Pausa para limpeza,M300 S2093 P287,G4 P30000,;====================,G1 Z0.2 ; Vai para Z0.2,G92 E0 ;zero the extruded length again,G1 E10 F1000 ; Purga fora do vidro,G1 Y60 E9 F1000 ; Linha de purga 1,G1 Y90 E12.5 F1000; Linha de purga 2,G92 E0 ;zero the extruded length again



  • I'll try to create some "start.g" macro and let it all happens within duet - but I do no know hot to make this macro to "read" the correct temperatures from the print gcode.



  • It won't be able to read the temp from the slicer.

    Ive done the same thing though, I let the slicer set the temps and then it moves on to my start.g on the duet. For simplify you can probably tell it how to behave, I'm not very familiar with it. For slicer it will heat the bed then the hotend by default.



  • Note that in the latest version of RRF, it will run the start.g macro automatically before any of the sliced g-code file is run (i.e. before the temperatures are set).

    You may have to create an alternate macro (start2.g for example) in the /sys/ folder, and call it up in the slicer startup script using M98 P/sys/start2.g. This would run the new start macro only after temperatures are set by the g-code.



  • That's exactly right. I use startgcode.g

    This is actually handy because you can use start.g to home the printer and move the nozzle and then the temps can even set by the slicer and then you can call a macro of your own to prime or whatever.

    With a little bouncing around between start.g the slicer gcode and called macros you can get pretty good control.



  • Just realized that the REAL start gcode was well below 😄

    And it send the command to heat the bed and tool there. I'll try to work with it.

    Also, I could not find the start.g at my sys files (just updated to the latest firmware, 2.0) should I create it?



  • Yeah if you haven't used the configurator recently to generate a config set it may not exist for you. You can create it yourself.

    There is also an stop.g that will run at the end of the print. I started using that for the slicer end code as well so that I don't have to modify each slicer when I make changes. It's nice to have it all in one place since I switch between slicers often.



  • @phaedrux That is the plan! I'll transfer everything not related to temperature to these macros.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.