开源改变世界

推推 grbl 2年前 (2023-01-30) 154次浏览
关闭
ExploratoryDe​​vices 打开了这个问题 2020 年 11 月 19 日 · 6条评论
关闭

非指令 A 轴运动#673

ExploratoryDe​​vices 打开了这个问题 2020 年 11 月 19 日 · 6条评论

注释

您使用的是什么版本的固件?
[MSG:Grbl_ESP32 Ver 1.3a 日期 20201101]
[MSG:Compiled with ESP32 SDK:v3.2.3-14-gd3e562907]

问题是否可重复?
是的

什么情况下会出现bug?
在代码中运行带有 A 轴运动的 g 代码程序。

当运行一个带有 A 轴运动的程序时,A 轴获得的额外度数超出了程序期间所命令的度数,并且超过了可接受的舍入/量化误差。这些往往会在程序的某个时刻同时发生。在紧接程序中第一个 A 轴移动之后的行中,它似乎是最可重复的。

当手动输入 gcode 命令移动 Z 轴时,我也能够观察到 A 轴的移动。同样,这似乎只发生在 A 轴从其“纯”零位置移动时。事实上,如果我在硬重置后运行一个没有 A 轴移动的程序,则 A 轴不会从“0.0”开始移动。但是如果我完全点动 A 轴(比如向前和向后 1 度)以便它计算“真实”位置(几乎不会在点动后返回到 0.0)并运行相同的程序,A 轴移动而无需命令.

我已经看到 A 轴从一步跳到 8 度!该错误反映在 DRO 和机器的物理轴上。一旦发生此错误,即使在 A 轴的后续运动之后,它也会继续执行程序的其余部分。据我所知,它只在给定程序中出现一次。请参阅下面运行测试程序的串行日志中的注释,其中轴在没有命令的情况下移动了 0.478(17 步)。

从两个不同的流媒体(bCNC 和 GrblGru)运行的代码观察到相同的效果。

显示错误发生的串行日志。(删除了“确定”行):

$G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
<Idle|MPos:57.000,-58.184,0.000,0.028|FS:0,0|Pn:XYZA>  <-------- ? to report position at start of program
?
G90
G90G94
G17
G21
G28G91Z0
G90
S12031M3
G4P4
G54
G90
G1A0F3000   <-------- No movement. 0.028 on DRO (acceptable error expected due to step quantization)
G0X41.679Y-1.185
Z55.8     <-------- Observed uncommanded additional 0.478 degrees, displaying 0.506 on DRO here.
G1X40Y-1.185F1500
G1A90F3000  <-------- Moved to 90.506 on DRO
G0X41.679Y-1.185
Z55.8
G1X40Y-1.185F1500
G1A180F3000 <-------- Moved to 180.506 on DRO
G0X41.679Y-1.185
Z55.8
G1X40Y-1.185F1500
G1A270F3000  <-------- Moved to 270.506 on DRO
G0X41.679Y-1.185
Z55.8
G1X40Y-1.185F1500
G0Z55.8
G28G91Z0
G90
M5
M3  <------- Actually sent M30, but echos M3 for some reason. Probably unrelated.
Run ended
2020-11-18 22:42:02.861000
Current: 32 [32]  Completed: 100% [12s Tot: 12s ]
Grbl 1.3a ['$' for help]
<Idle|MPos:57.000,-58.184,0.000,270.506|FS:0,0|Pn:XYZA|Ov:100,100,100> <-------- "?" to report position at end of program. Confirms 0.478 degree error from last commanded A position.
?
g1 a270 f3000 <-------- manually commanding the last A axis move from the program while in the idle state causes the axis to move as expected. Axis moved 0.478 degrees to commanded position. DRO showed 270.028.
$G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0]
<Idle|MPos:57.000,-58.184,0.000,270.028|FS:0,0|Pn:XYZA|WCO:17.000,-57.000,-75.000,0.000> <-------- ? to report position after sending above command manually. Confirms axis moved and error is gone.
?

机器设置如下:

$0=3
$1=250
$2=0
$3=1
$4=0
$5=1
$6=1
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=0
$22=1
$23=1
$24=200.000
$25=800.000
$26=250.000
$27=1.000
$30=24000.000
$31=1836.000
$32=0
$N1=
$N0=
$100=320.000
$101=320.000
$102=320.000
$103=35.556
$104=100.000
$105=100.000
$110=3000.000
$111=3000.000
$112=3000.000
$113=3000.000
$114=1000.000
$115=1000.000
$120=300.000
$121=300.000
$122=150.000
$123=200.000
$124=200.000
$125=200.000
$130=275.000
$131=397.500
$132=116.000
$133=1440.000
$134=300.000
$135=300.000

测试程序:

G90 G94
G17
G21
G28 G91 Z0
G90

T19 M6
S12031 M3
G4 P4.
G54
G90
G1 A0 F3000
G0 X41.679 Y-1.185
G0 Z55.8
G1 X40 Y-1.185 F1500

G1 A90 F3000
G0 X41.679 Y-1.185
G0 Z55.8
G1 X40 Y-1.185 F1500

G1 A180 F3000
G0 X41.679 Y-1.185
G0 Z55.8
G1 X40 Y-1.185 F1500

G1 A270 F3000
G0 X41.679 Y-1.185
G0 Z55.8
G1 X40 Y-1.185 F1500

G0 Z55.8
G28 G91 Z0
G90
M5
M30
 ExploratoryDe​​vices 添加了 漏洞 有些东西不工作标签 2020 年 11 月 19 日
所有者

你能显示你的启动信息吗?我想重复您的设置。

https://github.com/bdring/Grbl_Esp32/wiki/Requesting-Help#boot-messages

当然。引导消息如下。

为了进一步排除故障,我直接从 git zip 下载编译了一个“原始”版本,只更改了试驾机中的“#define N_AXIS 4”。我可以使用原始帖子中的测试程序 gcode 在试驾机上重现此问题。

使用我第一篇文章中的 $ 设置在“试驾”机器上重现的步骤:
冷启动或硬重置。(所有轴都从 MPOS 0.000 开始)
运行测试程序。轴在 270.109 度处结束。
再次运行测试程序。轴结束于 270.503 度。
发送“G1A270F3000”(来自程序的最后一个 A 轴移动)。轴移动到 270.025 度。

引导消息:

Grbl 1.3a ['$' for help]
[MSG:'$H'|'$X' to unlock]
<Alarm|MPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:XYZA|Ov:100,100,100>
Grbl 1.3a ['$' for help]
[MSG:'$H'|'$X' to unlock]
[MSG:Grbl_ESP32 Ver 1.3a Date 20201101]
[MSG:Compiled with ESP32 SDK:v3.2.3-14-gd3e562907]
[MSG:Using machine:OMIO 4-Axis Router]
[MSG:Axis count 4]
[MSG:RMT Steps]
[MSG:Init Motors]
[MSG:Global stepper disable pin:GPIO(13)]
[MSG:X  Axis Standard Stepper Step:GPIO(4) Dir:GPIO(2) Disable:None Limits(0.000,275.000)]
[MSG:Y  Axis Standard Stepper Step:GPIO(26) Dir:GPIO(15) Disable:None Limits(-397.500,0.000)]
[MSG:Z  Axis Standard Stepper Step:GPIO(27) Dir:GPIO(33) Disable:None Limits(-116.000,0.000)]
[MSG:A  Axis Standard Stepper Step:GPIO(18) Dir:GPIO(14) Disable:None Limits(-1440.000,0.000)]
[MSG:DAC spindle Output:GPIO(25), Enbl:GPIO(22), Dir:None, Res:8bits]
[MSG:Local access point GRBL_ESP started, 192.168.0.1]
[MSG:Captive Portal Started]
[MSG:HTTP Started]
[MSG:TELNET Started 23]
[MSG:Flood coolant on pin GPIO(21)]
[MSG:Mist coolant on pin GPIO(12)]
[MSG:X  Axis limit switch on pin GPIO(34)]
[MSG:Y  Axis limit switch on pin GPIO(34)]
[MSG:Z  Axis limit switch on pin GPIO(34)]
[MSG:A  Axis limit switch on pin GPIO(34)]
[MSG:Probe on pin GPIO(32)]
Grbl 1.3a ['$' for help]
[MSG:'$H'|'$X' to unlock]
<Alarm|MPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:XYZA|Ov:100,100,100>
所有者

我无法重复你所有的问题,但 ABC 总是表现得有点不对劲。

我发现并没有为这些轴初始化计数器。这为我清除了 DRO。

您可以尝试在 ABC_Stepperfix 分支上重新编译和重新测试吗?

谢谢@bdring. 我编译了你建议的分支,将测试运行设置为 4 轴,我一直观察到的行为消失了。DRO 现在按预期报告。我将为我的机器编译它并使用物理轴对其进行测试以确保 DRO 和物理轴仍然一致并报告我的发现。

所有者

我将更改与 devt 分支合并。将来使用它。
另一个分支可能很快就会消失。

感谢那。

确认我使用第 4 轴在实际工作中对此进行了测试,并且它按预期工作。没有奇怪的动作!

非常感激。