[LinuxCNC/linuxcnc Issue#239] interp’s named variables for tool info are wrong

未分类 bolang 4个月前 (10-15) 30次浏览

Issue #239 | 状态: 已关闭 | 作者: SebKuzminsky | 创建时间: 2017-03-03

标签: tooltable


Forum user jtc reports a bug with #<currentpocket>:

https://forum.linuxcnc.org/10-advanced-configuration/32412-bug-in-current-pocket#88904

The documentation for #<currentpocket> says:


#<currentpocket> - Return pocket number of the current tool.

However, on startup the value is 1, which is wrong. And after Tx M6 the variable holds the index into Interp’s tool table, which may differ from the pocket number in the tool table file and thus is also wrong.

To further complicate the issue, Random and Non-random tool changes differ in their behavior here.


评论 (3)

#1 – SebKuzminsky 于 2017-03-06

The branch “2.7-tool-info” adds a test that demonstrates the current bogus behaviors.


#2 – rene-dev 于 2018-02-25

https://github.com/LinuxCNC/linuxcnc/blob/c8a718ea374289d661fbf5239096de53eddd3975/src/emc/rs274ngc/interp_namedparams.cc#L664
this returns the index number, not the pocket number.

this is how to get the pocket number:
https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/iotask/ioControl.cc#L297
it would be much easier to store the pocket number in the tooltable array…


#3 – rene-dev 于 2020-04-20

fixed in 2.8 and master by dab2a051b30e600ef95fbe911053386ef44631d0


原始Issue: https://github.com/LinuxCNC/linuxcnc/issues/239

喜欢 (0)