I have a custom machine that has two tool heads have different gcode for changing between each one. (And the tool heads are not located only on the x axis, they need both x and y to move). I need to alternate between the two gcodes to utilize the two different tool heads. (So it will use code 1 to pick up tool head 1 and code 2 to pick up tool head 2, so the code needs to go 1, 2, 1, 2, etc…) Is there a way to have the tool change gcode alternate somehow?
If you use different slicers, you could use Repetier firmware. You can set “select” and " deselect" commands in the firmware.
Does Marlin have that at all? I run Repetier Host with Slic3r Prusa Edition too, but I can change those if needed.
I don’t think this is possible in Marlin.
Another way is to put g-code in your slicer in the “tool change g-code” with the use of placeholders. I haven’t done this yet in Slic3r. Only in S3D and Kisslicer.
@Rudy_Van_Parys I used this:
[[next_extruder==1] ]
M32 !/TOOL12~1.GCO#
[[/next_extruder==1]]
[[next extruder ==0]]
M32 !/TOOL21~1.GCO#
[[/next_extruder==0]]
but it will do both tool changes (TOOL12 and TOOL21) and pick up a tool, move it to the second spot, and then put it back to where it was originally. Can I even do that? I think the placeholders from S3D are similar.
This will not work… You can check your generated g-code in notepad++ after you sliced a file. Then you can see what the slicer did with the placeholders. The [next_extruder] placeholder just puts the number of the next extruder.
S3D has placeholders like: {IF NEWTOOL=0}, {IF OLDTOOL=1}
I believe the clean and easy way is with the repetier firmware. I’m working on a printer with 4 tools with repetier. This way I can do toolchanges without additional g-code in slicers.
@Rudy_Van_Parys Thank you so much for your help! I am configuring the Repetier Firmware right now…