Hello Guest it is May 18, 2025, 08:45:36 PM

Author Topic: Mach3 Probing Anomolies  (Read 254 times)

0 Members and 1 Guest are viewing this topic.

Mach3 Probing Anomolies
« on: May 13, 2025, 09:39:44 PM »
Hello everyone.

New member here with a bit of an issue.
I recently purchased my first CNC (DMC2 Mini) as a kit and the build itself went relatively OK. Some wiring issues but we got it all working.

At first I couldn't get the probes to work (custom/included code) for the puck and Left/Right/Front/Back probe, so i did a test piece (plastic) with a manual zero. It turned out OK for my first piece.

I played with the probe settings (including varGageThick) and managed to get them all working (late at night).
Today I went to try my first actual part (aluminum) but all the probes are messed up. The Z goes up instead of down and the other 4 all go in the same direction (even though their varGageThick are all the same). So everything appears to have saved OK.

I did a screen change from PA back to Mach3 and back again but that didn't work.
I did a complete shut down, reboot, reload, etc, but still no change.

Any suggestions are greatly appreciated.

John

Here's a sample of the probe code for the left

'*************************************************************************************************************
'*******************************  X AXIS (NEGATIVE SIDE) TOUCH SCRIPT FOR MACH3  *****************************
'******FONT**********************         FOR BOTH INCH AND MM UNITS            ******************************
'*********Courier*****************      CHARLIE SARSFIELD REV9 MAY/2018        *******************************
'**********************************      WWW.YOUTUBE.COM/SUNNY5RISING         ********************************
'***********************************         SUNNY5RISE@GMAIL.COM           **********************************
'*************************************************************************************************************
'***************** NOTES:                                                                  *******************
'*****************   TO USE DEFAULT PROBE & GAGE VALUES, SET RELEVANT DRO(S) TO ZERO       *******************
'*****************   TO USE A GAGE VALUE OF ZERO, ENTER A NEGATIVE VALUE IN THICKNESS DRO  *******************
'*************************************************************************************************************

'----- USER VARIABLES FOR DISTANCES, FEED RATES, AND OPTIONS -------------------------------------------------
If GetParam("Units") = 0 Then
 'METRIC VALUES
 VarMaxDistance = 25.4      'MAX TRAVEL
 VarFeedRate = 127      'MM/MIN APPROACH FEEDRATE
 VarStandOff = 0      'STANDOFF DISTANCE
 VarProbeDia = 4      'DEFAULT PROBE DIAMETER | EDGE FINDER DIA. DRO PRECEDENCE
 VarGageThick = 55.05      'DEFAULT GAGE THICKNESS | GAGE THICKNESS DRO PRECEDENCE
'Else
 'SAE VALUES
' VarMaxDistance = 1.0      'MAX TRAVEL
' VarFeedRate = 5      'INCH/MIN APPROACH FEEDRATE
' VarStandOff = 0      'STANDOFF DISTANCE
' VarProbeDia = 0.125      'DEFAULT PROBE DIAMETER | EDGE FINDER DIA. DRO PRECEDENCE
' VarGageThick = 0.0036      'DEFAULT GAGE THICKNESS | GAGE THICKNESS DRO PRECEDENCE
End If

'VarDelayInSec = 0      'DEFAULT SECONDS TO DELAY MOTION
'VarBeepOrSpeak = 2      'COUNTDOWN AUDIO: 0=NONE 1=BEEP 2=SPEAK
'VarSecOfAudio = 5      'SECOND AT WHICH AUDIO BEGINS

'VarCompleteAudio = 3      'END SIGNAL: 0=NONE 1=Beep 2=SPEAK 3=WAV_AUDIO_FILE
'VarWavAudioFile = "C:\MACH3\ToolCompleteSND1.wav" 'AUDIO FILE & PATH

'*************************************************************************************************************
'*************************************************************************************************************

'----- GET INITIAL ENVIRONMENT SETTINGS FOR LATER REINSTATEMENT ----------------------------------------------
'VarInitialDistMode = GetOemLED(48)           'DISTANCE MODE G90/G91
VarInitialDistMode = 0   
VarInitialLinearMode = GetOemDRO(819)        'LINEAR MODE  G00/G01
VarInitialFeedRate = 300          'FEEDRATE
VarInitialInhibit = GetParam("ZInhibitOn")   'Z INHIBIT STATUS  OFF/ON
VarInitialXScale = GetParam("XScale")        'X SCALE VALUE
VarInitialFRO = GetOemDRO(821)           'FEEDRATE OVERRIDE PERCENTAGE
Message ""                      'CLEAR STATUS LINE TEXT

'----- CHECK DIGITIZE STATE; 0=CLEAR 1=ACTIVE ----------------------------------------------------------------
If GetOemLED (825) <> 0 Then
 MachMsg("Digitize Status Not Clear. Check Probe/Connections And Try Again!","*** ERROR! ***",0)
 Message "Edge Find CANCELED"   'DISPLAY MESSAGE
 End            'END SCRIPT
End If

'----- RETRIEVE PROBE DIAMETER AND GAGE THICKNESS ------------------------------------------------------------
If VarProbeDia = 0 And GetOEMDRO(1000) = 0 Then
 MachMsg("Coffee First, Then Provide Probe Diameter And Try Again.","*** ERROR! ***",0)
 Message "Edge Find CANCELED"   'DISPLAY MESSAGE
 Sleep 2000 : Message ""
 End            'END SCRIPT
Else
 If GetOEMDRO(1000) <> 0 Then VarProbeDia = Abs(GetOEMDRO(1000))   'CHECK AND GET FINDER DIA DRO VALUE IF USED
End If

If GetOEMDRO(1001) <> 0 Then         'CHECK FOR GAGE THICKNESS VALUE
 Select Case InStr(1,GetOEMDRO(1001),"-")   'CHECK IF NEGATIVE IS USED
  Case 0   'NEG NOT PRESENT
    VarGageThick = Abs(GetOEMDRO(1001))   'SET GAGE THICKNESS TO DRO VALUE
  Case 1   'NEG IS PRESENT
    VarGageThick = VarGageThick            'SET GAGE THICKNESS TO ZERO
 End Select         
End If
Select Case GetParam("Units")   'SET UNITS FOR STATUS LINE DISPLAY
 Case 0   'MM
  VarMsgUnits = "mm"
 Case 1   'INCH
  VarMsgUnits = "in"
End Select
'FORMAT STATUS LINE TEXT
VarStatusMsg = "Probe: " &VarProbeDia &VarMsgUnits &"   Gage: " &VarGageThick &VarMsgUnits

'----- ACTIVATE TIME DELAY IF USED ---------------------------------------------------------------------------
VarDelayInSec = Abs(VarDelayInSec)
If VarDelayInSec <> 0 Then
 Do Until VarDelayInSec = 0      'LOOP UNTIL SECONDS = ZERO
  Message VarDelayInSec         'DISPLAY SECONDS VALUE IN STATUS LINE
   If VarDelayInSec < VarSecOfAudio + 1 Then
    Select Case VarBeepOrSpeak   
     Case 1 'OPTION BEEP
      Beep
     Case 2 'OPTION SPEAK
      Speak(VarDelayInSec)   
    End Select
   End If   
  Sleep 1000      'PAUSE 1 SEC.
  VarDelayInSec = VarDelayInSec - 1   'REDUCE SECONDS BY 1 AFTER EACH LOOP
 Loop
End If

'----- CANCEL SCALE, FEEDRATE OVERRIDE, Z-INHIBIT ------------------------------------------------------------
SetParam("XScale",1.0)         'SET X SCALE TO 1.0
DoOemButton(1014)         'CANCEL FEED OVERRIDE
SetParam("ZInhibitOn",0)           'TURN Z INHIBIT OFF

'----- MOVE PROBE TOWARD CONTACT -----------------------------------------------------------------------------
SetOemDRO(800,0)           'ZERO X AXIS DRO
Sleep 200            'DELAY TO ALLOW DRO TO CHANGE
Message VarStatusMsg &"     X Zero Running..."
Code "G90 G31 X" &VarMaxDistance &"F" &VarFeedRate   'MOVE IN X POS DIRECTION



 While IsMoving()         'WAIT UNTIL MOVE IS COMPLETE BEFORE PROCEEDING
  Wend

'----- GET CONTACT POSITION AND TEST FOR MAX TRAVEL ------ MOVE TO STANDOFF ------ UPDATE X AXIS DRO ---------
'If GetVar(2000) >= (VarMaxDistance - .001) Then   
If 1=2 Then
 MachMsg("Maximum Travel Reached. Reposition X Axis Closer To Part And Try Again!","*** OOPS! ***",0)
 Message ""
 RETURNSTATE            'CALL REINSTATE SUBROUTINE
 End               'END SCRIPT
Else
 Beep
' Code "G90 G0 X" &GetVar(2000)      'MOVE TO CONTACT POINT DUE TO OVERRUN
  While IsMoving()
   Wend
 SetOemDRO(800,0)         'ZERO X AXIS DRO
 Sleep 200
' Code "G90 G1 X-" &VarStandOff &"F" &VarFeedRate*2   'MOVE TO STANDOFF DISTANCE
 Code "G90 G1 X-" &2 &"F" &600  'This is backing off of the part after contact
  While IsMoving ()
   Wend
 SetOemDRO(800, "-" &VarStandOff + VarGageThick + (VarProbeDia/2)) 'SET X DRO
 Sleep 200
 Select Case VarCompleteAudio
  Case 1 'OPTION BEEP
   Beep
  Case 2 'OPTION SPEAK
   Speak("Tool Zero Complete.")
  Case 3 'OPTION WAV_AUDIO_FILE
   PlayWave(VarWavAudioFile)
 End Select
 Message VarStatusMsg &"     X Tool Zero Complete!"
End If
RETURNSTATE            'CALL REINSTATE SUBROUTINE
End               'SCRIPT COMPLETE

'******************************************* SUBROUTINE BELOW ************************************************

'----- SUBROUTINE TO RETURN INITIAL SETTINGS -----------------------------------------------------------------
Sub RETURNSTATE
 'REINSTATE INITIAL FEEDRATE
 Code "F" &VarInitialFeedRate       
 
 'REINSTATE DISTANCE MODE  0=G91  -1=G90
 If VarInitialDistMode = 0 Then Code "G91" Else Code "G90"
 
 'REINSTATE LINEAR MODE  0=G00  1=G01
 If VarInitialLinearMode = 0 Then Code "G00" Else Code "G01"

 'REINSTATE Z INHIBIT STATUS 0=OFF 1=ON
 If VarInitialInhibit = 1 Then SetParam("ZInhibitOn",1)

 'SET X SCALE TO INITIAL VALUE
 If VarInitialXScale <> 1.0 Then SetParam("XScale",VarInitialXScale)

 'SET FEEDRATE OVERRIDE TO INITIAL VALUE
 If VarInitialFRO <> 100 Then SetOemDRO(821,VarInitialFRO)
End Sub     

'*************************************************************************************************************
 
                 
John

Do what you can
When you can
If you can

Offline TPS

*
  •  2,578 2,578
Re: Mach3 Probing Anomolies
« Reply #1 on: May 15, 2025, 01:26:17 AM »
i would do some simple test's by using MDI input line:

first make sure you are on absolute mode:

Code: [Select]
  G90

then try to do a probe with Z:

Code: [Select]
  G31 Z-10 F20

this will do a simple Z-probe 10mm down with speed 20mm/min

i asume you are in metric unit's.

then you can see what happens without using scripts were you are not sure what is going on.
 

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach3 Probing Anomolies
« Reply #2 on: May 15, 2025, 03:40:17 PM »
Thanks for the suggestion TPS.

Here's what happened:

G31 Z-10 F20      Y axis moved in - direction. Right speed but didn't stop at the desired distance (kept going)

G31 X10 F50        Y axis moved in - direction. Right speed but didn't stop at the desired distance (kept going)

G31 Y10 F50       Y axis moved in - direction. Right speed but didn't stop at the desired distance (kept going)

Is it possible I have a bad board?

Thanks again
John

Do what you can
When you can
If you can
Re: Mach3 Probing Anomolies
« Reply #3 on: May 16, 2025, 04:14:00 AM »
Sometimes that behaviour results because the machine isn't homed or referenced correctly. Try restarting/rehoming

Offline TPS

*
  •  2,578 2,578
Re: Mach3 Probing Anomolies
« Reply #4 on: May 16, 2025, 04:30:07 AM »
witch board/motion controller are you using?
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach3 Probing Anomolies
« Reply #5 on: May 17, 2025, 11:23:34 PM »
The board is a Mach3 board coupled with a custom manufacturer breakout board.

Tonight we managed to get it all working properly and homed 4 times successfully, but then it all went pot again, reverting back to doing the same as before. No idea what's going on. Makes no sense.

It's like the machine doesn't remember the info from the files.

question, Does the machine have to read the files each time you probe, or are the held in some memory on the board?

Thanks again
John

Do what you can
When you can
If you can
Re: Mach3 Probing Anomolies
« Reply #6 on: May 18, 2025, 01:30:10 AM »
What do you mean by Mach 3 board? Could you provide a photo?
Re: Mach3 Probing Anomolies
« Reply #7 on: May 18, 2025, 05:35:40 AM »
If the "board" is a motion controller then that should be where probing is handled.  Probing requires motion to stop as quickly as possible once the probe triggers, and thye system can't afford the round trip time for the probe signal to make it through Mach 3 and into the motion controller to make it stop.  That's why we are asking what the specific board is.  How does the Mach 3 PC connect to it?

For example, I use the UC100 motion controller which has a USB interface to the PC, probing works just fine.  Previously I used Mach 3 on an old PC with parallel port, where the "motion controller" is an integral part of Mach 3 - that worked fine as well.  As I mentioned above, occasionally I've had probe issues a bit similar to yours which have cleared when I re-homed the controller.
Re: Mach3 Probing Anomolies
« Reply #8 on: May 18, 2025, 06:49:15 PM »
The board is a Mach3 as per attached, connected via USB.

I spoke with the supplier this morning and we removed 2 files from the Mach3 directory that they suspected might be causing conflicts with other files:

1. Mach3mill.xml removed, DMCmill.xml being used.
2. 1045.set removed, PA Interface being used.

This initially worked and the probing was all fine (6 times). I decided to confirm everything with a complete power down and reboot, which undid whatever was working.

After trying a few more probes, it started working again. So, I tried a simple PC reboot and all was OK.

After setting a working coordinate, I homed the machine and tried GO TO XYZ 0 and it worked. I also tried from numerous random positions and all was OK.

I watched the DRO while probing to confirm the numbers coincided with the script files and they do.

Now for todays odd part. After everything seemed OK, I tried one last time and low and behold it crapped out. When I tried GO TO XYZ 0, it moved the spindle so that the Zero point was somewhere inbetween the spindle center and the probe center. This is where it stands.

I have asked the supplier to provide a new control board so as to rule it out ( a big pain, but if it fixes the issue, it'll be work it).

Could this be a simple grounding issue? We had to add an extra grounding wire between the controller board and the bed, just to get the probes to function and they do appear to be functioning properly. It's the probing itself that is the issue.

Thanks again for the support (this might show up as a second reply, but hopefully not).

Cheers
John

Do what you can
When you can
If you can