Connecting it up:
Firstly, I need to get some sort of tool setter / touch pad thing working. Some time ago I made a simple but crude conductive pad for this purpose. Like most examples it relies on pulling down a normally open input on the controller by contact between the tool in the spindle and the touch pad. Obviously this requires the tool to be grounded - and the system 0V connection to be connected to the machine metalwork.
This is what I ended up with on The Shiz (with Centroid controller) before I bought a slightly more workmanlike device. It's got a 3.5mm jack on it, as it needed a "probe detect" signal as well as a "tool touching" output, to prevent you seeking a tool without the probe connected. For the Newker controller there doesn't seem to be a probe detect function.
I may get around to wiring in a fixed tool setter at some point but for now all I need is a single wire, so a 4mm banana plug and socket will suffice. The conductive centre contact from a 4mm plug does the trick, holding the spring and plunger in place as well as making the required contact and providing a 4mm socket for a flying lead.
4mm socket on front panel, 4k7 pullup to 24V and a wire to the X25 / M28 input is all that is required (yellow wire):
Making it work:
That was the easy part. Now for some trial and error:
- Run macro M882 from MDI. This stops the tool at the surface of the touch pad and stores the machine Z coordinate somewhere (not sure where).
- Then manually jog the tool down to the surface of the table ie level with the bottom of the touch pad. This could go horribly wrong!
- Then run macro M883. This stores the difference between the last 2 Z coordinates in Other Parameter #389. This value is simply the height of the tool setter, which is about 42mm in my case.
- NB: #389 only needs to be acquired once.
The tool setting parameters (in Other Parameter):
- #380 - the X machine coordinate of the tool setting position
- #381 - the Y machine coordinate of the tool setting position
- #382 - the Z machine coordinate of the tool setting position
- #383 - the downward speed of the tool as it seeks the touch pad (mm/min). This can be reasonably fast eg 500 mm/min or so.
- #384 - the (slow!) withdrawing speed of the tool seeking movement after the tool has touched the pad (mm/min) eg 10 mm/min. The tool will stop once the contact is broken again. This speed determines the accuracy of the measurement to some extent - the next step is to save the current position to the tool table.
- #385 - it's claimed to be the Z machine coordinate of the tool setting position but I can't discern any effect. It doesn't seem to change anything.
- #386 - the rapid speed to the location of the tool setter, including the Z retract to the safe height specified in #383 eg 1000 mm/min.
- #387 - automatic / manual setting mode. 1 means use the fixed position defined by #380-382, 0 means manually position the tool above the setter, which can be simply placed on the workpiece.
- #388 - The minimum Z axis machine coordinate ie how far the tool is permitted to descent while seeking the tool setter. Could be as much as the soft movement limits eg 90mm.
- #389 - described as the "gap", this is the height of the tool setter which can be acquired automatically using macros M882 and M883 as described above. It only needs to be done once.
Populating the tool length table (press the "Redeem" button):
- Ensure the tool setter is plugged in (and positioned at the defined X & Y coordinate position on the table position defined with #380 and #381 if you are using a fixed tool setter position).
- Insert the tool.
- Run M882 in the MDI screen. Unless you have screwed up the settings, when you press the green go button the tool should retract to the Z coordinate defined in #382, then it should move to the X & Y coordinates defined in #380 and #381 at the speed defined by #386. It should then (rapidly) descend at the rate defined in #383. It should stop once it touches the touch pad, then retract (slowly) at the rate defined by #384. Once the tool loses contact, it should stop and the helpful Chinese message should tell you the process was successfully completed.
- To save the tool length offset to the tool table, press the "Redeem" button to bring up the tool length offsets table. Move the highlighted row to the current tool using the up and down arrows, then press "A - SetTool" to save the current Z machine coordinate to that tool number.
- Insert the next tool and repeat...
Testing out the tool length offsets:
If I've done this correctly, I should be able to swap between 2 tools from the tool table and position them at the same G54 height.
Something like this:
G49
G53 G00 Z0
G54
G43 H02 Z15.
G04 P1000
G43 H01 Z15.
G04 P1000
G43 H02 Z15.
G53 Z0
G49
G53 Z0
M30
- The initial G49 clears any current tool length offsets.
- The G04 P1000 causes a 1000ms delay in the program between virtual tool changes.
- You need to issue G43 H02 etc to apply the length offset for tool 2 etc. Simply declaring something like T02H02 won't do anything until you issue the G43 to make it active.
- You'd need to issue a M06 tool change if you wanted to physically swap the tools out but for now, I'm simply looking for the quill to move between tool changes, by a distance equal to the difference between their length offsets.
That worked nicely.
Here's the machine doing the business on a dummy tool:
Here's the machine doing the business on a dummy tool:
Whew