For developing a CNC system, I am reading the "ISO 6983-1:2009".

In it, there are several references to what they call "Detailed format classification" which I struggle to understand:

A classification of the data in a block shall be used to specify the programming detail for a system and machine configuration. This is called the detailed format classification and is described in Annex C.


Zero omission shall be specified in the detailed format classification (see Annex C).


The number of digits shall be designated by the detailed format classification ( see Annex C).


It seem this "Detailed format classification" is sort of a definition of the machine on which the program will run. But in this case, I do not understand why this is something part of the program and not some values of the control system.

My question is: What exactly is this "Detailed format classification"?

  • Is it part of the program?
  • What is it purpose?

enter image description here

  • 1
    $\begingroup$ Detailed information is on each line sequence, for example N01 is the number of line command, then N02 is the other line sequence, then N03; the user or the interfase to create his own code determines if the line number commands are one by one or 10 by 10 to insert manually inside other line commands like S parameters, M03 and M04 functions to enable or disable other mechanism that the G-code generator can't do. This command lines N01 to N9999999. When an ISO is called is to standarize the way document some procedure or instruction; this way everybody who knows the code can read it easily. $\endgroup$ – Fernando Baltazar Aug 11 '18 at 20:19
  • $\begingroup$ @FernandoBaltazar Please refrain from answering via comments. Make it a full answer. $\endgroup$ – Trish Aug 12 '18 at 8:45
  • $\begingroup$ @Trish: His comment IMO does not answer the question, that is why it is a comment and not an answer. Or do I understand it wrong? $\endgroup$ – Adrian Maire Aug 12 '18 at 8:51
  • 1
    $\begingroup$ it is more than just a comment, but an answer attempt. $\endgroup$ – Trish Aug 12 '18 at 8:57
  • 1
    $\begingroup$ @Trish This is a hint to read the detailed ISO-6983 classification, not an attempt to answer the full question. A tip normally gives a direction where the people want to go. But if the people who ask has no notion about ISO Standars and Programming at least Gcode they will not understand the hint; probably they will comment that the answer has no their answer and I could get a vote down. Also my comment suggest that is a part of the program and the purpose according his questions. $\endgroup$ – Fernando Baltazar Aug 13 '18 at 5:06

This is simply the formalised definition of the syntax, so that a parser can be written to interpret any legal G-code. Without this, there is ambiguity - not in the general operation, but in the bounds of what is 'legal' and what should be rejected.

Taking the example X+053, this is not a position of 53 units, it is:

  • Address X
  • Sign is required (in this implementation)
  • Leading zeros can be ommitted
  • Up to 5 orders of magnitude before the decimal
  • Up to 3 digits of precision after the decimal

This means that X can range from +99999.999 to -99999.999 - an interpretation which matches the verbiage at the bottom of the page.

As hinted at in the text, it is possible to use various fixed precision number systems (think using integer milimetres rather than decimal metres), and also to anchor at the most significant bit, so 001 could represent 00100.000. It may help to remember that these specifications were designed in the days of dedicated hardware rather than general purpose computers, when the standard portable storage medium held ~600 kB, and relate to actual machines that had been developed long before that.

  • $\begingroup$ The second digit indicates the number of decimal decades ahead of the decimal sign This does not seem the usual meaning of the address: e.g. X+053 usually indicates position/increment to X53, not that there are 5 digits ahead of the decimal sign. Am I understanding it totally wrong? $\endgroup$ – Adrian Maire Aug 14 '18 at 7:00
  • $\begingroup$ Additionally, the format is formalised in the chapter 5 already. $\endgroup$ – Adrian Maire Aug 14 '18 at 7:03
  • $\begingroup$ Updated my answer to explain now I realise what is going on... $\endgroup$ – Sean Houlihane Aug 14 '18 at 10:20
  • 1
    $\begingroup$ It's not specifying if leading zeros can be omitted, it's specifying an international notation for capturing the number system in use - written ~50 years after these codes started to evolve. Imagine you want a modern machine to consume old G-code, you need a clear way to define how to parse it. $\endgroup$ – Sean Houlihane Aug 14 '18 at 14:10
  • 1
    $\begingroup$ I'm not sure this code would ever have been intended to be directly consumed in a machine readable form. The closest (I think) would be the #define for the parser. Think of it as kind of similar to the LOCALE settings. $\endgroup$ – Sean Houlihane Aug 14 '18 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.