Your start.g
-
In the lack of anything nifty to put in start.g myself , what do you got in yours?
-
I would be interested in idex start codes
-
Can't help you with strat.g but here is my very blah start.g for my jubilee tool changer:
; This file is called before any print job
T-1
if !move.axes[0].homed || !move.axes[1].homed|| !move.axes[2].homed ; If the printer hasn't been homed, home itMy start.g file for a creality printer .... doesn't exist.
-
@jens55 said in Your strart.g:
Can't help you with strat.g but here is my very blah start.g for my jubilee tool changer:
Fixed!
😂
; This file is called before any print job
T-1
if !move.axes[0].homed || !move.axes[1].homed|| !move.axes[2].homed ; If the printer hasn't been homed, home itMy start.g file for a creality printer .... doesn't exist.
Yeah i guess the homing could live there.
-
; start.g - run before slicer gcode at start of print 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 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 M566 P1 ; jerk between all moves ; Slicer Start Gcode begins.
-
-
I wrote these when I was beginning to learn coding on the Duet, so there may be a better way to do this, but...
I collect the time (state.time) in one global variable and the print file name (job.file.name) in another.
Then in stop.g, I collect the time again so I have the elapsed print time. I append the start time, elapsed time, and job name into a file so I can create print statistics.
When I did this, I thought the data I wanted would be deleted from the object model before stop.g would run.
And since writing the macro over a year ago, I've never looked at the file once.
But I'm going to add some of the things from Phaedrux's file, and the checking for homing.
-
@Phaedrux
Got som ideas there! Care to share that lucky tune btw? Just for shits and giggles?😂
-
@Exerqtor Sure, here's a link to all the midi files and converted gcodes I have messed around with.
And here's the ones that actually ended up working well, including the ones I made myself.
It's a bit hit or miss these days whether the PanelDue will play them smoothly as things have gotten more complex.
And here's the original thead with a link to the tool to convert midi to gcode tone.
https://forum.duet3d.com/topic/15722/turn-your-printer-into-a-juke-box
-
@Phaedrux said in Your start.g:
@Exerqtor Sure, here's a link to all the midi files and converted gcodes I have messed around with.
And here's the ones that actually ended up working well, including the ones I made myself.
It's a bit hit or miss these days whether the PanelDue will play them smoothly as things have gotten more complex.
And here's the original thead with a link to the tool to convert midi to gcode tone.
https://forum.duet3d.com/topic/15722/turn-your-printer-into-a-juke-box
Thanks! Looks like it might be some weirdness happening in RRF 3.5.0b1+ though
🤔
I uploadedluckytune.g
and ran it to listen to what it sound like, and each time i excecute the file it plays off in a different pitch/tune lol.On another note (pun intended), I've slapped together something based on your
start.g
and my excisting print start routine:
start.g
:; /sys/lib/print/print_start.g v2.0 ; Called when starting a print (after start.g) at the end of your slicers start code ; Used to configure print parameters M140 S{global.bed_temp} ; Set bed temperature if exists(global.sb_leds) set global.sb_leds = "heating" ; StealthBurner LED status M116 H0 S5 ; Wait for the bed to reach its temperature +/-5°C M98 "/sys/lib/print/print_probe.g/" ; Pre print mesh macro, if it will probe a mesh or not i controlled by global.Print_Probe(true=on, false=off) and select a mesh accordinlgy M376 H5 ; Set bed compensation taper to 5mm G10 P{global.initial_extruder} R{global.hotend_temp} S{global.hotend_temp} ; Set active and standby temps for the initial tool if exists(global.sb_leds) set global.sb_leds = "heating" ; StealthBurner LED status M116 H1 ; Wait hotend to reach it's temperature M42 P0 S0.3 ; Turn on chamber lights to 30% G0 Z{(global.first_layer_height + 5)} F3000 ; Drop bed to first layer height + 5mm to reduce pucker factor M98 P"/sys/lib/print/print_purge.g" ; Purge the nozzle before starting print M400 ; Wait for moves to finish if exists(global.sb_leds) set global.sb_leds = "printing" ; StealthBurner LED status if exists(global.RunDaemon) set global.RunDaemon = false ; Disable daemon.g while printing because of bug in RRF 3.5.0b1+
-
@Exerqtor
If you have daemon.g running it tends to interrupt these "music" macros.
I see you have a global runDaemon
I use that at the start and finish of the tunes to disable the daemon for the duration of the tune.
It depends where the daemon is in terms of its process cycle as to whether the tune ends up unhindered.
You may need a G4 at the start of the tune. -
@OwenD said in Your start.g:
@Exerqtor
If you have daemon.g running it tends to interrupt these "music" macros.
I see you have a global runDaemon
I use that at the start and finish of the tunes to disable the daemon for the duration of the tune.
It depends where the daemon is in terms of its process cycle as to whether the tune ends up unhindered.
You may need a G4 at the start of the tune.Noted, thx!
-
M291 P"Start.g wird ausgeführt" S0 M98 P"/Macros/SUB/CheckDoor" ;Door open or closed M561 M106 P3 S0 G4 S1 M106 P3 S25 G4 S1 M106 P3 S0 G4 S1 M106 P3 S25 ;dimme LED for IR Probe M98 P"/Macros/SUB/Preheat" ;Preheat for Loaded Filament if !move.axes[0].homed || !move.axes[1].homed || !move.axes[2].homed G28 G28 Z0 M98 P"/Macros/Buildplate" ;Load Hightmap for Buildplate and Filament M98 P"config_probe.g"
-