Reading variable from ini no longer works?

More
31 May 2025 13:04 - 31 May 2025 13:07 #329443 by wusel0464
Hello,

For some reason, reading a variable from the ini.file no longer works. Get the error message that the variable is not defined. However, the whole thing worked until the beginning of the year, but so far I didn't do anything unless it was updated today on the occasion.

Here is the excerpt from the INI and the sub -program for tool measurement.
Linuxcnc is the current 2.10 QTDragon HD.

INI
[WERKZEUGWECHSEL]
WECHSEL_POS_X                       = 150
WECHSEL_POS_Y                       = 20
WECHSEL_POS_Z                       = 0
WL_POS_X                            = 6.934             #(Position Taster X)
WL_POS_Y                            = 11.154            #(Position Taster Y)
WL_POS_Z                            = -100              #(Position sicheres Z, etwas laenger als laengstes Werkzeug, hoehe Taster beruecksichtigen)
WL_WEG_ZUM_SENSOR                   = -70               #(Messdistanz, Weg innerhalb der Taster ausloesen muss)


Tool length
#1801=#<_ini[WERKZEUGWECHSEL]WL_POS_X>                                  (Position Taster X)
#1802=#<_ini[WERKZEUGWECHSEL]WL_POS_Y>                                  (Position Taster Y)
#1800=#<_ini[WERKZEUGWECHSEL]WL_POS_Z>                                  (Position sicheres Z, etwas laenger als laengstes Werkzeug, hoehe Taster beruecksichtigen)
#1804=#<_ini[WERKZEUGWECHSEL]WL_WEG_ZUM_SENSOR>                         (Messdistanz, Weg innerhalb der Taster ausloesen muss)


If something has changed in the syntax, if I assign the values ​​directly in the measurement, I don't get a mistake.
I found it pleasant to have the values ​​in the Ini.

I somehow don't get the measurement routine built into Qtdragon. I work with two buttons switched in series as an opener. What one is installed and the other flies to workpiece height measurement.

Thank you very much and have a nice weekend Frank.
Last edit: 31 May 2025 13:07 by wusel0464.

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

More
31 May 2025 19:22 #329465 by cmorley
Replied by cmorley on topic Reading variable from ini no longer works?
Try removing the comments that are on the same line.
Also confirm that the right INI file is being looked at. More then one of us have edited the wrong version :)

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

More
01 Jun 2025 15:38 #329518 by wusel0464
Replied by wusel0464 on topic Reading variable from ini no longer works?
Hello,

Thanks for the quick help.
Now I just deleted the comments in the Ini and the mistake has disappeared. But the comments were at least half a year without problems.
Something must have changed lately.
I left the comments in the change routine.
Very strange.

Many greetings and thanks, Frank

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

More
02 Jun 2025 14:38 #329551 by wusel0464
Replied by wusel0464 on topic Reading variable from ini no longer works?
Hello,

I once exchanged tab for spaces, but that makes no difference. I suspect that the reader routine does not recognize the comment as such.
Incidentally, my INI file is not as chaotic as there, I just copied it in and this strange arrangement came out.
In practice, everything is nicely arranged in the INI.

Many greetings Frank

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

More
04 Jun 2025 15:52 #329697 by wusel0464
Replied by wusel0464 on topic Reading variable from ini no longer works?
Hello,

According to today's update of Linux CNC 2.10, the comment in the INI is still not recognized as such.
This modest entry is already sufficient.

WL_POS_X = 6.934 #

Without a comment, everything works normally.

It would be nice if someone could see over the knowers.

Thanks and best regards, Frank.

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

More
05 Jun 2025 08:32 #329730 by Aciera
Replied by Aciera on topic Reading variable from ini no longer works?
Inline comments have not been allowed since version 2.8:
linuxcnc.org/docs/stable/html/config/ini-config.html#_comments

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

More
05 Jun 2025 14:21 - 05 Jun 2025 14:36 #329742 by wusel0464
Replied by wusel0464 on topic Reading variable from ini no longer works?
Hello,

In my view, not necessarily the best idea.
For my part, I felt very useful and pleasant to comment.
It works in other places too.
And I also see no problem that everything that comes after a double cross is simply a comment if it is in the same line. The possibility of creating extra comments lines remains.
The only thing I can think of is that I recently edited the INI and because the comments could have inserted without switching on the milling machine, I can't think of anything else.

What I really miss is an understandable change overview between really every single versions or the place where I find something.

This has done the problem.
Sorry for the sometimes unhappy choice of Google translator, my modest English is even worse.

All the best and best regards, Frank
Last edit: 05 Jun 2025 14:36 by wusel0464.

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

Moderators: cmorley
Time to create page: 0.118 seconds
Powered by Kunena Forum