GCODE Commands for pre and post change extruder

In addition to the already existing commands you can add the command {IF NEWTOOL =} as simplify
Example:
{IF NEWTOOL=0} M104 S165 T1; set T1 inactive extruder to 165 C
{IF NEWTOOL=0} M109 T0 S{TEMP0}; Set T0 new active extruder to TEMP0

or

{IF NEWTOOL=1} M109 T1 S{TEMP1}; set T1
{IF NEWTOOL=1} M104 S165 T0; Cool T0 to 165

or

{IF NEWTOOL=0} M280 P0 S90
{IF NEWTOOL=1} M280 P0 S180

Thank's

Comments

  • Idea is good, but the scripts are evaluated BEFORE starting curengine. This would require a postprocessing where we test results and replace values. So for no problem but we also need to look ahead for this to know what new tool would be. I will think about it and how I could achieve it. The idea is good especially for dual extrusion I'd like to do some cooling.

  • But the pre and post gcode not plugs directly Host? Or commands that are sent to Cura Engine and then Cura Engine that interprets them?
  • Actually CuraEngine is quite dump on the ear and does not interpret anything. All thise variable expansions are done on host side before sending to CuraEngine, but conditionals for tools make only sense after slicing. Would require a complete parse and replace cycle which slows down everything depending on gcode length. Just hope curaengine handles it as simple string so it survives it.
Sign In or Register to comment.