what's wrong with my tooltable?
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4862
11.811023622047244 is being parsed (probably by Python) with the "." as a thousands separator rather than a decimal point.
One flaw with this explanation is that the numbers should be E16 with the number of decimal places output.
Incidentally, the tool table units are expected to be the base units of the configuration. LinuxCNC is internally all-metric. Except for the Axis GUI, which is internally Imperial...
Please Log in or Create an account to join the conversation.
- Reinhard
- Offline
- Platinum Member
- Posts: 508
- Thank you received: 94
.
You're right for sureMy guess ...
.
Well I thought similar and therefore I wanted to know it for sure and started a little research.11.811023622047244 is being parsed (probably by Python) with the "." as a thousands separator rather than a decimal point.
First I searched for the command I issue for reload EMC_TOOL_LOAD_TOOL_TABLE
and found these positive triggers:
src/emc/task/emctaskmain.cc
src/emc/nml_intf/emc.cc
src/emc/usr_intf/shcom.cc
src/emc/iotask/ioControl.cc
src/emc/iotask/ioControl_v2.cc
src/emc/task/emctaskmain.cc: case EMC_TOOL_LOAD_TOOL_TABLE_TYPE:
load_tool_table_msg = (EMC_TOOL_LOAD_TOOL_TABLE *) cmd;
retval = emcToolLoadToolTable(load_tool_table_msg->file);
emcToolLoadToolTable -> iotaskinf.cc
... sendCommand( ... )
Next hit was src/emc/nml_intf/emc.cc, which is internal stuff like update only. Not of interest too.
src/emc/usr_intf/shcom.cc results in a sendCommand too and for so not of interest.
src/emc/iotask/ioControl.cc is indentical to src/emc/iotask/ioControl_v2.cc respect to keyword usage and finally is the only place of interest:
case EMC_TOOL_LOAD_TOOL_TABLE_TYPE:
loadToolTable( ... )
reload_tool_number( ... )
The number scanning is straight forward plain C (without any python influences) and looks like this
case 'Z':
if (sscanf(&token[1], "%lf", &offset.tran.z) != 1)
valid = 0;
break;
Remember: on my tests I used the loadToolTable function from linuxcnc unchanged in a standalone app, where I parsed the same file (which I overwrite from my app and ask the linuxcnc-backend to reparse) again and again.
So three or if you like four parties parsed the same file.
Axis on opening tooltable showed the right values, therefore I guess, that axis parses the file itself without reading the status area for tooltable.
So the wrong number handling happens between reading tooltable file and writing the values to shared memory.
I thought: may be the reloading of tooltable is broken, but when I overwrite my generated tooltable (which leads to wrong Z-values) with the original tooltable from axis, Z-values from linuxcnc backend are correct.
.
Well - that is the best way!Incidentally, the tool table units are expected to be the base units of the configuration.
.
Is this related to the ini-files - or does this means, that axis GUI uses a different backend than all other screens?LinuxCNC is internally all-metric. Except for the Axis GUI, which is internally Imperial...
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4862
What doesn't get the right numbers?
Places that you can see the tool offsets are
Active GUI
G-code numbered parameter (MDI the command "(DEBUG, #5403)")
HAL pins, in the terminal "halcmd show pin halui.tool.length−offset.z"
The Python interface:
python
import linuxcnc
s = linuxcnc.stat()
s.poll()
print s.tool_offset()
print s.tool_offset
print s.tool_table()
print s.tool_table
exit()
Please Log in or Create an account to join the conversation.
- Reinhard
- Offline
- Platinum Member
- Posts: 508
- Thank you received: 94
Brrrh - keep calm!So, Axis gets the right numbers?
When you open tooltable from file-menu from main menu of axis gui, the toolmanager then shows the right values.
My guess was, that axis gui parses the tooltable file itself, without caring about the values from backend.
... and my guess seems to be right.
.
OK, didn't know that.MDI the command "(DEBUG, #5403)"
A quick shot resulted in 0.00...
So backend has no Z-value and axis has read the values from file itself. QED
.
That did not show anything beside the headlinehalcmd show pin halui.tool.length−offset.z
.
Sorry - but I don't like to bother with python any morepython
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23178
- Thank you received: 4862
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
- Posts: 7780
- Thank you received: 2075
It's probably why Andy suggested checking with python.
Please Log in or Create an account to join the conversation.
- Reinhard
- Offline
- Platinum Member
- Posts: 508
- Thank you received: 94
I know the function "Stat_tool_table" from emcmodule.cc, but I don't believe, that when axis reads the same source than I, that it can lead to different result.
That's why I suspected, that the toolmanager from axis reads the tooltable file directly - and it looks that other screens do it the same way ...
I wanted to check out other screens, but I did not found any other screen that is usable at first sight.
It's tedious to start an old debian, try different screens and find out, that none of them is usable ...
Currently my app is broken, so I can't continue research. Have to fix it first.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
- Posts: 7780
- Thank you received: 2075
Looking at AXIS's source I can see where AXIS reads for tool info.
Gscreen, Gmoccapy, and Qtvcp use a widget to read the var file for tools other then the current tool - but the current tool offsets are still read from linuxcnc's Stat...
It would be helpful if you tried or answered the questions or suggestions that Andy and I suggested.
Oh I tried to run your app but it couldn't find something;
Error: Could not find or load main class de.schwarzrot.app.LinuxCNCClient
and I assumed default-jre is the right java...
Chris
Please Log in or Create an account to join the conversation.
- Reinhard
- Offline
- Platinum Member
- Posts: 508
- Thank you received: 94
Well, from axis main menue: file -> tooltable (or the 4th entry from bottom counted)What are you calling AXIS tool manager?
.
Sorry Chris, but I NEVER talked about current tool offsets.- but the current tool offsets are still read from linuxcnc's Stat...
.
Well, that's what I try to do. Always.It would be helpful if you tried or answered the questions or suggestions that Andy and I suggested.
But may be I don't find the right words to describe what I mean - so sorry for any annoyance that I caused!
.
Ok, I assume, you followed the readme ...Oh I tried to run your app but it couldn't find something;
Is there another way to communicate?
This forum has no private messages and I can't edit the email in profile. Can you see the email I used to register? If so, can you write me a mail?
Please Log in or Create an account to join the conversation.
- Reinhard
- Offline
- Platinum Member
- Posts: 508
- Thank you received: 94
look at the starterscript - second source line is the directory, where you extracted the archive (UI_BaseDir).Error: Could not find or load main class de.schwarzrot.app.LinuxCNCClient
May be you have to adjust the path?
Please Log in or Create an account to join the conversation.