586,102 active members*
2,620 visitors online*
Register for free
Login

Thread: Line numbers

Results 1 to 12 of 12
  1. #1
    Join Date
    Aug 2007
    Posts
    6

    Line numbers

    I'm new to NC coding, and I need to know if lines HAVE to be numbered in chronological sequence: N1
    N2
    N3 etc.
    Would an M98 sub pgm. call have to have the same line number as the sub programme?

    Thanks, Barry.

  2. #2
    Join Date
    Mar 2007
    Posts
    207
    I think the correct answer is, it depends......

    Most machine controllers don't care about the line numbers most of the time.

    Some older controllers might care all of the time.

    There are certain times that most all controllers care about the order. For instance in the G7x series of lathe canned cycles, N block/line numbers must be included, they must follow a certain order and most of all, must be unique, not duplicated anywhere else in the program.

    John

  3. #3
    Join Date
    Aug 2007
    Posts
    6
    Quote Originally Posted by John3 View Post
    I think the correct answer is, it depends......

    Most machine controllers don't care about the line numbers most of the time.

    Some older controllers might care all of the time.

    There are certain times that most all controllers care about the order. For instance in the G7x series of lathe canned cycles, N block/line numbers must be included, they must follow a certain order and most of all, must be unique, not duplicated anywhere else in the program.

    John
    Hi John, the controller is Ultimax on a new Hurco VM2 mill. Similar to Fanuc I believe.

  4. #4
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by batmill View Post
    .... Would an M98 sub pgm. call have to have the same line number as the sub programme?

    Thanks, Barry.
    I think the M98 call needs the program number not a line number; it is an external call. M97 is an internal call to a line number in the same program. The letter used to label the program number or line number is different for different machines but I think the M98 calling outside the program and M97 within the program is universal.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  5. #5
    Join Date
    Mar 2007
    Posts
    207
    Quote Originally Posted by batmill View Post
    Would an M98 sub pgm. call have to have the same line number as the sub programme?
    Your controller most likely doesn't need any line numbers except for special functions.

    You could put them in if you wanted to.

    What Geof said is right, the line numbers that you asked about are irrelevant to use of the M98 sub-program call. For the line with the M98 you could have any or no line number on it. But you must give it a valid program number for the subroutine.

    Be careful with M97, if its a subroutine call on your machine it DOES have to reference a valid line number. On my Milltronics VMC however M97 is pocket clear!! (so much for standardized G-code)

    As a friend of mine says, "The great thing about standards, is that there are so many of them to choose from."

    John

  6. #6
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by John3 View Post
    ....... On my Milltronics VMC however M97 is pocket clear!! (so much for standardized G-code)

    As a friend of mine says, "The great thing about standards, is that there are so many of them to choose from."

    John
    I sometimes wish I had a pet ghost I could commission to haunt the people who screwed up the original concept of standardized G codes. Excuse the minor hijack it is one of my (many) pet peeves.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  7. #7
    Join Date
    Jul 2003
    Posts
    263
    Quote Originally Posted by batmill View Post
    Hi John, the controller is Ultimax on a new Hurco VM2 mill. Similar to Fanuc I believe.
    the ultimax is nowhere near to the fanucs

    you dont really need line numbers, the only time you need them is if you have a problem in your prog and need to search for it, all line numbers does is take up memory.

    we run 2 to 3 megs programs in our Hurcos with no line numbers, the operators hate line numbers.

    the Ultimax only needs line numbers when you are using Hurco's programming system not in ISNC mode
    If you can ENVISION it I can make it

  8. #8
    Join Date
    Jun 2007
    Posts
    21

    Smile

    We only use N numbers at the beginning of each tool work within the program so its easy to call this line up if you need to make changes within that portion of the program or re-run a particular tool;

    N1(drill work)
    code
    code
    ect,,,
    N2(tap)
    code
    code
    ect,,,
    N3(endmill work)
    code
    code
    ect.

    This also makes the program easy to follow for editting and proving

  9. #9
    Join Date
    Jan 2006
    Posts
    4396
    Quote Originally Posted by Geof View Post
    I sometimes wish I had a pet ghost I could commission to haunt the people who screwed up the original concept of standardized G codes. Excuse the minor hijack it is one of my (many) pet peeves.
    I'll give a Good Example of this. Acromatic 2100E made by Siemens.

    They use "P" instead of "R" for Arcs. This can be changed in the Windows 98 Controllers but I have heard that it is a PITA.

    There Drilling Canned Cycles have Too many Options that do not apply to 90% of what needs to be done.

    I have to say that the Fanuc and Yasnac MX Series are two of the best though out Controls, IMPO.

    Sorry for the Hijack but this is annoying pet peeve that I have had for many years.
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

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

    www.refractotech.com

  10. #10
    Join Date
    Feb 2007
    Posts
    592

    Arrow

    Quote Originally Posted by bob@apc View Post
    We only use N numbers at the beginning of each tool work within the program so its easy to call this line up if you need to make changes within that portion of the program or re-run a particular tool;

    N1(drill work)
    code
    code
    ect,,,
    N2(tap)
    code
    code
    ect,,,
    N3(endmill work)
    code
    code
    ect.

    This also makes the program easy to follow for editting and proving
    Yes this is a prefered method - with an optional stop on the line before each Nxxx starting point.

  11. #11
    Join Date
    Jun 2007
    Posts
    21
    Quote Originally Posted by skullworks View Post
    Yes this is a prefered method - with an optional stop on the line before each Nxxx starting point.
    Correct,, That would be part of the ect,ect I refer to before the next N# .

  12. #12
    Join Date
    Aug 2007
    Posts
    6
    Thanks all, especially to CNC King.

Similar Threads

  1. Tool Numbers
    By Mike Mattera in forum EdgeCam
    Replies: 10
    Last Post: 02-04-2008, 05:18 PM
  2. Line numbers Fanuc OMD
    By Gncc50 in forum Fanuc
    Replies: 1
    Last Post: 08-22-2007, 07:30 PM
  3. How to get rid of line numbers in NC code
    By mcoughlin in forum CamWorks
    Replies: 1
    Last Post: 04-17-2007, 04:30 AM
  4. G-Code Line Numbers?
    By Imagineering in forum G-Code Programing
    Replies: 3
    Last Post: 08-17-2005, 01:26 PM
  5. How do I engrave numbers...
    By slp_prlzys in forum DIY CNC Router Table Machines
    Replies: 7
    Last Post: 10-15-2004, 08:35 PM

Posting Permissions

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