545,767 active members*
1,834 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Hardinge Lathes > Wanting to understand why my code is acting like this.
Results 1 to 13 of 13
  1. #1

    Join Date
    Jul 2021
    Posts
    7

    Wanting to understand why my code is acting like this.

    Hopefully, you don't mind my little story here before we get into this small, novice problem I'm having here.
    I was just promoted to lathe line supervisor in my small little shop and have been given the task of speeding things up.
    My previous supervisor did things a little different when it comes to programming our machines, almost like he never
    wanted to change from the older lathe models from the 80's early 90's. I could be totally wrong about that. Anyway,
    This first picture is how this particular flat bottom rapids to the machine and the old code. My old boss used G98 with
    400.0 inches per min feed to travel to work piece. It's fine and all, but I would like to speed things up and use G00 on all
    our programs, like the second picture.
    The problem for me is, or the question I want to ask is why when I'm in G98, does the tool travel directly to the workpiece
    diagonally like I want, but when I use My G00 rapid travel it seems to go to Y, Z, Then X(not diagonally) even though all three
    axis are on the same line. What am I missing? Parameters?
    Unfortunately, my videos of the tool in action were too large.
    Thanks for any input you might have
    Dustin LaPlace

  2. #2
    Flies Fast
    Join Date
    Dec 2008
    Posts
    2819

    Re: Wanting to understand why my code is acting like this.

    You are not really speeding things up .... 400 inch/min is probably what rapid rate converts to.
    ( this would need to be checked against machine specs)

    G01 does control the axes in sync... where G00 does not,
    G00 just makes each axes turn at the max rate for that motor until it reaches the target position, it gives the appearance ( & name) of a "dog-leg" rapid move.

  3. #3

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    Thank you, Superman, however, based on my test runs on this part, changing every high-end move to G00 saved about 45 sec per part, and on this particular machine, it's pretty obvious that it's quicker, just watching visually.
    I know I'm doing the right thing there.
    I wish there was a way to manipulate the Axis Moves in G00 so that If I have an o-ring groove, it would go rapid direct to the O.D., the Z position, and the Y at the same time. Makes me want to stick with the G98
    and just change the rapids to G00 within the other high end moves within the individual blocks.

  4. #4
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4926

    Re: Wanting to understand why my code is acting like this.

    I think you need to understand what G98 and G99 actually do in the case of a lathe.

    Assuming a Fanuc or Haas controller, I'm not sure about others. But I assume they are similar.

    G98, sets feed to IPM or mm/min
    G99, sets feed to IPR or mm/rev

    G00, rapid move, axes move independently at the assigned rapid feed rate. The sequence of the axis moves would be hard coded into the controller firmware.

    G01, coordinated axes move. The tool tip arrives at the new assigned position in all axes at the same time, and the move is accomplished at the assigned feed rate.

    G98 or G99 would have no effect on a G00 move, the axes would move at the rapid feed rate set in the parameters, IPM or mm/min.

    G00, G01, G98, and G99 commands are all modal, in other words, once issued they stay in memory until the opposing command is issued. So any following commands would be affected by those commands.


    There is a little more going on than I described above, but that is the basics. I hope this helps.
    Jim Dawson
    Sandy, Oregon, USA

  5. #5
    Registered
    Join Date
    Mar 2009
    Posts
    1577

    Re: Wanting to understand why my code is acting like this.

    G00 intended to make fastest movements. It does not monitor accidental collision.

  6. #6
    Registered
    Join Date
    Feb 2011
    Posts
    348

    Re: Wanting to understand why my code is acting like this.

    Good information from everybody posting
    the M98p1 sounds like a hardinge safe index call
    I would look at it to determine whether it forces it to be a G00 or a G01 when it enters/ finishes the sub program only because there is no G01/G00 in the older programs at the start of them ?

  7. #7

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    Thanks, rcs60
    Yes it is a safe index call, I created a new one on the second program and called it M98 P3

    old one looked like this

    0003
    G01 G40 G98 T0
    G98X12.0 Z7.5 Y0 F400.0
    M99

    I changed my new one to this

    G0 G40 T0
    G0X12.0 Z7.5 Y0
    M99

    I will have to verify these are the exact #s when I get to work.
    Thank you, I will look into it.

  8. #8

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    Warning received Algirdas
    I will take it into consideration.

  9. #9

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    Very informative Jim Dawson, I appreciate the lesson,
    So basically you are telling me the G00 Coordinate axis moves are in the firmware and hard to manipulate, and
    on my Hardinge, it's going to move the z-axis last even though all are programed in the same line.
    Thank you

  10. #10
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4926

    Re: Wanting to understand why my code is acting like this.

    Quote Originally Posted by DLaPlace View Post
    Very informative Jim Dawson, I appreciate the lesson,
    So basically you are telling me the G00 Coordinate axis moves are in the firmware and hard to manipulate, and
    on my Hardinge, it's going to move the z-axis last even though all are programed in the same line.
    Thank you

    Not that hard to manipulate, but you can't do it on a single line.

    Let's assume that the tool tip is at WCS 0,0. Now you want to rapid move the tool to X1.0 Z3.0 We're not going to worry about a Y axis for the moment, just assume no Y axis.

    So you have 3 possibilities of movement:

    G00 X1.0 Z3.0 In this case, the moves would start more or less at the same instant, but X would arrive before Z because of the shorter X distance to travel.

    If you would want Z to move first then X, you would need to put the moves on separate lines.

    G00 Z3.0
    X1.0 In this case the X move would wait for the Z move to complete.

    Or the inverse

    G00 X1.0
    Z3.0 In this case the Z move would wait for the X move to complete.

    When you throw a Y axis into the mix, it gets a bit more complicated. This is where I am speculating on the controller firmware, because I have no first hand knowledge of a lathe with a Y axis. But it would make sense to retract the Y axis to a safe position prior to making a rapid X/Z move. This is similar to what the firmware on a mill should do, by retracting the Z axis to a safe position before a rapid X/Y move.

    Out of curiosity, that lathe/controller are you working with? I have a Hardinge Conquest 42, live tools, circa.1989 Originally had Fanuc OT controls. I wish I had a Y axis.
    .
    .
    Jim Dawson
    Sandy, Oregon, USA

  11. #11

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    Thanks, Jim Dawson, I shall give that a shot.
    As far as what machine specifically we are talking about, it's a Hardinge Conquest 42 with live tools. It has Fanuc controls and the Y axis.
    Must just be an upgrade from the one you have.
    I'm thinking we got it around 2005-2010, was not that involved in the machinery back then.
    Again, thanks for all your info.
    Dustin LaPlace

  12. #12
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    4926

    Re: Wanting to understand why my code is acting like this.

    It's my pleasure to help where I can Dustin.

    I love my Hardinge.

    My machine is getting a shiny new 7.5kW servo spindle motor installed in the next week or so, and it also replaces the last piece of hardware on the machine that says Fanuc on it. I am not a Fanuc fan. Been needing a full C axis for a long time. Now I just need a Y axis and a sub-spindle to do everything I want to do with it.

    If your machine is going to be retired in the future, I might be interested in it.

    Jim
    Jim Dawson
    Sandy, Oregon, USA

  13. #13

    Join Date
    Jul 2021
    Posts
    7

    Re: Wanting to understand why my code is acting like this.

    I'm not a Fanuc fan either,
    I will try to keep you in mind if and when we decide to get rid of them.

Similar Threads

  1. Wanting better G-code to speed up cutting time.
    By Jonnygexter in forum Uncategorised CAM Discussion
    Replies: 15
    Last Post: 01-28-2020, 09:33 PM
  2. Help me understand probe code
    By J S Machine in forum G-Code Programing
    Replies: 4
    Last Post: 10-07-2016, 01:37 AM
  3. Replies: 4
    Last Post: 02-02-2013, 03:59 AM
  4. Replies: 2
    Last Post: 08-16-2011, 05:30 AM
  5. Wanting to understand about coolant filtration.
    By ipsllco in forum Daewoo/Doosan
    Replies: 6
    Last Post: 05-06-2010, 03:19 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
  •