Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: dwayneinfo on January 06, 2007, 12:28:27 PM

Title: Set Z to zero automatically?Auto tool zero questions
Post by: dwayneinfo on January 06, 2007, 12:28:27 PM
Happy New Year everyone, I am new to this and have built a router. I am actually using it now to build the second router. I MUST have more speed, cutting area and accuracy.  ;D I have been reading some this morning and want to set up the Auto Tool Zero button. I found a few post about the scripting needed and I think I understand how to use and set to the button. What I really need to know is how do you physically connect a touch plate? I want to set a plate with a known thickness under my router. Hit the button and have it lower to the plate. Zero the DRO and then raise an inch or so. Any help would be appreciated.

Dwayne

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on January 06, 2007, 06:28:10 PM
All The guys are doing is ::)using a chunk of AL .125 plate and when the tool hits the part it tells the computer that it is there... I didn't think something like this would work but I was wrong   ::)

You would hook the frame to one side and the plate to the other side of the input... I have no idea how they stop noise from being a problem.
Hope that helps
Brian
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: dwayneinfo on January 06, 2007, 07:39:22 PM
Which input? The one in Mach for probe?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on January 06, 2007, 10:21:31 PM
Hi Dwayne,

Yes, hook it up to use the "Probe" input and in "Ports and Pins", set the proper port and pin number with active low.  Then just set up a button with the needed script.  I have found that I still need to fudge the plate thickness just a little (by way of a user DRO on the settings page), so you may need to experiment a little to find that sweet spot.  Other than that, I have had no problems with noise.

Regards,
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: dwayneinfo on January 06, 2007, 10:24:31 PM
Scott and Brian,

Thnks for replying. I will try to get something hooked up in the next few days. Tired of trying to look and see if I am on the part/table or not. My eyes are too old to let me see if the thing is right or not. Not to mention this has got to be faster and way moe accurate.

Dwayne
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on January 06, 2007, 10:28:49 PM
Hey Dwayne,

Here's the script I'm using now.  You can adapt it to your needs if you want.  ;)

Regards,


'Z zeroing macro by Scott Worden - Timber Lake Creations (and a little "Probe Var" tip from Brian ;-).


CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.


Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-5 F" &ProbeFeed
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z2.0" '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
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: xjdubber on January 08, 2007, 02:53:49 PM
All The guys are doing is ::)using a chunk of AL .125 plate and when the tool hits the part it tells the computer that it is there... I didn't think something like this would work but I was wrong ::)

You would hook the frame to one side and the plate to the other side of the input... I have no idea how they stop noise from being a problem.
Hope that helps
Brian

I work for multicam, thats how they do it, except that they put a grounding clip on the spindle because their spindles have ceramic bearings so it would not transfer the signal
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: dwayneinfo on January 08, 2007, 09:41:27 PM
Scot where do I set the thicness of the plate at in the script? Also the set position once raised along with the feed speed to plate?

Dwayne
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on January 09, 2007, 12:37:55 AM
Dwayne,

In the script, I have comments stating where you can change or hard code the variables if you don't have any of the DRO's in your screen set.

For the plate thickness, you would replace GetUserDRO (1151) with the thickness of your plate.   It would look like this...PlateThickness =0.125 or whatever the thickness of your plate is.

For the feedrate...ProbeFeed=20 or whatever speed you want

And for the height after setting, in the script where it reads....Code "G0 Z2.0" 'Change the Z retract height here, just change it to G0 Z whatever you want.  You could also use a variable at the beginning for this instead. 

Hope this helps,
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Ron Ginger on January 10, 2007, 01:55:24 PM
Does the plate need to have any give to it? It somehow bothers me to have the system feed down and hit a plate with a sharp tool- doesn't the tool dig into the plate a bit?

I considered gluing a sheet of rubber under the plate to add just a bit of give- is that necessary?

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: GaryB on January 10, 2007, 03:51:20 PM
In-time your zero plate will be peppered with little indentations, especially if you use fine pointed bits. I just replace the AL. plate when it gets bad. Setting your feedrate to 30ipm or less will not give the Z axis the shock it would receive if hitting the plate at 180ipm  :o

Putting foam or rubber pad under the Z plate usually gives false readings due to inconsistent compression. If you mic the plate including the pad it will not be the same reading as when compressed by the Z axis during a zeroing routine, you would also get different reading with different feedrates in this scenario.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Chaoticone on January 10, 2007, 04:09:08 PM
I do not use a plate to touch off so this is just my 2 cents. I agree with ronginger. I would think that you would allways want to touch off at the same rate for consistency. Do any of you guys doing this use carbide bits, cutters? Does this not chip them? Has anyone tried a spring loaded plate? I thought of a base plate with a shoulder bolt in each corner. A top plate with bronze bushings to slide on the shoulder bolts. A spring on the shoulder bolts in between the two plates. Would this work?


Ignorant on the matter but wanting to learn.
Brett
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on January 10, 2007, 04:48:15 PM
I (and I'm pretty sure this goes for Gary also) use carbide tooling all the time and if you use a slow probe feedrate and an aluminum or brass plate, you should be fine.  I've never had a chipped cutter (yet).  ;)  I use a strip of flexible adhesive backed non-ferrous magnet on the back of my plate which allows me to stick it to the side of the machine when done with it.  I just add the total thickness of the plate and magnet strip to the plate thickness setting.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: GaryB on January 10, 2007, 06:04:35 PM
Yep same as Scott run run 100% carbide bits and never broke or chipped one yet on the zero plate.
As Scott stated slow feedrate and a soft aluminum or brass for the plate, when it gets too much pitting I just replace the plate, cost about 35 cents for aluminum (buy it by the lb $3.00 worth will last a couple of years).

Brett, you idea may work but myself personally would not use any plate that has any physical movement or cushioning due to the chance of error, just a couple of thousands will show up after a bit change and cause grief for additional sanding and clean up.
Another thing you might note is that quite often when using a touch off plate the area under the plate may be very small, I have had to zero out on a 1/2 x 1/2  area within the relief on many occasion, (due to material movement after an area clear)
Just for your info I have another very small plate with a gator clip to fit into detail areas when needed, I just clip it onto my existing plate and run the zero routine.

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: dwayneinfo on January 10, 2007, 07:54:23 PM
Seems to me that you could just jog it very close then insert the plate. Set the feedrate slow and touch off on alluminum, it should be soft enough to not hurt the tooling. Does this sound right to the people who know?

Dwayne
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Chaoticone on January 10, 2007, 08:02:58 PM
Thanks for the Input guys. At what rate are you jogging into the plate? .5 IPM?

Brett
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: GaryB on January 10, 2007, 10:39:20 PM
Dwayne, if you set your feedrate in your touch off script as in Scott's example above then there's no need to jog close to the plate, just put the plate under your bit and run the routine.

Brett, don't know what the other guys run at but I use 30IPM for my touch off.

gary

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Chaoticone on January 11, 2007, 01:21:39 AM
Thanks Gary.

Brett
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on January 18, 2007, 02:21:20 PM
This is a very interesting thread. I had no idea you could make such a simple touch off plate. Im just getting started cncing. built my first mill this fall. was wondering. I dont know a damn thing about using macros. where do I look to even begin figuring out how to set something like this up. I get the basic of the plate. its setting up the program to perform the operation that Im unclear on. :-\
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on January 18, 2007, 04:46:58 PM
GNBG,

You can do it a couple of ways, with a button placed on your screen or by making a .m1s file containing the macro and calling it up with a M(file number like 301, etc.) in the MDI line.  The variables in the macro will have to be changed to suit your needs, settings, and screen.

The easiest is to place a button on your screen (along with a DRO for the plate thickness and the feed rate at which to measure at) with Screen4 and edit the script for the button in Mach3.  Take a look at the script behind some of the other buttons and also look at the settings for some of the buttons in Screen4 (the exe for that is in the Mach folder).  The Screen4 video will help to understand that part a bit and as far as macros, looking at what's behind some of the buttons in Mach3 and the wizards are a good place to learn by example.  The DRO, Button, and LED lists on the Wiki are a must to have in front of you too.

If it's all more than you want to mess with, send me the screen .set file that you are using and I can place a button (with script) and a DRO on it for you and you can then dissect it to see how it works.  ;)

It's best to test this with a junk bit or a broken off one chucked upside down just in case.  ;)

Regards,
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: chuckels on January 22, 2007, 06:27:50 AM
Hey Brian, Art
how about adding this feature to the default screen set next update ??? buttons, code and DRO for us guys that don't even know where to put a maco or sub in the code.
chuck
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on January 22, 2007, 11:26:26 PM
Chuck,
I would LOVE... but there is no way that I can tell what you would like to the macro to do...  I could add code that would just set the Z to zero and would turn off the tool length comp. It is not a simple problem ;(
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: chuckels on January 23, 2007, 12:28:02 AM
Brian,
how about going to home or some offset from home than feeding down while looking at a selectable input from the pp that would detect touch than re-zero Z and move to safe Z.... or something to that effect that most of us boobs could fudge with.  WOW the more i rite the worse it gets.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on January 23, 2007, 07:31:04 AM
See there is the problem! What if you don't have a home switch on the Z axis?  IThe only way that I see to get it to work is to have 5 tool length offset codes that all work from a plugin. This would make it so there was one for everyone!!!

Now you need to some how help me find more time to get to work on it :)
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Ron Ginger on January 28, 2007, 08:24:57 PM
I made a small plate from a piece of PC board. I soldered a wire to it and hooked that to my probe input. I used the Z button script from a few replies back.

That worked so well that I decided to add buttons for touch off on X and Y. I used the standard screen for Offsets, and used the graphic there to indicate which edge I was touching off. I simply hold my little PC board plate against the correct edge of the piece and click the button. It seems to be working perfectly.

I used the same script for each button, with the obvious changes for X and Y. I did screw up one button and made the pull back move the wrong sign and snapped off a test tool. At least I know my new mill has lots of torque :-)

I set the feed to 1 in/min, rather slow, but then the overshoot of the probe after it touches the tool edge is so small it doesn't hurt anything. I jog up close to the touch point, less than 1/4" before touching.

Works well for nice edges, like a vise. Might be hard to hold the PC board up to an irregular edge.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on February 20, 2007, 07:42:00 AM
Ive been thinking about doing this for a little while. Just testerday it dawned on me. are you guys using this for a wood router. so that the touch plate is insulated on a peice of wood. cause if you were doing this on a mill say with a piece of steel. wouldnt the signal ground as soon as you set the touchplate on the machine? that is if I understand that the ground is hooked to the machine and the signal wire is hooked to the plate so that when the bit touches the plate it creates a complete circuit. and if that is the case would the guy who is using the PC board be a solution, that is if I m thinking that a pc board is plated only on one side.
am I understanding any of this correctly?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Ron Ginger on February 20, 2007, 08:12:41 AM
No, I am doing it on a Knee Mill, with metal parts and vise. What you are missing is that my plate is a piece of copper clad printed circuit board. It has copper on both sides, but is a fiberglass plate. I thought about removing the copper from the back side- the part that touches the work or vise, but its not necessary. The wire is soldered to the top of the plate, the side that will touch the tool.

It works well.

ron ginger
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: dfurlano on February 20, 2007, 10:21:28 AM
I am a real knucklehead when it comes to anything electrical.  Is there something that exists that graphically describes how to make this connection? 

I have a KDN driver http://www.kdntool.com/_sgg/m4m2_1.htm and I have the pin out configuration for the homing connector but it sounds like you are using the printer port for sensing. 

My main question is how do you make the connection from the plate to the printer cable????

Thanks.

Dan.   

PS... why wouldn't you make a spring loaded plate to touch off on and write a macro the hits the plate backs up a little and feeds down real slow.  That way your not dinging the plate and I would think getting a more accurate position.  I would liek this because a lot of my tools are pointed.  You could also make an offset so that you place the touch off on your part and the macro subtracts the offset.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on February 20, 2007, 10:24:30 AM
My aluminum plate has an adhesive backed flexible magnetic strip on the underside.  It's non-conductive and I can stick it to the frame of my machine when not in use.  Just use the total thickness of the plate and magnetic strip for the plate thickness setting.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on February 22, 2007, 07:54:31 AM
ok Im determined to learn how to set this up. I watched the scripting video and Im reading over the macro that was posted a page back or so. I understand some of it. but not all. the video mentioned an advanced scripting video but I did not see one on the site. is there any other tutorials I can get my hands on to teach me how to do this. also I opened my screen editor and then opened the standard mach screenset. and everything in that file is all over the place so I had to spend an hour just moving DRO's and buttons to there proper place. one of my questions is if I want to create a screenset or add a button in screen designer. how do I load that screens set into my mach3 program.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on February 22, 2007, 07:55:43 AM
Found the Mach2 costumizaton PDF. guess Ill read that a while.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on February 22, 2007, 09:39:23 AM
GNBG,

I don't think that second video exists yet.

If you load some of the various wizards and go to 'Operator/Edit Button Script', you can look at many macros that have been done and learn by example.  Also, download some of the docs on scripting and the button, led, dro, etc. lists on the Wiki.

If you load the default .set in the editor and make some changes (add buttons, leds, etc.), do a save as, give it a name, and save it in the root Mach3 folder.  You can then open that screen set from Mach3 by going to 'View/Load Screens'.

If you make your own screen that uses different backgrounds etc., you will need a folder of jpgs with a name that goes with your screen set which is placed in the Mach3/bitmaps folder.  These jpgs are then selected in the screen editor.  Or you can just reference the original ones for your new set.

Hope this helps a bit.  Keep pluggin' away at it and it will gradually all come together.  ;)
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Ron Ginger on February 22, 2007, 11:10:18 AM
Be careful of the Screen4 editor. If you open it on a small screen that requires the display to have scroll bars it will totally screw up the screen set- stuff gets moved  all over and you cannot get it right.

I use a big monitor- 1280x1024 to edit the wizard screens in 1024x768.

I agree with the suggestion to look at existing code- its the best way to learn. But Id copy the 1024.set file, I call it My1024.set, then I mess with that one. If I blow it there is always the original unaltered screen to get back to.

I have never been able to get Screen4 to display jpg images- there is a button to turn them on or off, but for me they are always off. I believe it has to do with which folder the Screen4 image is in, but I have not been able to get it right.

The screen edit and macro ability is one of Machs best features, its a shame the editor is such a hack and so frustrating for beginners to use..

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Hood on February 22, 2007, 11:53:03 AM
ok Im determined to learn how to set this up. I watched the scripting video and Im reading over the macro that was posted a page back or so. I understand some of it. but not all. the video mentioned an advanced scripting video but I did not see one on the site.

Dont think there is an advanced video :(

 
is there any other tutorials I can get my hands on to teach me how to do this.

I am trying to write some macros for my lathe, I am getting there but its been a struggle. Dont know of any tutorials but I have found that by looking at other macros you get some ideas, also there is a list of commands etc on the downloads page I think. It doesnt mean much at first butsome of  it is starting to make sense now.

also I opened my screen editor and then opened the standard mach screenset. and everything in that file is all over the place so I had to spend an hour just moving DRO's and buttons to there proper place. one of my questions is if I want to create a screenset or add a button in screen designer. how do I load that screens set into my mach3 program.

 If you save your screenset to the Mach folder then all you do is open Mach, go to View menu then load screens, browse to where your screen is and choose it. It will then open your screen every time you use Mach.


Hood
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on February 23, 2007, 12:36:29 PM
hmm Im looking on the downloads page for the list of commands and Im not seeing it. What is it called.
chris ???
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on February 23, 2007, 01:16:31 PM
Try the Wiki  http://www.machsupport.com/MachCustomizeWiki/index.php?title=Main_Page

Table of contents:
   4.2 is the VB scripting commands .pdf and 9.1-10 are all the reference tables for LED's, buttons, DRO's, etc.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: rem300wm on February 23, 2007, 10:53:43 PM
Hello Scott,
here is the .set file.
Thank You,Marco.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: rem300wm on February 24, 2007, 12:04:59 AM
Hello Scot,
Here is the file,
Thank You,Marco
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on February 24, 2007, 06:21:51 PM
Hey what Imput are most of you using for your touch  plates. are you setting it up in the touchprobe box or are you just using one of the blank inputs.
not sure why that matters yet. but Ill get there.
can anyone else post the script they'r using so I can compare the two that are on this posting?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on February 25, 2007, 01:13:47 AM
Probe
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on March 17, 2007, 12:44:46 PM
ok so Ive finally gotten around to trying this. I set everything up. added the script from earlier in this post to the "auto zero" button on the program run screen. I havnt made a touch plate yet so Im just holding the wires and tapping them together at the proper moment to test things( i know Im lazy). anyhow everything works great right up to when the controller retracts the z axis to its safe height. it always abruptly stops short of the set height. it always stops roughly at the same spot about .5'' short of the height. I tried changing the retract height and it in turn changed the spot where it is abruptly stopping at but still short of the height. Its quite a hard stop. its not tripping my estop or anything but it seems strange. any one got any ideas on how to fix this. I will post my  xml for all to look at
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on March 17, 2007, 06:07:09 PM
GNBG,

Try changing your 'Safe Z Setup' to be in work coordinates and see if that helps.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on March 17, 2007, 07:08:08 PM
I got it to work by changing the retract move from a rapid to a feedrate move. not sure why that is but it works.
guess ill fool around with my motor settings and see if its a motor problem. or maybe noise.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 03, 2007, 04:11:40 AM
Scott

Can you help me to understand your macro for tool height.

I have looked at the Wiki etc. and think I understand most of it but there are a few points that are eluding me  ;D

And maybe if Scott is not on line someone else may give me a few pointers. ;)

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.

These User DROs are ones that you put in your screens with Screen designer I guess

Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate

What is the value of P (seconds?)

Code "G31Z-5 F" &ProbeFeed
While IsMoving()
Wend

The following three lines is what I mostly don't understand

Code "G4 P0.25"   What is this pause for

ZProbePos = GetVar(2002)  Don't know what "GetVar (2002)" is

Code "G0 Z" &ZProbePos  Don't understand this line. Maybe when the previous line is explained it will then be obvious  :)


While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z2.0" '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

I really want to get this going on my machine and also get some level of understanding of this stuff. :)

Thanks for any help,   Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: guynamedbathgate on April 03, 2007, 07:30:55 AM
yeah I never fully understood it either. but I cut and pasted it into the script editor for the auto z button on the program run screen and it works like a charm. I did slow the feedrate to 15 for my comfort and I just entered the plate thickness directly into the script where it sais you could put your plate thickness here. But If you asked me to write this script from scratch. Id have no idea where to begin. Im interested in learning more on this too. I have watched the video and browsed over the wiki. but Im affraid if your not coming from a place with at least some programing experience. the learning curve is a bit steep.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on April 03, 2007, 07:47:39 AM
Hey Greg,

Yes, the plate thickness and probe feed are added to the screen with a designer (Screen4 or waiting for the latest JetCam designer).

The value of P for me is in seconds, but you can also have it be set to milliseconds in 'General Config'.  This just give me enough time to get from the computer to the Z-plate and hold it in position.

The "G31Z-5 F" &ProbeFeed is a G-code probing cycle that records the position of the axis when contact is made.  The -5 value is just a amount that should allow it to reach the plate from any Z axis position it may be started at.  You can increase this if you have more travel because if it travels 5" without contact, the height won't be set.  I think I increased mine to 7"  If you work in millimeters, you will have to adjust some of these values.

The While IsMoving() is to keep the macro from continuing on until the previous requested action is completed.

The "G4 P0.25" pause is just to be sure that the position has had time to be recorded within Mach.

GetVar(2002) is a internal variable that is the exact position where the probe made contact, not where the axis stopped at.  Because the axis can't stop immediately, there can be a slight overrun.  Although, if your probe feedrate is slow enough (about 20ipm) it's almost unnoticeable.  When the macro runs, you can feel the slight adjustment made due to the difference between the axis position and where the probe actually hit at, which is what the Code "G0 Z" &ZProbePos line does.

Hope this helps to understand the flow of the macro.  I also have another one much the same that can be used to set X & Y to the inside corner of a jig/fixture or the outside corner of the material.

If you need help setting up a screen, just ask.

Regards,
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 03, 2007, 04:41:05 PM

Hey thanks for that Scott. I think I have now got that.

My problem is that I can usually get this stuff into my head, but can't for the life of me get it to stay there  ;D


Guynamedbathgate, I hear what your saying.  I really like to be able to understand why a thing works. :)


Any one know where I can find reference to "GetVar (2002)"   Is it in the Wiki or PDFs ?

Greg

EDIT,  I can't find the setting for time units "P" on the General Config page.  Is it still there?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Hood on April 03, 2007, 04:56:14 PM
Here you go.
Hood
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 03, 2007, 11:01:33 PM

OK I feel suitably chastised.   ;D

Plane as the nose on your face now that I see it. 

Thanks Hood
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on April 03, 2007, 11:28:19 PM
Reference to GetVar (2002) is on the Wiki under "How to get data from a probe".  Waaay down at the bottom.  ;)
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 04, 2007, 12:50:43 AM

Yay!!!  It's easy when you know where to look.  ;D

Now it all makes sense

Thanks Scott
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 04, 2007, 08:37:58 PM

Hey Scott.  It works @$%&# fantastic.   ;D 

Don't know why it took me so long to get around to it.

I just modified your code to suit myself.  Easier to do after making the effort to understand it.  :)



PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then
DoButton ( 10 )
Code "G4 P0.25"
Code "G31Z-50 F400"
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z20" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If     

I put a DRO on the screen and also a big LED that I can see easily for the Probe.

My fear was that if an electrical or other fault happened and the switch failed it would drive
the spindle into the work and most likely break the tool.

So with the LED I just touch the plate to the tool before running script to satisfy myself that all is good. :D

Anyhow thanks for the help,  Greg

.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on April 04, 2007, 09:56:10 PM
Okay some one please post this in a place that everyone can find it !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

or just keep a link to it ;)
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: chuckels on April 05, 2007, 01:46:16 AM
any chance of posting the complete screen set as well as the code?
thanks,
chuck
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 05, 2007, 04:50:58 AM
I can do that Chuck.

But you really should have a go at making the alterations to your screen set.

Once you see how easy it is you'll be glad you did. And you will then find yourself doing all sorts of changes.

Download Screen4 and have a play with it. 

Open the 1024.set then "save as" so no matter what you do you can fall back to an unaltered screen.

Remember making a few changes is a lot simpler than designing a screen from scratch.

And if you have specific questions, then ask.  :)

If that little pep talk has fallen on deaf ears  ;D  then send me a PM with your email address and I will send it to you.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 05, 2007, 11:52:16 PM
Well that little bubble of excitement didn't last long  :(

I found a bug which I don't expect will affect very many users.

Took me ages to figure out what was going on.  You'll understand why if you read on.  :)

Could not believe that I wasn't doing something stupid or that my macro was at fault.

Anyhow eventually I worked out what made things go pear shaped.

To do with slaved axis. I have X and A motors running my X axis in a dual drive setup.

The Auto Tool Zero works perfectly up until I jog or move the X axis by any method except homing.

After moving the X axis, it spits the dummy and does strange things and wont work again till I restart Mach.

Now what threw me is that a homing sequence does not have the same effect.

But then I thought about it  ::)  and a homing sequence treats the slaved axis separately so that the individual homing switches can do their thing.

Now I suppose because this will affect very few users, that it will not score highly on the "To Do List"

So until that happens my "Wizz Bang Zero Setter" will have to go on the shelf.  :'(


Now for the disclaimer   ;D  If I have done something supremely stupid and it is all my fault. 

I apologize profusely for casting aspersions on the very excellent Mach software.  8)

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on April 06, 2007, 10:33:33 AM
So Slaving is not working after homing? I think that is the real problem that you are having...
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 06, 2007, 05:01:52 PM

No not at all Brian.  Slaving is working no problem. And continues to work properly.

The Auto Tool Zero macro will work as it should repeatedly up until I do any X axis movement

As soon as the X axis moves then the macro plays up and will not work again until I restart Mach

The action that stops the macro working is X axis movement. Dual drive or slaved axis.

Now the interesting thing is that a homing sequence does not do it even though obviously the X axis has moved.

I am presuming that is because a homing move is not strictly speaking a slaved move.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Brian Barker on April 06, 2007, 05:05:26 PM
Could you try testing it with the X axis unslaved?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 06, 2007, 05:19:02 PM
OK I unslaved the X and A axis, restarted Mach, and the macro continues to work after any sort of move. No problems.

Re select slaving. Restart Mach.  And an X axis move means the macro no longer works.

Greg

EDIT:  I am just now heading out the door for a few days hang gliding vacation.

So don't think me rude if I don't reply.  :D
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 09, 2007, 05:02:26 AM

Well I'm back.  :)

Is there any line or lines of code I can put at the beginning of the macro to sort of jerk Mach out of

whatever state a slaved axis move leaves it in?

I tried   Code "G90 F400"  like Scott had in his macro.  That made no difference.

Also tried hitting reset twice after a slaved move and before running macro.  Same no difference.

Any suggestions?

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 10, 2007, 01:23:44 AM

I have done some more playing around and discovered another clue.

After doing an X axis (slaved) move the macro plays up.

Then if I hit Reset twice (enter reset state and exit reset state) then do a homing sequence (Ref All) the macro will work again.

This is not a practical work around but may give someone a clue as to what is going on

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 11, 2007, 05:36:37 PM

As most of you know Art is much more active on the Yahoo group so I have been posting there.

Art has found the bug and will have it fixed in the next release.  Yipeeee!!!!!!!

Soon I will have reliable Tool Zero macro.   ;D   :o

Thanks again Scott for getting me started here.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on April 12, 2007, 12:22:58 AM
Hey Greg,

Glad you got that problem figured out and that the Z zero will soon work for you!

Regards,
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on April 16, 2007, 09:28:16 PM

OK after a couple of hiccups Art has fixed the bug and it seems to be working great.   :)

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: bigbigjimbo on November 24, 2007, 11:52:41 AM
Hi where do I find Screen4 to Download and is the Auto Tool Zero on the Mach default screen set the same as what is being discussed on this forum.
I have seen this in action on U-tube and it is a must have If it is not on the default screen I think it should be there as it is very useful as everyone zeros the Z axis
Jim
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on November 25, 2007, 10:05:09 PM
Hey Jim,

Here's Screen4 http://www.machsupport.com/Downloads/Screen4.zip

The "Auto Tool Zero" button is not the same, in fact it doesn't have any script behind/under it at all.

Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on November 30, 2007, 09:19:31 PM
Thanks to you all you guys, I've got a custom screen, macro that seems to work, and a plate fabricated. My problem(?) is the actual wiring to Bob Campbell's excellent BOB. There doesn't seem to be a probe or spare input, and I think I'd like to use the Z limit switch input for the probe. Am I right that I need to modify my config(.xml) file to do this? Or am I missing something obvious?

Any suggestions would be appreciated.
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on November 30, 2007, 10:10:26 PM
On a printer port, pins  10 - 13 and 15 are inputs.

It should not matter which input you use.

If the one labeled "Z limit" is spare then that will be fine.

Just set the pin you are using in "Ports and Pins" as probe and set it to active low.

Now here is the rub.  A lot of the BOB makers pull the inputs low with on board circuitry.

That is they are low when at rest.  This is fine for a limit or estop switch but ......

This device described in this thread needs an input that is high when at rest.

You will need to check that out on your particular BOB or with the manufacturer.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on December 02, 2007, 02:15:23 PM
Greg,

Thanks for clarifying some of this for me - I think I'm close. I have a pin assigned to "Probe", and I can see it toggle an LED state in the Diagnostics screen when I ground the touch pad. However, its state (i.e., grounded or not) doesn't affect the running of the macro, which runs to the limit of it's travel, retracts, and displays the "z axis now zeroed" message.

I guess I don't understand what in the macro tells it which pin is hooked up to the probe...

Again, my thanks for the help.

SF
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on December 02, 2007, 03:33:48 PM
Ventuseu,

Are you saying that the tool stops before hitting your touch plate and retracts?  If your plate triggers the led when grounded, it should work.  The G31Z-(what ever distance you have here in the macro) is what relates to the "Probe" connection and how far it will travel before stopping.  Is it possible that you need to increase this distance in the macro to make your tool continue moving until it contacts the plate or start the macro closer to the touch plate?

If you start the macro and manually touch the plate to ground, does the macro work properly then?
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on December 02, 2007, 03:53:58 PM
In "Ports and Pins" set the probe to the pin you want and set it to active low.

Greg

EDIT:  Woops sorry I did not see that Scott had already answered.   :)
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on December 02, 2007, 07:36:13 PM
Scott,

No, when I ground the pad while the z axis is traveling down, the motion doesn't stop (i.e., it doesn't terminate the macro).

I beginning to suspect that I don't have the correct mapping for the BOB's internal pin/terminal connection, although I've made the probe connection to match the documentation I have for Sound Logic PC-2-Route Model M2 board. Tomorrow, I'll try using a different terminal on the BOB and see what happens.

I really appreciate the responses-getting advice quickly from you guys keeps me from getting frustrated.

SF
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Scott on December 03, 2007, 12:45:50 PM
SF,

Another quick test of the macro would be to ground out your plate and then run the macro.  If the digitize/probe led is triggered (OEM LED 825), the macro should throw up the error message...

"Z-Plate is grounded, check connection and try again"  
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on December 03, 2007, 03:41:57 PM
Scott,

Thanks for the suggestion. I've tried that, and grounding has no effect.

As I'm trying to verify the entire signal path from pad/probe to the Mach 3 screen button, it has become painfully clear that I still don't understand how the button on the screen is linked to pin assigned in "ports & pins". I assume that much of this magic is contained in the OEM code, but the link between the screen button (and its macro) and the assigned pin still escapes me...

Thanks,

SF
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on December 03, 2007, 03:55:27 PM
SF  forget about the script, DRO, button etc for now.

What you need to make happen is touching the plate to tool makes the "Digitize" LED come on on the diagnostics page.

When that is happening the rest will fall into place easily.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on December 05, 2007, 09:09:25 PM
Scott,

Thanks for the the clarification. On my diagnostic screen, the 4th LED on the top row is the one that toggles on and off as the probe is grounded.

I think I've found the problem. A careful rereading of my BOB documentation suggests that the four aux inputs aren't independent inputs, but are only intended to be used as limit switches. Each input is apparently hardwired on the board with the home/limit switch for one of the axes...

I've sent an e-mail to Campbell Designs for clarification, and the response was that they'll look into it and get back to me. I await their reply...

Thanks for your help,

SF
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on December 05, 2007, 09:34:30 PM
SF it sounds like you have not set up the probe input in "Ports and Pins"

It should look like in the picture.  With relevant port and pin number,

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: ventuseu on December 09, 2007, 10:57:46 AM
Thanks to Scott and especially Greg's help, the probe is working perfectly.

On Bob Campbell's breakout board, if you connect and assign the probe to the Aux Home pin(15), enable both the probe and 4th axis home on pin 15  in Ports & Pins, and it works perfectly...

As usual, it wasn't a hardware problem - it was the lousy software between my ears.

Thanks

SF
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: fourxfour2 on January 31, 2008, 09:06:15 AM
Hi guys, I don't post much (do read alot) but I have been watching this thread and the one one CNC forum and have been playing with the Mach screen 4..with whats been posted I think it's time to try this on my router..
Just one question....I thought I read that someone had done this with the X,Y axis also...and can it you bring the tool to a predetermined spot ...like touch off in X with a 1/2 EM and have Z retract and the tool move to its CL and then Zero the DRO.
Any scrip to paw over would really help.....
Thanks again to all .....
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: La_coterie on February 18, 2008, 06:26:02 PM
Questions/problems.... sorry guys...

I don't know if it becasue I'm playing with the script on a laptop without the Mach driver installed (laptop don't have a PP so no point!) As I understand a G31, it moves the given distance, in the case here 5, unless the probe is triggered. I'm finding that it just keeps going, anyway I'll try it on the machine shortly...

Some other bits that strike me are the fact that the script puts the machine in G90 and doesn't take it out again - ok easily added, but is there a catch all "something" I dunno what, to check and store what all the active G & M codes are and then at the end after runing the script put them back as they were. 
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on February 18, 2008, 08:21:25 PM
La_coterie

There are many zero scripts floating around.

This is what I am currently using. It is a variation on Scotts.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

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 P2" ' two second delay
Code "G31 Z-20 F100" 'Z goes down a max of 20mm at 100mm/min
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
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'retract Z to 20 mm
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)"
Exit Sub
End If


This does not change any other modal settings other than the feed rate.  And that is set back to what it was before.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: La_coterie on February 20, 2008, 08:42:47 AM
Thanks for that Greg,

though there could still be cause for concern..

I've been testing these scripts just letting the G31 run to the end and of course it still thinks its done its job, I think some more scripting needs putting in there..

Another thing is that if your dro is reading a large number then G31 Z-20 is a long way before it stops - if it can get there, so that needs to be incremental. If it's not incremantal and your dro is reading smaller than -20  i.e, -100 then it goes up  ::)

 here's what I put..
>
If GetOemLed (825)=0 Then
Code "G91"
Code "(Put Plate in Position)"
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-20 F" &ProbeFeed
Code "G90"
While IsMoving()


But this assumes that the machine was in G90 state before hand and wants to go back to being G90 :-\

Is there a list of variables in Mach that hold the current active G codes? That way it can be collected before the start of the macro & put back after the macro

There's gonna be that day when you're not using abs and it's bound to be an expensive tool/job  :'(

Shoving different numbers in the dro and trying out the macro usually works  ??? I can't put my finger on what exactly how to replicate it but stepping through the macro I found that when it goes haywire it hasn't updated the ZProbePos variable, I'll try some more to make it repeatable but early tests seem to indicate that it screws up if I don't jog the Z axis after changing the dro.....  oh ver 3.0 arts last :)

Has anybody else had this?

Steve
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: La_coterie on February 20, 2008, 01:27:42 PM
 :-[  Whoops, my error  ::) on the lack of updating the ZProbePos ..I had OEM trig 1 set to the same pin for cycle start. 
I should have guessed that when I saw the start led flashing at the same time as the probe led  ::)  but I figured it was another mach "feature"  ;D
Steve
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on February 20, 2008, 03:27:20 PM

Another thing is that if your dro is reading a large number then G31 Z-20 is a long way before it stops - if it can get there, so that needs to be incremental.

If it's not incremantal and your dro is reading smaller than -20  i.e, -100 then it goes up  ::)




That's what this line is for,    DoOEMButton (1010) 'zero the Z axis so the probe move will start from here

This zeros the Z DRO before the move.  So does not matter if it is incremental or absolute.     No need for G90  or G91

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: backyardcnc on March 30, 2008, 05:15:34 AM
Greg,

In an earlier post you made a screen file OLFlaser.set available for download. I have tried this offline in MACH and I have a question. This screen set has a button AUTO TOOL ZERO but I am unsure of the purpose of this button and it's script. I think I wrongly assumed that it would auto zero the Z but  is not a script as you have included in your post above. Since the LASER ZERO F12 is setup to move the spindle (tool center) to the point that was jogged to using the laser, I am not sure what the purpose of this button is? To be fair, I don't yet have a LASER CROSS HAIR (just bought 2 on ebay) nor do I have a Z zero  set plate yet so I am not actually performing the moves just trying to under stand the logic/scripting. Appreciate your comments. My ultimate goal is to get the LASER CROSSHAIRS and AUTO Z SET working with a new SHUTTLEPRO jog pad that I hope to pick-up tommorrow.

Cheerio
Gerald
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: marting on March 30, 2008, 10:20:32 AM
Hi to all,
I've been following all the developments on this post and have one question about an option that I have not seen yet. Is it possible to call this macro for zeroing the Z axis by means of pushing a pre-programmed button on the device (pendant, joystick, MPG or what have you) that it used for jogging or fine posisioning? Also along the same lines - Could the same be applied for calling the "video window" (from the PlugIn Control) which is used to center the cutter in the X and Y axii? I'm not much of a guru in this area so pardon me if I'm talking nonsense.
Regards
Marten
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on March 31, 2008, 04:55:59 AM
Hi to all,
I've been following all the developments on this post and have one question about an option that I have not seen yet. Is it possible to call this macro for zeroing the Z axis by means of pushing a pre-programmed button on the device (pendant, joystick, MPG or what have you) that it used for jogging or fine posisioning? Also along the same lines - Could the same be applied for calling the "video window" (from the PlugIn Control) which is used to center the cutter in the X and Y axii? I'm not much of a guru in this area so pardon me if I'm talking nonsense.
Regards
Marten

G'day Marten

Yes the "Auto Tool Zero" script can be called via a Shuttle Pro.  Mach has a plugin for this device.

As far as Joysticks etc.  There are plugins available but I have not used them.

Also any device that uses "KeyGrabber" will do it.

I don't know if the Video Window can be activated by a button press.  I have not tried to do this.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on March 31, 2008, 04:59:01 AM
Greg,

In an earlier post you made a screen file OLFlaser.set available for download. I have tried this offline in MACH and I have a question. This screen set has a button AUTO TOOL ZERO but I am unsure of the purpose of this button and it's script. I think I wrongly assumed that it would auto zero the Z but  is not a script as you have included in your post above. Since the LASER ZERO F12 is setup to move the spindle (tool center) to the point that was jogged to using the laser, I am not sure what the purpose of this button is? To be fair, I don't yet have a LASER CROSS HAIR (just bought 2 on ebay) nor do I have a Z zero  set plate yet so I am not actually performing the moves just trying to under stand the logic/scripting. Appreciate your comments. My ultimate goal is to get the LASER CROSSHAIRS and AUTO Z SET working with a new SHUTTLEPRO jog pad that I hope to pick-up tommorrow.

Cheerio
Gerald

Gerald

I have no recollection of the screen set you refer to.  I have posted a few variations at peoples request.

However the "Laser Zero" button would be as you said.

The "Auto Tool Zero" button should run a button script with the script as has been posted above.  Or a close variation of it. :)

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: astr on September 24, 2009, 01:18:44 PM
I read through this thread several times and it appears that this is exactly what I want: a Z-axis auto-zero function using an additional button and user DRO's on the main Mach3 screen.  I got the probe wired up, enabled it in Mach3 and Mach3 seems to recognize a "touch". 

The harrdware and configuration seem to be OK but I get lost as how to modify the screen to add the buttons and DRO's and how to install the scrtipt behind these.  I've played with Screen4 a bit.  I kind of undrestand some of the scripts that are posted earlier in this thread but somehow I'm missing the actual steps necessary to put all the pieces together.

Could someone point me in the right direction?  Please use small words and short sentences as I get confused easily ;D ;D
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Greolt on September 24, 2009, 06:12:18 PM
Look at this link for a few more details,

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

The script at the begining of that thread has some short comings.

Look towards the end of the thread for a better version.

Greg
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: Hood on September 25, 2009, 03:21:01 AM
If you want a VB button just add a button in screen4 and choose to have it as a VB button, then save and exit then back in Mach go to Operator menu then Edit Button Scripts. The VB Buttons will be flashing, click on the one you made and the editor window will open, add your code and close and thats it.
 If there are DROs in the script you probably dont need to add them to the screen, Mach will see them even if you dont :) The only time you would need them is if you want to see them or they are meant for inputting data manually.

Hood
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: astr on September 25, 2009, 09:48:26 AM
Greg: 

Thank you for your response.  I will read through the thread that you suggested.  Last night I found and went through the Scripting Tutorial which helped a lot.

Hood:

Thank you for your response.  After going through the tutorial, what you said make more sense to me.  This weekend I'll just have to try a few things.  I now realize how powerful these scripting features are.  I just need to master them!

Andy
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: astr on October 13, 2009, 05:31:37 PM
Greg:

 Finally got everything working and am extremly pleased with the results.  Thanks very much for posting this project and guiding me to it.  I made a few changes to the script and posted it on CNCzone.  Now its on to implementing the laser crosshairs.

Again, thanks very much - Andy
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: iqchallengedd on November 19, 2009, 08:35:03 PM
I've read through this thread. It's obviously packed with info on how to make the edge finder and z probe. Two problems: it's very lengthy and a whole lot of it is gibberish to me. I was wondering if maybe I could boil it down to a third-grader's level with just a few steps and let you guys see if it makes sense. I have a fully functional CNC router with Gecko 201s, a Bob Campbell break out board, limit switches on the X and Y (none on the Z). I have parallel port. I want the zero systems badly. I don't need any help on how to make the plates. What I do need is the wiring and software know-how. As best I could tell from the thread I need to pick "probe" and "low" from the Mach program. I need two wires coming from the BOB. I need to download a screen program to create a screen with buttons and lights for operating the probe. Is that about it? I want to do it in the least difficult way and make it fancy later.

1. I understand I need the so-called Screen 4 package downloaded and installed. Yes/No
2. I understand I need to insert some script which I can copy from one of you guys. Yes/No
3. I understand I need wires coming from the BOB but I don't know which terminals Yes/No

Is this about it? Can you tell me which terminals on the BOB?

My sincere thanks, BB

www.ProjectCNC.wordpress.com
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: astr on November 20, 2009, 10:51:11 AM
I've read through this thread. It's obviously packed with info on how to make the edge finder and z probe. Two problems: it's very lengthy and a whole lot of it is gibberish to me. I was wondering if maybe I could boil it down to a third-grader's level with just a few steps and let you guys see if it makes sense. I have a fully functional CNC router with Gecko 201s, a Bob Campbell break out board, limit switches on the X and Y (none on the Z). I have parallel port. I want the zero systems badly. I don't need any help on how to make the plates. What I do need is the wiring and software know-how. As best I could tell from the thread I need to pick "probe" and "low" from the Mach program. I need two wires coming from the BOB. I need to download a screen program to create a screen with buttons and lights for operating the probe. Is that about it? I want to do it in the least difficult way and make it fancy later.

1. I understand I need the so-called Screen 4 package downloaded and installed. Yes/No
2. I understand I need to insert some script which I can copy from one of you guys. Yes/No
3. I understand I need wires coming from the BOB but I don't know which terminals Yes/No

Is this about it? Can you tell me which terminals on the BOB?

My sincere thanks, BB

www.ProjectCNC.wordpress.com

1. Yes - this package lets you modify the Mach3 screens to include the buttons and DRO's that will operate with the z-zero plate

2. Yes - This script is what runs when you click on the buttons that you have defined in  Screen4.  It is the program that moves the z-axis downward until contact is made with the plate, resets the z-dro to the value of the z-axis at the time of contact, and then retracts the z-axis.  There are several different scripts posted either here or CNCZone.

3. Yes - you will have to assign and connect an unused input on your BOB to the contact plate.  You will have to configure this input as a probe input in Mach3.  I'm unfamiliar with your specific BOB so I can't provide any guidance there.

I know you are looking for a "cook book" answer as how to make this all work for you.  That is how I started out also.  The problem is that your setup is different than mine, how you use your equipment is different than what I do with mine so there is no one "answer".

My experience was that after a somewhat frustrating and time consuming start, I finally figured out how to make this work for me.  On top of that, I now have learned enough that I can easily customize other aspects of Mach3 and make it work better for me.

Good Luck!

Andy
Title: Re: Set Z to zero automatically?Auto tool zero questions
Post by: iqchallengedd on November 20, 2009, 08:54:37 PM
I know you are looking for a "cook book" answer as how to make this all work for you.  That is how I started out also.  The problem is that your setup is different than mine, how you use your equipment is different than what I do with mine so there is no one "answer".

I realized how difficult it is to answer such a question. Everyone in the DIY CNC world has there own combination of "stuff". Maybe I can take the info you gave me and get a little more from someone else and eventually get it going. After all-- that's how I built the CNC in the first place. Thanks
If anyone reading this knows which terminals to use on the Campbell BOB please advise. Thanks to you too.