Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: bigbigjimbo on June 28, 2010, 12:58:22 PM

Title: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 28, 2010, 12:58:22 PM
I have my 4th Axis set up on the hardware side of things but I am not sure how to go about it in Mach3 software Is there somewhere that i can see a complete start to finish setup or can someone explain it step by step.
I have at the moment only messed around in setting it up on mach3 but i thought that once it was setup correctly I should see it as it should be on the display for the tool path meaning for example i see a tube form with the engraving on it.
Thanks Jimbo
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 28, 2010, 05:01:52 PM
Not much more to it than a linear axis.  :)

Steps per unit are in degrees.  Bit of maths will sort that out.

The axis must be designated A.  Neither B nor C will give you a visual representation of the toolpath.

Under "Toolpath" set "A-Rotations Enabled", and select which axis it rotates about.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 28, 2010, 10:52:37 PM
Greg is there somewhere that you enter the diameter so that it shows it proper on the display or is this sorted out by the length of the drawing
Jimbo
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 29, 2010, 01:00:52 AM
"Rotation Radius" DRO that is found on the settings page.

If Z axis zero is at the centre of rotation (to my mind, most often the correct place for it, others will disagree) then the visual toolpath will display correctly.

If Z axis zero is at some other height above centre,  this must be entered into the above DRO for the toolpath to display correctly.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 29, 2010, 01:49:12 AM
Greg
I undersatand what you are saying I will try it all out later and if i have a problem i will post again/
Thanks
Jimbo
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 29, 2010, 11:31:08 AM
Greg
tried it and i find the display creates circles of dots and where it should be cutting there is other dot shapes, I was expecting to see (in my case a alpha letter) form into a cylinder and show the tool moving around as it would do on the normal XYZ cutting display.
Jimbo
Title: Re: Mach 3 and 4th Axis
Post by: rcsimpson on June 29, 2010, 04:07:08 PM
I am using the 2Linc engraving software (full version) to engrave round tubing.   I seem to have a problem of my code bombing out and not sure why.   I can disable the X,Y,Z axis and the code runs to completion.  It seems that if I enable X and A it will bomb out and stop.

Can anybody help?
csimpson@rcsguns.com
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 29, 2010, 06:35:15 PM
Jimbo a picture is worth a thousand words.  :)

And perhaps post the code too and I will take a look.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 30, 2010, 01:17:33 AM
Gerolt
here is the code and display pic
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 30, 2010, 02:16:05 AM
Jim

There are no A axis calls in that gcode.  Only X,Y and Z.

It also has G2 and G3 calls which are not applicable to a rotary axis.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 30, 2010, 02:36:30 AM
OK
How is this done then and how is the code created. Must i use a special program or do it manually.
I have not seen anything on this before in a post but then again I have never tried it and never really looked.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 30, 2010, 02:53:53 AM
Gerolt
So regarding the G2 & G3. These were created using a V-carve program so i would have thought that if it worked on the flat it would work on the curve. I am not questioning your comment just curious as to why that wont work?
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 30, 2010, 05:17:29 AM
How is this done then and how is the code created. Must i use a special program or do it manually.

There are all sorts of CAM programs that will produce 4th axis code.  Most of them cost a lot of money. Mastercam, VisuallMill, Surfcam, to name a few.

The poor man's way is to take a XYZ toolpath and "WRAP" it around the rotary axis.

This can be done in more ways than you can skin a cat.

One of the easiest ways is to use a program called CNCWrapper,

http://www.cncwrapper.com/

I can attest that this cheap little program works extremely well.

However you mentioned that you have a V-carve program.  If that was "Vcarve Pro"  from Vectric, then this program has a wrapping post processor included.

G2 and G3 commands do not operate on a rotary axis.  They are not supposed to. There are ways to cheat and get around this but they are hacks.

Nobody has ever been able to describe to me where it would be an advantage to do so.

Greg


EDIT: 
I forgot to mention that DeskProto is a very capable 4th axis CAM program that is offering special pricing to hobby users.   249 Euros

I am very tempted to buy this myself.  :D
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 30, 2010, 07:52:05 AM
Greolt
Thanks I will have a play about with cncwrapper and let you know how I get on. What can i do with the G2&3? I am playing about with Artcam at the moment as it does V-Carve but i cant see anywhere init that does an A-axis i will look at the manual just incase.
Deskproto looks good and not too expensive like some might invest in that sometime soon if i think it will do all i want.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 30, 2010, 05:08:54 PM
Greolt
Thanks I will have a play about with cncwrapper and let you know how I get on. What can i do with the G2&3? I am playing about with Artcam at the moment as it does V-Carve but i cant see anywhere init that does an A-axis i will look at the manual just incase.
Deskproto looks good and not too expensive like some might invest in that sometime soon if i think it will do all i want.
Jim

I know nothing of artcam, but with Vectric you can use a "non arc" post processor.  I would imagine artcam is the same.
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on June 30, 2010, 10:35:35 PM
Greolt,
This is really showing my ignorance :D. what would be an example of an non arc postprocessor. I presume this is selected as i would when i go to post process the job.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on June 30, 2010, 10:57:08 PM
As I said I have no experience with artcam.

However when saving the toolpath there should be an opportunity to select the post processor.

Look for a Mach one that does not have the word arc in the description.

I would do a very simple cut file consisting of a circle.  Then save the toolpath and look at it in notepad.

It will be obvious if it contains arcs or segments.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 01, 2010, 01:01:30 AM
Greolt
Yes you are correct i have a choice i will see what Mach processors done have Arc if any and try that. Bought CNCwrapper last night need to look at it with a code created as you describe.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: BR549 on July 01, 2010, 12:56:46 PM
WHAT IF you were to do a swapaxis(A,Y) then A thinks it is Y.

AND do an axis correction formula on Y based on the Radius in the Radius correction DRO to convert the Y linear Moves into an ANGULAR move.


Would this be a  4th axis  wrapper function that would be usefull ??
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 01, 2010, 03:06:02 PM
Greolt,
Here is the code and the screen capture all is working ok i think. The only problem is that the M is curving the wrong way around the circumference i have tried playing with the Axis but cant get it the right way.
Any suggestions.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 01, 2010, 06:39:09 PM
WHAT IF you were to do a swapaxis(A,Y) then A thinks it is Y.

AND do an axis correction formula on Y based on the Radius in the Radius correction DRO to convert the Y linear Moves into an ANGULAR move.

Would this be a  4th axis  wrapper function that would be usefull ??

As I said there are many ways to do it.  It would be possible.  I would not call it useful.

If you send Y axis pulse signals to the A axis, then A now has Y motor tuning settings.  My A axis would stall at the first rapid move.

And one of Mach's most useful rotary axis features would not work.  Rotary axis feedrate compensation.

If you want  to look for ways to do this then start by opening the gcode in notebook and "find and replace" all instances of "Y" with "A"

Of course you must also deal with scaling and direction issues.   

I just find CNCWrapper to be worth the $20.  Same reason I use an electronic calculator.  Sure I can do all my math on paper but I just find it easier to use a tool.


Jim

You have probably made what is the most common error when setting up your rotary axis.  Wrong direction of rotation.

Set it according to the "Right Hand Rule".  See pics below.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: BR549 on July 01, 2010, 07:49:14 PM
Just thought I would ask, I have seen it run that way and it looked simple enough. It ran just like you were working with xyz.
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 01, 2010, 09:10:00 PM
Just thought I would ask, I have seen it run that way and it looked simple enough. It ran just like you were working with xyz.

There are three things to do with a XYZ toolpath to effectively "Wrap" it around a rotary axis.

First is to change the relevant axis designations,

One way is as you have described, swap axis signal output.  As I said above there are other considerations when doing this.  They can be taken care of also, if you want to do a bit more fiddling.

Another way is you can use a text editor to swap axis names.  Also as described above.

There will be many other ways I can not think of right now.


Second thing is the output must be scaled to be correct on your given circumference.

This also can be done a myriad of ways.  

From scaling the original artwork before toolpath generation. to using Mach's scale axis feature, to going through the code with a calculator and scaling each position. (Yuck)

Adjust the axis steps per unit setting etc. etc. etc.  Choose your poison.  ;D


Thirdly the direction of output must be taken into account.

Many will simply set the rotary axis to run in the "other than conventional" direction.  Nothing wrong with that, you are the operator and can run it any way you wish.

I prefer to stay with convention, but that is just me.  :)

As I said above, I find a tool like CNCWrapper to be a great little utility.  A couple of clicks and all is taken care of.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: rgoldner on July 02, 2010, 12:05:04 AM
Just thought I would ask, I have seen it run that way and it looked simple enough. It ran just like you were working with xyz.

There are three things to do with a XYZ toolpath to effectively "Wrap" it around a rotary axis.

First is to change the relevant axis designations,

One way is as you have described, swap axis signal output.  As I said above there are other considerations when doing this.  They can be taken care of also, if you want to do a bit more fiddling.

Another way is you can use a text editor to swap axis names.  Also as described above.

There will be many other ways I can not think of right now.


Second thing is the output must be scaled to be correct on your given circumference.

This also can be done a myriad of ways. 

From scaling the original artwork before toolpath generation. to using Mach's scale axis feature, to going through the code with a calculator and scaling each position. (Yuck)

Adjust the axis steps per unit setting etc. etc. etc.  Choose your poison.  ;D


Thirdly the direction of output must be taken into account.

Many will simply set the rotary axis to run in the "other than conventional" direction.  Nothing wrong with that, you are the operator and can run it any way you wish.

I prefer to stay with convention, but that is just me.  :)

As I said above, I find a tool like CNCWrapper to be a great little utility.  A couple of clicks and all is taken care of.

Greg


Another program you may want to look at is the Indexer Wizards. This will take all of the above into account including calculating the correct feed rates. It also does much, much more then just wrapping. You may download a fully functional demo from my website:

http://wizardsbyrich.yolasite.com/

The program will run full featured for seven days. After that if you like it you will have to buy a license ($100).

In full disclosure, if you haven't already figured it out, I am the author of the Indexer Wizards.
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 12:22:38 AM
Greg
I had thought that the CNCwrapper would have taken care of the orientation of the (Letter in my case) and how it is positioned on the wraparound on the cylinder.
I know it is a simple solution but these are often the hardest to find, Just one thing that might be the cause when in Mach in the setup "the green light being on means the axis is imobilised. correct?"
I thought i had tried all combinations but obviously not.
in CNC wrapper i have also used the X axis with A axis and the Y axis with A and set them the same in Mach3.
I suppose i need to keep playing  :)
I thought it would be so easy but nothing worthwhile ever is.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 12:26:13 AM
Rich
I will download your program today and see if i can get any joy from that one. I love these programs that dont cost the earth and give you a decent play time before buying. So here's hoping but i dont see why CNC wrapper cant do it or should i say I dont see how I cant get it to work.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 12:28:16 AM
Greg I should have said I will look at the RH rule solution also. it's got to be simple
jim
Title: Re: Mach 3 and 4th Axis
Post by: rgoldner on July 02, 2010, 12:33:24 AM
Rich
I will download your program today and see if i can get any joy from that one. I love these programs that dont cost the earth and give you a decent play time before buying. So here's hoping but i dont see why CNC wrapper cant do it or should i say I dont see how I cant get it to work.
Jim

Don't misunderstand me. CNC Wrapper is a good program and worth what it costs. I think my way of wrapping is a little more complete. However, the real power of the Indexer Wzards is how much more it can do besides wrapping and how easy it is to make changes. Try it. I'm sure you will like it.
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 02, 2010, 01:23:27 AM
I had thought that the CNCwrapper would have taken care of the orientation of the (Letter in my case) and how it is positioned on the wraparound on the cylinder.

Here is am example.  Simple lettering wrapped with CNCWrapper.

Orientation correct, positioned how I intended, no problems.  All in few seconds.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 01:27:45 AM
There is something i am geting wrong and i cant see it
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 01:29:31 AM
Tried the program by Ritch and i keep getting a corrupt file on code i know is working so something wrong there also
Jim
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 01:37:51 AM
Greg
Send me your Gcode for that to see if i can get the same result. I know yours works so maybe it can solve my problem, Have you tried mine?

Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 02, 2010, 01:38:25 AM
Jim

Post the gcode that you are wanting to wrap and I will take a look.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 02, 2010, 01:47:56 AM
OK I had a look at your code.  I can see nothing wrong with it.

However you chose the worst letter to use as a test.  Capital M looks the same backwards.  Even upside down it looks like a W.

Try doing something more meaningful than the letter M.  Like the word "Text" for example.  :)

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 02:36:35 AM
Greg
Thats correct what you say about the M but my point is that the curve is clearly showing to curve along the length of the letter not accross it
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 02, 2010, 02:40:00 AM
That just means that you did not arrange it correctly when producing the original code in your CAM program.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 02:56:26 AM
Greg
I have used the cam as it should be reason i know this is if i show a displayed cut using XYZ then it displayes correct It is only when it is wrapped this occurs.
My thoughts is that there is something not set correct in Mach3 but i dont have a clue what it is.
Unless what you mean by "arrange" is something i am picking up wrongly.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 03:16:47 AM
Greg
Here are two attachments showing the same word, the word is showing along the length as left to right same as would do in an XYZ cut
but you can see it is still curving the wrong way so why is this where is the mistake in the setup and if you say it is the setup in CAM and you can get it curving the correct way then it must be in Mach the problem lies but i just dont know where?
Jim
Title: Re: Mach 3 and 4th Axis
Post by: rgoldner on July 02, 2010, 09:16:55 AM
Tried the program by Ritch and i keep getting a corrupt file on code i know is working so something wrong there also
Jim

Jim, please send me the file that is corrupt. I will examine it and see if I can figure out what is wrong. Please send it to my email (rgoldner AT iname DOTcom)  rather than the group.
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 10:15:14 AM
Rich
It says that for all the Code files i try but i will send you it within the hour
jim
Title: Re: Mach 3 and 4th Axis
Post by: rgoldner on July 02, 2010, 10:35:55 AM
Rich
It says that for all the Code files i try but i will send you it within the hour
jim

Jim, I think you may be misunderstanding how the Indexer Wizards work. The Indexer Wizards allows you to specify what you want to do and then it creates the gcode file to run in Mach3. The only time you would load a gcode file into the Indexer Wizards is to make changes to gcode that was generated by the Indexer Wizards.

If you haven't already done so, please read the manual (available by clicking Help from the main menu). If you would like I can call you and we can discuss this. I can even connect to your machine and show you how to use the Indexer Wizards. Send me a private email if you would like to proceed with either of these options.
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 10:52:40 AM
Rich
I see what you mean now and i was wondering about the manual as the one that downloaded with it was just for installing the program let me have another look.
Where are you country i mean
Jim
Title: Re: Mach 3 and 4th Axis
Post by: rgoldner on July 02, 2010, 11:00:00 AM
Rich
I see what you mean now and i was wondering about the manual as the one that downloaded with it was just for installing the program let me have another look.
Where are you country i mean
Jim

I'm in North Carolina in the US.
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 11:05:53 AM
Ok i have now tried it and i see how you wrap a g-code aropund something but i am still haveing the same problem where it is wrapping around the cylinder in the wrong way i will send you the code to your email from the pictures in here you will see what i mean about wrapping the wrong way. I want it to wrap so the width of the letter is wrapping around the cylinder.
It is obviously something that is set up wrong in Mach but i cant see what
Jim
Title: Re: Mach 3 and 4th Axis
Post by: alenz on July 02, 2010, 07:09:28 PM
Jim, are you sure you have your work oriented properly? The A-axis of the cylinder is parallel with the machine X-axis. So if you look at the X Y Z drawing, it will wrap along the Y-axis. If you want your text to wrap lengthwise around the cylinder then it must be drawn with the text height as X and the text length as Y. (Rotated 90 deg from normal)
Al
Title: Re: Mach 3 and 4th Axis
Post by: bigbigjimbo on July 02, 2010, 10:35:47 PM
Hi Guys
After much playing around and finding out how to reorientate vectors I have finally sorted it out, You are all correct as I thought you were i just couldnt suss it out in my head I knew it was something simple. So I have to look at the drawing in the cam program as if it was the job and orientate (which now i know how to do ) the text etc. so that it is the way I want it to appear on the item.
I tried it late last night and finally got it working.
thanks for the tips lads and the patience Greolt you have all been great.
Now to master Rich,s Indexer Wizzard going to start reading the manual on that it looks really good and easy.
Jim
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on July 03, 2010, 03:34:41 AM
Jim

I have been away from the computer for a day or so.  Glad to see you are starting to get a handle on the "Wrapping" idea.

CNCWrapper has a pretty good help file.

Here is a screen grab of the Design Size Calculator which may be helpful to grasp wrapping layout and direction.

Greg
Title: Re: Mach 3 and 4th Axis
Post by: mtaylor18 on April 03, 2012, 10:19:48 PM
How do I get mach3 to rotate A axis in degrees. When I set my rotary table at 0 and MDI in A180 for a test, the table rotates 6 full revotutions and then stops at about 80° more. It looks like it is moving in a linier 180". Don't know. What do I have to configure to make it rotate in degrees when programming A axis?
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on April 03, 2012, 11:52:29 PM
You need to calibrate the steps per unit for the A axis.   This should be the number of steps that Mach must output for one degree of axis travel.

There is no black magic about it.  When gcode calls a movement for the A axis of ten units, then Mach puts out the steps needed to move ten units.  Whatever you have set in "steps per unit"

Check "A-axis is Angular" in  General Config.   Despite popular opinion, this does only one thing.  When changing from G20 to G21 or vice versa, the axis output will remain unchanged.  That's all it does.

Under "Toolpath Config" you can check "Use Radius for Feedrate" if you wish to use the rotary axis feedrate compensation.  I find it works well.

Check "A-Rotations Enabled" if you want the toolpath display to show the rotary toolpath.  That is all this setting effects.  Only toolpath display.  And set which axis the rotary is aligned with, to make the toolpath display correctly.

Greolt
Title: Re: Mach 3 and 4th Axis
Post by: mtaylor18 on April 04, 2012, 01:43:30 AM
Thanks, but Greolt correct me if I am wrong. I have nema 57 stepper (small motor) It is 1.8° and I used the following formular to tabulate the steps in the X Y and Z axis  1.8 deg/step; 200 step/rev; 16 Pulse/step; 3200 Pulse/rev; 1 Multiplier; 5.08 threads/in;
1 thread start; .19685 in/rev; Calculation = 16256 Steps/inch.  This worked perfect when making test cuts. Now I am stumped on what to use for steps/rev I have a timing belt from the stepper gear to the chuck drive with a 72 ratio. How does this all equate in?
I played around with numbers of 40 - 55 steps and the chuck moved very close when I MDI G0 A180 but I could not get it to move exact with any of these inputs. Am I missing the formula by a few points? What is the exact number to be used. Thanks for your help.

Martyondrums
Title: Re: Mach 3 and 4th Axis
Post by: Greolt on April 04, 2012, 05:34:01 AM
  1.8 deg/step; 200 step/rev; 16 Pulse/step; 3200 Pulse/rev; 1 Multiplier; 5.08 threads/in;  1 thread start; .19685 in/rev; Calculation = 16256 Steps/inch. 
............ I have a timing belt from the stepper gear to the chuck drive with a 72 ratio.

I am sorry.  What you have said makes no sense to me.  You talk about threads per inch, and then a belt drive with a ratio of 72.

Any way it matters little.
 
Quote
I played around with numbers of 40 - 55 steps and the chuck moved very close when I MDI G0 A180

Around 40 to 55 was close.  Just adjust this until you get it right.

Greolt
Title: Re: Mach 3 and 4th Axis
Post by: mtaylor18 on April 04, 2012, 09:44:09 AM
Greolt,

I am sorry if I confused you. The threads per inch were part of the calculations for the linear motion.

Now as for the rotary axis. I have a little 3 jaw chuck. that is driven by a pulley on the back side. The pulley is driven by the stepper motor that has a smaller pulley attached to its' shaft. They are connected by a timing belt. The large pulley has a 72 stamped on it, so I am assuming it is a 72:1 ratio. The stepper motor has to turn more revolutions to make the chuck turn 1 revolution. This is where I am having the issue determining what the step number is. I hope this makes this more clear for you.
I guess, like you say, I will have to play around with the numbers and measure the angle of rotation until I come up with what the stepper needs to turn. Thanks for all your help.

Martyondrums