Contact me: hankecnc@gmail.com

“恢复原点”问题 Linux 1.2b – 提议的解决方法 #368

推推 grbl 3年前 (2023-02-01) 199次浏览
打开
adnovea 打开了这个问题 2020 年 4 月 25 日 · 1条评论
打开

“恢复原点”问题 Linux 1.2b – 提议的解决方法#368

adnovea 打开了这个问题 2020 年 4 月 25 日 · 1条评论

注释

“恢复原点”问题 Linux 1.2b - 提议的解决方法 #368
adnovea 评论了 2020 年 4 月 25 日  

恢复原点”按钮在 v1.2b 中不起作用。
它适用于 v1.2.8.1b,但似乎无法下载源代码。

祝贺你的出色工作。

“恢复原点”问题 Linux 1.2b - 提议的解决方法 #368
作者
adnovea 评论了 2020 年 4 月 26 日  

==> 在使用此解决方法之前,应由开发人员对其进行验证

为了解决这个问题,我模仿了版本 1.2.8.1b 的功能。
我在 GRBL (v1.1h) eeprom 中使用使用“G10 L2 Px”保存的永久偏移量。

在 frmmain.cpp 中(第 2513 行)

void frmMain::on_cmdRestoreOrigin_clicked()
{
    // Restore offset
    sendCommand(QString("G21"), -1, m_settings->showUICommands());
    sendCommand(QString("G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value()))
                                            .arg(toMetric(ui->txtMPosY->value()))
                                            .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands());
//**** BEGIN --- Modification by AdNovea
//    sendCommand(QString("G92X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX)
//                                       .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY)
//                                       .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), -1, m_settings->showUICommands());

    sendCommand("$#", -2, m_settings->showUICommands());
    sendCommand(QString("G54"), -1, m_settings->showUICommands());
    sendCommand(QString("G92X%1Y%2Z%3").arg(toMetric(ui->txtWPosX->text().toDouble()))
                                       .arg(toMetric(ui->txtWPosY->text().toDouble()))
                                       .arg(toMetric(ui->txtWPosZ->text().toDouble())), -1, m_settings->showUICommands());
//**** END --- Modification by AdNovea


    // Move tool
    if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) {
    case 0:
        sendCommand("G0X0Y0", -1, m_settings->showUICommands());
        break;
    case 1:
        sendCommand("G0X0Y0Z0", -1, m_settings->showUICommands());
        break;
    }
}
“恢复原点”问题 Linux 1.2b - 提议的解决方法 #368 adnovea 更改了标题 “恢复原点”在 Windows 版本 1.2.8.1b 中有效,但在 Linux 1.2b 中无效 “恢复原点”问题 Linux 1.2b – 提议的解决方法 2020 年 4 月 26 日

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

还没有

发展

没有分支机构或拉取请求

1名参加者
“恢复原点”问题 Linux 1.2b - 提议的解决方法 #368

喜欢 (0)