开源改变世界!!

添加对 SmoothieWare 的支持 #204

推推 grbl 2年前 (2023-01-26) 151次浏览
关闭
Leary 打开了这个问题 2014 年 11 月 17 日 · 86条评论
关闭

添加对 SmoothieWare 的支持#204

Leary 打开了这个问题 2014 年 11 月 17 日 · 86条评论

注释

添加对 SmoothieWare 的支持 #204

当我尝试将 Universal GCode Sender 与运行 Smoothieware 的新 Shapeoko 一起使用时,我得到了这个;

**** 连接到 COM10 @ 9600 波特 ****
Smoothie
[详细][错误] 处理响应时出错:尝试完成不存在的命令:<(-1)>ok

然后,如果我尝试发送 gcode,我会收到
“启动文件流时出错:Grbl 尚未完成启动”

添加对 SmoothieWare 的支持 #204

这听起来超级容易修复。Appart 从引导消息来看,Smoothie 应该主要与 GRBL 兼容……
有人想要 Smoothieboard 来尝试让它工作吗?如果是这样,可以通过wolf.arthur@gmail.com
与我联系。

添加对 SmoothieWare 的支持 #204
所有者

如果您取消注释FirmwareUtils中的 TinyG 行,TinyG 插件可能适用于 Smoothie。这里的“插件”模型从未完全开发过,但大部分架构更改在我筋疲力尽之前就已完成。

添加对 SmoothieWare 的支持 #204

请有人介意取消注释 Smoothie(第 41 行)行并为我编译一个测试版本。我没有安装 NetBeans,愿意对此进行测试并报告

添加对 SmoothieWare 的支持 #204

午餐时我有一些空闲时间,所以我想试试这个。我在 MAC OS X 上,克隆了项目,安装了 NetBeans,并尝试构建(未注释该行)。没有走得太远,所以我想我会发布这个以防您看到它并快速回答缺少的内容。

ant -f /Users/george/Documents/Github/Universal-G-Code-Sender onejar-build-release
Creating new property file: /Users/george/Documents/Github/Universal-G-Code-Sender/src/resources/build.properties
init:
deps-jar:
Created dir: /Users/george/Documents/Github/Universal-G-Code-Sender/build
Updating property file: /Users/george/Documents/Github/Universal-G-Code-Sender/build/built-jar.properties
Created dir: /Users/george/Documents/Github/Universal-G-Code-Sender/build/classes
Created dir: /Users/george/Documents/Github/Universal-G-Code-Sender/build/empty
Created dir: /Users/george/Documents/Github/Universal-G-Code-Sender/build/generated-sources/ap-source-output
Compiling 56 source files to /Users/george/Documents/Github/Universal-G-Code-Sender/build/classes
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:121: error: cannot find symbol
        systemStateBean.setMachineX(Utils.formatter.format(this.machineCoord.getX()));
  symbol:   method getX()
  location: variable machineCoord of type Point3d
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:122: error: cannot find symbol
        systemStateBean.setMachineY(Utils.formatter.format(this.machineCoord.getY()));
  symbol:   method getY()
  location: variable machineCoord of type Point3d
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:123: error: cannot find symbol
        systemStateBean.setMachineZ(Utils.formatter.format(this.machineCoord.getZ()));
  symbol:   method getZ()
  location: variable machineCoord of type Point3d
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:127: error: cannot find symbol
        systemStateBean.setWorkX(Utils.formatter.format(this.workCoord.getX()));
  symbol:   method getX()
  location: variable workCoord of type Point3d
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:128: error: cannot find symbol
        systemStateBean.setWorkY(Utils.formatter.format(this.workCoord.getY()));
  symbol:   method getY()
  location: variable workCoord of type Point3d
/Users/george/Documents/Github/Universal-G-Code-Sender/src/com/willwinder/universalgcodesender/GUIBackend.java:129: error: cannot find symbol
        systemStateBean.setWorkZ(Utils.formatter.format(this.workCoord.getZ()));
  symbol:   method getZ()
  location: variable workCoord of type Point3d
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
/Users/george/Documents/Github/Universal-G-Code-Sender/nbproject/build-impl.xml:923: The following error occurred while executing this line:
/Users/george/Documents/Github/Universal-G-Code-Sender/nbproject/build-impl.xml:263: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 5 seconds)
添加对 SmoothieWare 的支持 #204

仅供参考,如果我下载 1.0.8 版,它将编译无误,但 TinyG 没有成功发出任何命令。有趣的是,可视化工具也不起作用(在其他版本上对我也不起作用)。

如果我切换到边缘分支,可视化工具和编译工作,但 TinyG 也不起作用。

看起来需要做更多的工作来支持除 GRBL 之外的任何东西的不同响应和设置。

也许更好的第一个测试是编辑代码以寻找 Smoothie 响应并接受它以及 GRBL 0.8/0.9 响应?

添加对 SmoothieWare 的支持 #204
所有者

@GeorgeIoak你是绝对正确的。如果您看一下此处,您会发现 Smoothie 根本没有实现。您还可以看到用于在不同 gcode 类型之间切换的模式设置。就像您建议的那样-一种支持不同响应和设置的方法!很多跑腿工作已经完成,我只是没有时间为我的 TinyG 设置电子设备并修复错误。这项工作将在TinyGCommunicatorTinyGController中完成。对于 Smoothie,将创建另外两个文件来实现这些接口。

添加对 SmoothieWare 的支持 #204

@winder我确实进行了快速更改并绕过了版本检查,只是为了确认我可以运行一个文件。好消息是我能够开始工作,但坏消息是工作在同一个地方停了 2 次,大约 1/2 次(我认为是 1150/2249)。它在 (G3) 上停止的代码在作业的早期已经成功运行,所以我不确定它为什么会在这里停止。

我认为 Smoothie 比 TinyG 更容易,因为我认为 Smoothie 是 GRBL 的直接端口,而 TinyG 是 GRBL 的分支。我可能是错的,所以不要引用我的话!

没有可视化工具工作有点令人失望,我找到了一些线索来尝试让它工作但还没有成功。一旦我得到一份成功运行的工作,我就可以帮助创建和测试 SmoothieCommunicator 和 SmoothieController。

添加对 SmoothieWare 的支持 #204

嘿。

Smoothie 目前有一个 G3 问题,所以这可能不是
您的代码的问题。所以你可以忽略这个。

这听起来确实像是让 Smoothie 与 UGS 一起工作:)

干杯。

2015 年 2 月 28 日星期六凌晨 2:32,George Ioakimedes < notifications@github.com

写道:

@winder https://github.com/winder我确实进行了快速更改并
绕过了版本检查,只是为了确认我可以运行一个文件。
好消息是我能够开始工作,但坏消息是
工作在同一个地方停了 2 次,大约 1/2 次(
我认为是 1150/2249)。它在 (G3) 上停止的代码在作业的早期已经成功运行,
所以我不确定它为什么会在这里停止。

我认为 Smoothie 比 TinyG 更容易,因为我认为 Smoothie 是 GRBL 的
直接端口,而 TinyG 是 GRBL 的分支。我可能是错的
,所以不要引用我的话!

没有可视化工具工作有点令人失望,我找到了一些线索
来尝试让它工作但还没有成功。一旦我得到一份
成功运行的工作,我就可以帮助创建和测试 SmoothieCommunicator 和
SmoothieController。


直接回复此电子邮件或在 GitHub
#204(评论)
上查看 。

Courage et bonne humeur。

添加对 SmoothieWare 的支持 #204

我将不得不跳转到 Smoothie 论坛并研究这个问题。该代码昨晚使用 Pronterface 确实运行了一次,但这可能是抽签的运气,因为我认为我之前已经测试过它但它也失败了。作为参考,我正在试验的文件可以在此处查看。

是的,UGS 和 Smoothie 一起工作。我主要是一名硬件设计人员,所以编码对我来说并不是天生的,但我将开始研究如何正式获得 Smoothie 支持。我只是碰巧用 Mac 进行测试,所以可能会引发其他一些问题。

添加对 SmoothieWare 的支持 #204

@GeorgeIoak刚遇到同样的错误。替换了代码片段(因为包含的 Point3d 没有 .getX()):

    public void updateSystemState(SystemStateBean systemStateBean) {
        logger.log(Level.INFO, "Getting system state 'updateSystemState'");
        double[] mp = new double[3];
        this.machineCoord.get(mp);
        double[] wp = new double[3];
        this.machineCoord.get(wp);
        systemStateBean.setFileName(gcodeFile.getAbsolutePath());
        systemStateBean.setLatestComment(lastComment);
        systemStateBean.setActiveState(activeState);
        systemStateBean.setControlState(controlState);
        systemStateBean.setDuration(String.valueOf(this.getSendDuration()));
        systemStateBean.setEstimatedTimeRemaining(String.valueOf(this.getSendRemainingDuration()));
        systemStateBean.setMachineX(Utils.formatter.format(mp[0]));
        systemStateBean.setMachineY(Utils.formatter.format(mp[1]));
        systemStateBean.setMachineZ(Utils.formatter.format(mp[2]));
        systemStateBean.setRemainingRows(String.valueOf(this.getNumRemainingRows()));
        systemStateBean.setRowsInFile(String.valueOf(this.getNumRows()));
        systemStateBean.setSentRows(String.valueOf(this.getNumSentRows()));
        systemStateBean.setWorkX(Utils.formatter.format(wp[0]));
        systemStateBean.setWorkY(Utils.formatter.format(wp[1]));
        systemStateBean.setWorkZ(Utils.formatter.format(wp[2]));
        systemStateBean.setSendButtonText(openCloseButtonText);
        systemStateBean.setSendButtonEnabled(openCloseButtonEnabled);
        systemStateBean.setPauseResumeButtonText(pauseButtonText);
        systemStateBean.setPauseResumeButtonEnabled(this.canPause());
        systemStateBean.setCancelButtonText(cancelButtonText);
        systemStateBean.setCancelButtonEnabled(this.canCancel());
    }

现在代码执行时没有错误。

添加对 SmoothieWare 的支持 #204

今天我的邮箱里应该有一个 SmoothieBoard!我是一名拥有 15 年以上经验的专业 Java 开发人员。我主要使用 J2SE 进行销售点自动化和控制系统开发。我做了一些企业/网络的东西有一段时间了,但已经好几年了。

我非常有兴趣帮助它与 Smoothie 一起使用。

是否有任何代码用于 Smoothie 支持?如果不是,我怎样才能得到到目前为止已经实施的内容来帮助解决这个问题?

添加对 SmoothieWare 的支持 #204
所有者

有一个用于添加额外控制器的 API。目前只有 GRBL 和几乎完整的 TinyG 实现。您使用 Java 的时间比我长,所以我很想听听您的意见。

这是后端如何实现的高级概述:
https ://github.com/winder/Universal-G-Code-Sender/wiki/Code-Overview

添加完整的 smoothie 支持应该不错,这可能只是扩展 GRBL 控制器类并重新实现几个在 smoothie 中处理不同的功能(即版本检查)的问题。

添加对 SmoothieWare 的支持 #204

感谢您提供概述链接。稍后我会看一下并熟悉一下。我使用 Eclipse 多年,对 NetBeans 的经验很少。我需要下载 NB 才能继续。

添加对 SmoothieWare 的支持 #204

我一直在努力让 Smoothie board 正常工作。似乎在连接时,Universal Gcode 发件人没有收到“Smoothie”问候消息。如果我通过将“isReady”设置为“true”来强制它,我可以让它至少允许我发送命令,但每次我都会遇到与#214中提到的计时问题相同的错误

这是我遇到的怪事的截屏视频。

另一件有趣的事情是,如果我使用串行终端连接到 smoothieboard,我会收到问候消息,但如果我连接到通用 Gcode 发送器,关闭连接,然后尝试串行终端,我不再收到问候消息,但我可以发送命令并接收回复。

我在 2015 年 1 月 15 日和 6 月 21 日尝试了 Smoothie 固件

添加对 SmoothieWare 的支持 #204

嘿。

这听起来确实像是 Windows 串行驱动程序部分的一些奇怪之处,我
认为您需要修改代码以使其更宽容一些。

您可以做的一件事:不是仅仅“等待”Smoothie 说
“Smoothie”,而是在连接后向开发板发送“version”命令。这
将强制 Smoothie 打印出欢迎信息。

关于“ok”,我不知道那里发生了什么……也许它
期望该行以 \n 结尾,而我们以 \r\n 或其他东西结束它?

干杯。

在 2015 年 6 月 25 日星期四上午 7:50,morrowsend notifications@github.com
写道:

我一直在努力让 Smoothie board 正常工作。似乎在
连接时,Universal Gcode 发件人没有收到“Smoothie”问候
消息。如果我通过将“isReady”设置为“true”来强制它,我可以让它
至少允许我发送命令,但每次我都会遇到与#214 中提到的计时问题相同的错误
214

这是我遇到的怪事的截屏视频。
http://youtu.be/p1Ht4iqDl34

另一件有趣的事情是,如果我使用串行终端连接到
smoothieboard,我会收到问候消息,但如果我连接到通用
Gcode 发送器,关闭连接,然后尝试串行终端,我
不再收到问候消息,但我可以发送命令并接收回复。

我在 2015 年 1 月 15 日和 6 月 21 日尝试了 Smoothie 固件


直接回复此电子邮件或在 GitHub
#204(评论)
上查看 。

Courage et bonne humeur。

添加对 SmoothieWare 的支持 #204
所有者

@morrowsend听起来你走在正确的轨道上。GRBL/Arduino 在通过 USB 连接时会自行重启,听起来 Smoothie 可能没有此功能。实际上,我一直在考虑 UGS 是否也应该将其用于 GRBL。像 Arthur 的建议这样的东西是伟大的第一步,AbstractController 中有一个名为“openCommAfterEvent”的函数,您可以实现它以在您的控制器中发送“版本”。

我最近制作了一个简单的流媒体程序来测试一些通信更改,您可以考虑在解决这些奇怪的串行问题时关闭该项目。
https://github.com/winder/simpleJavaGrblStreamer

最后…对此感到抱歉,但我最近对 ​​AbstractController 类进行了一系列优化,可能会有一些合并冲突。您应该取消这些更改,因为它们修复了 AbstractController 的一些基本问题(它过于复杂、缓慢、存在并发问题等)。

添加对 SmoothieWare 的支持 #204

所有帮助我解决这个问题的好主意。多谢你们!winder,我昨晚分叉了它,这样我就可以随心所欲地破解它(比如 12 小时前从这篇文章开始的)所以我假设最新的变化是在那个时候实施的。不过,我将查看 AbstractController 类是否有任何不同以确保。

添加对 SmoothieWare 的支持 #204

After playing a bit with it today, I still haven’t made progress, but here’s what I tried playing around with the openCommAfterEvent method in Abstract Controller:

喜欢 (0)