Thank you very much Andy.
I will give this a try too, although I first need to understand this, hehe.
After some testing, my proposal does not work reliably.
After a couple of probing commands, the error comes back.
I first thought about a race condition, so I also tried the synced
M62/M63 and isolated everything with G04 dwell commands,
up to 1s, like this one here:
Code:
...
M64 P0 (turn on touch probe)
G04 P1
G38.2 Z#8
(also tried wating here)
M65 P0 (turn off touch probe)
G04 P1
G0 Z#7
...
After some debugging, it's clear, that the G38 command itself
triggers this error. Most likely dIrectly after the probe made contact.
The short time between the (sucessful) end of G38 and my custom
"probe off" command seems to be the zone, where this happens.
If this is true, probably not even Andy's solution would work here.
To be clear, yes, there is a _lot_ of bouncing involved here.
I am directly probing with a 0.1mm cutter and the touch probe
is connected to the galvanically isolated material.
But this all was working in the past; I almost used this daily,
with previous versions.
Is there a latching element available in HAL?
A flipflop? That might help here, if it's fast enough.
Otherwise, the last resort would be a HW latch - if the bouncing
is the cause of this. If it's just the static "probe HIGH" signal;
well - no go.