Change this:
ZProbePos = GetVar(2002)
To this:
ZProbePos = GetOEMDro(802)
Gerry, I want to thank you for commenting, I was not able to really look at your inputs last night as I was off the PC. I am not fully knowing what or where I would make those changes. Is it in the script itself? I will post what I scripted in...
I see what you are talking about, about midway down. So now I'll ask you if you think I should change that still? Here I will bring us all up to speed about where I am. I reloaded the below script, and the only other thing I changed was when I loaded Gcode file, and I now hit the Regen Toolpath button,as Reulet suggested. The spindle now comes down to touch plate and rises up 1", and then runs the code just fine. I made a simple file of a circle in a square and added my name inside the circle just for fun. The file runs every time. I will go out this morning and See if I can get it to cut proper again. I need lots of practice. I cant thank you all enough.
///////////
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 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-5. F4" '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 exact 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, .587) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
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 applicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If