开源改变世界

归位失败,开关工作 #1478

推推 grbl 3年前 (2023-01-24) 155次浏览

关闭
Napalm1432 开启了这个问题 2018 年 12 月 11 日 · 6条评论
 Closed

Homing Fail, switches work#1478

Napalm1432 opened this issue on Dec 11, 2018 · 6 comments

注释

归位失败,开关工作 #1478
凝固汽油弹1432 评论了 2018 年 12 月 11 日  

所以我刚刚完成了我的 CNC 构建,并且正在配置 GRBL,但它一直给我这个错误:
“发送 $H:ALARM 时检测到错误:归位失败。”
我检查了我所有的止动器是否真的适用于 23 美元并且它们都提供了正确的输出。
此外,当我将硬限制设置为 1 时,轴将在击中相应的结束开关时停止移动。
但是每当我尝试 $H 命令时,它都会向上移动 Z 直到它碰到开关,然后吐出错误。
一直在环顾四周并尝试各种配置,但到目前为止都失败了……
希望有人能提供帮助:)

编辑:最新 $$ 设置:
$0 = 50(步进脉冲,usec)
$1 = 25(步进空闲延迟,毫秒)
$2 = 0(步进端口反转掩码:00000000)
$3 = 0(dir 端口反转掩码:00000000)
$4 = 0(步进启用反转,布尔)
$5 = 0(限制引脚反转,布尔)
$6 = 0(探针引脚反转,布尔)
$10 = 19(状态报告掩码:00010011)
$11 = 0.010(结偏差,mm)
$12 = 0.002 (弧度公差,毫米)
$13 = 0(报告英寸,布尔值)
$20 = 0(软限制,布尔值)
$21 = 0(硬限制,布尔值)
$22 = 1(归位周期,布尔值)
$23 = 2(归位方向反转掩码:00000010)
$24 = 25.000(归位进给,毫米/分钟)
$25 = 50.000(归位寻道,毫米/分钟)
$26 = 250(归位去抖动,毫秒)
$27 = 0.000(归位牵引,毫米)
$100 = 400.000(x,步长/毫米)
$101 = 400.000(y,步长/毫米)
$102 = 400.000 (z, step/mm)
$110 = 1000.000 (x max rate, mm/min)
$111 = 1000.000 (y max rate, mm/min)
$112 = 1000.000 (z max rate, mm/min)
$120 = 60.000 (x 加速度,毫米/秒^2)
$121 = 60.000 (y 加速度,毫米/秒^2)
$122 = 60.000 (z 加速度,毫米/秒^2)
$130 = 100.000 (x 最大行程,毫米)
$131 = 100.000 ( y 最大行程,毫米)
132 美元 = 50.000(z 最大行程,毫米)

归位失败,开关工作 #1478

Please attach your $$ settings, I had this issue ages ago but need to remind myself what it was.

归位失败,开关工作 #1478

@MeJasonT … “Been looking around and trying all kinds of configurations, but all fail so far…”

understand now, what i tried to say?

归位失败,开关工作 #1478

ok If i remember right for homing to work you have to have hardware limits enabled. software limits are ignored whilst homing. $27 you may not want to pull you machine of home position but i would give yourself 3 to 5 mm just for the sake of testing – is your machine homing in the right direction. Industry CNC standard practice is far top right corner for X&Y with Z Up.
These were a couple of things that got me when I first ran my machine.
I was going to ask what version of GRBL you were running but i see its an older version as there are no settings for laser control.
Are you using the correct wiring for the version of GRBL firmware before version 0.9 the limit pin for Z and Spindle direction were different to that of version onward

grbl wiring.docx

You have mentioned that your Limit pins are working but are they outputting the correct state IE Normally Open or Normally Closed. The homing process is to clear Z axis from work area and then move X & Y simultaneously to their home locations. if homing is selected and switch is closed when it should be open (for example) then the GRBL will alarm straight away as it cant move as it will appear its already up against the stop.

Hope this helps, let us know how you get on.

归位失败,开关工作 #1478
Author

So while waiting for a response, I’ve also been looking trough the code, to see when an error is thrown.
From what I can see @MeJasonT is on point with the $27, the code will throw an error when switches are still activated after pull-off.
I tested all switches thoroughly, they are in the NO state, ? command confirms all that, also when manually pressing and using ? command it’s confirmed. although i have to say, i did have some issues at first, but i was able to resolve that quickly after finding out it was actually attached to spindle pin, so for now I simply took out the #define for it and made sure the pin was correct.
When it comes to the position of the endstops, I didn’t really think about the direction, BUT I actually make X Y home to the back right corner (seen from the front), and Z to the top, guess I’m lucky with that.
我现在不在机器附近,当我在机器附近时,我会尝试将牵引距离设置为 4 毫米,看看是否能解决问题!
我会在测试后编辑此评论。

归位失败,开关工作 #1478

好的,伙计,我明天会赶上你。

归位失败,开关工作 #1478

嗯,做到了!
4-5 毫米有点多,但至少它有效,是时候进行调整了 :)
发现我的 y 归位方向是错误的,只需将 $23 设置为 0
感谢您的帮助!

喜欢 (0)