Named Parameter not defined error

More
26 Jan 2023 05:46 #262919 by SkyMoCo
Named Parameter not defined error was created 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 or Create an account to join the conversation.

More
26 Jan 2023 11:46 #262929 by mgm
Replied by mgm on topic Named Parameter not defined error
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 or Create an account to join the conversation.

More
26 Jan 2023 17:06 #262942 by SkyMoCo
Replied by SkyMoCo on topic Named Parameter not defined error
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 or Create an account to join the conversation.

More
26 Jan 2023 18:13 #262949 by mgm
Replied by mgm on topic Named Parameter not defined error
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 or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum