Gcode for 4th axis


Results 1 to 10 of 10

Thread: Gcode for 4th axis

  1. #1
    Member
    Join Date
    Apr 2011
    Location
    U.S.A
    Posts
    66
    Downloads
    0
    Uploads
    0

    Default Gcode for 4th axis

    Looking for a gcode file to make the 4th axis turn constantly in mach4 , until a stop command is given . Ideally it would be a macro / script , that can be activated by a button on the Mach4 screen , if not a file that can be inserted in my PP. The idea is to use the axis as a lathe and run a simple gcode profile while it is turning. I know there are wrapping PP , but they are so slow , i can hear my beard grow!

    Hope someone can help

    ED

    Similar Threads:


  2. #2
    Member
    Join Date
    Apr 2011
    Location
    U.S.A
    Posts
    66
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    Is there someone who can create this gcode , or macro / script for Mach 4??.


    Ed



  3. #3
    Member
    Join Date
    Apr 2004
    Location
    Oakland CA USA
    Posts
    5402
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    I don't think G-code works that way. Usually, a positional command will only execute once the previous command is finished. It sounds like you're trying to turn your mill or router into a lathe, which works the way you describe. Why not substitute a regular induction motor for the stepper that's powering your rotary table? Once that's set up, all you'll have to do is switch it on and run the code for your profile using the Z and X axes, just like a CNC lathe.

    Andrew Werby
    https://computersculpture.com/


  4. #4
    Member
    Join Date
    Nov 2008
    Location
    USA
    Posts
    545
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    The question is how much 4th axis control does your CAM software provide? How complex is your part?
    Say you started with a long square and want to turn it round. That’s either a lathe package or some custom (or hand written) Gcode in a milling package. Same part over and over the custom write it. Create a stool spindle and that’s more complicated. Vectric software is designed to do some of this but it’s complicated.
    You just want to turn the 4th axis while moving the spindle, you could drive the stepper driver separately from the controller using a few different methods.


    Sent from my iPhone using Tapatalk



  5. #5
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5101
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    Is there way in Mach4 to have a second spindle set up? You might be able to call your 4th axis a spindle and then just turn it on with a ''M'' command.

    Jim Dawson
    Sandy, Oregon, USA


  6. #6
    Member
    Join Date
    Apr 2011
    Location
    U.S.A
    Posts
    66
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    There in lies the problem ! How to set that up in Mach4 ??


    Ed



  7. #7
    Member
    Join Date
    Nov 2008
    Location
    USA
    Posts
    545
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    You can drive a stepper with step (a frequency) and direction signal. Something as simple as an arduino can generate those signals. M codes drive relays like spindle and flood, and others. Those M codes from your controller can control the arduino, which powers the stepper driver.

    This works great for turn it on and let it run during the entire cut. Not so useful if you want to stop-start it and change direction while cutting.


    Sent from my iPhone using Tapatalk



  8. #8
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5101
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    Quote Originally Posted by edcross View Post
    There in lies the problem ! How to set that up in Mach4 ??


    Ed
    Maybe this would be a starting point. https://warp9td.com/index.php/faq/faq-mach4#ObSpindle

    Jim Dawson
    Sandy, Oregon, USA


  9. #9
    Member
    Join Date
    Apr 2011
    Location
    U.S.A
    Posts
    66
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    G53 A 9000 , will make my A axis turn continuously until it completes 9000 degrees at the motor velocity in the motor setup . How can i put this line in my gcode and have it stay active until the end of the gcode file ??


    Ed



  10. #10
    Member
    Join Date
    Nov 2008
    Location
    USA
    Posts
    545
    Downloads
    0
    Uploads
    0

    Default Re: Gcode for 4th axis

    A command like that would be handy but gcode doesn’t work like that. If you move X then Y it will wait for X to complete before moving Y. If the command has both an X and Y then they will move at the same time.
    So each new line of Gcode executes when the line above it completes.


    Sent from my iPhone using Tapatalk



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

Gcode for 4th axis

Gcode for 4th axis

Gcode for 4th axis