开源改变世界

一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084

推推 grbl 3年前 (2023-01-30) 189次浏览
打开
2个任务
ZincBoy 打开了这个问题 2021 年 2 月 15 日 · 2 条评论
打开
2个任务

注释

一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084
贡献者

以下是我重现该问题所遵循的步骤:

  1. 使用 python 接口和版本 2.8.1
  2. linux.stat.interpreter_errcode 将返回 INTERP_OK
  3. 使用以 (abort, msg) 终止的 linuxcnc.command.mdi 运行 o 代码
  4. 在此之后 linuxcnc.stat.interpreter_errcode 将返回 INTERP_ERROR
  5. linuxcnc.stat.interpreter_errcode 将从那时起返回 INTERP_ERROR
  6. 无论 stat.interpreter_errcode 的状态如何,command.mdi 字符串仍然可以发送并且可以正常工作
  7. linuxcnc.command.reset_interpreter() 不重置 interpreter_errcode

这是我期望发生的事情:

我希望 linuxcnc.command.reset_interpreter 命令重置 interpreter_errcode 但它没有。似乎没有办法将 interpreter_errcode 重置为 INTERP_OK。这发生在模拟和实时模式中。

这是发生了什么:

在此之前它工作正常:

我没有在旧版本上测试过这个,所以不能说这是否是一个新问题。

有关我的硬件和软件的信息:

  • 我正在使用这个 Linux 发行版和版本(通常显示为lsb_release -a):Debian Buster
  • 我正在使用此内核版本(显示为uname -a): Linux VK45 4.19.0-14-rt-amd64使用 Tcl_SetResult 和 Tcl_GetStringResult  #1 SMP PREEMPT RT Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
  • 我在跑步 …
    • [ X] 来自 linuxcnc.org 的二进制版本(包括 buildbot.linuxcnc.org)
    • 我自己构建的二进制文件
    • 来自 linuxcnc.org 之外的其他来源的二进制版本
  • 我正在使用这个 LinuxCNC 版本(显示在包管理器中,或者对于 git 版本,scripts/get-version-from-git):2.8.1
  • 我正在使用此用户界面 (GUI)(例如 AXIS、Touchy、gmoccapy 等):gmoccapy
  • 我正在使用此接口硬件供应商和芯片组(例如,并行端口、以太网端口、FPGA 卡):Mesa Ethernet FPGA
一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084
合作者

自发布以来,我一直在我的收件箱中保留有关此的电子邮件。我终于抽出时间来查看它,但无法重现问题。我正在运行这个 Python 脚本。

#! /usr/bin/env python
import linuxcnc

codes = ["INTERP_OK", "INTERP_EXIT", "INTERP_EXECUTE_FINISH", "INTERP_ENDFILE", "INTERP_FILE_NOT_OPEN", "INTERP_ERROR"]
s = linuxcnc.stat()
s.poll
print(codes[s.interpreter_errcode])
c = linuxcnc.command()
c.mdi("O<abort_test> call")
s.poll
print(codes[s.interpreter_errcode])
c.reset_interpreter()
s.poll
print(codes[s.interpreter_errcode])
exit(0)

其中 abort_test.ngc 是:

O<abort_test> sub
(abort, aborting)
O<abort_test> endsub
M2

也许重新映射需要激活?您还记得它在您的测试期间是否处于活动状态吗?

一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084
贡献者作者

当我遇到那个问题时,我确信我已经重新映射了 T 和 M6 代码。它们都使用 gcode 重新映射,并使用默认的 prolog 和 epilog python 代码。该代码与探测有关,我很确定在 python 调用的 ngc 中没有进行 T 或 M6 调用。

免费注册 在 GitHub 上加入此对话。已有帐户? 登录评论
标签
还没有
项目

还没有

发展

没有分支机构或拉取请求

2名参加者
一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084一旦发生错误,linuxcnc.stat.interpreter_errcode 就会停留在 INTERP_ERROR 并且无法重置 #1084

喜欢 (0)