On 16 August 2015 at 18:52, Gene Heskett <ghesk...@wdtv.com> wrote: > But as I contemplate adding another section to the code by way of > copy/paste, with an intervening paragraph of setting new values for the > 2nd tool, it strike me that either this code should source a config > file, or it could become a callable SUB for the configuration > controlling file. > > So, one, is it possible, and two, whats the prefered order and syntax?
I think that it is optionally possible to access _the_ INI file from G-code, but not a generic file. http://www.linuxcnc.org/docs/html/remap/structure.html#_optional_interpreter_features_ini_file_configuration_a_id_sub_ini_features_a So, if your INI contains [RS274NGC]FEATURES = 4 then you can use (for example) #1 = #<_ini[AXIS_0]PGAIN> in the G-code. Which probably doesn't achieve what you want. Note that "4" is a bit-field, You would typically use 12 to enable HAL-pin reading too. I suspect that what you really want to do is use a subroutine. In fact I alterd my Lathe GUI to use subs and params rather than HAL-pin access, partly because of queuing behaviour. example O<cut_joint> CALL [6.35] [13] ... O<cut_joint> SUB (DEBUG, I will cut #2 fingers with a #1 diameter cutter) O<cut_joint> ENDSUB -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers