Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: Improper G-Code

  1. #1
    huskermcdoogle is offline Stainless
    Join Date
    Nov 2005
    Location
    South Texas
    Posts
    1,279

    Post

    I was trying to post a program to a Hardinge Cobra Lathe

    Fanuc 21-T Controller

    It gives an Error 010 Improper G-Code

    I have no idea what this means but I will post the first part of the code and see if any of you think you know what is wrong.

    it stops at the G50 S3600
    %
    O0000
    G20
    (PROGRAM NAME - HELP DATE=DD-MM-YY - 04-01-06 TIME=HH:MM - 17:32)
    (TOOL - 1 OFFSET - 1)
    (LROUGH OD ROUGH RIGHT - 80 DEG. INSERT - CNMG-432)
    G0T0101
    G97S216M13
    G0G54X3.5341Z.11
    G50S3600
    G96S200
    G99G1Z-2.84F.01
    X3.7339Z-3.0141
    X3.8753Z-2.9434
    G0Z.11

    this is obviously abreivated but it makes it no further than the G50 when you go back to edit.

    No idea that is wrong. Compared it to other programs in the memory that i have ran in the past and see no differences up to that point.

  2. #2
    mrainey's Avatar
    mrainey is offline Stainless
    Join Date
    Jul 2004
    Location
    Spartanburg, South Carolina
    Posts
    1,503

    Post

    What does G99 do?

  3. #3
    jhearons is offline Aluminum
    Join Date
    Sep 2003
    Location
    riverside, ca, usa
    Posts
    244

    Post

    G99 = ipr feed

  4. #4
    Xjenderfloip is offline Stainless
    Join Date
    Feb 2005
    Location
    Rotterdam
    Posts
    1,236

    Post

    G0T0101 (=====where is line N101? ===)

    G97S216M13
    G0G54X3.5341Z.11
    G50S3600
    G96S200
    G99G1Z-2.84F.01
    X3.7339Z-3.0141
    X3.8753Z-2.9434
    G0Z.11

  5. #5
    ACE323 is offline Cast Iron
    Join Date
    Mar 2005
    Location
    New Hampshire
    Posts
    354

    Post

    Isn't M13- the live tool spindle?
    Cant use ipr

  6. #6
    ACE323 is offline Cast Iron
    Join Date
    Mar 2005
    Location
    New Hampshire
    Posts
    354

    Post

    xjen,

    I think thats supposed to be a toolcall with a G0- rapid move- not necessary

  7. #7
    PBMW is offline Titanium
    Join Date
    Aug 2005
    Location
    Bremerton, Wa
    Posts
    2,577

    Post

    You called a G96 without ever turning on the spindle....
    Jim

  8. #8
    Dan Fritz is offline Cast Iron
    Join Date
    Apr 2005
    Location
    Willoughby, Ohio
    Posts
    428

    Post

    The alarm #10 is only going to happen if you try to use a G-code that your CNC is not equipped to use. This can happen if there's an option not installed, or if the G-code you're using is not recognized by the control at all.

    Some CNCs are set up to use EIA G-codes instead of the usual Fanuc JIS (Japanese Industrial Standard) G-codes so, for example, G20/21 for inch/metric might really be G70/71 on your machine.

    Try entering each of the G-codes in your program in MDI mode. The alarm #10 will tell you which one is the culprit.

  9. #9
    Dave K is offline Diamond
    Join Date
    Mar 2004
    Location
    Waukesha, WI
    Posts
    6,202

    Post

    I believe on a hardinge, m13 turns on spindle and coolant at the same time.

  10. #10
    sakis is offline Aluminum
    Join Date
    Jun 2005
    Location
    Michigan
    Posts
    156

    Post

    I think the G54 is the culprit. Are you using the W.SHIFT to set the z? Can you find G54 etc in the offset pages?

  11. #11
    willbird is offline Banned
    Join Date
    Jul 2005
    Location
    North(very) West(very) Ohio...near exit 13 on OH turnpike
    Posts
    3,714

    Post

    I'll ask the dumb question, are you sure you don't have a letter "O" instead of a zero ?? I'v seen it too many times to count over the years.

  12. #12
    Boris is offline Titanium
    Join Date
    Oct 2005
    Location
    England
    Posts
    3,018

    Post

    Nobody has spotted it have they?

    try G92 S3600 instead of G50 S3600

    Some lathes are funny about that


    Boris

  13. #13
    huskermcdoogle is offline Stainless
    Join Date
    Nov 2005
    Location
    South Texas
    Posts
    1,279

    Post

    Sorry about not being up to speed on replying. Just got finished welding up some bike frames....

    M13 is spindle counter clockwise on coolant on

    G20 is supposed to be used

    G99 - IPR is what i want to use and is what i have used in the past with this machine

    G96 - Always works

    G50 - has worked in the past.

    Frankly nothing has changed and this thing won't work.

    Gonna get some live help tommorow but any more ideas are very welcome.

    All G codes listed there work in MDI without and alarm.

    G54 is the only one i question but is in other programs. 90% or programs written for this lathe are from mastercam same post, same computer.

    I am literally dumbfounded. I can usaully figure these things out. Can't find the manual that tells what the ararms are either. Damn disorganized shop.

    Husker

  14. #14
    SeymourDumore is offline Diamond
    Join Date
    Aug 2005
    Location
    CT
    Posts
    6,341

    Post

    The only thing, see if programming G54 in it's own block makes a difference.
    Not sure if the machine likes calling a workoffset and positioning in it in the same block.

  15. #15
    Dan Fritz is offline Cast Iron
    Join Date
    Apr 2005
    Location
    Willoughby, Ohio
    Posts
    428

    Post

    Below is a "cut & paste" of text from the 21T operator's manual section on the G54-G59 coordinate systems. In your program, the G54 coordinate system is selected first, then you give it the G50S3600. Normally, the G50S--- command is just to set the upper limit of the spindle speed in CSS so it shouldn't matter, but this statement may explain your problem:

    (from manual):

    When bit 2 (G50) of parameter No. 1202 is set to 1, executing the G50
    command results in the issue of P/S alarm No. 10. This is designed
    to prevent the user from confusing coordinate systems.

    Try giving the G50S3600 command before you select G54.

  16. #16
    pi
    pi is offline Stainless
    Join Date
    Jan 2005
    Posts
    1,684

    Post

    looks like a mastercam post.
    error may be further in the program.

  17. #17
    SeymourDumore is offline Diamond
    Join Date
    Aug 2005
    Location
    CT
    Posts
    6,341

    Post

    Dan

    Wonderful example of Japano-English translation.
    Does that mean that G50 can only be invoked at the beginning of the program and never again until an M30?
    Not very useful if you want to limit for turning at one speed and for cutoff at another.

  18. #18
    Dan Fritz is offline Cast Iron
    Join Date
    Apr 2005
    Location
    Willoughby, Ohio
    Posts
    428

    Post

    You can always set parameter 1202 bit 2 to a "0" if you don't want it to throw the alarm.

    Check to see if that bit is a "1" now (bit 2 is the 3rd bit from the right). If it is a "1", set it to zero and then just be careful to not try to use G50 to preset the coordinate system when in G54. Using G50 to set the spindle speed limit should never be a problem, even in G54.

    Did you try running your program with the G50S3600 block ahead of the G54 block ?

  19. #19
    huskermcdoogle is offline Stainless
    Join Date
    Nov 2005
    Location
    South Texas
    Posts
    1,279

    Post

    I took the G54 out becuase it really doesn't need to be there becuase i am only using one tool and just set the ofsets that way...

    Works without the G54.

    Thanks for all the help.

    Husker

  20. #20
    Ox's Avatar
    Ox
    Ox is online now Diamond
    Join Date
    Aug 2002
    Location
    West Unity, Ohio
    Posts
    18,063

    Post

    M13 is spindle counter clockwise on coolant on
    M13 is spindle on ClockWise/coolant on.


    looks like a mastercam post.
    error may be further in the program.
    Error should be in the line after it stops. At least on the 18-T. I have a 21-I too - but can't say 100% for sure on that one. ???


    Think Snow Eh!
    Ox

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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