So, I've just finished building a Jubilee Tool Changer with 4 tools. On my single nozzle machines, I usually have a prime and retract command to pull and push the filament through the Revo nozzle to prevent oozing when it starts and stops. I'd like to do something similar with my Jubilee Tool Changer printer.
It normally goes something like this for retract
M83 ; Relative extrusion mode
G1 E-18 F800 ; retract 18mm filament
and then this for priming.
M83 ; Relative extrusion mode
G1 E18 F800 ; prime 18mm filament
I have the tfreeX.g, tpreX.g, tpostX.g files for each tool to dock and undock, but experimenting with PrusaSlicer trying to make it do it through start code and tool change code doesn't work well if I don't start with T0.
So, is there any way to check the tool is active, at active temperature, and currently printing a file within my tfreeX.g for a retract something like:
; tfree0.g
; Runs at the start of a toolchange if the current tool is tool-0.
; Note: tool offsets are applied at this point unless we preempt commands with G53!
G91 ; Relative Mode.
G1 Z2 ; Pop Z up slightly so we don't crash while traveling over the usable bed region.
G90 ; Absolute Mode.
G53 G0 X11 Y5 F12000 ; Rapid to the back of the post. Stay away from the tool rack so we don't collide with tools.
; ; This position must be chosen such that the most protruding y face of the current tool
; ; (while on the carriage) does not collide with the most protruding y face of any parked tool.
if job.file.fileName!=null
if heat.heaters[1].current = heat.heaters[1].active
M83 ; Relative extrusion mode
G1 E-18 F800 ; retract 18mm filament
M591 D0 S0 ; Disable filament sensor
G53 G1 Y-40 F6000 ; Controlled move to the park position with tool-1. (park_x, park_y)
M98 P"/macros/tool_unlock.g" ; Unlock the tool
G53 G1 Y-5 F6000 ; Retract the pin.
And then something like this for initial tool pickup and prime
; tpost0.g
; called after firmware thinks Tool0 is selected
; Note: tool offsets are applied at this point!
; Note that commands preempted with G53 will NOT apply the tool offset.
M116 P0 ; Wait for set temperatures to be reached
M302 P0 ; Prevent Cold Extrudes, just in case temp setpoints are at 0
G90 ; Ensure the machine is in absolute mode before issuing movements.
G53 G1 Y-40 F6000 ; Move to the pickup position with tool-0.
M98 P"/macros/tool_lock.g" ; Lock the tool
if job.file.fileName!=null
if heat.heaters[1].current = heat.heaters[1].active
M83 ; Relative extrusion mode
G1 E18 F800 ; prime 18mm filament
G53 G1 Y-5 F6000 ; Move off the parking posts
M591 D0 S1 ; Enable filament sensor
G1 R2 Z0 ; Restore prior Z position before tool change was initiated.
; Note: tool tip position is automatically saved to slot 2 upon the start of a tool change.
; Restore Z first so we don't crash the tool on retraction.
G1 R0 Y0 ; Retract tool by restoring Y position next now accounting for new tool offset.
; Restoring Y next ensures the tool is fully removed from parking post.
G1 R0 X0 ; Restore X position now accounting for new tool offset.
M106 R2 ; restore print cooling fan speed
Is there a way to check the tool is at or close to active temperatures? And that those temperatures aren't below the cold extrusion? Something like what M116 does, but in an if statement? I know I could do this without the if statements, but I'd rather avoid the warning messages when I'm manually changing tools not in a print or not at temperature. That's partly why I enable/disable the filament sensor for the tool change.