FEATURES variable in INI file RS274NGC section
25 Nov 2016 01:38 #83249
by screwtop
FEATURES variable in INI file RS274NGC section was created by screwtop
Hi all,
Firstly, mad props to all the devs for making LinuxCNC such a piece of wizardry! I've been refitting my Chinese CNC router due to problems with the RichAuto hand-held controller, and have just recently got the machine to a useful working state.
While working on a Z-probe routine based around G38, I recognised that I should use custom variables in the machine INI file for things like the probe plate thickness and probing feedrate. It seems that in order to refer to INI file variables (and HAL values) from within G-code, you have to add FEATURES=12 to the INI file, in the RS274NGC section, a la:
I found this nugget in a forum/list discussion. I was thinking it would be helpful if this requirement was mentioned in the documentation on custom sections and variables:
linuxcnc.org/docs/2.6/html/config/ini_co...sub:custom-variables
FEATURES itself should probably also be described in the section on the RS274NGC INI file section:
linuxcnc.org/docs/2.6/html/config/ini_co...sub:RS274NGC-section
(I'm using LinuxCNC 2.6 at present but the 2.7 and development docs are the same in this regard.)
Indeed, is there any reason not to enable FEATURES=12 by default? I was curious about this variable and wondered what possible values there are.
Thanks!
Firstly, mad props to all the devs for making LinuxCNC such a piece of wizardry! I've been refitting my Chinese CNC router due to problems with the RichAuto hand-held controller, and have just recently got the machine to a useful working state.
While working on a Z-probe routine based around G38, I recognised that I should use custom variables in the machine INI file for things like the probe plate thickness and probing feedrate. It seems that in order to refer to INI file variables (and HAL values) from within G-code, you have to add FEATURES=12 to the INI file, in the RS274NGC section, a la:
[RS274NGC]
...
FEATURES=12
I found this nugget in a forum/list discussion. I was thinking it would be helpful if this requirement was mentioned in the documentation on custom sections and variables:
linuxcnc.org/docs/2.6/html/config/ini_co...sub:custom-variables
FEATURES itself should probably also be described in the section on the RS274NGC INI file section:
linuxcnc.org/docs/2.6/html/config/ini_co...sub:RS274NGC-section
(I'm using LinuxCNC 2.6 at present but the 2.7 and development docs are the same in this regard.)
Indeed, is there any reason not to enable FEATURES=12 by default? I was curious about this variable and wondered what possible values there are.
Thanks!
Please Log in or Create an account to join the conversation.
25 Nov 2016 09:56 #83257
by andypugh
Replied by andypugh on topic FEATURES variable in INI file RS274NGC section
The ability to read HAL pin values from G-code is problematical because there are issues with when the interpreter reads the values and when the other HAL components set the values.
However, INI file data is static and these concerns are not (usually) an issue. So I think that setting the feature mask to 4 might be a good idea, but setting it to 12 ought to be something that is done deliberately and while understanding the consequences.
However, INI file data is static and these concerns are not (usually) an issue. So I think that setting the feature mask to 4 might be a good idea, but setting it to 12 ought to be something that is done deliberately and while understanding the consequences.
Please Log in or Create an account to join the conversation.
25 Nov 2016 10:45 #83260
by screwtop
Replied by screwtop on topic FEATURES variable in INI file RS274NGC section
Thanks, Andy. I think it's safe to say I don't understand the consequences. So FEATURES is a bitmask for enabling experimental functionality? I'd wondered if it might be a sort of version number for LinuxCNC's G-code dialect. Is it documented somewhere in the user docs, or is it more something for developers and testers?
I can imagine that reading HAL signals from G-code would be tricky! I did find some more information here, which clarifies that accessing INI-file vars as named parameters is still experimental:
linuxcnc.org/docs/html/remap/remap.html#...to-inifile-variables
This will be a very useful feature once stabilised/merged.
I can imagine that reading HAL signals from G-code would be tricky! I did find some more information here, which clarifies that accessing INI-file vars as named parameters is still experimental:
linuxcnc.org/docs/html/remap/remap.html#...to-inifile-variables
This will be a very useful feature once stabilised/merged.
Please Log in or Create an account to join the conversation.
25 Nov 2016 12:00 #83263
by andypugh
It is something of an "orphan" as the developer who introduced it left to start Machinekit.
Replied by andypugh on topic FEATURES variable in INI file RS274NGC section
This will be a very useful feature once stabilised/merged.
It is something of an "orphan" as the developer who introduced it left to start Machinekit.
Please Log in or Create an account to join the conversation.
25 Nov 2016 18:55 #83308
by screwtop
Replied by screwtop on topic FEATURES variable in INI file RS274NGC section
Ah, I see. I've been watching MachineKit's progress with interest; I wasn't exactly sure how amicable the relationship with LinuxCNC was, to be honest. It was confusing at least for me as a new MachineKit user not being sure if it was LinuxCNC or not.
Ha - and had I scrolled up just a little from the location from my last message, I would have found exactly what I was looking for:
linuxcnc.org/docs/html/remap/remap.html#...i_file_configuration
So, as you say, FEATURES=4 would make sense in my case of just wanting to access INI file vars from G-code.
Still, is there a case for documenting this in the INI Configuration section? Even just an extra sentence or two and/or a link to the Remap docs would help. I'm happy to do some editing, if that's permissible.
Thanks again!
Ha - and had I scrolled up just a little from the location from my last message, I would have found exactly what I was looking for:
linuxcnc.org/docs/html/remap/remap.html#...i_file_configuration
So, as you say, FEATURES=4 would make sense in my case of just wanting to access INI file vars from G-code.
Still, is there a case for documenting this in the INI Configuration section? Even just an extra sentence or two and/or a link to the Remap docs would help. I'm happy to do some editing, if that's permissible.
Thanks again!
Please Log in or Create an account to join the conversation.
25 Nov 2016 21:30 - 25 Nov 2016 21:31 #83315
by andypugh
I think so.
You could edit the files on Github and submit a pull request, if you like.
github.com/LinuxCNC/linuxcnc/blob/master.../src/remap/remap.txt
and
github.com/LinuxCNC/linuxcnc/blob/master...onfig/ini-config.txt
Asciidoc syntax is descibed here:
asciidoctor.org/docs/what-is-asciidoc/
Replied by andypugh on topic FEATURES variable in INI file RS274NGC section
Still, is there a case for documenting this in the INI Configuration section?
I think so.
You could edit the files on Github and submit a pull request, if you like.
github.com/LinuxCNC/linuxcnc/blob/master.../src/remap/remap.txt
and
github.com/LinuxCNC/linuxcnc/blob/master...onfig/ini-config.txt
Asciidoc syntax is descibed here:
asciidoctor.org/docs/what-is-asciidoc/
Last edit: 25 Nov 2016 21:31 by andypugh.
The following user(s) said Thank You: screwtop
Please Log in or Create an account to join the conversation.
26 Nov 2016 03:36 #83324
by screwtop
Replied by screwtop on topic FEATURES variable in INI file RS274NGC section
Grand, thank you. I've cloned, branched, and made some changes - do I need privs to push the branch before I can issue a pull request? Computer says no, at the moment. My username on GitHub is also screwtop.
Perhaps you could also confirm that I'm using the right markup for chapter and section references (the HTML docs I've built don't seem to come out with the correct inter-page links):
For another chapter:
<<cha:remap,Remap Extending G-Code>>
For a section in another chapter/page:
<<cha:remap#remap:ini-features,Optional Interpreter Features>>
or perhaps just
<<remap:ini-features,Optional Interpreter Features>>
Perhaps you could also confirm that I'm using the right markup for chapter and section references (the HTML docs I've built don't seem to come out with the correct inter-page links):
For another chapter:
<<cha:remap,Remap Extending G-Code>>
For a section in another chapter/page:
<<cha:remap#remap:ini-features,Optional Interpreter Features>>
or perhaps just
<<remap:ini-features,Optional Interpreter Features>>
Please Log in or Create an account to join the conversation.
26 Nov 2016 12:09 #83337
by andypugh
I don't actually know, I have never committed via Github, I have push privileges to the main repository.
I am pretty sure that anyone at all can send a pull-request, and one of the developers gets to accept or reject it.
Replied by andypugh on topic FEATURES variable in INI file RS274NGC section
Grand, thank you. I've cloned, branched, and made some changes - do I need privs to push the branch before I can issue a pull request? Computer says no, at the moment.
I don't actually know, I have never committed via Github, I have push privileges to the main repository.
I am pretty sure that anyone at all can send a pull-request, and one of the developers gets to accept or reject it.
Please Log in or Create an account to join the conversation.
26 Nov 2016 21:35 #83349
by screwtop
Replied by screwtop on topic FEATURES variable in INI file RS274NGC section
I did some more reading...without push privileges, I think I would need to fork the repo first, clone that, branch, modify, commit, push, and then use the forked repo to initiate the pull request. Apparently the parent repo devs will be notified. I'll give that a try...
Please Log in or Create an account to join the conversation.
26 Nov 2016 22:56 #83351
by screwtop
Replied by screwtop on topic FEATURES variable in INI file RS274NGC section
The following user(s) said Thank You: BigJohnT
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.093 seconds