PDA

View Full Version : X, Y, and Z zeroing routine



k4mg
03-09-2009, 04:41 PM
I recently bought my ShopBot, and found it came with routines for zeroing to the surface of my material, and finding the corner of my table. I do many smaller projects and quickly found that I didn't like using offsets to locate projects that I wanted to place out on my table, vs. in the corner, so I wrote a new routine. It is a modification of the C3 routine to use the same input switch that C2 uses, plus combines the Zzero from C2 into the code. You use it as follows:

* Locate your project wherever you wish on the table
* Use a jig and hook it onto a corner of your work
* Run the new routine, and enter Y in the first prompt, which lets you move your spindle around
* Move your spindle over the jig, and lower the tool slightly into the cap. It does not need to be centered in the cap
* Hit escape, and the routine finds the center of the cap, then finds the bottom of the cap, and updates your zeros.

I have documented the instructions on how to use the routine, and made the code and the PartWorks carve file for the jig available on my website, located here:
My XYZ code and jig (http://www.k4mg.com/Hobbies/CNC/xyz.htm)

I didn't put all the information here because I think the high-res pictures help to tell the story.

Any improvements on the code or the jig would be welcome.

Barry

dubliner
03-10-2009, 10:00 AM
Great stuff Barry, thanks for posting.

joecnc2006
03-10-2009, 10:52 AM
Heres mine i did a while back.

http://www.youtube.com/watch?v=JcHgKazSjyA

I used acrylic.

wberminio
03-10-2009, 01:33 PM
Good,helpful information

Thanks

Erminio

k4mg
03-11-2009, 06:49 AM
Hi Joe,

Didn't you notice where I gave you and Ernie all the credit for the jig design? On the linked Romaxx page, where I first used this jig and Ernie's code on my Romaxx router. My only modification to your design was the cap vs. the tube, to incorporate Z zeroing. The BASIC used on Mach3 is a more advanced version than the version on the ShopBot control software, so I wrote the ShopBot routine. It automatically zero's X and Y, then measures and zero's Z, all in one step. It was easy modifying the C2 and C3 code plus looking at many other examples generously provided by ShopBot.

I think I am going to modify my jig and go with a thru hole and inset the cap, instead of gluing it. I have had the cap fall off several times, and the excess glue it takes to hold it on is unsightly. I may not be using the proper hot glue.

I hadn't seen the video, I saw your design on cnczone, that Earnie posted as a picture. I drew up my own, using a 3/4 inch cap. I hope people will watch your video, since it shows the essence of how to use the jig. I probably should make one too.

I guess you can tell by my ShopBot purchase that I never did build your Hybrid. I sure do like the plans and the forum though.

Barry

joecnc2006
03-11-2009, 09:38 AM
No problem, Yes I would love to see a video, it help people visualize and also like you said acts like an instructable, A picture is worth a thousand words but a Video is priceless, a member on the forum said that one time and i liked it.

k4mg
03-12-2009, 01:14 PM
Based on my experiences with the hot glued cap coming off, I re-designed my jig to have a tight fitting hole to insert the cap into. I updated my website with revised pictures, and revised PartWorks files for both a 1/2 and 3/4 inch version. I also made the worlds shakiest 2 minute video of the routine running available here:
http://www.youtube.com/watch?v=iznNP9MzzgY
(http://www.youtube.com/watch?v=ft52fnWb0Ek)

I gave one of the new jigs to my friend Chuck, and he felt it could be yet again improved. I posted a picture of his re-design on the site also. You can see it here:
http://cnc.k4mg.com (http://www.k4mg.com/Hobbies/CNC/xyz.htm)

Barry

jdervin
03-29-2009, 01:42 AM
How do you keep the jig from shifting when the tool makes contact with the cap while traveling in the negative directions? Do you just hold it in place by hand or is there some way of clamping it?

k4mg
03-29-2009, 07:57 AM
Hi John,

I hold it, but I did a lot of testing and didn't find that it shifted. Possibly your bit is a little gummed up and isn't making good contact? I do have trouble with V-bits, and find it best to only put the very tip down into the jig.

I also always align the flutes (on a two flute bit) to increase the repeatability of the zeroing. I align along the Y axis, but it doesn't matter.

Barry

creative_cabinetry
09-06-2009, 04:09 PM
Just wanted to thank you for sharing this info. I invested a lot of money for cabinet software, which gives tool paths for the flip side of partitions etc. I was pulling my hair out trying to figure where to put the part. I was using the prox. switches for my reference and for some reason, it wasn't accurate enough. I remembered your post on the forum, so long story short, I made one in no time and it worked better than I could have hoped for! Have you ever included the air drill in the code? I know what the offset is so I'm wondering if it wouldn't be too difficult to add it to the path? Anyway you've saved me time and money. I contemplated spending a lot of money for a similar solution, which I really couldn't afford. Given the state of the economy I can use all the help I can get. Many Thanks again.

k4mg
09-07-2009, 07:10 AM
Hi Barry,

Thanks for the kind words.

I don’t have an air-drill, so I am just guessing about what you need. Let’s say you have found a corner of your work using your spindle with the routine I wrote. What do you want the routine to do for the drill? Since you know the air drill off-sets, which I assume don't change, it seems that is all you need to know.

Of course, you can zero your work using the drill instead of the spindle, just put the ground on the drill and do the zero using the drill. Be sure to test first by touching your z-zero plate to the drill bit.

If I don't have this right, please provide more information.

Barry

myxpykalix
09-07-2009, 09:14 AM
Barry,
I have seen posts for this but haven't followed the articles so i am somewhat ignorant of how it works, ect so let me ask a question or two.
One of the problems i have is jumping back and forth to the keyboard when trying to line up my X,Y on the table and i notice this jig is always set for the lower left corner.

I almost never use the lower left and always use the center of the material as my 0,0 because i usually have the material held down with something obscuring access to the corner. Is this jig only usable for the corners?

jerry_stanek
09-07-2009, 09:59 AM
Jack you know how big your work piece is so just zero to the corner and manually move the bit to the center and hit your zx zy.

Gary Campbell
09-07-2009, 10:52 AM
Barry B....
I have a numbere of routines that I am sure can accomplish what you are trying to do, but am not quite clear on your needs. Can you explain what you are trying to do in more depth?
Gary

creative_cabinetry
09-07-2009, 11:28 AM
Jack, this jig, I believe is primarily for the corner. Anyway that is my desire. I want to be able to flip parts and accurately machine the back to match the front. This jig has accomplished this much more accurately than the proximity switch. Why? I can't tell you , but this works well.
Gary, The routine would need to be run if you change material thickness, change router bit or drill bit. When using an air drill the z and the drill should be zeroed as well, but not necessarily every time. My hope was to first run your code, at the end, it would move the 4.772 and begin the drill zeroing sequence. Maybe I'm trying to accomplish more than I should.

Gary Campbell
09-07-2009, 12:09 PM
Barry...
I am assuming you mean the drill offset rather than zero. Here is a video of the routine that I used to use to set the XY zero and the offsets on 2 drills. It uses Morris' Super Zero fixture attached to a plexi plate that is held by vac into the corner of my Air Index, which is then retracted. There is also an adjustment for the difference in height for the tip of a brad point boring bit to the depth that it actually drills a hole. This can range from .040 to .080 depending on the bit. Sorry about the vac noise in the video. http://www.youtube.com/watch?v=b7M1mMhOvr0&feature=channel_page

Even tho I am sure my friends in Durham will disagree, these corner jigs have become a neccessity, especially to those of us that perform operations on both sides of a part. The number of posts concerning XY zeroing being inconsistant in the last few months bears this out.

I said used to use because I now use the prox at the top of the A & Z axes to store the daylight number of all drill and spindle bits. This way, if any is changed, SB3 can calculate offsets to the others. Actually the installed height of the bit in the spindle is the only thing that can change. The drills are always the same as long as I use the boring bits.

I have all of my boring bits "indexed" to the same length using the set screw on the shank of the bit. This allows simply placing them in the chuck full depth with no change of offset.

As soon as I add a second spindle, I am going to add an aluminum "touch block" for this purpose and then use the top of spoilboard or top of material as mathematical shift in any tools height.

I am working on the final stuff (with Ryan from SB) that allows me to write all these numbers to a file after they are recorded. This will allow "rezero" of all 4 tools by simply bumping the A & Z against the prox and doing the math. This even works well after software shutdown or loss of position during cutting.

I always try and find a way to complicate a file to, in the end, make my life easier. I would be the last one to think you are trying to accomplish too much.
Gary

creative_cabinetry
09-07-2009, 04:21 PM
Gary, that is a great video and a great set up! You set the bar really high! That, for the most part is what I was trying to accomplish. The jig I built x and y zero's then drops straight down and z zero's. My drill offset is x = 4.772., so my hope is, an x movement at the end of the xyz zero routine of x = 4.772 and then air drill zero routine begins, which it would be in position for. I agree these jigs are the only way I know of to machine an accurate flip side of a panel. I'm wondering if the proximity switches were ever intended for that kind of accuracy. Make no mistake the jig you have is awesome, but the one I made cost me less that $2 and very little time. I'm fairly new to the cnc realm and have learned of many a possibility from people like yourself and Barry R. I know people express their appreciation often on the forum, and I likewise appreciate you guys. I"ll include the link for the benefit of anyone wondering what jig I am using.
http://www.k4mg.com/Hobbies/CNC/xyz.htm
Thanks,
Barry

Gary Campbell
09-07-2009, 05:07 PM
Barry...
You can build a custom file that works like this:

SK (start keyboard & move bit over/into position)

FP, {XY zero in circle file}

FP, {ZZero file}

J2, {x_drill_offset, y_drill_offset)

FP, {drill offset file}

END

This is of course oversimplified, but not by much. If you need help with this, email me.

The prox, as I can find, serve 2 purposes. One is to electronically prevent the machine from contacting the hard stops. The second is to have a repeatable zero position. I think that the repeatability and therefore accuracy of the XY Zero routine had degraded over the last year or so. I know I had no need for an accessory zero for a long time. Now it is obvious that many have this same need. Many others may, but dont have the repeatability requirements of Flip Op cutting, especially with the SB Link.

Since I am sure that the good folks in Durham will dissagree with my above statement, I will add that I feel that they have created these inaccuracies within the code of SB3, possibly trying to solve another problem. I will also add, in order to make it a trifecta of internally disagreed with statements for the folks at SB, that they may be trying to fix hardware problems with software.

That is, and most likely always will be, the difference between those that are theorists and those that know that things just dont seem right. The theorist must always assume user error, as all that they have done, in theory, is correct. This may be true, everything that they have completed is correct. However, it does not mean that they have completed everything. Thats the human factor.
Gary

joecnc2006
09-07-2009, 05:50 PM
I do like the All Aluminum one, I can remake mine in a 3/4" Alum. and make the top hole all through, then add a flat bottom 1/8" thick plate to have a z-zero at the same time.

Joe

khaos
09-08-2009, 10:25 AM
Hey I like it. How do you insure a square hold down?

Gary Campbell
09-08-2009, 04:44 PM
joecnc...
It is not neccessary to add an 1/8 plate to the bottom, unless you want to. You do need to enter the proper thickness for whatever material you use.

Joe J...
If you are asking about my corner jig, the aluminum block is screwed to a plexi plate, which in the video is held by vacuum. I have tried just setting loose, but have not had the best luck with that method.
Gary

gundog
01-05-2010, 06:23 PM
I like using a laser edge finder a couple minutes and I am zeroed anywhere on the table. I use the factory supplied jig to set the z. I cut plastic most of the time and the material is not very square so using a small jig in a corner tends to not lay the material out very good for me. I can adjust the move commands to move slowly then in SK mode with the laser edge finder chucked into the spindle locate the edge and zero that axis I can make the edge finder travel up and down the material to get the best alignment for the material (that is not square)

I also use the laser edge finder to find zero when machining both sides of one sheet. For machining 2 sides I pick a couple spots in the waste material and drill a 1/8” hole. The holes you drill will be in the same position relative to the other parts. I save the file in a mirrored copy and record the position of those holes when the sheet is flipped. I screw in a small screw so you have an x in the middle of the hole with the laser edge finder in the spindle send the machine to the coordinates of that hole move the material to match do this for 2 or 3 holes you now have the machine setup to machine the other side.
The edge finder finds duty on other machines in my shop like my mill for tramming in the vise or finding marked holes on material in the mill or drill press. I use it for my lathe for setting the tail stock.

Mike

sagreen83
01-16-2010, 01:59 AM
Thought I would post a video of my XYZ zero jig in action. I made the base on my Bridgeport and the center tube was made on my metal lathe.

http://www.youtube.com/watch?v=tXSaSZ3ZchY

Thanks to everyone for their work in making these things happen!

Scott...

Ted D
08-27-2010, 10:07 PM
Very cool. I came to this forum to ask about making a zero plate (I just bought an older machine and it doesn't have one) but obviously this is even better. The only thing I'm not completely clear on is the wiring. I'm assuming the wire from the copper cup goes to the zero plate input connection in the control box, but what are the other wires I see in the pictures doing? TIA

Ted D
08-28-2010, 03:27 PM
Never mind. I learned that with a router you sometimes have to ground the bit directly because you don't get a good connection through the brushes. Simple enough.

j_richardson
05-17-2011, 05:16 PM
Dusting off this thread while I try to get some clarity on the topic of x, y zeroing.
Let's say I make a prototype part on the bot, and then shut down the machine. A few days later, we want to modify the prototype (maybe cut a little more material off), so if I have pinned the part, I can relocate it in the same spot on the table from the first time, but since the machine was shut down, the x and y will be off a little on restart (the z I can re-zero with the z plate routine). What is the preferred method to set up the x and y again? Use the limit stops? I think I saw that there is a routine to do that (?). Or is it better/easier to use one of the machined jigs like Scott Green's that could either be permanently mounted in the corner or pinned so that it can be remounted when needed?

After locating the xy I would have to offset to where the part is located (if for instance it was at xy 10,10 on the table) and rezero at that point to do the new machining.

curtiss
05-17-2011, 07:34 PM
Is your C3 command working ? (type C3)

It should z the x/y axis in relation to the prox switches.

With that said, I do not think the xy can move much over a few days unless you bump it.

j_richardson
06-09-2011, 05:20 PM
I tried the C3 command and the carriage passed the limit switches and crashed against the end stops. I think the switches work, because if I jog the carriage, it will stop at the limits, and the light on the switch goes out. Is there such a thing as a bug in the C3 program?

beacon14
06-09-2011, 06:11 PM
No the C3 program is well-tested but it is looking for your prox switches to be on certain input switches and either normally open or normally closed.

Open up the SBParts/xyzero.sbp file and look for the block of code that looks like this:


Check_PRT:
&TrgtHIT = 1
&Xtrgt = 3
&Ytrgt = 3
IF %(53) = 1 THEN GOTO Getoffprox
GOTO Start_Zeroing
Check_PRS:
&TrgtHIT = 0
&Xtrgt = 2
&Ytrgt = 3check the first or second paragraph depending on whether you have a PRT or PRS. The &xtrgt and &ytrgt should be equal to the input switch number for each axis. If those are correct then the switch type might be reversed from what is expected.

backyard_cnc
06-30-2011, 01:36 PM
Hi All,
At the start of this thread the originator Barry posted links to his XYZ zero jig and shopbot routine. I have made a jig from a milled block of aluminium but would like to modify the routine so that the Z zero is set at another spot on the jig (1.5,1.5) other than at the 0,0 or center of the cup. I wonder can anybody either share a routine that can do this or tell me what to look for in modifying the routine that Barry has posted.

Appreciate all comments. I am a newcomer to SHOPBOT so have much to learn!

Gerald
2004 PRT96

dana_swift
06-30-2011, 06:13 PM
Gerald, there should be a "center in hole" routine located in the SBParts folder. It works great at centering in a cup, I use it for my highest precision centering on a fixture. On my bot, I get a 0.001 repeatability on that center point. Usually 0.000.

Additionally after a long cut, if your cup is still on your fixture you can check the center in hole again and find out how accurate you were able to relocate the same point after a lot of jostling. Its a good way to test shopbots claimed position repeatability of 0.002".

I have found the cheapest way of making this test is to embed a copper sweat fitting end cap into a fixture. They are cheap and I can leave them in the fixture if desired. I use both 1/2" and 3/4" sweat fittings depending on the bit size I am using. Also there is a 3/4" sweat fitting pocket in four locations on my spoilboard so I can check for changes in X/Y squaring actual move distances, etc after months of operation.

To hook the sweat fittings up to the ZZero plate I just hooked up two car-battery-size alligator clips from the local auto-parts store with a wire. If you like I can post some photos.

D

backyard_cnc
06-30-2011, 09:32 PM
Dana,

Thanks for taking the time to reply and offer your comments. I will check and see if I do in fact have a file by that name in the shopbot parts folder.

I have actually milled a corner jig out of 1/2" aluminium (a benefit of owning a large CNC mill) but the ZEROing hole goes all the way thru as I intend on making a lexan insert with cross hairs to allow centering over any point not just corners. Because of this I want a routine that first finds the center of the hole and then offsets to a new point to zero the Z. Even better yet might be a routine that does all this by default but prompts along the way so that it could be used to zero any or all axis. Does this make sense? I am guessing at some point I will have to spend the time to learn more about righting these sorts of files for the SHOPBOT but just no time right now so I was hoping a simple mod to existing code would at least allow me to just offset the Z by the needed amount!

Cheerio
Gerald

dana_swift
06-30-2011, 09:52 PM
Gerald, dont be afraid of the code in an SBP file. Its not complicated. Look at regular cut files, then look at something like the ZZero routine.

With a little thinking about it, you should see what is happening and get ideas how to make modifications to do exactly what you want for the X, Y, zero using your plate.

Good luck with your project!

D

srwtlc
07-01-2011, 02:00 PM
Here's the fixture I've been using and the file used with it. I don't use it for zeroing the Z axis as it's just easier to use the supplied Z zero plate when needed, but it could be used to do so if desired. It can be flipped for inside/outside corner usage. No crosshair setup as I don't need that function and it would only be as accurate as my eyes anyway. ;)

The file relies on the user positioning the probe/tool over the hole and then at the start of the file, it moves to a position above the plate and sets the plate height/thickness then moves over the hole and down to within 0.125" of the bottom of the hole to start the routine. This file is also somewhat based off the one supplied in the SBParts folder. Mathematically it could possibly be a little better, but it works.

JDGJr
03-25-2013, 11:26 PM
Can you describe the plug that you're using in the 5/32" holes, possibly where to buy one?

thanks

srwtlc
03-26-2013, 12:16 AM
I got some overstock ones from here...

http://desco.descoindustries.com/DescoCatalog/Overstocks/OverstockCoilCords/

One with a 4mm banana plug should work.

JDGJr
03-26-2013, 11:25 PM
Thank you Scott. I got a pair of measurement leads today, and they work fine, and include an alligator clip on one end.

Modified your script to set zero and I'm ready to start working on both sides of my parts!