Welcome, Guest. Please login or register.
Did you miss your activation email?
September 16, 2014, 10:24:32 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  how to set up auto tool zero fot (X,Y,AND Z)
Pages: 1 2 »   Go Down
Print
Author Topic: how to set up auto tool zero fot (X,Y,AND Z)  (Read 12538 times)
0 Members and 1 Guest are viewing this topic.
josh
Active Member

Offline Offline

Posts: 97


View Profile
« on: February 28, 2009, 02:41:06 AM »

hello to all
I got this plastic square with a round copper inserted into it. I would like to do a tool setting where it will find the center and also will do the tool height.
I have seen something on that were you can add a bluemach screen to it abd it will load it for you,
I like my screen the regular one , is there  way were I can add a  macro scrip so when I press (auto tool zero) it will do the same ass the mach blue screen.
if someone has done this can you please tell me how I can do it myself.
thanks
Logged
jimpinder
Active Member

Offline Offline

Posts: 1,233


Wakefield, West Yorks, UK


View Profile
« Reply #1 on: February 28, 2009, 04:30:32 AM »

I'll start you off with the few of the basics, so you undertsand where you are coming from. No doubt a few others have ready made programs for this. I don't.

The input into Mach 3 that you use is the "probe". See Ports and Pins/Inputs. A signal on this pin (whichever you allocate) will stop the axis moving. To do this you need a lead from pin, and a +5 or 0v lead to your detector.

The way I use mine is as follows - bear in mind that the inputs to my computer are direct to LPT1. This means that a 0v signal on the pin will activate it. I have a small jack plug which I can plug into my control box. Out of this plug comes a two core lead. One core is to 0v. The other core is to the pin. In practice the 0v lead is not required becasue the mill/lathe is earthed anyway. The wire going to the pin is soldered to a square of copper clad, nicely polished (thickness 1.55mm).

In practise if I need to set a drill height, I plug in the lead, lay the copper clad beneath the drill, and jog the drill down to it, leaving it a little short. If you then type, on the MDI line " G31 Z (and a minus number slighly below your copper clad height) the drill will move down, and the stop as soon as it touches the copper clad. You can then set the height of the drill (remembering the 1.55mm thichness of the copper clad), so I set my Z axis at 1.55, which is the equivelant of 0 if the tool had been touching the workpiece. (the 0v lead has a clip on it, so if I am unsure the drill is properly earthed, I can clip the earth lead on)

The other axis  work on the same principle

The problem is I do not know how your particular set up is wired, what BOB.s you have etc , so you will have to experinment a little to get the leads right. There should be some documentation with the BOB. Once you have that figured out you are ready to move on to some of the full automatic systems that others have devised.
Logged

Not me driving the engine - I'm better looking.
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,648



View Profile
« Reply #2 on: February 28, 2009, 10:41:41 AM »

hello to all
I got this plastic square with a round copper inserted into it. I would like to do a tool setting where it will find the center and also will do the tool height.
I have seen something on that were you can add a bluemach screen to it abd it will load it for you,
I like my screen the regular one , is there  way were I can add a  macro scrip so when I press (auto tool zero) it will do the same ass the mach blue screen.
if someone has done this can you please tell me how I can do it myself.
thanks

Josh,

I just did exactly that a few days ago.  Here's all you have to do:

1) Go to Config->Ports&Pins->Inputs, and configure a pin as the "Probe" input, making it Active Low.
2) Wire your touch plate to the Probe input.
3) Go to the Offsets screen, and, in the top-left corner, set the touch plate thickness to the exact thickness of your plate.
4) Go to Operator->EditButtonScript, then click on the AutoToolZero button.  When the VB editor opens, delete the few lines of code in there, and paste in the following:

'Tool Zero Setting Macro

' Change the following three lines to suit your machine
PlateThickness = GetOEMDRO(1001) ' Thickness of touch plate
RetractClearance = 0.100 ' Clearance above touch plate to retract to
ProbeFeed = 5      ' Feedrate to use for probing

' Define some constants
ZDRO = 2      ' Z Axis DRO
AbsoluteModeLED = 48   ' Absolute Coordinate Mode LED
IncrementalModeLED = 49   ' Incremental Coordinate Mode LED
FeedrateDRO = 818   ' OEM code for feedrate DRO
ProbeLED = 825      ' OEM code for probe input LED
ZTouchDRO = 2002   ' OEM code for DRO that holds Z touch position

' Do nothing if probe is already grounded
If GetOemLed(ProbeLED) = 0 Then

   ' Wait a few seconds for user to get touchplate in place
   Code "G4 P2"
   
   ' Save current feedrate
   CurrentFeed = GetOemDRO(FeedrateDRO)
   
   ' Save current coordinate mode
   AbsMode = GetOemLED(AbsoluteModeLED)

   ' Set absolute coordinate mode
   Code "G90"

   ' Zero Z DRO
   Call SetDro (ZDRO, 0.0000)

   ' Pause for DRO to update
   Code "G4 P0.5"

   ' Do the touch move
   Code "G31 Z-0.5 F" & ProbeFeed

   ' Wait for it to complete
   While IsMoving()
   Wend

   ' Delay a bit for Huh
   Code "G4 P0.25"

   ' Get the Z position where probe input triggered
   ZProbePos = GetVar(ZTouchDRO)

   ' Go back to touch position (G31 backs off after touch)
   Code "G0 Z" & ZProbePos

   ' Wait for it to complete
   While IsMoving ()
   Wend

   ' Set Z DRO to touch plate thickness
   Call SetDro (ZDRO, PlateThickness)

   ' Pause for DRO to update
   'Code "G4 P0.5"

   ' Retract Z to SafeZ, if enabled, else to RetractClearance above plate
   If(IsSafeZ() = 1) Then
      SafeZ = GetSafeZ
      If  SafeZ  > PlateThickness Then
         GotoSafeZ()
      End If
   Else
      RetractHeight = PlateThickness + RetractClearance
      Code "G0 Z" & RetractHeight
   End If
   
   ' Tell user we're done
   Code "(Z axis is now zeroed)"

   ' Reset feedrate to original value
   Code "F" & CurrentFeed
   
   ' Reset coordinate mode to original value
   If AbsMode = 0 Then
      Code "G91"
   End If
Else
   Code "(Z-Plate is grounded, check connection and try again)"
End If

Exit Sub
             
    I'd also suggest adding an LED connected to the Probe input on the screen, so you can make sure the Probe input is working before running the macro.  If you don't know how to do this, contact me off-line.  If you send me your screenset, I can add the LED, and send it back to you.

   I also have macros for doing edge-finding, and center finding in a circle or pocket I can send you.  They install in basically the same way.

   Once you have this capability, you'll wonder how you ever did without it!

Regards,
Ray L.
Logged

Regards,
Ray L.
stevec
Active Member

Offline Offline

Posts: 12


View Profile
« Reply #3 on: March 13, 2009, 10:27:57 PM »

Hey Ray,

I know you did not explain all that for me but THANKS. This is exactly what I was looking for.

I do not know how to add a LED to the screen. Could you help me? PLEASE...

I am also intrested in the edge and center finder macro that you were refering to if possible.



Thanks in a million
Logged
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,648



View Profile
« Reply #4 on: March 13, 2009, 10:42:59 PM »

Hey Ray,

I know you did not explain all that for me but THANKS. This is exactly what I was looking for.

I do not know how to add a LED to the screen. Could you help me? PLEASE...

I am also intrested in the edge and center finder macro that you were refering to if possible.



Thanks in a million

Steve,

Send me your e-mail address (mine is Jagboy@pacbell.net), and I can send you a modified default Mach3 screenset with the LED added, and the macro installed, along with the rest of the macros.

Regards,
Ray L.
Logged

Regards,
Ray L.
stevec
Active Member

Offline Offline

Posts: 12


View Profile
« Reply #5 on: March 14, 2009, 12:10:38 AM »

Thank you very much!! On the way to your email

Logged
Kent McVicker
Active Member

Offline Offline

Posts: 10


View Profile
« Reply #6 on: March 15, 2009, 10:57:45 AM »

This is a little different than what ya'll are discussing, so please forgive.  My machine came with a factory installed auto zero plate.  When used it works.  It tells me it is moving to a safe z height of 1" after zeroing the z.  In reality it moves to over 4".  After running my cut file, without problems, the z does not return to the proper height if I rerun the cut file.  It is about 1" high.  The dro reads 0 and if you run the cut file,it will cut 1" to high.  No problems with this if I manually set z.  What do I need to change?  I have the lastest lockdown.
Kent
Logged
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,648



View Profile
« Reply #7 on: March 15, 2009, 11:26:38 AM »

This is a little different than what ya'll are discussing, so please forgive.  My machine came with a factory installed auto zero plate.  When used it works.  It tells me it is moving to a safe z height of 1" after zeroing the z.  In reality it moves to over 4".  After running my cut file, without problems, the z does not return to the proper height if I rerun the cut file.  It is about 1" high.  The dro reads 0 and if you run the cut file,it will cut 1" to high.  No problems with this if I manually set z.  What do I need to change?  I have the lastest lockdown.
Kent

Kent,

Mach3 does not include a touch-off macro, so whatever macro you're running, came from somewhere else.  Therefore, it's impossible for anyone here to know what it does, or how.  You need to extract the macro (Config->Edit Button Script), and post it here so we can see what it's doing.

Regards,
Ray L.
Logged

Regards,
Ray L.
Sparky_NY
Active Member

Offline Offline

Posts: 31


View Profile
« Reply #8 on: September 25, 2009, 09:57:23 PM »

hello to all
I got this plastic square with a round copper inserted into it. I would like to do a tool setting where it will find the center and also will do the tool height.
I have seen something on that were you can add a bluemach screen to it abd it will load it for you,
I like my screen the regular one , is there  way were I can add a  macro scrip so when I press (auto tool zero) it will do the same ass the mach blue screen.
if someone has done this can you please tell me how I can do it myself.
thanks

Josh,

I just did exactly that a few days ago.  Here's all you have to do:

1) Go to Config->Ports&Pins->Inputs, and configure a pin as the "Probe" input, making it Active Low.
2) Wire your touch plate to the Probe input.
3) Go to the Offsets screen, and, in the top-left corner, set the touch plate thickness to the exact thickness of your plate.
4) Go to Operator->EditButtonScript, then click on the AutoToolZero button.  When the VB editor opens, delete the few lines of code in there, and paste in the following:

'Tool Zero Setting Macro

' Change the following three lines to suit your machine
PlateThickness = GetOEMDRO(1001) ' Thickness of touch plate
RetractClearance = 0.100 ' Clearance above touch plate to retract to
ProbeFeed = 5      ' Feedrate to use for probing

' Define some constants
ZDRO = 2      ' Z Axis DRO
AbsoluteModeLED = 48   ' Absolute Coordinate Mode LED
IncrementalModeLED = 49   ' Incremental Coordinate Mode LED
FeedrateDRO = 818   ' OEM code for feedrate DRO
ProbeLED = 825      ' OEM code for probe input LED
ZTouchDRO = 2002   ' OEM code for DRO that holds Z touch position

' Do nothing if probe is already grounded
If GetOemLed(ProbeLED) = 0 Then

   ' Wait a few seconds for user to get touchplate in place
   Code "G4 P2"
   
   ' Save current feedrate
   CurrentFeed = GetOemDRO(FeedrateDRO)
   
   ' Save current coordinate mode
   AbsMode = GetOemLED(AbsoluteModeLED)

   ' Set absolute coordinate mode
   Code "G90"

   ' Zero Z DRO
   Call SetDro (ZDRO, 0.0000)

   ' Pause for DRO to update
   Code "G4 P0.5"

   ' Do the touch move
   Code "G31 Z-0.5 F" & ProbeFeed

   ' Wait for it to complete
   While IsMoving()
   Wend

   ' Delay a bit for Huh
   Code "G4 P0.25"

   ' Get the Z position where probe input triggered
   ZProbePos = GetVar(ZTouchDRO)

   ' Go back to touch position (G31 backs off after touch)
   Code "G0 Z" & ZProbePos

   ' Wait for it to complete
   While IsMoving ()
   Wend

   ' Set Z DRO to touch plate thickness
   Call SetDro (ZDRO, PlateThickness)

   ' Pause for DRO to update
   'Code "G4 P0.5"

   ' Retract Z to SafeZ, if enabled, else to RetractClearance above plate
   If(IsSafeZ() = 1) Then
      SafeZ = GetSafeZ
      If  SafeZ  > PlateThickness Then
         GotoSafeZ()
      End If
   Else
      RetractHeight = PlateThickness + RetractClearance
      Code "G0 Z" & RetractHeight
   End If
   
   ' Tell user we're done
   Code "(Z axis is now zeroed)"

   ' Reset feedrate to original value
   Code "F" & CurrentFeed
   
   ' Reset coordinate mode to original value
   If AbsMode = 0 Then
      Code "G91"
   End If
Else
   Code "(Z-Plate is grounded, check connection and try again)"
End If

Exit Sub
             
    I'd also suggest adding an LED connected to the Probe input on the screen, so you can make sure the Probe input is working before running the macro.  If you don't know how to do this, contact me off-line.  If you send me your screenset, I can add the LED, and send it back to you.

   I also have macros for doing edge-finding, and center finding in a circle or pocket I can send you.  They install in basically the same way.

   Once you have this capability, you'll wonder how you ever did without it!

Regards,
Ray L.


There appears to be a bug in this auto tool zero routine.  As I recall (perhaps wrongly), it used to work a long time back but now behaves strangely.   I upgraded to th 029 lockdown version just incase but it made no difference.

The symptoms:      With safe Z enabled in mach, the routine touches the plate, and sets the Z dro to the plate thickness (plate thickness from the offsets page), it does not retract at all however.   Safe Z is set at -.135, using machine coordinates and enabled in setup, it functions properly if the stop button is pressed during a program.

If safe Z is disabled,  the tool touchoff works but the dro is updated incorrectly and retracts far further than the .1 setting in the routine.   My plate is .061, retract is set at .1, it retracts to .350 or more, different each time. 

Something must have changed since the routine was written, any help would be appreciated.

Logged
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 2,405



View Profile
« Reply #9 on: September 26, 2009, 07:36:36 AM »

There appears to be a bug in this auto tool zero routine.  As I recall (perhaps wrongly), it used to work a long time back but now behaves strangely.   I upgraded to th 029 lockdown version just incase but it made no difference.

The symptoms:      With safe Z enabled in mach, the routine touches the plate, and sets the Z dro to the plate thickness (plate thickness from the offsets page), it does not retract at all however.   Safe Z is set at -.135, using machine coordinates and enabled in setup, it functions properly if the stop button is pressed during a program.

If safe Z is disabled,  the tool touchoff works but the dro is updated incorrectly and retracts far further than the .1 setting in the routine.   My plate is .061, retract is set at .1, it retracts to .350 or more, different each time. 

Something must have changed since the routine was written, any help would be appreciated.



Have a look at this thread on the CNC Zone but please read the WHOLE thread as there's important info in there.

Towards the end you will find the latest code that clears up all the "problems" for most users but always use caution with this code:

http://www.cnczone.com/forums/showthread.php?t=36099

Dave
Logged

----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    Wink
Pages: 1 2 »   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!