Closed DjangoReinhard closed 11 months ago
I believe that the tool table is assumed to be in the base units of the configuration.
Were you using a metric config?
from inifile:
[TRAJ]
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
There goes that theory. I run metric machines, and have not seen this problem. Is this also a problem if you use the Axis interface? I seem to recall that Gmoccapy does a lot more internal tool handling that the other GUIs do.
he is not using any UI, running rs274 directly. This is looks like a bug. the tooltable should always be interpreted in machine units.
In that case I suspect that the sai doesn't actually look for units in the .ini. I don't see any evidence of a search for TRAJ in saicannon.cc and I do see a hard-coded function: https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/sai/saicanon.cc#L720
Andy you're right! The hardcoded function is the evil. I tried to change hardcoded number with "_sai._length_unit_factor" and it seems to work.
Andy you're right! The hardcoded function is the evil. I tried to change hardcoded number with "_sai._length_unit_factor" and it seems to work.
But I suspect that variable mirrors the G20 / G21 status, not the machine base units. That function should probably look at the INI, after checking that an INI is specified.
It's been a long time coming, but I now believe this to be fixed.
Imperial INI file
andypugh@rm-one:~/linuxcnc-dev/configs/sim/axis$ cat saitest.ngc | rs274 -g -v sim_mm.var -i axis.ini -t sim.tbl
executing
...
13 N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 12.9794, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
Metric INI file.
andypugh@rm-one:~/linuxcnc-dev/configs/sim/axis$ cat saitest.ngc | rs274 -g -v sim_mm.var -i axis_mm.ini -t sim.tbl
executing
...
10 N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.5110, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000)
wrong unit handling of (standalone-)interpreter
Here are the steps I follow to reproduce the issue:
This is what I expected to happen:
on processing G43 with tool #3 I expect the toollength to be 53mm, but interpreter calculates 1346.2mm - which is the length value from tooltable treaten as imperial unit and converting it to mm. All arcs/circles failed with error about to big tool radius
Initialization of backend uses mm settings, and G21 has been used explicitly - so I see no reason, why tooltable entries of a mm-machine should be treaten as imperial values.
Information about my hardware and software: