Hello Guest it is April 18, 2024, 02:26:58 AM

Author Topic: probing malfunctioning  (Read 3663 times)

0 Members and 1 Guest are viewing this topic.

probing malfunctioning
« on: November 02, 2021, 10:55:14 PM »
I am having a problem with getting the Z probing to work properly and could really use some help. I have downloaded numerous scripts to try and isolate the problem but none of them seem to work right. the z probe will function correctly about 5% of the time but the rest of the time it does random other things. Sometimes when I press the probe button the z axis goes up, other times it will go down (the correct direction) but not stop when it touches the probe plate (and yes when it touches the probe plate the digitize light in Mach 3 does go on) but most of the time it will touch the plate then instead of retracting the specified amount it is suppose to it will raise up a random distance first then move up the specified distance. I am running Windows 10 with the latest update and Mach 3 version R3.043.062. Here is the latest probe script I tried. I tried to find one that just does the most simple probing to eliminate anything else that could be causing the problem. Any help would be greatly appreciated

Code: [Select]
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-4. 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, .060) ' 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 

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: probing malfunctioning
« Reply #1 on: November 04, 2021, 04:46:56 AM »
your probing code is allready quite simple, but it uses Var 2002 to get the Point where probe was hit.
not all Motion controler's handle this variables correct.

here is a Version without using this variable, just for testing.
Code: [Select]
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-4. 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, .060) '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 
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: probing malfunctioning
« Reply #2 on: November 04, 2021, 08:18:13 AM »
Awesome....Thank you I will try it this morning.