As a general forwarding note, I realize that turbocnc is not an open
project and do not expect any of the things that we talk about here to
be incorporated into the source, but in the interest of exploration I'll
continue this thread. With that in mind I would like to take this time
to thank Dave Kowalczyk for listing to our ideas, suggestions, and
incorporating them into the latest and greatest version ;-)
Carol & Jerry Jankura wrote:
> I wouldn't be too concerned about the INI file becoming corrupted and
> "losing" the position information any more than I'd be concerned about a
> separate file. When reading an INI file, the programmer has the option of
> providing a default value to be used only if the section or key value is not
> available. In this case, the default is simply set to zero, the same as it
> would be if the INI file didn't even exist.
If the configuration of my machine was "off the shelf", I would agree.
Now picture a scenario where the machine gets turned off in the middle
of writing the .ini file. Now the parameters are corrupted (as a note
there are ways of getting mostly around this like writing to a different
file and renaming -- renaming a file is nearly an atomic operation)...
Let's say that it took me a couple of hours of playing around to find
and tune the parameters of my set up (which it did actually), and the
crash happens a couple of months after initial setup when I no longer
remember all the details, and it just so happens that I forgot to make a
backup... Now I have to sit down and refigure, and retune, and I have a
project that MUST get out the door by 6:00am tomorrow...
> A better concern is more philosophical: Should data that changes regularly
> and is more related to the current G-Code being executed be stored in the
> same file as data which relates to machine setup?
For the most part I agree, but I would state the philosophical question
in the following manner: Should machine state (positional data) be
integrally intertwined with it's geometric representation and machine
1) The answer to the state<->geometry is yes. There must be a
one-to-one correspondence between state and geometry or configuration.
2) The question of state<->parameterization is no. What it takes to
tell a machine how to move is fundamentally different from it being at
any given X,Y,Z,A,... position.
If we separate the two (thus accomplishing #2), writing the
state/position information on exit is generated by the machines inherent
understanding of it's geometry (so #1 is accomplished).
> Personally, I'd prefer to
> minimize the number of initialization files, so I'd keep it all in one
> place. That makes it a lot easier when you move your program from one
> machine to another.
loosing the posional information is easily recoverable - just zero or
set the position. So, only the turbocnc.ini file is of any importance.
The posional information changes every time. That is why I like Doug
Fortune's idea of calling it turbocnc.pos.