Hey everyone, I posted this in a different area but I think this area is more appropriate.
I am trying to get my Probe working in Mach3, so I entered 2 tools into my tool table, tool 99 (my probe) at 6.5 height, and tool 30 at 4 height.
I went into the offset tab in Mach3, I changed the tool from 0 to 99 which is my probe, and I am using the following macro for Z:
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
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 P2" ' two second delay
Code "G31 Z-1.0 F5" 'Z goes down a max of 1.0 at 5IPM
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, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z1.0" 'retract Z to 1.0 inch
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
When I enter tool 99, the offset light goes green, as I would expect. If I run that macro, it touches, and starts retracting, and then it actually goes up the full 6.5 from the offset, than an extra 1" for the Z1.0, and then it sets my DRO at 1, which is actually way off.
If I manually turn the offset off, and run the macro, it behaves as I would expect, it touches down, retracts 1, and sets the DRO at 1. The problem is, if I do that with the offset off, when I change tools, it does not change the DRO, which is exactly what I would expect.
So, it seems as though I need to use the offsets, but my macro is not working correctly. Can anyone help me out here with this? I have tried a few different macros for this that I found either in things I bought from Hoss, or in various forum posts, and they all behave the same way.
Do I need to reed the tool offset before retracting, and then somehow change my retraction accordingly?
Any help would be appreciated