correct bed temp at start of print with no tool selected
-
I have a tool changer where my start gcode will try to heat up the bed first before it picks up the first tool. the only problem is, the M703 command will only work after the tool is selected. is there any way to force the firmware to automatically select the bed temp of the filament currently loaded in the tool to be used before the tool is picked up without MANUALLY EDITTING the gcode file everytime I need to use a different filament for the same gcode?
-
Best I can think of is this.
Most slicers will have a placeholder or token for "next filament " or similar
In prusa slicer it looks like
initial_filament_typeIn your start G code use that to work out what the next filament will be.
Use that to call a macro with the filament as a parameterM98 P"0:/macros/loadConfig.g" A"{initial_filament_type}"
In that macro use something like
M98 P{"0:\filaments\" ^ param.A ^ "\config.g"}
This would run everything just as if M703 had been called.
It's untested and you'll have to alter it according to your slicer.Why is it important to heat the bed before selecting a tool?
Could you not select a tool, use M568 to set the tool heater to inactive and use M116 to wait for the bed to reach temp? -
I can't quite wrap my head around this. looking at the gcode documentation, I don't see A as a parameter for M98. i am not understand how this works.
A"{initial_filament_type}" and ^ param.A ^ "\config.g"}
i will try to investigate further. thank you.
-
-
@OwenD said in correct bed temp at start of print with no tool selected:
Why is it important to heat the bed before selecting a tool?
Could you not select a tool, use M568 to set the tool heater to inactive and use M116 to wait for the bed to reach temp?i can have it select a tool first but the only issue is I put my wait for bed temp commands in my start gcode script. this script runs after the Tn command. what happens is it will end up heating my hotend first to active temp, and then wait for the bed to heat up. I don't want my active temp heated to print temperature and just sit there because I end up getting jams.
this is why I try to have all my bed temp done before it does anything with the tools. however, the way I have my machine setup to load filament configuration based on what filament is preloaded in Tn does not allow the bed temp settings ( which is located in filament/config.g ) to be applied to the M190 command prior to tool selection.
i can try to put something like M568 Pn A0 in the TpostN.g but i dont know how to implement this for tools that's not the first tool to be used. for example, if i use PLA for the bottom layer with bedheat of 60C, it would wait for bed temp to reach 60C before starting to heat up the tool. but what if lets say it switches to another tool that extrudes ABS, I dont want it to wait for ABS's bedtemp (which is higher than PLA) before heating that tool to active temp because it will melt my first layer which is PLA.
I tried to use meta commands with conditional codes but there is nothing in the ojbection modelling page that corresponds to allowing the machine to know it WILL be starting to print the first layer.
-
@OwenD said in correct bed temp at start of print with no tool selected:
Best I can think of is this.
Most slicers will have a placeholder or token for "next filament " or similar
In prusa slicer it looks like
initial_filament_typeIn your start G code use that to work out what the next filament will be.
Use that to call a macro with the filament as a parameterM98 P"0:/macros/loadConfig.g" A"{initial_filament_type}"
In that macro use something like
M98 P{"0:\filaments\" ^ param.A ^ "\config.g"}
This would run everything just as if M703 had been called.
It's untested and you'll have to alter it according to your slicer.Why is it important to heat the bed before selecting a tool?
Could you not select a tool, use M568 to set the tool heater to inactive and use M116 to wait for the bed to reach temp?based on your 2 scripts, would I need to select the filament type in the slicer first? and if I were to switch to a different type of filament, would I need to edit the gcode file?
-
@tekstyle
Yes, you have to tell the slicer what filament each tool is using
If you change tools during the print you'd have to call the macros again in your tool change section of the slicer.Your example of switching from PLA to ABS doesn't really make sense to me
If you're initial layers are PLA with a bed temp of 60 degrees, you're not going to heat the bed to 100 degrees if you do a tool change (on the same print) to ABS as that would melt the PLA
-
@OwenD
I have my bed temp for each filament type set in the filament config file. I use a conditional code that will run a start heating bed macro if the firmware sees that there is a current print job. however, I have not attempted dual extruding prints yet.what would be a good object model to check for as a condition so the firmware knows it is heating the bed for the first layer of any given print?
I will put this into the tpost#.g file so it will check to make sure that the following layer is the first layer for a print before applying the bed temp and evoking a start heating bed macro. otherwise of the conditions aren't met, it will ignore that portion of the tpost#.g script and move on to only heating tool to the mounted filament's config.
below is my tpost:
m703 G4 s1 if {job.file.fileName != null} && {job.build.currentObject = -1} M98 P"/sys/PRINTCODE/startbedtemp.g" ;evoke startbedtemp.g to warm bed m568 P2 A2 ;then set T2 to active temp g4 s5 M116 P2 ; Wait for set temperatures to be reached ; if file name exist amd no current object