开源改变世界

发送 $$ 中断与 GRBL 1.1 的连接 #1563

推推 grbl 3年前 (2023-02-03) 213次浏览
打开
truglodite 打开了这个问题 2021 年 3 月 4 日 · 7条评论
打开

发送 $$ 中断与 GRBL 1.1 的连接#1563

truglodite 打开了这个问题 2021 年 3 月 4 日 · 7条评论

注释

发送 $$ 中断与 GRBL 1.1 的连接 #1563
石英石 评论了 2021 年 3 月 4 日  

在对 bCNC 进行最新更新后,我无法在 bCNC 终端或 CAM“$$”按钮中使用 $$ 命令获取我的 GRBL 设置。我在更新的 raspbian 上运行最新的 bCNC。python3 和 python2 安装的行为相同。这是错误发生时的终端输出是一致的:

pi@raspberrypi:~ $ python3 -m bCNC
new-config Utils <configparser.ConfigParser object at 0x75d0b930>
================================================================================
WARNING: bCNC has been recently ported to support both python v2.x and v3.x
Most things seem to work reasonably well in both python versions.
Please report any issues to: https://github.com/vlachoudis/bCNC/issues
================================================================================
self.canvas.winfo_id(): 33554522
Not Loading 6 axis displays
Not Loading 6 axis displays
Controller state changed to: Alarm (Running: False)
Controller state changed to: Alarm (Running: False)
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/bCNC/Sender.py", line 787, in serialIO
    elif self.mcontrol.parseLine(line, cline, sline):
  File "/home/pi/.local/lib/python3.7/site-packages/bCNC/controllers/_GenericController.py", line 248, in parseLine
    pat = VARPAT.match(line)
NameError: name 'VARPAT' is not defined

…只是为了验证:

pi@raspberrypi:~ $ python3 --version
Python 3.7.3

我不知道 python 所以我希望其他人可以帮助解决这个问题。bCNC 在其他方面对我来说工作正常。我实际上可以用它切割零件,但必须小心不要触摸“$$”并不能激发信心。

我已经尝试完全擦除 pi3b+ 上的 sd 卡,并从更新的 raspbian 图像开始。所以我相当确信这实际上是一个错误而不是用户错误。我安装使用

pip3 install --upgrade bCNC
发送 $$ 中断与 GRBL 1.1 的连接 #1563
合作者

你能检查一下这是否可能是由#1544引起的吗?

发送 $$ 中断与 GRBL 1.1 的连接 #1563
作者

哈维,修好了。谢谢你的信息。

我再次尝试从最新的 git 安装(“float”为 $0),它正在运行。我猜这个修复还没有为 pypi 安装方法实现。

发送 $$ 中断与 GRBL 1.1 的连接 #1563
合作者

哈维,修好了。

这意味着您没有 GRBL 1.1,如果这对您有帮助,则意味着您拥有 grblHAL。我怎么知道呢?

我猜这个修复还没有为 pypi 安装方法实现。

实际上它包含在 pypi 版本 0.9.14.313 及更高版本中。
也许你只需要做pip install --upgrade bCNC

发送 $$ 中断与 GRBL 1.1 的连接 #1563
作者
石英石 评论了 2021 年 3 月 4 日  

这意味着你有 grblHAL

AFAIK 我有 GRBL 1.1。斜坡板正在运行一个不太旧的 grblmega5x 版本。更具体地说,这个固件:
https ://github.com/Enducross/Grbl_MPCNC_Autosquare

我也碰巧正在设置 GRBL esp32 板。该板正在运行 bdring 的 grblesp32 的最新主控,它也使用 1.1 参数 AFAIK。grblesp32 的行为没有什么不同。

也许你只需要做pip install --upgrade bCNC

我可能在这里遗漏了一些明显的东西。正如我在 OP 中所说,这发生在从 raspberrypi.org 图像中使用pip install --upgrade bCNCpip3 install --upgrade bCNC. 此外,在使用这些方法安装后,我确实验证了 GUI 版本是 0.9.14.340。太奇怪了,因为它与我现在使用的版本相同(只是通过 master zipfile 手动安装)。

为了帮助澄清我的概念……如果“float”有效,它可能是 grblhal,如果“int”有效,它是 grbl 1.1?

[编辑:我现在更加困惑了,因为 grbl esp32 似乎也在使用一个 0 美元的 int:
https ://github.com/bdring/Grbl_Esp32/wiki/Settings

因此,如果我上面的概念是正确的,bCNC 使用浮点数,那么这些板现在都不应该工作了???]

发送 $$ 中断与 GRBL 1.1 的连接 #1563

我对 $$ 有同样的问题,但我的 Raspberry Pi 仍在使用 python2.7。

pi@CNC:~ $ sudo pip install --upgrade bCNC
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already up-to-date: bCNC in /usr/local/lib/python2.7/dist-packages (0.9.14.316)
Requirement already satisfied, skipping upgrade: Pillow>=4.0 in /usr/lib/python2.7/dist-packages (from bCNC) (5.4.1)
Requirement already satisfied, skipping upgrade: pyserial; sys_platform != "win32" in /usr/lib/python2.7/dist-packages (from bCNC) (3.4)
Requirement already satisfied, skipping upgrade: numpy>=1.12 in /usr/lib/python2.7/dist-packages (from bCNC) (1.16.2)
================================================================================
WARNING: bCNC has been recently ported to support both python v2.x and v3.x
Most things seem to work reasonably well in both python versions.
Please report any issues to: https://github.com/vlachoudis/bCNC/issues
================================================================================
self.canvas.winfo_id(): 29360218
Not Loading 6 axis displays
Not Loading 6 axis displays
Controller state changed to: Idle (Running: False)
$$
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/Sender.py", line 787, in serialIO
    elif self.mcontrol.parseLine(line, cline, sline):
  File "/usr/local/lib/python2.7/dist-packages/bCNC/controllers/_GenericController.py", line 248, in parseLine
    pat = VARPAT.match(line)
NameError: global name 'VARPAT' is not defined
$0=10
$I
[VER:1.1h.20190830:]
[OPT:V,15,128]
ok

如果我在“文件”选项卡上单击“报告”,我会在控制台上看到:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/bCNC/Utils.py", line 526, in __call__
    return self.func(*args)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/Utils.py", line 690, in sendErrorReport
    ReportDialog(None)
  File "/usr/local/lib/python2.7/dist-packages/bCNC/Utils.py", line 600, in __init__
    from bCNC import __version__, __date__
ImportError: cannot import name __version__

发送 $$ 中断与 GRBL 1.1 的连接 #1563
合作者

NameError:未定义全局名称“VARPAT”

已修复,请再次升级 pip。
此外,我强烈建议使用最新的 python 3 来防止出现问题。我们很快将完全放弃对 python 2 的支持。

发送 $$ 中断与 GRBL 1.1 的连接 #1563

是的,谢谢。它现在已在 bCNC-0.9.14.317.tar.gz (python 2.7) 中修复…

我安装了 python 2.7 版本的 bCNC 是偶然的,因为它仍然是 Raspberry Pi OS 中默认的 python/pip 版本。python3/pip3 也安装在系统上。
(或者我在 bCNC(python3)有问题的时候尝试使用 python3 版本……我不记得了)

我现在在 bCNC (python3)

pi@CNC:~ $ sudo pip uninstall bCNC
Uninstalling bCNC-0.9.14.317:
  Would remove:
    /usr/local/bin/bCNC
    /usr/local/lib/python2.7/dist-packages/bCNC-0.9.14.317.dist-info/*
    /usr/local/lib/python2.7/dist-packages/bCNC/*
    /usr/local/lib/python2.7/dist-packages/tests/*
Proceed (y/n)? y
  Successfully uninstalled bCNC-0.9.14.317

pi@CNC:~ $ sudo pip3 install --upgrade bCNC
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting bCNC
  Using cached https://files.pythonhosted.org/packages/4f/3f/21eca89c78550e30e8937b3e9c27bc8ddbce8cbcda848b4b6b0b3bca68e2/bCNC-0.9.14.317.tar.gz
Requirement already satisfied, skipping upgrade: Pillow>=4.0 in /usr/lib/python3/dist-packages (from bCNC) (5.4.1)
Requirement already satisfied, skipping upgrade: numpy>=1.12 in /usr/lib/python3/dist-packages (from bCNC) (1.16.2)
Requirement already satisfied, skipping upgrade: pyserial in /usr/lib/python3/dist-packages (from bCNC) (3.4)
Building wheels for collected packages: bCNC
  Running setup.py bdist_wheel for bCNC ... done
  Stored in directory: /root/.cache/pip/wheels/22/e6/ba/c8fdfc0e822806e4f68d108dd124f4faff9e89a60182052915
Successfully built bCNC
Installing collected packages: bCNC
Successfully installed bCNC-0.9.14.317

谢谢你的好软件!

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

还没有

发展

没有分支机构或拉取请求

3人参加
发送 $$ 中断与 GRBL 1.1 的连接 #1563发送 $$ 中断与 GRBL 1.1 的连接 #1563发送 $$ 中断与 GRBL 1.1 的连接 #1563

喜欢 (0)