Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

T codes and other CNC Programming questions

  1. Apr 19, 2012 #1
    I have learnt M Codes and G Codes in CNC Programming.

    I was looking at a programming and found some statements unfamiliar to me

    This is how the program goes

    N1 T0000;
    G00 X0.0 Z0.0;
    N2 T0000;
    G00 X0.0 Z0.0;

    1) all the programs I have studied till date number each and every line
    The above program doesn't do that. Is line numbering optional?
    2) Line Numbers I have seen till now goes like NXXX - i.e. N005, N010 etc.
    The above uses N1. Is this specific syntax for a particular brand of machine?
    3) What is T0000 &T0101 - I have never come across this before?
    The programs I have seen have a T01 in the first line - that's the only T word I have seen till now. T01 is selecting a tool T01.
    I don't understand why someone would select tool T0000 go to X0.0 Y0.0 & then selected T0101.
    i.e. What exactly was T0000 for - i.e you changed the tool after just 1 goto.
    4) If N1 & N2 are line numbers, why have those 2 particular lines been numbered (as compared to other lines which haven't been labelled)

    Till now, I haven't actually programmed on an actual machine - just reading from books.
    Last edited: Apr 19, 2012
  2. jcsd
  3. Apr 20, 2012 #2


    User Avatar
    Gold Member

    It looks to me like the T0000 and X0 Z0 commands are being used to park the machine. For example, for a tool change in the first instance and at the end of the job in the second. (Think turret lathe - you wouldn't want to change the tool without clearing the job!)

    T0101. I have used 2 controllers (Allen Bradley and Fanuc) that allow different offsets to be assigned to the same tool. T0101 is tool 1, offset 1. T0102 would be tool 1, offset 2. You might need one set for face/diameter cuts and another for concave radius cuts (tool clearance allowing). I have seen it called a wear offset.

    N1 and N2 are probably being used as sequence labels to enable a goto statement to jump to that part of the program out of order. For instance, you might want to jump over a finish cut sequence while setting a roughing tool up. You could do this by temporarily programming a GOTO N2. I have not yet used a machine where line numbers were compulsory.
    Last edited: Apr 20, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook