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?
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:
- 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.