Hello Guest it is August 06, 2020, 11:47:09 PM

### Author Topic: 4th axis - GCode degrees vs distance  (Read 19981 times)

0 Members and 1 Guest are viewing this topic.

#### rhtuttle

• 425
##### 4th axis - GCode degrees vs distance
« on: March 02, 2010, 11:59:07 AM »
I have never looked into a 4th rotating axis until lately and have some real basic questions.  I have read several of the posts here but seem to be getting more confused rather than less.

1. Can anyone point me to some literature that explains coding concepts for an A-axis?

2. If I use a 10/1 reduced drive for the axis with 1.8 degree stepper and 10 microstepping I would use 20000/360 for steps per revolution, correct?

3. Do you express the A distance in degrees, circumference distance, or, can you do either?

4. Code example for: 1" diameter stock that you want to spiral at a 45 degrees ( move x 3.1416 inches and rotate A 360 degrees) like screw cutting.

5. Code example for: 1" diameter stock that you want to rotate A-axis 0.2 inches on the surface, do a sub routine to cut along the X-axis, then rotate A 0.3 inches.

If you can provide insight on any of the above it would be very much appreciated.

TIA

RT

#### pointcloud

• 90
##### Re: 4th axis - GCode degrees vs distance
« Reply #1 on: March 02, 2010, 12:16:30 PM »
1. Ok in Mach under general config you will see a box on the left that says unchecked for linear. Whcich means unchecked you use a linear measurement, checked is angular for input.

2. stepper calculation??? looks ok

3.  if you check the box in the gen config you will use angular if it is unchecked it would be a linear input.

4-5 I would use the box checked and write something like this
G01X0Y0Z.480A0F12(ENTER THE WORK .020)
G01X10Y0Z.480A45F12
G00Z.750(.250 above the part)

This would have the X travel 10 inches the Y would not move, The Z would be .020 deep, and the a would rotate 45 deg or a 1/4 turn.
REMEMBER Z0 IS THE CENTER OF THE A AXIS.... TOP OF THE PART IS .500 ON A 1" DIA.
Hey THANKS 4 all the help in advance. I'll need more than you'll ever expect!!!

www.cravenpottery.com

#### rhtuttle

• 425
##### Re: 4th axis - GCode degrees vs distance
« Reply #2 on: March 02, 2010, 12:31:04 PM »
Since the A-axis rotates I assumed that the box had to be checked.  (sound of hand slapping forehead) DOH!

Can you query and configure on the fly (VB,Button or Interface) whether the axis is rotational?

RT

#### cjmerlin

• 194
##### Re: 4th axis - GCode degrees vs distance
« Reply #3 on: March 02, 2010, 02:09:49 PM »
I use separate Mach3 profiles to do this, use mach loader to setup profiles.

#### rhtuttle

• 425
##### Re: 4th axis - GCode degrees vs distance
« Reply #4 on: March 02, 2010, 02:44:09 PM »
Thanks for the reply.  I do use separate profiles, but to my knowledge there is no way of changing them without having to shut mach down and reload.  Which means that you have to re-reference.

I have an app that generates the code, loads it into Mach and runs it using the Mach interfaces available.  If it is possible to switch from angular to linear programmatically then I would prefer to do that when possible.

#### pointcloud

• 90
##### Re: 4th axis - GCode degrees vs distance
« Reply #5 on: March 02, 2010, 06:40:21 PM »
I have no idea why you'd do this changing???

Hey THANKS 4 all the help in advance. I'll need more than you'll ever expect!!!

www.cravenpottery.com

#### Greolt

• 956
##### Re: 4th axis - GCode degrees vs distance
« Reply #6 on: March 02, 2010, 08:39:47 PM »
1. Ok in Mach under general config you will see a box on the left that says unchecked for linear. Which means unchecked you use a linear measurement, checked is angular for input.

I don't believe this is correct.  I remember Art saying that that checkbox did only one thing (which I can't remember) but it was not to change units to linear.

For an rotational axis to be swapped between angular units and linear units, the controller would also need to know what is the diameter/circumference.

Angular units are the only ones that make any sense as a unit of measure for rotation.

Greg

#### pointcloud

• 90
##### Re: 4th axis - GCode degrees vs distance
« Reply #7 on: March 02, 2010, 08:58:47 PM »
Just check it out...

Hey THANKS 4 all the help in advance. I'll need more than you'll ever expect!!!

www.cravenpottery.com

• 4,913
##### Re: 4th axis - GCode degrees vs distance
« Reply #8 on: March 02, 2010, 09:16:40 PM »
Here is an interesting topic that might be of interest.
And a clip from the new MILL manual.

http://www.machsupport.com/forum/index.php/topic,1117.0.html

#### Greolt

• 956
##### Re: 4th axis - GCode degrees vs distance
« Reply #9 on: March 02, 2010, 09:28:45 PM »
That wording can be easily misunderstood.  A good example of that is in this thread.

Unchecking the box does not suddenly allow Mach to know how many steps make a linear unit.

Cutting on a 10 unit diameter job, the steps per linear unit is very different than when cutting on a one unit diameter job.

Mach does have the ability to adjust the rotational axis feedrate to compensate for differing diameters.  It does not have the ability to alter steps per unit as diameter differs.

I say again....Angular units are the only ones that make any sense as a unit of measure for rotation.

Greg