Welcome, Guest. Please login or register.
Did you miss your activation email?
November 27, 2014, 02:21:19 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Auto Zero
Pages: 1 2 3 4 »   Go Down
Print
Author Topic: Auto Zero  (Read 9315 times)
0 Members and 1 Guest are viewing this topic.
Toad
Active Member

Offline Offline

Posts: 38


View Profile
« on: October 29, 2009, 02:55:46 PM »

I need your assistance, How can I get the Z- auto zero to work?  I have Mach-3 configured for the probe set up on a board output #14, The board is grounded to the router. What else do I need to do to get the auto zero to work?
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 4,069



View Profile WWW
« Reply #1 on: October 29, 2009, 05:12:21 PM »

Do you have the VB code? Lots of info here.

http://cnczone.com/forums/showthread.php?t=36099
« Last Edit: October 29, 2009, 05:16:16 PM by ger21 » Logged

Greolt
Global Moderator
*
Offline Offline

Posts: 933


View Profile
« Reply #2 on: October 29, 2009, 05:49:43 PM »

Yes there is a lot of info about.  That thread and others.

One of the first things you will need to do is use an input not an ouput.

Greg
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 4,757


Precision Chaos



View Profile WWW
« Reply #3 on: October 29, 2009, 06:16:45 PM »

This may help. There is better code floating around I'm sure. The post Gerry pointed you to probably has a good macro in it. Mine works but could have more checks in it.

http://www.machsupport.com/forum/index.php/topic,10088.0.html
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
Toad
Active Member

Offline Offline

Posts: 38


View Profile
« Reply #4 on: October 31, 2009, 10:28:04 AM »

Good day Chaoticone:

I pasted the script, and I get an Script compile error.  Any Idea what I did wrong?

I went to the operator tab, edit button script. The button began to blink and I pasted the code in.

Toad
Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 4,757


Precision Chaos



View Profile WWW
« Reply #5 on: October 31, 2009, 11:46:59 AM »

I'm not sure unless you had my signuture at the end. If it is a later version of Mach it could have issues as well. Here is an updated one for later versions of Mach.

'Auto Tool Zero Script

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness =0.059
ProbeFeed = 5

Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
Code "G4 P5000" 'Time to get to the z-plate
Code "G31Z-5 F" &ProbeFeed
Code "G4 P0.25"
While IsMoving()
Sleep(100)
Wend
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Sleep(100)
Wend
Call SetDro (2, PlateThickness)
Sleep(100)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z0.25" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If 
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
Toad
Active Member

Offline Offline

Posts: 38


View Profile
« Reply #6 on: October 31, 2009, 05:39:02 PM »

Thanks,

I'll try this one and let you know. I do appreciate your assistance and patience.

Toad
Logged
Toad
Active Member

Offline Offline

Posts: 38


View Profile
« Reply #7 on: October 31, 2009, 07:41:24 PM »

OK , One more time, I still get a script compile error.  Must be me, but I am pasting everything from auto zero script down to end if.

Don't know enough to know what I an doing wrong.

Toad
Logged
Greolt
Global Moderator
*
Offline Offline

Posts: 933


View Profile
« Reply #8 on: November 01, 2009, 12:39:06 AM »

I tried the above posted script and do not get any compile errors.

However there are a couple of problems in its operation.

The first is that if you have G04 dwell time set to seconds in General Config, (the default setting) then 5000 seconds is too long to wait.  My coffee would go cold while I waited.

And if you have it set to MS, then the other G04 delays are so short as to be irrelevant.  Something like Sleep 100 would be more appropriate.

The other issue is, if a user started this script with Z axis DRO at say -6, then the first move will be in an unexpected direction.

I really hate it when a CNC machine I am operating does something I do not expect.  Smiley

Either zero the Z axis DRO prior to the G31, or do  G91 G31 Z-5  probe move.

Greg
« Last Edit: November 01, 2009, 12:52:13 AM by Greolt » Logged
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 4,757


Precision Chaos



View Profile WWW
« Reply #9 on: November 01, 2009, 08:38:02 AM »

Greg, your right. That is my personal touch off routine set up up for my machine and it works well with it but it could cause others problems. We need to come up with a standard auto zero script taking into account all possibilities. Metric/Imperial, abs./inc., ms/s etc.   Smiley  There are a lot of auto zero scripts floating around but I haven't seen one that everyone was happy with yet.  Sad  It would have to be well commented too. Maybe we need to start a topic specifically for this? This is one of the things I have wanted to do for a long time but right now time is the problem.

Brett

 
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
Pages: 1 2 3 4 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!