Cannot get example below from docs to work.

More
6 years 1 month ago #180571 by jeoslislo
If enabled in the INI file G-code has access to the values of INI file entries and HAL pins.

#<_ini[section]name> Returns the value of the corresponding item in the INI file. For example, if the ini file looks like so:

[SETUP]
XPOS = 3.145
YPOS = 2.718
you may refer to the named parameters #<_ini[setup]xpos> and #<_ini[setup]ypos> within G-code.

EXISTS can be used to test for presence of a given ini file variable:

o100 if [EXISTS[#<_ini[setup]xpos>]]
(debug, [setup]xpos exists: #<_ini[setup]xpos>)
o100 else
(debug, [setup]xpos does not exist)
o100 endif

All I get is setup]xpos does not exist.

I setup ini_vars:

[RS274NGC]
PARAMETER_FILE = linuxcnc.var
INI_VARS = 1

Any ideas?

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #180577 by tommylight
Just a stab in the dark, but Linux does care about upper and lower case letters and they are not the same thing, so you might want to try and change that.

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #180581 by Todd Zuercher
What version of Linuxcnc are you running?

I'm not familiar with that feature, can you post a link to where it is documented?

My first guess is that it is probably case sensitive and will need to match the all caps used in the ini file.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #180586 by Hakan
Isn't it the FEATURES that has to be set for _ini?
[RS274NGC]
FEATURES = 4
from the section above the given example in the docs.

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #180651 by jeoslislo
LinuxCNC/AXIS version 2.7.15

linuxcnc.org/docs/devel/html/gcode/overv...tml#gcode:parameters
4. HAL pins and INI values

From the docs:
The names are not case sensitive - they are converted to uppercase before consulting the ini file.

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago #180653 by jeoslislo
It works with FEATURES = 4

I am running vers 2.7.15. Should I be using a later version? What is the easiest way to update?

Please Log in or Create an account to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum