View Full Version : 4th axis


balsaman
10-02-2003, 07:59 PM
How does Mastercam handle a 4th axis? Is there somewhere I need to set it up?

Can I wrap a 2D drawing around a cylinder for engraving with a 4th axis?

Eric

cadcam
10-02-2003, 11:47 PM
Balsaman,

How does Mastercam handle a 4th axis? There are sevral ways.
It really matters what you want to do or make.
Do you want to use Axis substution or true 4axis ?

Do you want to use exsiting 3d model or Surfaces or solids?

Can I wrap a 2D drawing around a cylinder for engraving with a 4th axis? I do this all the time.

Draw it in 2d program it on the first Parameter page, use Rotary Axis tell it the axis to Sub and if it is 2d to Roll it and the and the major Dia.

Just a few thoughts.

balsaman
10-03-2003, 06:49 AM
Originally posted by cadcam
Balsaman,

There are sevral ways.
It really matters what you want to do or make.
Do you want to use Axis substution or true 4axis ?

Do you want to use exsiting 3d model or Surfaces or solids?

I do this all the time.

Draw it in 2d program it on the first Parameter page, use Rotary Axis tell it the axis to Sub and if it is 2d to Roll it and the and the major Dia.

Just a few thoughts.

It will be a true 4th axis. "W" I guess.

I will try you suggestion for the rolling thing. Thanks!

Eric

cadcam
10-03-2003, 08:55 AM
Are you saying you will be engraving a "W"?
If so the way I stated will be perfect.

If you want me to make up one and mail you a file let me know.

Just let me know what version.

Rekd
10-03-2003, 09:23 AM
"W" as in W axis. Are you on a lathe?

'Rekd

cadcam
10-03-2003, 11:23 AM
Good call did'nt think about that.
How are you doing Matt?

Rekd
10-03-2003, 11:32 AM
I'm doing better now. Things are almost back to normal. Normal? heh, yeah, normal.

Thanks for asking. :D

'Rekd

balsaman
10-03-2003, 11:56 AM
W axis.

I was looking at it this morning. I think I can figure it out. I will sit down and try and do a file when I have some time.

I am not on a lathe. I am working on a 4th axis for my router.

Thanks for your help.

Eric

balsaman
10-03-2003, 03:20 PM
Hi,

I got it to wrap a tool path around a 2" cylinder. Very cool. One more question...Does it automatically change the Y coordinates to degrees? Y is the axis I substituted for the rotary axis. Do I need to change the Post Proccessor for this? I had to "enable 4th axis button" in line 164 or so to enable 4th axis.

Looking at the gcode, it doesn't look just right. It looks just like the inch coordinates.

Eric

hardmill
10-03-2003, 03:26 PM
E-mail it to me eric. What post are you using?

PEACE:D

CAMmando
10-03-2003, 03:41 PM
Depending on the post ...

It will probably be output as A axis in degrees.

Is this that TurboCNC post ????

Try the fanuc post and see what the output looks like. Your post may need some re-writitng.

balsaman
10-03-2003, 03:54 PM
Hi, yes, thanks, I tried the MPfan post and it looks better and now I get an A axis with degrees :). I *think* I can modify this post a little to get it to work. If not, I will let you guys know.

Yes, it's turbocnc, and I was trying to use the turbocnc post. That didn't work.

I post a question here, then get back to working at it, kinda figure it out, and then you guys all confirm what I figured out...lol...

This place is the best.

Eric

CAMmando
10-03-2003, 04:43 PM
Eric,

From what I remember of that post you emailed me before it seemed a bit hacked. Probably fine for basic 2 axis stuff. In the long run it would be best to start with a similar format machine post that is rock solid such as the MPFAN or MPMASTER and tweak it to work with your control software.

So do I presume you are putting a 4th axis on the new router ???;)

balsaman
10-03-2003, 08:07 PM
I am working on getting that mpfan post working right.

Yes, I am currently building the 4th axis.

Here is the motor/gearbox. I have a 3" 4 jaw chuck I am adapting and my buddy is making me a tail stock.

Eric

balsaman
10-03-2003, 10:13 PM
Ok I got the MPfan post working pretty much the way I like it.

Have a look at this gcode sample tho:

N372 X-.215 A112.169 F372.62
N374 X.527 F20.


Notice the feed rates for the lines with an A axis. Big number. is that degrees per minute? how will that big feedrate number affect the x axis move?

Eric

cadcam
10-03-2003, 10:26 PM
the big numbers are called in Inverse time not standard feed rates.

balsaman
10-03-2003, 10:30 PM
Ok,

sooo...it will work fine that way?

Eric

CAMmando
10-03-2003, 11:03 PM
Eric,

If the control supports it, a G93 usually commands inverse time Feed Mode G94 is called to return to IPM feed mode.


Here is an explaination from HAAS regarding inverse time feed rate.

Inverse-time feed is not as complicated as it sounds. Inverse-time-feed rates simply dictate the amount of time a particular stroke will take to complete. To calculate the time for a stroke, divide the inverse-time-feed rate into 60. For example, an inverse-time-feed rate of F1000 dictates that the commanded motion of that line will take 0.06 seconds. This method of feed-rate command allows for more precise control of the feed rate when combining rotary and linear axes. With the Haas control you have the option of running in either inverse-time-feed mode or feed-per-minute. The Haas control can convert linear-feed-per-minute rates to approximated angular-feed-rates based on the user-definable part diameter stored in the 4th- and/or 5th-axis diameter setting(s). This feature allows the user to program a combination of linear and rotary axis motions in feed-per-minute mode, but the rotary feed rate will only be exactly correct at the diameter set by the user. Therefore, inverse-time feed is preferred when mixing linear and rotary axes because it is not a linear-feed-rate command, but rather a time-based feed command.

CAM

balsaman
10-04-2003, 01:09 PM
From my post:

use_frinv : 0 #Use Inverse Time Feedrates in 4 Axis, (0 = no, 1 = no )

It's set for "no" (no other choice)

Perhaps this is why it's not putting in a G93 / G94 anywhere. Still, I am not sure how this will work. Turbocnc doesn't support G93.

Eric

hardmill
10-04-2003, 02:45 PM
The mpfan and the mpmaster both have (1=yes),
try a different post. Keep us posted(HaHa "posted":p)

PEACE :D

CAMmando
10-04-2003, 03:20 PM
Eric,

Dont know what version that post is, but the V9 MPFAN.pst had a tyopo in the text as you pointed out.

it should read 0= no, 1= yes

An easy test for this:

Create a test program.

Toolpath a 3.1415....... Inch Line around a 1.000" Diameter.

Set Feed Rate to 3.1414.....

Post and check A axis Feed rates.

This should give you an idea what is going on.

With inverse feed the a xis should be approx. F1.0

With direct angular feed it should be F360.

CAM

balsaman
10-04-2003, 03:32 PM
Camando,

You be da man! I will try that. My controller (turbocnc) doesn't support it...not yet. Version 4 will...soon to be out.

Eric

balsaman
10-04-2003, 04:21 PM
Here is the code for the 3.141" line wrapped around a 1" cylinder with inverse time enabled. Note that now we have the G93 and 94 in there:

%
O0000
(PROGRAM NAME - T )
(DATE=DD-MM-YY - 04-10-03 TIME=HH:MM - 16:04 )
N100 G20
/ N102 G00 Z1.
( 1/8 FLAT ENDMILL TOOL - 1 DIA. OFF. - 21 LEN. - 2 DIA. - .125 )
N104 T1 M6
N106 G00 G90 X-.0625 Y0. A180. M03
N108 Z.6
N110 G01 Z.5 F6.16
N112 G93 A-180. F1.
N114 G00 Z.75
N116 G91 Z.5
N118 G90
N120 M05 (Spindle off)
N122 M18 (Drive off)
N124 M02 (The End)

Here is the code with inverse time disabled:

%
O0000
(PROGRAM NAME - T )
(DATE=DD-MM-YY - 04-10-03 TIME=HH:MM - 16:08 )
N100 G20
/ N102 G00 Z1.
( 1/8 FLAT ENDMILL TOOL - 1 DIA. OFF. - 21 LEN. - 2 DIA. - .125 )
N104 T1 M6
N106 G00 G90 X-.0625 Y0. A180. M03
N108 Z.6
N110 G01 Z.5 F6.16
N112 A-180. F360.
N114 G00 Z.75
N116 G91 Z.5
N118 G90
N120 M05 (Spindle off)
N122 M18 (Drive off)
N124 M02 (The End)


It seems that the feedrate numbers in this case are degrees per minute.

Now if there is a x axis move together with an A axis move with the feedrate in degrees...well I have no idea what happens. I guess I will find out when I get my rotary axis going. Possibly it will work just fine? This is the way I will need to run it until version 4 is available.

Thanks for all your help guys!

Eric

CAMmando
10-04-2003, 08:03 PM
Now if there is a x axis move together with an A axis move with the feedrate in degrees...well I have no idea what happens.

I think the MPFAN post should do fine taking care of the timing calculations. Make sure you show us a part when you get it going. :)

balsaman
10-04-2003, 08:49 PM
I will have to hurry and get this built so I can try it.

Thanks to all who helped.

Here is a screen shot of the name "LIZ" wrapped around a 3" cylinder. I cant wait to try it.

Eric

balsaman
10-12-2003, 10:47 PM
Ok oh Mastercam guru's. I have my 4th axis working but there is a problem. Have a look at the following gcode:

N454 X.752 A-106.732 F515.16
N456 X.7581 A-106.554 F529.03
N458 X.7642 A-106.375
N460 X.7703 A-106.196
N462 X.7764 A-106.015
N464 X.7825 A-105.833
N466 X.7886 A-105.651 F541.5
N468 X.7946 A-105.468
N470 X.8007 A-105.283
N472 X.8067 A-105.097 F555.91
N474 X.8127 A-104.911
N476 X.8187 A-104.723
N478 X.8247 A-104.536
N480 X.8307 A-104.346
N482 X.8367 A-104.157 F567.83
N484 X.8375 A-104.131 F596.27
N486 X-.5255 F20.

The problem is that my controller (turbocnc) thinks that all the negative angles are moves over 360 degrees. So, instead of going from -106.554 to -106.375 the short way, it goes the long way around. Positive numbers are ok. Is it my post, or Turbocnc? Maybe I should put all the geometry in the positive quadrant in Mastercam? Lemme go try that.

Eric

balsaman
10-12-2003, 11:09 PM
If I move the geometry so all of it is in the positive quadrant, all is well. Turbocnc doesn't like the negative angles I guess.

Eric

balsaman
10-13-2003, 01:57 PM
Could I ask someone to look at my post? I set it for incremental but it's still spitting out absolute coordinates, with no G91 in sight.

Eric

HomeCNC
10-13-2003, 04:41 PM
If you find that you want to try another controller, give Mach 2 a try.

balsaman
10-13-2003, 04:55 PM
I would like to. I got a 400 mhz computer so I could try mach 1, but I can't for the life of me get XP installed on it. Errors on install.

Eric

HomeCNC
10-13-2003, 05:05 PM
What about W2K?

balsaman
10-13-2003, 06:37 PM
I will have to try it.

never mind about the post guys. The solution was a simple one found at the turbocnc yahoo group. I set the axis up in the software as a linear axis with one revolution = 360 inches. It works perfectly this way.

Turbocnc converts all angles to something between 0 and 360 degrees. so an angle of 370 gets converted to 10 degrees after it's made the move. This is fine but if a gcode wants to make a move to 370, then the next move to 380, it goes to 370, gets converted to 10, then moves alllllll the way to 380, which then gets converted to 20. (I am not sure why it does this)

Anyways, we are up and running!

Eric