584,841 active members*
4,608 visitors online*
Register for free
Login
Results 1 to 19 of 19
  1. #1
    Join Date
    Nov 2014
    Posts
    34

    Quick Question / Clarification on G54

    Greetings all.

    So, I'm writing a post processor for Fusion 360, and I want to make sure i'm using a G-Code correctly.

    If I was writing something for a turning profile, and I used a G54 command, while the X was .625 away from center, somewhere in the controller, it would remember that it was .625 away from center and adjust all X coordinates by that..right?

    But if I don't have a controller that is spacially aware of it's X distance from the center, and I issued G54 G0 X.625 all in one line, it would do the same thing as just issuing a G54 command somewhere in my setup, right?

    Just wanting to make sure before I start fixing up the post processor.

    ~Dan

  2. #2
    Join Date
    Jun 2015
    Posts
    119

    Re: Quick Question / Clarification on G54

    No, G54 just calls the work offset (makes it active). You have to set the work offset by another method (by G10, macro, or when you set up your part).
    ____________________________
    My blog: http://www.fletch1.com

  3. #3
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    So, G54 would take me to said offset... G10 modifies the coordinates,
    Lets assume inches on the spacing
    so.. if I had G10 X.625 in one line
    And then I ran the code G0 X.725, it would move the X axis .1 inches... right?

    Ultimately, this is the behavior I'm looking for.

  4. #4
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    Quote Originally Posted by dregalia View Post
    So, G54 would take me to said offset... G10 modifies the coordinates,
    Lets assume inches on the spacing
    so.. if I had G10 X.625 in one line
    And then I ran the code G0 X.725, it would move the X axis .1 inches... right?

    Ultimately, this is the behavior I'm looking for.
    I think that's correct. Where do you apply the tool offsets? I normally use a G53 (ACS) for tool change clearance, and a G54 (WCS) where the tool offsets are applied for turning.
    Jim Dawson
    Sandy, Oregon, USA

  5. #5
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    Well, I haven't applied anything yet. I'm trying to get 2 Axis CNC Lathes to work using Arduinos and Fusion 360, so tonight I'll be trying the code. I was going to attempt it last night, but got caught up in things. So, tonight is the night for mad scientist type stuff. In the end, all I want to do is be able to run a profile on round stock.

    I'll let you know what happens with it. I'm not setting up anything special for tools, clamps, etc.. This is strictly cutting edge and stock. I'm trying to keep it simple so I can debug it.

  6. #6
    Join Date
    Mar 2003
    Posts
    35538

    Re: Quick Question / Clarification on G54

    so.. if I had G10 X.625 in one line
    And then I ran the code G0 X.725, it would move the X axis .1 inches... right?
    That depends on where the tool currently is, and whether you are in absolute or incremental mode.

    Also, verify the syntax required of G10 on your control.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #7
    Join Date
    Feb 2006
    Posts
    1792

    Re: Quick Question / Clarification on G54

    G54 datum is to be set by the operator. The postprocessor may only have G54.
    It is possible to have both G54 and G00 in the same line, as these belong to different G-code groups.

  8. #8
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    @ger21: Here is the code I think I need to use. (I'm not sure about the G90 in there)
    This is the first cut I'm doing with the lathe.
    Let's assume that the piece is 1.25 inches in diameter, which leaves me a .625 radius.
    I am setting the bit to touch at the edge of the stock. The GCode sender I'm using sees this as workspace 0/0 and machine 0/0

    G18
    G90
    G20

    (PROFILE1)
    G10 P0 L20 X0.625
    G94
    G90 G0 X0.725 Z0.2575
    G0 Z0.149
    X0.6519
    G1 X0.6516 F40.
    X0.595 Z0.0925
    Z-9.

  9. #9
    Join Date
    Nov 2014
    Posts
    34

    Exclamation Re: Quick Question / Clarification on G54

    Quote Originally Posted by ger21 View Post
    That depends on where the tool currently is, and whether you are in absolute or incremental mode.

    Also, verify the syntax required of G10 on your control.

    @ger21, so, if I was in incremental mode, and my tool was at 0/0/0 and then set my G10 to X.625, and ran a G0 X.725, it would move X.100, however, if I had run
    G90 G0 X.725 it would move X.725, regardless of where it was at, right?

    I need to make sure I got this right.

    Thanks

  10. #10
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    Quote Originally Posted by dregalia View Post
    @ger21, so, if I was in incremental mode, and my tool was at 0/0/0 and then set my G10 to X.625, and ran a G0 X.725, it would move X.100, however, if I had run
    G90 G0 X.725 it would move X.725, regardless of where it was at, right?

    I need to make sure I got this right.

    Thanks
    When I was first testing my lathe I made some ''tool bits'' out of plastic (soft wood would work too) and used a dial indicator to confirm movements. Sometime the best way to figure out if something is working is to just load the G code and see what happens. I've cut a lot of air chips.
    Jim Dawson
    Sandy, Oregon, USA

  11. #11
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    I've been cutting air chips for about 2 weeks now.. and watching my X axis fly off the rails.. It seems like I just keep going further and further away from what I'm trying to do..
    I'm fairly certain it's because I don't know what I'm doing. I know why people haven't done this before. I think all the knowledge I need is locked away in the minds of people who aren't online.
    I just can't imagine that my question doesn't have an answer. It seems like it would be a common task. Maybe I'm not asking it right.

  12. #12
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    That is very strange. I'm assuming you have a home position that is set at machine 0,0, and the tools are offset from that position?

    EDIT:
    In looking at your code above, the G90 is an absolute position move. Only considering the X axis for the moment, is the tool set to 0 when the tip is on the spindle centerline, in machine absolute coordinates?
    Jim Dawson
    Sandy, Oregon, USA

  13. #13
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    So, I'll try to set this up for you...
    There is no Lathe-centric software, so it's literally a spindle, and an X and Z Axis bolted on next to it.
    The best I can do for coordinates is to build everything in Fusion 360, and put in the stock size, and the cut. I know the stock size, but instead of having a 'zero' position at the tail stock center, it's at the tail stock edge of the stock.
    So, my machine is zero'd at Z0 X.625. If the first line of code told my controller that is where it's at, I could literally run the rest of the GCode from that point. It's generated with the expectation that Z0 X0 is center stock of the tail stock.

    This is why I think throwing in an offset somewhere will tell the machine where the position is, and it works on the rest from there, if that makes any sense whatsoever. I have all the code generating correctly, except the first line that sets up where it thinks it is.

    ~Dan

  14. #14
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    If I understand correctly then I think you are correct. But is seems that the controller has no idea where 0,0 is at. You would need to bring the tool to the work, then manually input that position into the controller by some method. At least that's the way most machine work, or at least some derivative of that using a tool setter or some fixed point. As I recall that's what we had to do to set the tools on the Hardinge before we upgraded it, each job required a tool position manual input. Somewhere in the system there must be a provision for setting 0,0.

    It should be possible to write some code that would use the first X position as the base for the following operations. But that might mean starting the run with the tool against the work. Then maybe back off a bit, start the spindle and proceed with the rest of the run.
    Jim Dawson
    Sandy, Oregon, USA

  15. #15
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    Actually, that's exactly what I need. I can orchestrate everything else, thats not an issue... If I need to give it a .1 inch offset, easy enough. I just need to know how to tell it that when I put the tool up against the work, and it's zero'd out, that it is really at .625, or .725 if I offset it .1 inches.

    I mean, the only other way thru this, is to zero out everything, move the tool to zero, back it out, load the stock, and run the GCode, but I'd like to have it run from the edge of the stock, ya know?

  16. #16
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    What controller are you using? An open source platform? You may have to write some code that will do what you want. From what you describe, it seems that the only position input to the controller that is available right now is 0,0?

    A G53 tells the controller to use machine absolute coordinates, a G54 tells the controller to use work/tool offset coordinates. The G10 command sets the position of the G54 offsets, but your controller has to support the G10 command. Do you have a list of supported G codes for your controller and the required syntax?

    You might just try running with the G53 after you have zeroed out the tool position.
    Jim Dawson
    Sandy, Oregon, USA

  17. #17
    Join Date
    Sep 2010
    Posts
    1230

    Re: Quick Question / Clarification on G54

    Quote Originally Posted by Jim Dawson View Post
    What controller are you using? An open source platform? You may have to write some code that will do what you want. From what you describe, it seems that the only position input to the controller that is available right now is 0,0?

    A G53 tells the controller to use machine absolute coordinates, a G54 tells the controller to use work/tool offset coordinates. The G10 command sets the position of the G54 offsets, but your controller has to support the G10 command. Do you have a list of supported G codes for your controller and the required syntax?

    You might just try running with the G53 after you have zeroed out the tool position.
    Hello Jim,
    For sure the OP needs to specify the control being used. The references to G90/G91 in previous Posts will only apply for Absolute/Incremental Mode for a Fanuc Lathe control if the control is set to use G Code System B. or C. System. In System A (default setting), G90 is Outer diameter/internal diameter cutting cycle and G91 doesn't exist.

    For a Fanuc (and many other ) control, G53 is a One Shot Command and is only effective in the Block in which it's executed. It must be commanded in Absolute Mode. Accordingly, G53 X0 Z0 (U and W are typically Incremental for a Lathe Control) would return the axes slides to the Machine Coordinate System X/Z Zero (Reference Return Position).

    Regards,

    Bill

  18. #18
    Join Date
    Nov 2014
    Posts
    34

    Re: Quick Question / Clarification on G54

    @Jim, I'm using a GRBL/Arduino .9j controller. It supports G10. So, having a G54 and a G90 seems like it would be counter productive if I had a G10 L20 P1 offset command.
    I'm wondering if I need to bump up to 1.1 tho and set the WCO manually... That may be the trick.. I have some reading to do. MPOS vs WPOS... the G10 only sets the WPOS, but If I can set the MPOS and WPOS From GCode, I'm good to go.

  19. #19
    Join Date
    Dec 2013
    Posts
    5717

    Re: Quick Question / Clarification on G54

    I saw a picture of an Arduino once, so that is my experience with it. I can provide general G code and machine logic advice, but I have no idea how to input data or how that data is used internally in the Arduino. You are going to have to school me a bit.

    But as I understand it, if you dust off your programming skills, you could write code that would do exactly what you want. I am surprised that there is no provision for some kind of initialization file that could contain motor setup, steps per, other operational parameters, and maybe tool offsets?
    Jim Dawson
    Sandy, Oregon, USA

Similar Threads

  1. Quick question about G41
    By Dakmotron in forum Haas Lathes
    Replies: 5
    Last Post: 04-12-2013, 01:02 PM
  2. quick question???
    By total_noob in forum CNC Tooling
    Replies: 5
    Last Post: 01-17-2013, 10:54 PM
  3. quick question.
    By Willfitz in forum Canadian Club House
    Replies: 0
    Last Post: 02-29-2012, 12:34 AM
  4. quick question-
    By zukimaniac in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 06-15-2010, 05:58 AM
  5. New here, quick question 2T on TC-2
    By RonRoy2004 in forum G-Code Programing
    Replies: 2
    Last Post: 11-07-2005, 04:16 AM

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
  •