detecting different start g codes
-
Hello. I have a voroin style printer, and a prusa style printer, both of them controlled by a duet3 boards.
I has happened (many times Im embarrased to say) when doing a slicing, I mke a mistake and I chose the wrong printer profile on the slicer. So, when I send a gcode sliced for the voron to the prusa printer... things goes wrong.
My question is: I can see the slicer inserts a string at the beggining of the gcode saying wich profile was chosen. Is there any way I can propgram the duet3, to read the gcode, look for that line and based on that It can detect I choosed the wrong profile and not start the print if that is the case?Thanks in advance
-
@Tinchus you could do a check for the machine name but really it should be passed as a parameter
here's an example of how i use parameters https://github.com/TeamGloomy/Troodon-V2/blob/improved/Config/sys/start_print.g
and this is my start code in prusaslicerM98 P"start_print.g" A{first_layer_bed_temperature} B"{filament_type}" C{first_layer_temperature} D{nozzle_diameter} E{first_layer_print_min[0]} F{first_layer_print_max[0]} H{first_layer_print_min[1]} J{first_layer_print_max[1]}
so you would do something to the filament type
you could use something likephysical_printer_settings_id
but you'd have to check what that populates as for each printer -
@jay_s_uk thank you! Your example gave me a pretty good idea on how to do it. So I depend on the ability of my slicer to give me those kind of variables. Im using kisslicer right now, looks like I will have some trouble there.
Thank you again! -
@Tinchus Also, you don't have to use start.g. You can create your own macros which do essentially the same thing, which is what I do. In my case, I use macros entitled "prePrintAbs", "prePrintPetg" etc. Then I use an M98 command in the custom gcode section of the slicer to call the relevant macro for each filament type. You could do something similar.