[LinuxCNC/linuxcnc Issue#62] linuxcnc.stat.program_open() errors if called twice in a row

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

Issue #62 | 状态: 已关闭 | 作者: jepler | 创建时间: 2016-05-21

标签: task


dgarr notices that in master branch since ad06db2, the reload function is broken because linuxcnc says “interp_error: A file is already open”. This boils down to executing the following sequence, whether in 2.7 or master:

>>> import linuxcnc
>>> c = linuxcnc.command()
>>> c.state(linuxcnc.STATEESTOPRESET)
>>> c.state(linuxcnc.STATE_ON)
>>> c.home(-1)
>>> c.mode(linuxcnc.MODE_AUTO)
>>> c.program_open("/home/jepler/src/linuxcnc/share/axis/images/axis.ngc")
>>> c.program_open("/home/jepler/src/linuxcnc/share/axis/images/axis.ngc")
emc/task/emctask.cc 389: interp_error: A file is already open
A file is already open
can't open /home/jepler/src/linuxcnc/share/axis/images/axis.ngc

Options include allowing this sequence in task, or performing some other request in between, such as c.abort() explicitly in axis.py or implicitly in the linuxcnc module.

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

喜欢 (0)