[LinuxCNC/linuxcnc Issue#505] multi-spindle: python interface `cmd.brake` missing optional spindle argument.

未分类 bolang 5个月前 (10-15) 25次浏览

Issue #505 | 状态: 已关闭 | 作者: KurtJacobson | 创建时间: 2018-10-06


1. run sim/axis/lathe_multispindle/lathe.ini
2. reset and turn machine on
3. start a interactive python session and run:
python
>>> import linuxcnc
>>> s = linuxcnc.stat()
>>> c = linuxcnc.command()
>>> s.poll(); s.spindle[0]['brake']
1L
>>> c.brake(0) # release spindle 0 brake
>>> s.poll(); s.spindle[0]['brake']
0L
>>> s.poll(); s.spindle[1]['brake']
1L
>>> c.brake(0, 1) # release spindle 1 brake
Traceback (most recent call last):
File "", line 1, in
TypeError: function takes exactly 1 argument (2 given)
>>>


评论 (1)

#1 – KurtJacobson 于 2018-10-06

I attempted to fix this issue with 25dd7fe. This is my first attempt working with C/C++, so feel free to ignore it if it is way off base. I would appreciate feedback if anybody has the time to give it.

It does work properly on the multi-spindle lathe sim!! :satisfied:


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

喜欢 (0)