7

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

Adrian Maire
  • 290
  • 1
  • 14
  • 1
    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. – Fernando Baltazar Aug 11 '18 at 20:19
  • @FernandoBaltazar Please refrain from answering via comments. Make it a full answer. – Trish Aug 12 '18 at 08:45
  • @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? – Adrian Maire Aug 12 '18 at 08:51
  • 1
    it is more than just a comment, but an answer attempt. – Trish Aug 12 '18 at 08:57
  • 1
    @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. – Fernando Baltazar Aug 13 '18 at 05:06
  • For clarification: the question is specifically about the annex C: "Detailed format classification". In other words, I can read/write g-code and have a decent knowledge about standards entities like ISO. The comment of @FernandoBaltazar, seem to me to address the general G-code and ISO topic, more than the "Annex C". For example, usually G02 is for circular motion, but in this case, the x+053 does not indicate relative/absolute position, but the number of digits left/right of the decimal sign? – Adrian Maire Aug 13 '18 at 06:28
  • @AdrianMaire :D a previous line should have the position of the new hole, if is indicated the position then is absolute, if not the position is relative; the movements +053 are relative to the position. Thanks God you can read and write gcode. – Fernando Baltazar Aug 13 '18 at 21:00
  • @FernandoBaltazar Don't fear the down votes. You have the choice to delete any answer which gains too many downvotes or turns out to be wrong. Answers in comments that turn into discussions are bad, can't be edited (and I think in this case are actually wrong) – Sean Houlihane Aug 14 '18 at 10:23

1 Answers1

4

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.

Sean Houlihane
  • 3,712
  • 2
  • 18
  • 39
  • `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? – Adrian Maire Aug 14 '18 at 07:00
  • Additionally, the format is formalised in the chapter 5 already. – Adrian Maire Aug 14 '18 at 07:03
  • Updated my answer to explain now I realise what is going on... – Sean Houlihane Aug 14 '18 at 10:20
  • Thanks for your answer. But why is required this syntax, why to invent an X+053 when it could say "The system has to specify/document if leading zeros can be omitted" – Adrian Maire Aug 14 '18 at 14:03
  • 1
    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. – Sean Houlihane Aug 14 '18 at 14:10
  • Sorry to be a bit slow to get it. Where would you write this `%:/DS N03 G02 X+053..`? In you g-code program? Is it a setting in the user interface of the machine? Maybe a `#define` in the parser implementation? – Adrian Maire Aug 14 '18 at 14:20
  • 1
    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. – Sean Houlihane Aug 14 '18 at 14:23
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/81644/discussion-between-adrian-maire-and-sean-houlihane). – Adrian Maire Aug 14 '18 at 14:24