Tool changes And Z Height

Hey Sean,

If you leave the faulty code that is in the ‘tool-change’ field when the buildbotics-derived Onefinity controller is delivered, then on a ‘tool change’ event you won’t be able to change the bit because it will not raise the router/spindle to allow it. You will be stuck and be forced to abort the program. I don’t know who put this faulty g-code into this field, but it seems not to have been someone who knew what they did or had good knowledge of g-code.

Therefore you need a working ‘tool change’ routine in this field. My Aiph5u’s ‘tool change’ routine provides that. That is a short g-code that instructs the machine on how to behave if it encounters a ‘tool change’ event. It is something you need if you have multiple tools in one file and it is something the Onefinity manufacturer didn’t provide.

In detail, Aiph5u’s ‘tool-change’ routine will do the following:

What Aiph5u’s ‘tool-change’ routine will do

  1. When the machine encounters a ‘tool-change’ event in your g-code toolpath (i.e., a M6 command), first the ‘tool-change’ routine will save internally all modal states of your running program.

  2. It will then stop the spindle or the router.

    • (For a router, this will only work if you connected it to a relay that is wired and controlled by the ‘tool-enable’ pin 15 on 25-pin I/O port of the Onefinity controller to allow automatic on/off control, see here on how to do that (or use PRO Auto Control Box when it will be available (announced)). Without relay, you will have to switch the router manually off prior to changing the bit.)
  3. Then it will move the router/spindle to leftmost, frontmost and topmost position which is the most comfortable position for you to change the bit.

  4. It will then pause and popup a window that says “Please insert tool Nr. #<_selected_tool> and tighten the collet with both wrenches”, and it will wait until you click “Continue”. (The variable “#<_selected_tool>” will be inserted automatically by taking the tool number from your g-code program that is selected for this pass). This is the moment when the operator changes the bit, and when ready, clicks “Continue”.

  5. Then the ‘tool-change’ routine will move the router/spindle to a position 1½ inches above your last workpiece zero position.

  6. Then it will pause and popup a window that says “Please connect the touch probe to the controller, place the touch probe underneath the bit and attach the magnet end to the collet of your router” and it will wait until you click “Continue”. This is the moment when the operator puts the XYZ Touch plate into a position underneath the bit and attaches the magnet end to the router’s collet, and when ready, clicks “Continue”.

  7. The ‘tool-change’ routine will then very slowly lower the router/spindle until the bit’s tip just touches the touch plate (that is the Z probing step for making the machine know the length of the new bit)

  8. Then it will move the router/spindle upwards again and pause, and popup a window that says: “Please remove the touch probe and start the router” and it will wait until you click “Continue”. This is the moment when the operator removes the XYZ Touch plate and the magnet end of the touch plate from the router’s collet, and, if the router is not wired to start automatically, switches the router manually on again, and when ready, clicks “Continue”.

  9. Now the ‘tool-change’ routine will restore the modal states of your running program that it saved previously and start the next pass with the new tool.

If you don’t use my ‘tool change’ routine or a routine with a similar functionality, the machine will do none of the above, or useless behaviour, and leave you stuck with a program where you can’t change the bit because it doesn’t raise the router/spindle.

I suggest you try it out. It is always difficult to understand such things in theory.

2 Likes