Named Parameter not defined error

More
3 years 9 months ago #262919 by SkyMoCo
I am trying to pass a variable defined in the .ini file to a macro but I must be missing a step as when I run it, I get a not defined error for any variable I try to use, in this case max_probe.   From reading the docs and looking at example code, I think this should work.   If I define the variables inside the macro file, it works just fine, but I want to understand what I am doing wrong.

From my ini file:

[TOOLSENSOR]
max_probe = 10

And the macro has:

#<max_probe> = #<_ini[TOOLSENSOR]max_probe>

I read this to mean:
#<_ini[TOOLSENSOR]max_probe>
                                           ^--  Variable, converted to lowercase w/o underscores or spaces
                   ^
  From the TOOLSENSOR part of the file
       ^
  From the ini file

Please Log in to join the conversation.

More
3 years 9 months ago #262929 by mgm
I had the same problem ... the missing an entry in the INI

under the section: [RS274NGC]

INI_VARS = 1

and for the HAL parameters

HAL_PIN_VARS = 1

linuxcnc.org/docs/2.9/html/config/ini-co...sub:ini:sec:rs274ngc

Please Log in to join the conversation.

More
3 years 9 months ago #262942 by SkyMoCo
That must be a new 2.9 feature. I'm still on 2.8. I'll upgrade and give it a go.

Please Log in to join the conversation.

More
3 years 9 months ago #262949 by mgm
No you do not need updates !
My machine is also at 2.8

Just add the 2 lines in the ini and good !!!

Please Log in to join the conversation.

Time to create page: 0.159 seconds
Powered by Kunena Forum