Hi
I have made some macro modifications since yesterday, thanks to an instruction video from "gurubrew" youtube /watch?v=G4DeVa8rzA0
Good instruction!There is progress in the way, that the Z-axis does not retract as much in the wrong way as before. I'll explain.. The Z-axis still (sometimes) moves down towards the probe/table even though the tool activates the probe, (just a few millimeters), before the Z-axis retracts.
But the machine does'nt do it every time, and it does'nt seem to be systematic.

It most often seems like the machine "notice" the activation of the probe, but then contiues a few millimeters before retracting, instead of retracting imideatly.
The probe works
Hope it makes some kind of sence

Well here's the macro:
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED (48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO (819) 'Get the current G0/G1 state
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-30. F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving () 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, 32.20) 'change 32.20 to your plate thickness and then adjust for final accuracy
sleep 200 'Pause DRO to update
Code "G1 Z40. F400" 'put the Z retract height you want here
While IsMoving() 'wait while it happens
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feedrate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If