Hi,
in the early days (6.5 years ago) I tried using a manual switch to simulate a probe but did not have good results.
I did reach a conclusion as to why that was the case, but is just a pet theory of my own, whether it makes sense to you,
and even more importantly whether it's correct.....
I was trying to simulate a probe before my machine was complete, that is to say not all of the axes were operable.
Once all axes were operable and I instituted a good probe circuit probing has worked fine for me ever since.
I use Autoleveller, a software utility that probes a printed circuit board blank to measure its deviation (small, typically less that 0.2mm)
from flat, and thence modify the Z axis ordinate of the Gcode to isolation route the PCB. I have used it for years and probing a PCB blank
in ten or even hundreds of locations is commonplace, and I do it daily. I would have expected if there is a fault with Mach4 probing I would have
found it over the six plus years I've been using it.
The probing routine that you are using is not a native Mach4 operation, but is in fact a macro consisting of dozens of instructions to enact the
whole routine. ALL probing relies on the g31 code. If you don't understand how the g31 code works and its limitations then it should
come as no surprise that any macro built up of g31 blocks will fail.
An excellent description of the exact sequence of events when a g31 block is executed is given in Mach4Hobby/Docs/Mach4API.chm, look under
'Plugin Development/Probing' headings.
The shortened version goes something like this (mm units):
g31 z-5 f200
is interpreted as a more common g1 move from the controlled points current x,y,z location to x,y,-5 at a speed of 200mm/min
UNTIL the motion controller detects a probe event. On receipt of a probe event the motion controller stops, reports an AllAxesStopped
and then reports its x,y,z location, ie the probe position. The remainder to the Z axis travel, that is to z=-5mm is aborted.
That your probing routine passes a number of probe events it suggests that your motion controller and Mach4 must be co-operating
to successfully complete g31 blocks.
In practice all g31 blocks must be followed with a retract move, for instance:
g31 z-5 f200
g0 z5
This combination of moves will probe in the negative z direction until the probe event is detected, and once the position is reported back to Mach
then it will retract (at raid traverse rate) to z=5mm.
Now as the Z axis retracts you would expect the probe circuit to go open circuit right? Lets imagine that for some reason, fault or otherwise,
that the probe circuit does not open circuit. What is Mach to do? It has detected a fault....and as it may be required to do another g31
block in short order, has it not detected a fault that would preclude it from being able to do so?
When I was simulating a probe wit a button I believe that when the retract move was executing my motion controller was monitoring the
probe circuit and if it did not open circuit in some respectable time it would fault.
This is the basis of my pet theory.......but I have no evidence for it other than when I was trying to simulate a probe with a button, while
it would work with the 'probe closing event' it would often fail at the 'probe opening event' ie that I was not fast enough on the button.
What I did find is that when I got my Z axis working properly and a good probe circuit that kind of fault never occurred again. I presumed
that because the probe would open circuit within micro seconds of the Z axis retract block being executed that my motion controller was
happy enough that the probe circuit is operable.
As I say this is my own theory....whether its correct or not is up to you to decide.
Craig