584,874 active members*
5,189 visitors online*
Register for free
Login
Results 1 to 11 of 11
  1. #1
    Join Date
    Jun 2006
    Posts
    43

    Red face 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. #2
    Join Date
    Jul 2005
    Posts
    12177
    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.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  3. #3
    Join Date
    Jun 2006
    Posts
    43

    Red face

    Quote Originally Posted by Geof View Post
    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. #4
    Join Date
    Sep 2009
    Posts
    5
    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. #5
    Join Date
    Jun 2006
    Posts
    43

    Red face

    Quote Originally Posted by Jitendra Tomar View Post
    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?"

    Thanks! That is very helpful!

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by twehr View Post
    "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. #7
    Join Date
    Feb 2006
    Posts
    338
    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)
    ...
    G200 (return to normal XY mode)

  8. #8
    Join Date
    Nov 2015
    Posts
    3

    Re: 4th-Axis GCode Programming

    Hi

    I found a youtube video that shows how to use a macro to do something like the question being asked. I had the same problem and right now I don't have
    access to my 4th axis. Gcode on the fly for Rotary CNC - YouTube

    If I get it to work, what I plan to do is add variables for diameter of material and length of material. That I am pretty sure that I can do manually,
    Once I get that to work, I want to have a message so that I can enter this information. I'm looking at the M109 command. It looks like you can enter one
    variable, I would like to enter at least 2 variables.

  9. #9
    Join Date
    Jun 2015
    Posts
    4131

    Re: 4th-Axis GCode Programming

    hy hmatyas 4th axis programing requires a bit of trials, so to find the correct formulas

    i can help with code sugestions, going little by little, until solved, at least let's hope will figure it out

    so far i solved for rotary on other machine, so there is a place to start / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

  10. #10
    Join Date
    Nov 2013
    Posts
    4282

    Re: 4th-Axis GCode Programming

    Hi,
    I use Mach4 and all rotary axes are in degrees. This is a shame because I prefer radians. I use Fusion + Machining Extensions and Fusion can post either degrees OR radians, but Mach
    can only handle degrees.

    Mach does have a G93 mode which changes the angular velocity such the the peripheral speed remains constant. I have not used it in Fourth axis tool paths myself, thinking that G93 is
    best suited to lathes.

    Craig

  11. #11
    Join Date
    Jun 2015
    Posts
    4131

    Re: 4th-Axis GCode Programming

    hy joe if you need some feeds modified ( or someting else, etc ), i can help with

    for example, let's say that you just generated program file cut-this.cnc; the moment you see it become cut-this-fixed.cnc, then all is ok ( thus a service runs in background, scans a folder for new files, and adjusts them as needed; no intervention necesary ) / kindly
    Ladyhawke - My Delirium, https://www.youtube.com/watch?v=X_bFO1SNRZg

Similar Threads

  1. help with 5 axis gcode
    By ethank in forum Rhinocam
    Replies: 1
    Last Post: 09-25-2020, 08:05 PM
  2. Gcode Turn A axis CCW
    By kNucklBustr in forum Mach Software (ArtSoft software)
    Replies: 9
    Last Post: 09-24-2012, 06:47 PM
  3. Programming a Display Program for GCode
    By ZSamuels28 in forum G-Code Programing
    Replies: 8
    Last Post: 07-12-2011, 02:00 AM
  4. Way to take gcode for one axis and mirror it for another axis?
    By genestapp in forum Uncategorised CAM Discussion
    Replies: 2
    Last Post: 10-09-2010, 04:14 PM
  5. Toolchanging and offsets gcode programming
    By ddanutz in forum G-Code Programing
    Replies: 12
    Last Post: 11-04-2006, 11:39 PM

Tags for this Thread

Posting Permissions

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