Author Topic: Auto zero with ESS not working correctly  (Read 4086 times)

0 Members and 1 Guest are viewing this topic.

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Auto zero with ESS not working correctly
« on: April 01, 2018, 07:46:01 AM »
Hi,
I've set my Mill with a ESS and everything is working perfectly, since I'm upgrading everything else I wanted to set up
an auto zero, I have my touch pad set up giving the input light at "digitize" lighting, everything was going great.
But when I added the script to the auto zero button and pressed it the following happens:
1  Press Auto Zero
2  Dwell
3  Zeros Z
4  Moves down
5  Touches plate
6  Stops
7  Moves back to where it had originally zeroed (STEP 3)
8  then retracts to the setting I had asked it to retract to
9  Stops says Z is Zeroed

So this is my problem the starting Zero is usless to me as it could be anywhere

Not know much about basic, here is the script that I got from Gurubrew on youtube which was a great video

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. F50" '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, 1.5) ' change 1.5mm 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  

I had read on a differant post that the line that starts with "Call setdro (2,1.5) should be a 0 instead of a 2 but that didnt make any differance

Any help would be great
Thanks
Joe

Offline ger21

  • Global Moderator
  • *
  • Posts: 6,126
    • View Profile
    • The CNC Woodworker
Re: Auto zero with ESS not working correctly
« Reply #1 on: April 01, 2018, 08:33:05 AM »
The 1.5 in this line needs to be changed to your touch plate thickness.
Call SetDro (2, 1.5)

Also, if you are using version 3.043.066, try using 3.043.062.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #2 on: April 01, 2018, 08:40:51 AM »
The 1.5 on that line is my touch plate thickness 1.5mm

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #3 on: April 01, 2018, 08:41:30 AM »
Sorry and yes I'm using version 62
Thanks tho

Offline ger21

  • Global Moderator
  • *
  • Posts: 6,126
    • View Profile
    • The CNC Woodworker
Re: Auto zero with ESS not working correctly
« Reply #4 on: April 01, 2018, 09:43:11 AM »
Code "G1 Z1. F50"

The Z1 here needs to be greater than the plate thickness, so it should be at least 2, but I'd set it to at least 10.

After the tool touches the plate, the Z DRO should be changed to 1.5. Are you seeing that happen?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #5 on: April 01, 2018, 11:19:47 AM »
I'll have a look at that z1 when I get home but I think it's only a mistake from where I copied the script from because the original was in inches and I've changed the figures to metric, I do see the z dro go to 1.5 the second the spindle gets back to zero which is the original point I press auto zero, not at the top of the plate, if you understand me

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #6 on: April 01, 2018, 12:01:34 PM »
Just copied the script exactly from mach3 that i am using

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-100. F200" '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, 1.5) ' change 1.5mm to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z25. F200" '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   


it seem the z dro isnt zeroing when it touches the plate

Offline ger21

  • Global Moderator
  • *
  • Posts: 6,126
    • View Profile
    • The CNC Woodworker
Re: Auto zero with ESS not working correctly
« Reply #7 on: April 01, 2018, 10:50:24 PM »
It should be setting the DRO to 1.5 when it touches the plate.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #8 on: April 02, 2018, 03:29:03 AM »
Oh I know that but it's not doing it I'm afraid

Offline joeharney100

  • Active Member
  • Posts: 9
    • View Profile
Re: Auto zero with ESS not working correctly
« Reply #9 on: April 02, 2018, 08:19:11 AM »
Ok with a little trial and error I got it to work
I removed the line "Code "G0 Z" &ZProbePos"
worked first time exactly right
if this could cause any problems that I'm not aware of let me know
but as it stands I'm very happy I finally got some success