Duet 3 and g-code procedures and slicing
-
@Phaedrux said in Duet 3 and g-code procedures and slicing:
@monster said in Duet 3 and g-code procedures and slicing:
I've actually just now loaded up Cura and there is "Add printer"
I noticed that it doesn't see my network printer even though that on same computer it does access it WebUI.Only Ultimaker printers will show up on the network. You will need to create a custom printer entry using your parameters.
There is a plugin for Cura that allows sending the sliced gcode directly to the duet.
Cura does support multiple extruders/tools.
Ahaa! Got it! Thank you.
Dam... that million of settings in Cura -
Both Cura and SlicerPE have plugins to send g-code directly to a Duet.
In terms of telling the Slicer "which printer", you will find that nobody has built-in profiles for "Duet" because just saying "Duet" that doesn't specify the geometry of the printer.
It takes under five minutes in either slicer to define a custom printer, and key in the dimensions. I have customs in SlicerPE for my big delta (605mm diameter 620 z) and for a "Jubilee" style multi-tool printer, (about 305x305x300) including all the tools. Each took only moments to setup.
-
I've been practicing with Cura.
I still can't get print/simulate directly from Cura. There I added 3 printers
One with http://printer.local address and some name != printer name in WebUI
Another with http://<ip_address> and some name != printer name in WebUI
and another with http://<ip_address> and some name == printer name in WebUIattempt to print/simulate on either gives: There was a network error: 203 Error transferring ....
But I could upload it via WebUI and tried to print without filament - seems heads are moving right way
-
I usually slice with simplify3d and for my start up I have the following in my start script in simplify3d which as you can see carries out numerous functions, this have been working well for a while now.
M290 S0.0 ; clear any baby stepping
G28 ; home all axes
G1 X20 Y50 ; move nozzle to start point
G92 E0 ; zero extruder
G1 Z0.5 ; lower nozzle
G1 Y250 E30 F1200 ; slow wipe
G92 E0 ; zero extruder
G1 Z2 ; lift nozzle
G29 S1 ; load height map -
Here's my start sequence for reference.
start.g
M106 P2 F30000 S0.5 H-1 C"Duet Fans" M140 S65 ; set heated bed to 65 and release T0 ; Select Tool 0 M291 P"Print Started. Preheating and Homing." T10 G4 S1 M98 P"0:/macros/Musical Tunes/LuckyTune.g" ; Lucky tune to start print off on the right foot G4 S1 M220 S100 ; Set speed factor back to 100% in case it was changed M221 S100 ; Set extrusion factor back to 100% in case it was changed M290 R0 S0 ; clear babystepping M106 S0 ; Turn part cooling blower off if it is on G10 P0 R0 S80 ; Set extruder to 80 and release M190 S65 ; set heated bed to 65 and wait G28 ; home XYZ G29 S1 ; load heightmap M400 G10 P0 R80 S180 ; Set extruder to 180 and release M98 P"0:/sys/ZSpeedsPrint.g" ; Load Z speeds for printing M98 P"0:/sys/CurrentsPrint.g" ; Load print motor currents ; Slicer Start Gcode begins.
ZSpeedsPrint.g
; 0:/sys/ZSpeedsPrint.g ; Used to set faster z speeds for printing. M566 Z120 ; Set maximum instantaneous speed changes (mm/min) (Jerk) M203 Z600 ; Set maximum speeds (mm/min) M201 Z240 ; Set maximum accelerations (mm/s^2)
CurrentsPrint.g
; 0:/sys/CurrentsPrint.g ; Used to set normal motor current ; Make sure these values match those in config.g M913 X80 Y80 Z80 E80 ; set X Y Z E motors to 80% of their max current
Slicer start gcode
M98 P"0:/sys/PrimeNozzle.g" M98 P"0:/sys/StartGCode.g"
Primenozzle.g
;M98 P"0:/sys/PrimeNozzle.g" G90 ; Absolute positioning G1 X1 Y270 F6000 ; Move to front left corner M400 ; clear movement buffer M116 ; Wait for temps G1 Z0.3 F100 ; Move Z to prime height G91 ; Relative positioning M83 ; Relative extrusion G1 X40 E10 F300 ; Prime nozzle G10 ; Retract G1 Y-1 X1 F10000 ; Wipe nozzle M400
StartGcode.g
M291 P"Good luck and Godspeed." T5 ; Good luck and Godspeed. ; Battle Cry! ; M400 G4 S1 M300 P200 S523.25 G4 P200 M300 P200 S659.25 G4 P200 M300 P200 S739.99 G4 P250 M300 P285 S880.00 G4 P450 M300 P285 S880.00 G4 P285 M300 P625 S1108.73 G4 S1 M400 ; ; Start the print ;
Slicer End Gcode
M0 ; calls stop.g
Stop.g
; stop.g ; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled) ; Also called by slicer end gcode by M0 ; M400 ; Finish move queue M104 S0 ; Extruder heater off M140 S0 ; Bed heater off M106 S255 ; Fan at 100 to cool nozzle and bed G91 ; Relative positioning M220 S100 ; Set speed factor back to 100% in case it was changed M221 S100 ; Set extrusion factor back to 100% in case it was changed G1 E-2 F9000 ; Retract filament 2mm G1 X5 Y5 F9000 ; Wipe nozzle G1 Z20 F500 ; raise nozzle 5mm from printed part G90 ; absolute positioning G1 X150 Y130 F6000 ; Move x and Y axis over to bed center so probe is on top of bed ;M104 S35 ; Set hot end low and wait G4 S60 ; Wait 5 minutes ;M116 ; wait for temp to drop G28 X Y ; Home X and Y G28 X Y ; Home it again, Sam. M290 R0 S0 ; clear babystepping M84 ; Steppers off M98 P"ZSpeedsNormal.g" ; Load normal z speed settings again. M106 S0 ; Fan off M106 P2 F30000 L0.1 X0.8 B0.5 T35:70 H100:101:102 C"Duet Fans" ;Play a little beep beep beep to show print ended. M400 ; Clear queue again before jingle G4 S1 M300 P250 S750 G4 P251 M300 P200 S1250 G4 P201 M300 P250 S750 G4 P251 M300 P200 S1250 G4 P201 M300 P250 S2500 G4 P251 M300 P150 S2000 G4 P151 M300 P150 S2500 G4 P151 M300 P350 S3700 G4 P351
Doing things this way has a few benefits. Mainly that the slicer start gcode is basically nothing. That way I only have to change the files on the Duet and regardless of which slicer I use the starting and ending behaviour is the same. It also allows me to do a preheat and nozzle prime and still allows the slicer to control the print temps.
-
@Phaedrux Thanks for sharing - that sets the bar...
@Phaedrux said in Duet 3 and g-code procedures and slicing:
M98 P"0:/macros/Musical Tunes/LuckyTune.g" ; Lucky tune to start print off on the right foot
LOL
-
@monster said in Duet 3 and g-code procedures and slicing:
LuckyTune.g
Sorry, I forgot that one.
; 0:/macros/Tunes/LuckyTune.g ; Lucky tune to start print off on the right foot ; M400 ; Empty the movement buffer M300 P200 S1000 G4 P210 M300 P200 S1250 G4 P210 M300 P200 S1100 G4 P201 M300 P200 S2000 G4 P201 M300 P200 S1500 G4 P201 M300 P200 S1000 G4 P201 M300 P200 S1300 G4 P201 M300 P200 S1000 G4 P201 M300 P300 S1500 M400 ; Empty the movement buffer
-
@Phaedrux why do you use M400 often? I actually don't get why emptying of the buffer needed as command cause I though while one movement command is being executed then next command in script will not start. Which in turn means when next command is being executed all the movement of previous one is done. Or do I get some concept wrong? Perhaps movement buffer is not something I picture myself...
-
@Phaedrux said in Duet 3 and g-code procedures and slicing:
Slicer start gcode
Another piece of setup I do not understand fully.
what is "Slicer start gcode"? (as well as "Slicer End Gcode")
Is it some script that defined in slicer software to be included in each g-code to print?
And then "0:/sys/PrimeNozzle.g" & "0:/sys/StartGCode.g" seems located in your printers files system, right? That means your slicer software is counting on presence of those files in printer, correct?
Or is "Slicer start gcode" an another script in printer that being called right before sliced model to be printed?There are so many unknown things here I must admit. For example is there a list of standard scripts like start.g stop.g homex.g etc... that getting called in some occasions?
-
@monster said in Duet 3 and g-code procedures and slicing:
@Phaedrux said in Duet 3 and g-code procedures and slicing:
Slicer start gcode
Another piece of setup I do not understand fully.
what is "Slicer start gcode"? (as well as "Slicer End Gcode")
Is it some script that defined in slicer software to be included in each g-code to print?Got it! It is in printer settings in Cura!
-
@monster said in Duet 3 and g-code procedures and slicing:
@Phaedrux why do you use M400 often? I actually don't get why emptying of the buffer needed as command cause I though while one movement command is being executed then next command in script will not start. Which in turn means when next command is being executed all the movement of previous one is done. Or do I get some concept wrong? Perhaps movement buffer is not something I picture myself...
Probably unnecessary for the most part, done mostly out of habit during troubleshooting. Basically M400 just says wait until the movement queue is complete up to this point before executing what comes after.
For the music bits I found M400 before helped it play the tones more consistently without stutters, but I haven't tested that in quite some time.
-
@monster said in Duet 3 and g-code procedures and slicing:
what is "Slicer start gcode"? (as well as "Slicer End Gcode")
Is it some script that defined in slicer software to be included in each g-code to print?Yes that's right. Most slicers have a section of text boxes that allow you to enter custom gcode commands that will get inserted at certain locations, such as before the print starts, when the print is finished, at layer changes, at tool changes, etc.
Example from PrusaSlicer:
@monster said in Duet 3 and g-code procedures and slicing:
And then "0:/sys/PrimeNozzle.g" & "0:/sys/StartGCode.g" seems located in your printers files system, right?
That's right. M98 allows you to call a macro found on the Duet SD card, either in the macros or sys folder.
@monster said in Duet 3 and g-code procedures and slicing:
For example is there a list of standard scripts like start.g stop.g homex.g etc... that getting called in some occasions?
Yes, there is.
https://duet3d.dozuki.com/Wiki/Setting_up_macro_files_for_common_tasks
https://duet3d.dozuki.com/Wiki/Macros -
@monster said in Duet 3 and g-code procedures and slicing:
There was a network error: 203 Error transferring ....
Apparently Duet3 with SBC does not provide the same API as RepRapFirmware 2 and previous. This means all the slicer integrations are broken - I know of at least PrusaSlicer, and the Cura plugin (I am the maintainer if it).
Looks like once it is RRF that broke compatibility with slicers - usually it is slicers who break magic comments and other things
@dc42 @chrishamm any thoughts on this topic? It would be really nice if the well-known RRF HTTP API with
rr_connect
etc. would also be supported on Duet3+SBC!
It's not only slicers, also lots of other scripts, timelapse tools, and other integrations were relying on this API. -
@Phaedrux said in Duet 3 and g-code procedures and slicing:
@monster said in Duet 3 and g-code procedures and slicing:
For example is there a list of standard scripts like start.g stop.g homex.g etc... that getting called in some occasions?
Yes, there is.
https://duet3d.dozuki.com/Wiki/Setting_up_macro_files_for_common_tasks
https://duet3d.dozuki.com/Wiki/MacrosPriceless!
-
I can't remember where did I read that by now.
But back then when I was choosing controller I did read somewhere that when Duet 3 used with Pi it (or I guess Pi) can do slicing. And if my memory not mistaking that was saying about actually Cura slicer in Pi.Is it something I could try? I mean try to use that slicer.
Hope it is not to difficult to setup and use. May be that could solve my problem... -
Yes you could run a slicer on the pi, but it will be a bit slower than on your PC and I don't think it would solve any of your problems.