4th-Axis GCode Programming


Results 1 to 11 of 11

Thread: 4th-Axis GCode Programming

  1. #1
    Registered
    Join Date
    Jun 2006
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    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.

    Similar Threads:


  2. #2
    Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12177
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Jun 2006
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Sep 2009
    Location
    INDIA
    Posts
    5
    Downloads
    0
    Uploads
    0

    Default

    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
    Registered
    Join Date
    Jun 2006
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    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
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1511
    Downloads
    0
    Uploads
    0

    Default

    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
    Member
    Join Date
    Feb 2006
    Location
    United States
    Posts
    338
    Downloads
    0
    Uploads
    0

    Default

    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
    Member
    Join Date
    Nov 2015
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default 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.

    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
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4131
    Downloads
    0
    Uploads
    0

    Default 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

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


  10. #10
    Member
    Join Date
    Nov 2013
    Posts
    4282
    Downloads
    0
    Uploads
    0

    Default 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
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4131
    Downloads
    0
    Uploads
    0

    Default 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

    we are merely at the start of " Internet of Things / Industrial Revolution 4.0 " era : a mix of AI, plastics, human estrangement, powerful non-state actors ...


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

4th-Axis GCode Programming

4th-Axis GCode Programming