Cannot get example below from docs to work.

More
03 Sep 2020 19:20 #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.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
03 Sep 2020 20:26 #180577 by tommylight
Replied by tommylight on topic Cannot get example below from docs to work.
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
03 Sep 2020 20:31 #180581 by Todd Zuercher
Replied by Todd Zuercher on topic Cannot get example below from docs to work.
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.

  • Hakan
  • Away
  • Platinum Member
  • Platinum Member
More
03 Sep 2020 20:42 #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
04 Sep 2020 10:46 #180651 by jeoslislo
Replied by jeoslislo on topic Cannot get example below from docs to work.
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
04 Sep 2020 10:56 #180653 by jeoslislo
Replied by jeoslislo on topic Cannot get example below from docs to work.
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.

  • BeagleBrainz
  • BeagleBrainz's Avatar
  • Visitor
  • Visitor
04 Sep 2020 10:58 #180654 by BeagleBrainz
Replied by BeagleBrainz on topic Cannot get example below from docs to work.
Depends on how you installed Linuxcnc.

The easiest way is to give some more info.

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

More
04 Sep 2020 11:28 #180658 by jeoslislo
Replied by jeoslislo on topic Cannot get example below from docs to work.
I installed it years ago, most likely from the linuxcnc install CD.

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

  • BeagleBrainz
  • BeagleBrainz's Avatar
  • Visitor
  • Visitor
04 Sep 2020 11:32 #180660 by BeagleBrainz
Replied by BeagleBrainz on topic Cannot get example below from docs to work.
Any idea if it's Ubuntu or Debian ?
Any idea of which version ?

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

More
04 Sep 2020 11:33 #180661 by jeoslislo
Replied by jeoslislo on topic Cannot get example below from docs to work.
I can live with using FEATURES= 4 instead of INI_VARS = 1 in the .ini file if updating my version is going to require a major effort

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

Time to create page: 0.063 seconds
Powered by Kunena Forum