开源改变世界!!

RC 舵机在运行时挂起 #582

推推 grbl 2年前 (2022-10-19) 144次浏览 0个评论

关闭
edplese 打开了这个问题 on 7 Sep 2020 · 8 条评论
关闭

RC 舵机挂在运行第582章

edplese 打开了这个问题 on 7 Sep 2020 · 8 条评论

注释

RC 舵机在运行时挂起 #582

您使用的是什么版本的固件?

主分支fbf1732在 Mac 上使用 platform.io 编译。

还测试了几周前的一些较旧的提交,以查看它是否是最近的更改。

问题是否可重复?

是的

什么情况下会出现bug?

我有一个 6 包板,版本 v1p1,在模块 3 中安装了一个 RC 伺服模块。我从 6_pack_stepstick_v1.h 配置开始,从 wiki 添加了伺服配置,还删除了轴 A、B 和 C 的步进器配置:https ://github.com/bdring/6-Pack_CNC_Controller/wiki/RC-Servo-BESC-CNC-IO-Module 。所有默认值都用于 GRBL 配置。

6_pack_stepstick_v1.h.txt

步进驱动器在此配置中工作正常。当我发出移动伺服轴的命令时,它似乎陷入了永远不会结束的“运行”状态:

g0a5
<Idle|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:0,0|Pn:XYZ>
ok
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ|Ov:100,100,100|A:S>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>

步进器工作正常。

模块引脚 1 上的 BESC 工作正常,当我将伺服器连接到它时,它会在发出“m3 s5000”时移动。查看示波器上的引脚,我看到了正确的伺服脉冲。

A、B 和 C 轴的其他引脚 2、3 和 4 都输出恒定的 3.3V,并且没有脉冲。如果我将轴 A 移动到引脚 1,它会显示相同的行为。

我也尝试定义 USE_SERVO_AXES 但这似乎不再需要并且没有任何影响。

我对 Grbl_Esp32 相当陌生,所以这很可能是用户错误。任何帮助,将不胜感激!

RC 舵机在运行时挂起 #582 edplese 添加了 漏洞 有些东西不工作标签 on 7 Sep 2020
RC 舵机在运行时挂起 #582
作者

早餐 评论 on 7 Sep 2020

你好@bdring谢谢你的链接。为了输入命令,我是通过 WebUI 输入的。

以下是启动消息:

[MSG:Grbl_ESP32 Ver 1.3a Date 20200828]
[MSG:Compiled with ESP32 SDK:v3.2.3-14-gd3e562907]
[MSG:Using machine:6 Pack Controller V1 (StepStick)]
[MSG:Axis count 6]
[MSG:I2S Steps, Stream]
[MSG:Init Motors]
[MSG:X  Axis standard stepper motor Step:I2SO(2) Dir:I2SO(1) Disable:I2SO(0)]
[MSG:Y  Axis standard stepper motor Step:I2SO(5) Dir:I2SO(4) Disable:I2SO(7)]
[MSG:Z  Axis standard stepper motor Step:I2SO(10) Dir:I2SO(9) Disable:I2SO(8)]
[MSG:A  Axis RC Servo motor Output:4 Min:0.000mm Max:10.000mm]
[MSG:B  Axis RC Servo motor Output:16 Min:0.000mm Max:20.000mm]
[MSG:C  Axis RC Servo motor Output:27 Min:0.000mm Max:15.000mm]
[MSG:Using StepStick Mode]
[MSG:BESC spindle on Pin:GPIO(26) Min:0.90ms Max:2.20ms Freq:50Hz Res:16bits]

[MSG:Client Started]
[MSG:Connecting ednetx]
[MSG:Connecting.]
[MSG:Connecting..]
[MSG:Connecting...]
[MSG:Connected with 192.168.1.97]
[MSG:Connected with 192.168.1.97]
[MSG:Start mDNS with hostname:http://grblesp.local/]
[MSG:SSDP Started]
[MSG:HTTP Started]
[MSG:TELNET Started 23]
[MSG:Probe on pin GPIO(34) Inverted:N]

还有设置:

$Sta/SSID=ednetx
$Sta/Password=******
$Sta/IPMode=Static
$Sta/IP=192.168.1.97
$Sta/Gateway=192.168.1.1
$Sta/Netmask=255.255.255.0
$AP/SSID=GRBL_ESP
$AP/Password=******
$AP/IP=192.168.0.1
$AP/Channel=1
$System/Hostname=grblesp
$Http/Enable=ON
$Http/Port=80
$Telnet/Enable=ON
$Telnet/Port=23
$Radio/Mode=STA
$Bluetooth/Name=btgrblesp
$Notification/Type=NONE
$Notification/T1=
$Notification/T2=
$Notification/TS=
$Report/StallGuard=
$Spindle/Type=BESC
$Stepper/Pulse=4
$Stepper/IdleTime=250
$Stepper/StepInvert=
$Stepper/DirInvert=
$Stepper/EnableInvert=Off
$Limits/Invert=On
$Probe/Invert=Off
$Report/Status=1
$GCode/JunctionDeviation=0.010
$GCode/ArcTolerance=0.002
$Report/Inches=Off
$Limits/Soft=Off
$Limits/Hard=Off
$Homing/Enable=Off
$Homing/DirInvert=XY
$Homing/Squared=
$Homing/Feed=200.000
$Homing/Seek=2000.000
$Homing/Debounce=250.000
$Homing/Pulloff=1.000
$GCode/MaxS=1000.000
$GCode/MinS=0.000
$GCode/LaserMode=Off
$GCode/Line1=
$GCode/Line0=
$Spindle/Enable/Invert=Off
$Spindle/Enable/OffWithSpeed=Off
$Spindle/Delay/SpinDown=0.000
$Spindle/Delay/SpinUp=0.000
$Spindle/PWM/Invert=Off
$Spindle/PWM/Frequency=5000.000
$Spindle/PWM/Off=0.000
$Spindle/PWM/Min=0.000
$Spindle/PWM/Max=100.000
$X/StepsPerMm=50.000
$Y/StepsPerMm=100.000
$Z/StepsPerMm=100.000
$A/StepsPerMm=100.000
$B/StepsPerMm=100.000
$C/StepsPerMm=100.000
$X/MaxRate=36000.000
$Y/MaxRate=1000.000
$Z/MaxRate=1000.000
$A/MaxRate=1000.000
$B/MaxRate=1000.000
$C/MaxRate=1000.000
$X/Acceleration=2000.000
$Y/Acceleration=200.000
$Z/Acceleration=200.000
$A/Acceleration=200.000
$B/Acceleration=200.000
$C/Acceleration=200.000
$X/MaxTravel=300.000
$Y/MaxTravel=300.000
$Z/MaxTravel=300.000
$A/MaxTravel=100.000
$B/MaxTravel=100.000
$C/MaxTravel=100.000
$X/Current/Run=0.250
$Y/Current/Run=0.250
$Z/Current/Run=0.250
$A/Current/Run=0.250
$B/Current/Run=0.250
$C/Current/Run=0.250
$X/Current/Hold=0.125
$Y/Current/Hold=0.125
$Z/Current/Hold=0.125
$A/Current/Hold=0.125
$B/Current/Hold=0.125
$C/Current/Hold=0.125
$X/Microsteps=16
$Y/Microsteps=16
$Z/Microsteps=16
$A/Microsteps=16
$B/Microsteps=16
$C/Microsteps=16
$X/StallGuard=16
$Y/StallGuard=16
$Z/StallGuard=16
$A/StallGuard=16
$B/StallGuard=16
$C/StallGuard=16
RC 舵机在运行时挂起 #582
所有者

婚戒 评论 on 7 Sep 2020

手动发送命令

G0A0
G0 A10

A伺服是否移动?

RC 舵机在运行时挂起 #582
作者

早餐 评论 2020 年 9 月 7 日

你好@bdring发送 G0A0(通过 WebUI)后,伺服不会移动或保持位置。从上电开始,信号引脚保持在 3.3v 的高电平,并在 G0A0 命令之后继续。发出命令后,GRBL 会翻转到运行状态,并且在我重置 ESP32 之前永远不会退出。

G0A0
ok
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ|WCO:0.000,0.000,0.000, nan, nan, nan>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ|Ov:100,100,100|A:S>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
<Run|MPos:0.000,0.000,0.000,0.000,0.000,0.000|FS:600,0|Pn:XYZ>
RC 舵机在运行时挂起 #582
作者

早餐 评论 2020 年 9 月 7 日

我在不同的 ESP32 上尝试了一个更简单的配置,并看到伺服信号正常工作。我将对此进行更多测试,看看是否可以缩小问题范围。

RC 舵机在运行时挂起 #582
所有者

婚戒 评论 2020 年 9 月 7 日

你试过G0A10吗?

它在什么插座上?

RC 舵机在运行时挂起 #582
作者

早餐 评论 2020 年 9 月 7 日

@bdring感谢您今天对此的帮助。我弄清楚了这个问题。我从一个简单的配置到另一个 ESP32 上的相同完整配置头文件,它运行良好,所以当我看到这些消息时,我重置了原始损坏的 EEPROM 设置:

$RST=* (probably only needed $RST=$)
[MSG:Servo calibration ($133) value error. 300.00 Reset to 100]
[MSG:Servo calibration ($134) value error. 300.00 Reset to 100]
[MSG:Servo calibration ($135) value error. 300.00 Reset to 100]

重新启动后,伺服系统一切正常。

作为这方面的更多背景知识,我最初加载了库存6_pack_stepstick_v1.h固件,然后将 A、B 和 C 修改为伺服轴。在此更改之后,我不确定是否需要重置设置,当我检查设置时,所有值看起来都是正确的,就像它们已更新为伺服默认设置一样,所以我离开了它。

从错误中,它必须仍然具有 300.00 值作为这些设置,但是在查看设置时它显示为 100:

$A/MaxTravel=100.000
$B/MaxTravel=100.000
$C/MaxTravel=100.000

我现在很乐意解决这个问题,但想传递这些细节,以防在设置方面没有按预期工作。

再次感谢你!

RC 舵机在运行时挂起 #582
所有者

婚戒 评论 2020 年 9 月 7 日

设置问题是由于原始 Grbl 的刚性设置系统和难以添加新设置。有了新的设置系统,我们有了更大的灵活性。

有一个名为 ServoSettings 的新分支,它有一种新的更简单的伺服工作方式。它应该在一两周内与 main 合并。

RC 舵机在运行时挂起 #582
 
添加标题文本添加粗体文本,<Ctrl+b>添加斜体文本,<Ctrl+i>
添加引号,<Ctrl+Shift+.>添加代码,<Ctrl+e>添加链接,<Ctrl+k>
添加项目符号列表,<Ctrl+Shift+8>添加编号列表,<Ctrl+Shift+7>添加任务列表,<Ctrl+Shift+l>
直接提及用户或团队引用问题、拉取请求或讨论

添加已保存的回复

请记住,对此存储库的贡献应遵循我们的 GitHub 社区指南
通过赞助他们 来表达 您对 bdring的支持。

 赞助

标签
漏洞有些东西不工作
项目

还没有

发展

没有分支或拉取请求

2名参与者
RC 舵机在运行时挂起 #582RC 舵机在运行时挂起 #582

喜欢 (0)

您必须 登录 才能发表评论!