Hello Guest it is August 10, 2020, 07:37:40 AM

Author Topic: Double touch when using auto zero. Plate grounded error.  (Read 1706 times)

0 Members and 1 Guest are viewing this topic.

Double touch when using auto zero. Plate grounded error.
« on: March 11, 2018, 09:09:14 AM »
I finally got a triple edge finder and wired it up (somehow) correctly on the first try. (I think)

Then I got the hoss screenset which replaces the tool offset screen with the automated edge finder buttons.

When I try to use one of the routines, the Z axis moves down and touches the plate, then seems to back off a bit, then immediately throws an error that "plate is grounded" and moves into position to do the X edge find and stops.

I can make it go through the whole routine by simulating a Z by touching the plate to the mill then quickly taking it away. Then the error will not be produced and it runs the X Y edge finds.

I'm on a Taig mill using software limits.

It just seems to be doing some sort of double touch where it checks to see if it's grounded and it's still grounded because it just touched off and hasn't cleared out yet.

Any ideas?

Here's the code for the button:

Code: [Select]
Rem Probe Left

XNew = GetDro(0) - 3 'probe to current position - 3 inches
Code "G31 X" &XNew
While IsMoving() 'wait for prob move to complete
Wend
XNew = GetVar(2000) 'read the touch point

Rem move back To the hit point incase there was an overshoot

Code "G90 G0 Z.500"
Code "G90 G0 X" &XNew
Code "G91 X-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
       

While IsMoving ()
Wend
        Call SetDro (0,0.000)
        Code "G4 P0.25"
        Code "G91 G0 X-.200 Y1.0"
        Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'restore original feed rate
End If

Rem VBScript For probing In the Y- direction

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4" 'Slow feedrate to 4 ipm

Rem Probe up

YNew = GetDro(1) - 3 'move to current y position + 3 inches
Code "G31 Y" &YNew
While IsMoving() 'wait for the move to finish
Wend
YNew = GetVar(2001) 'read the touch point

Rem move back To the hit point incase there was an overshoot

        Code "G90 G0 Z.500"
Code "G90 G0 Y" &YNew
        Code "G91 Y-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge

While IsMoving ()
Wend
        Call SetDro (1,0.000)
        Code "G4 P0.25"
        Code "G90 G0 X0.0"
Code "F" &CurrentFeed 'restore original feed rate
        Code "(X, Y, and Z axis' are now zeroed)"
        Call ReturnG90G91State()
        Exit Sub
End If

Sub ProbeGrounded()
Code "(Probe plate is grounded, check connection and try again)"
Call ReturnG90G91State()
End Sub

Sub ReturnG90G91State()
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
End Sub



Taig Micro Mill. 1/4-20" lead screw. Powered by 1.25hp router with a 4:1 pulley reduction. Driven by Ethernet SmoothStepper to a Gecko 6540. Nema 23 motors. 3 Axis.

Offline TPS

*
  •  1,632 1,632
    • View Profile
Re: Double touch when using auto zero. Plate grounded error.
« Reply #1 on: March 11, 2018, 10:11:05 AM »
copy your code into VB Scripter window.
use the ||> step button and step through the code,
than you will see exactly when the error occurs.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Double touch when using auto zero. Plate grounded error.
« Reply #2 on: March 11, 2018, 03:17:30 PM »
I’ve followed your suggestion and tried all morning to edit the script in every possible way I can imagine to get ride of the ground error. Nothing yet. Any other things I can try? The wiring seems to be good when I test the connection.
Taig Micro Mill. 1/4-20" lead screw. Powered by 1.25hp router with a 4:1 pulley reduction. Driven by Ethernet SmoothStepper to a Gecko 6540. Nema 23 motors. 3 Axis.

Offline TPS

*
  •  1,632 1,632
    • View Profile
Re: Double touch when using auto zero. Plate grounded error.
« Reply #3 on: March 12, 2018, 02:16:11 AM »
but if you go to diagnostic Screen you can see the digitize LED working,
Off if your probe is free, ON if you touch your probe to te plate ?
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Double touch when using auto zero. Plate grounded error.
« Reply #4 on: March 12, 2018, 09:18:07 AM »
Yes, when I go to diagnostics there are no lights on until I touch the plate to the probe. Also, when I run the auto-zero, I can make it work by manually touching the plate to Z and then quickly removing it. That's the only way it will continue to probe X and Y.

I put a two-second pause between every line of code and still It does not work. I also tried commenting out as much code as possible to isolate the issue. Every time after It touches the plate, the next move causes the plate grounding error.
Taig Micro Mill. 1/4-20" lead screw. Powered by 1.25hp router with a 4:1 pulley reduction. Driven by Ethernet SmoothStepper to a Gecko 6540. Nema 23 motors. 3 Axis.

Offline TPS

*
  •  1,632 1,632
    • View Profile
Re: Double touch when using auto zero. Plate grounded error.
« Reply #5 on: March 12, 2018, 09:21:30 AM »
the Basic code is still the same you posted at the beginning ?

because in this code is no Z probe only:

X and Y.

make a shot description what the code should do.

« Last Edit: March 12, 2018, 09:35:08 AM by TPS »
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Double touch when using auto zero. Plate grounded error.
« Reply #6 on: March 12, 2018, 12:11:44 PM »
Looks like I made an error copying the above code. I've posted the correct code below.

The code is supposed to automatically zero the XYZ axis by first probing down to the top of the plate, then jogs over to find the X, then the Y.  I can get it to work by manually touching the plate to the probe, but any time the plate is resting on the wood or aluminum material a grounding error occurs. I think it's because I can quickly pull the plate away and some sort of double signal is not sent that causes the error.

Here is the code that causes the error:

Code: [Select]
Rem   Auto corner finding X-Y-Z-(button3) With tool diameter Input

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
CurrentToolDiameter = GetOemDRO(43) 'gets the current tool diameter

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' two second delay
Code "G90 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,0.000)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G90 G0 Z.500" 'retract Z to .500 inch
Code "G91 G0 Y-.100 X1.0"
Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'Returns to prior feed rate
End If

Rem VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then      'May need to use =0 if it errors
Call ProbeGrounded()          'Check to see if the probe is already grounded or faulty
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4"

Rem Probe Left

XNew = GetDro(0) - 3 'probe to current position - 3 inches
Code "G31 X" &XNew
While IsMoving() 'wait for prob move to complete
Wend
XNew = GetVar(2000) 'read the touch point

Rem move back To the hit point incase there was an overshoot

Code "G90 G0 Z.500"
Code "G90 G0 X" &XNew
Code "G91 X-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
        

While IsMoving ()
Wend
        Call SetDro (0,0.000)
        Code "G4 P0.25"
        Code "G91 G0 X-.200 Y1.0"
        Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'restore original feed rate
End If

Rem VBScript For probing In the Y- direction

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4" 'Slow feedrate to 4 ipm

Rem Probe up

YNew = GetDro(1) - 3 'move to current y position + 3 inches
Code "G31 Y" &YNew
While IsMoving() 'wait for the move to finish
Wend
YNew = GetVar(2001) 'read the touch point

Rem move back To the hit point incase there was an overshoot

        Code "G90 G0 Z.500"
Code "G90 G0 Y" &YNew
        Code "G91 Y-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge

While IsMoving ()
Wend
        Call SetDro (1,0.000)
        Code "G4 P0.25"
        Code "G90 G0 X0.0"
Code "F" &CurrentFeed 'restore original feed rate
        Code "(X, Y, and Z axis' are now zeroed)"
        Call ReturnG90G91State()
        Exit Sub
End If

Sub ProbeGrounded()
Code "(Probe plate is grounded, check connection and try again)"
Call ReturnG90G91State()
End Sub

Sub ReturnG90G91State()
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
End Sub    

 
« Last Edit: March 12, 2018, 12:15:48 PM by Benjammann »
Taig Micro Mill. 1/4-20" lead screw. Powered by 1.25hp router with a 4:1 pulley reduction. Driven by Ethernet SmoothStepper to a Gecko 6540. Nema 23 motors. 3 Axis.

Offline TPS

*
  •  1,632 1,632
    • View Profile
Re: Double touch when using auto zero. Plate grounded error.
« Reply #7 on: March 12, 2018, 12:37:51 PM »
are you working in metric or imperial?

added a few while ismoving see if this helps

Code: [Select]


Rem   Auto corner finding X-Y-Z-(button3) With tool diameter Input

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
CurrentToolDiameter = GetOemDRO(43) 'gets the current tool diameter

If GetOemLed (825)<>0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' two second delay
Code "G90 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,0.000)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G90 G0 Z.500" 'retract Z to .500 inch
Code "G91 G0 Y-.100 X1.0"
Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'Returns to prior feed rate
While IsMoving ()
Wend
End If

Rem VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then       'May need to use =0 if it errors
Call ProbeGrounded()          'Check to see if the probe is already grounded or faulty
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4"

Rem Probe Left

XNew = GetDro(0) - 3 'probe to current position - 3 inches
Code "G31 X" &XNew
While IsMoving() 'wait for prob move to complete
Wend
XNew = GetVar(2000) 'read the touch point

Rem move back To the hit point incase there was an overshoot

Code "G90 G0 Z.500"
Code "G90 G0 X" &XNew
Code "G91 X-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
  While IsMoving ()
Wend
 
Call SetDro (0,0.000)
    Code "G4 P0.25"
    Code "G91 G0 X-.200 Y1.0"
    Code "G90 G0 Z-.200"
Code "F" &CurrentFeed 'restore original feed rate
While IsMoving ()
Wend

End If

Rem VBScript For probing In the Y- direction

If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Call ProbeGrounded()
Exit Sub
Else
Code "G4 P1" 'Pause 1 second to give time to position probe plate

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
Code "F4" 'Slow feedrate to 4 ipm

Rem Probe up

YNew = GetDro(1) - 3 'move to current y position + 3 inches
Code "G31 Y" &YNew
While IsMoving() 'wait for the move to finish
Wend
YNew = GetVar(2001) 'read the touch point

Rem move back To the hit point incase there was an overshoot

    Code "G90 G0 Z.500"
Code "G90 G0 Y" &YNew
    Code "G91 Y-" &CurrentToolDiameter/2  'moves the probe half the tool diameter to center on edge
While IsMoving ()
Wend
    Call SetDro (1,0.000)
    Code "G4 P0.25"
    Code "G90 G0 X0.0"
Code "F" &CurrentFeed 'restore original feed rate
    Code "(X, Y, and Z axis' are now zeroed)"
    Call ReturnG90G91State()
    Exit Sub
End If

Sub ProbeGrounded()
Code "(Probe plate is grounded, check connection and try again)"
Call ReturnG90G91State()
End Sub

Sub ReturnG90G91State()
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
End Sub   

 


 


 

« Last Edit: March 12, 2018, 12:43:39 PM by TPS »
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Double touch when using auto zero. Plate grounded error.
« Reply #8 on: March 12, 2018, 01:00:28 PM »
Thanks so much! I'll try this as soon as I get home tonight. I'm working in Imperial (Inches)

EDIT:  Although in looking at the code you posted, it doesn't seem you changed anything above my problem area. I get the error when Z retracts to .5" near the beginning...
« Last Edit: March 12, 2018, 01:02:40 PM by Benjammann »
Taig Micro Mill. 1/4-20" lead screw. Powered by 1.25hp router with a 4:1 pulley reduction. Driven by Ethernet SmoothStepper to a Gecko 6540. Nema 23 motors. 3 Axis.

Offline TPS

*
  •  1,632 1,632
    • View Profile
Re: Double touch when using auto zero. Plate grounded error.
« Reply #9 on: March 12, 2018, 01:07:21 PM »
i guess i mean this code aeria:

   Code "G90 G0 Z.500" 'retract Z to .500 inch
   Code "G91 G0 Y-.100 X1.0"
   Code "G90 G0 Z-.200"
   Code "F" &CurrentFeed 'Returns to prior feed rate
   While IsMoving ()
   Wend

End If

Rem   VBScript For probing In the x- direction

If GetOemLed (825)<>0 Then          'May need to use =0 if it errors
   Call ProbeGrounded()          'Check to see if the probe is already grounded or faulty
   Exit Sub
Else


and specialy here i added a while ismoving() to wait for movement finished before the checking of probe is grounded
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.