After crashing my probe because the routines do some moves that are not guarded against contact, I started to write my own routines.
Here are some of what I want in such routines:
1 -- Must be safe in the sense that every move terminates when the probe makes contact.
2 -- My mode of operation is interactive. I don't need the probe routine to go down to the center of a hole before determining its diameter. I will position the probe in the desired location (I just bought an MPG) and then run the find center routine.
3 -- When it makes sense, (such as finding the center of something) the routine should leave the probe at the center. It doesn't make sense (at least to me) to position the probe at an edge because we need to know how far to raise the probe before positioning. In cases like that, find the edge, but remember the found value and return the probe to the starting point. Then manually move the probe to a safe location and give another command to move to remembered place.
4 -- When positioning to the center of a block, I want to use the same procedure as if I had just a DRO and edge finder.
A -- Jog to the side of an edge. Find the edge.
B -- Zero the DRO (selecting which coordinate system should be zeroed - P0, P1, ...)
C -- Jog to the side of the opposite edge. Find the edge.
D -- Store half the difference between the value in the coordinate system and the current value to that coordinate system.
E -- Go to that location. -- Or, since it has been saved in a coordinate system, do something else and go there later.
5 -- I'd also like the ability to find the top center of a horizontal cylinder. I've written a gcode routine to find the center and diameter of a circle given three points on it. It still needs some cleanup to make it more general, but it seems to work.
6 -- I'd like it to integrate with the buttons on my MPG. The axis selection knob together with the zero and half buttons should be useful for doing the procedure in #4.
7 -- It should (my current draft does) have an init routine that sets the relevant parameters (they are global named parameters) -- probe diameter, search distance, ... There is no reason why specific init routines couldn't be written for each important case.
8 -- Rather than diddle little screws on the bottom of my probe to get it centered perfectly, I've chosen to just calibrate the probe by measuring its offset. One way of doing that is to put a pin in a collet and use that to zero a ring. Then measure the center of the ring and record the offset. Save the offset and add (or subtract it) from every reading.
Comments, suggestions, etc are solicited. Should this be moved to a separate thread?
Thanks,
Ken