4th-Axis GCode Programming

1. 4th-Axis GCode Programming

Need clarification on GCode for 4th axis.

What is the "unit" of movement for a 4th (or any rotary) axis? Is the 4th axis measured in inches/millimeters (of head-relative movement) like X,Y, and Z, or degrees/radians (of rotation), etc. It is easy enough to make either set of calculations, but have not worked with (or seen) rotary axis code.

2. It could be machine specific. I use Haas machines with a 4th axis (A) and it is programmed in degrees. These machines have the ability to Circle Wrap which means they map the X or Y axis onto the A axis and for this you need to input a diameter value which the machine then uses to convert between linear measure and angular measure.

3. Originally Posted by Geof
It could be machine specific. I use Haas machines with a 4th axis (A) and it is programmed in degrees. These machines have the ability to Circle Wrap which means they map the X or Y axis onto the A axis and for this you need to input a diameter value which the machine then uses to convert between linear measure and angular measure.
Either way, it is going to come down to calculating the amount of rotation necessary to "move" the head a specified distance. I am, in fact, doing a project that involves wrapping a 2D image around a cylinder. (Laser work)

I had considered the axis-swapping approach, but still need to derive appropriate "units." Since I will be also building my own 4th-axis, it sounds like I can do it however I wish. Just did not want to do something totally contrary to the rest of the world.

Given your answer - that it is machine specific - I could write the application to allow users to choose their method, producing code that is likely to be compatible with their specific setup.

Thanks for the quick response - adds to my knowledge bank!

4. It depends on your machine, if your 4th Axis is Linear Axis unit would be in INCH/MILIMETER, and if your 4th Axis is a Rotary one unit would be in degree.

5. Originally Posted by Jitendra Tomar
It depends on your machine, if your 4th Axis is Linear Axis unit would be in INCH/MILIMETER, and if your 4th Axis is a Rotary one unit would be in degree.
So, if user indicates they are mapping X or Y (I am working in 2D Laser), OR they have their Z axis directed to the rotary axis, then it is, by default, linear. BUT, it they indicate they are using the A (or B or C) axis, it should be, by default, degrees?

That is what I really wanted to know, but did not ask clearly - "What is the normal unit of measure for the A, B, or C axes?"

6. Originally Posted by twehr
"What is the normal unit of measure for the A, B, or C axes?
I have only setup and seen these axis in degrees. I would consider that to be the norm. But there is always someone to disagree.

Stevo

7. From what I have seen, default to degrees motion. It sounds like you still need this, so add a G code to change behavior. Much like Geof described.

An example might be:
G0 X-3.0 Y 0.0 A85.0 (position Y0.0, center of cylinder at rotation for start of laser marking)
G201 Z2.0 (G201 made up code to trigger modal wrapping around A at 2.0 radius)
G1... (code in XY that the control translates to XA moves)
...

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•