Contact me: hankecnc@gmail.com

运行期间停止导致 WCS 发生变化 #1035

推推 grbl 3年前 (2023-02-02) 304次浏览
关闭
sfinexer 打开了这个问题 2018 年 11 月 8 日 · 36条评论
关闭

运行期间停止导致 WCS 发生变化#1035

sfinexer 打开了这个问题 2018 年 11 月 8 日 · 36条评论

注释

运行期间停止导致 WCS 发生变化 #1035
贡献者

运行中停止。
Z 坐标显示不正确。

运行期间停止导致 WCS 发生变化 #1035
合作者

没有足够的信息

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 8 日  

http://cnc.tiven.ru/ssr-2018-11-08_13.20.31.mp4
cnc代码中没有这个坐标!

运行期间停止导致 WCS 发生变化 #1035
合作者

1.) 你使用最新的 GRBL 版本吗?
2.) 当发生这种情况时,GRBL 报告什么 WPOS 坐标?
3.) 您在设置或 gcode 中使用任何偏移量、WCS 或类似的东西吗?
4.) 你设置了什么safe-z?

运行期间停止导致 WCS 发生变化 #1035
合作者
哈维 评论了 2018 年 11 月 8 日  

这些是什么鬼?

运行期间停止导致 WCS 发生变化 #1035

对我来说看起来不像符合 g 代码的行。如果您需要评论,请使用圆括号,而不是方括号。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
  1. grbl_1.1g
  2. 我随时按下停止按钮。

[控制器]
grbl_0 = 10
grbl_1 = 25
grbl_2 = 0
grbl_3 = 0
grbl_4 = 0
grbl_5 = 0
grbl_6 = 0
grbl_10 = 3
grbl_11 = 0.0
grbl_12 = 0.002
grbl_13 = 0
grbl_20 = 1
grbl_21 = 0
grbl_22 = 1
grbl_234 = 3
grbl 100.0
grbl_25 = 500.0
grbl_26 = 25
grbl_27 = 20.0
grbl_30 = 50000.0
grbl_31 = 2000.0
grbl_32 = 0
grbl_100 = 80.0
grbl_101 = 80.0
grbl_102 = 40.0
grbl_110 = 10000.0
grbl_111 = 4500.0
grbl_112 = 10000.0
grbl_120 = 3000.0
grbl_121 = 200.0
grbl_122 = 1000.0
grbl_130 = 319.0
grbl_131 =
429.0 grbl_132 = 300.0

4),,,,

@HarvieCP1251

运行期间停止导致 WCS 发生变化 #1035
合作者

CP1251

我不在乎。仍然无效的 g 代码

[Блок №91301]   
G0 Y267.127 X46.646
G1Z-5
G0Z1
[Блок №91302]   
G0 Y267.059 X47.965
G1Z-5
G0Z1
[Блок №91303]   
G0 Y267.092 X48.878
G1Z-5
G0Z1
[Блок №91304]   
G0 Y266.925 X49.353
G1Z-5
G0Z1
[Блок №91305]   
G0 Y267.086 X50.057
运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 8 日  

@Harvie为什么?
代码完全正确。你为什么认为他不是真的?

运行期间停止导致 WCS 发生变化 #1035
合作者

就像我说的。AFAIK 你不能使用方括号。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

我会尝试使用“)”括号,我认为不会有任何改变。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

@Harvie但是代码适用于这些括号!
执行否时出错。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 9 日  

@Harvie如果我按下暂停键,那么一切都很好,只有在按下停止按钮时才会出现错误。
http://cnc.tiven.ru/ssr-2018-11-08_22.16.38.mp4

运行期间停止导致 WCS 发生变化 #1035
贡献者
马里奥巴斯 评论了 2018 年 11 月 9 日  

在第一个视频中短暂出现错误 22:@Harvie,我再问一次,你能纠正在旧版本中启用的错误弹出窗口的删除吗?
必须能够读取“终端”中的错误。
检查第2行,
G0带F是错误的

检查第 5 行
  G1 Z-5
它没有 F 的值。是错误的

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

@MARIOBASZF 的值设置一次并保持不变,直到分配另一个值。

F——工作进给速度,与G0无关。
@MARIOBASZ在第二个视频中,我开始暂停,所有坐标都是正确的,然后我按下停止按钮,坐标就变了!!!

运行期间停止导致 WCS 发生变化 #1035
贡献者

在终端中你读到了错误代码?在您的示例中,我没有在第 5 行之前看到 F 的值

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 9 日  

@MARIOBASZ第 2 行。
不,我没有阅读错误描述。

这里的 g 代码如果我先暂停坐标是正确的,然后(不从暂停中删除)我按下停止按钮,坐标就会改变。
g代码如何影响我先按下暂停键,然后单击停止键并改变坐标的事实?

这是 B-cnc 或 grbl 中的错误。
但这显然是一个错误。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

@Harvie
我需要跳过这条线!
如果我使用“()”而不是“[]”,那么 grbl 将寻找注释的完成。
在这种情况下不建议使用“()”,下面是负责此操作的 grbl 代码。
换句话说,我会不必要地加载 arduino。

为了 (;;) {

// Process one line of incoming serial data, as the data becomes available. Performs an
// initial filtering by removing spaces and comments and capitalizing all letters.
while((c = serial_read()) != SERIAL_NO_DATA) {
  if ((c == '\n') || (c == '\r')) { // End of line reached

    protocol_execute_realtime(); // Runtime command check point.
    if (sys.abort) { return; } // Bail to calling function upon system abort

    line[char_counter] = 0; // Set string termination character.
    #ifdef REPORT_ECHO_LINE_RECEIVED
      report_echo_line_received(line);
    #endif

    // Direct and execute one line of formatted input, and report status of execution.
    if (line_flags & LINE_FLAG_OVERFLOW) {
      // Report line overflow error.
      report_status_message(STATUS_OVERFLOW);
    } else if (line[0] == 0) {
      // Empty or comment line. For syncing purposes.
      report_status_message(STATUS_OK);
    } else if (line[0] == '$') {
      // Grbl '$' system command
      report_status_message(system_execute_line(line));
    } else if (sys.state & (STATE_ALARM | STATE_JOG)) {
      // Everything else is gcode. Block if in alarm or jog mode.
      report_status_message(STATUS_SYSTEM_GC_LOCK);
    } else {
      // Parse and execute g-code block.
      report_status_message(gc_execute_line(line));
    }

    // Reset tracking data for next line.
    line_flags = 0;
    char_counter = 0;

  } else {

    if (line_flags) {
      // Throw away all (except EOL) comment characters and overflow characters.
      if (c == ')') {
        // End of '()' comment. Resume line allowed.
        if (line_flags & LINE_FLAG_COMMENT_PARENTHESES) { line_flags &= ~(LINE_FLAG_COMMENT_PARENTHESES); }
      }
    } else {
      if (c <= ' ') {
        // Throw away whitepace and control characters
      } else if (c == '/') {
        // Block delete NOT SUPPORTED. Ignore character.
        // NOTE: If supported, would simply need to check the system if block delete is enabled.
      } else if (c == '(') {
        // Enable comments flag and ignore all characters until ')' or EOL.
        // NOTE: This doesn't follow the NIST definition exactly, but is good enough for now.
        // In the future, we could simply remove the items within the comments, but retain the
        // comment control characters, so that the g-code parser can error-check it.
        line_flags |= LINE_FLAG_COMMENT_PARENTHESES;
      } else if (c == ';') {
        // NOTE: ';' comment to EOL is a LinuxCNC definition. Not NIST.
        line_flags |= LINE_FLAG_COMMENT_SEMICOLON;
      // TODO: Install '%' feature
      // } else if (c == '%') {
        // Program start-end percent sign NOT SUPPORTED.
        // NOTE: This maybe installed to tell Grbl when a program is running vs manual input,
        // where, during a program, the system auto-cycle start will continue to execute
        // everything until the next '%' sign. This will help fix resuming issues with certain
        // functions that empty the planner buffer to execute its task on-time.
      } else if (char_counter >= (LINE_BUFFER_SIZE-1)) {
        // Detect line buffer overflow and set flag.
        line_flags |= LINE_FLAG_OVERFLOW;
      } else if (c >= 'a' && c <= 'z') { // Upcase lowercase
        line[char_counter++] = c-'a'+'A';
      } else {
        line[char_counter++] = c;
      }
    }

  }
}

// If there are no more characters in the serial read buffer to be processed and executed,
// this indicates that g-code streaming has either filled the planner buffer or has
// completed. In either case, auto-cycle start, if enabled, any queued moves.
protocol_auto_cycle_start();

protocol_execute_realtime();  // Runtime command check point.
if (sys.abort) { return; } // Bail to main() program loop to reset system.

}

运行期间停止导致 WCS 发生变化 #1035
贡献者

@sfinexercontrolaste la correcta implementacion de F?
终端视图?(我运行时出错)
运行期间停止导致 WCS 发生变化 #1035

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 9 日  

我的代码没有给出错误。
执行正确完成。
运行期间停止导致 WCS 发生变化 #1035
运行期间停止导致 WCS 发生变化 #1035

运行期间停止导致 WCS 发生变化 #1035
合作者
哈维 评论了 2018 年 11 月 10 日  

如果我使用“()”而不是“[]”,那么 grbl 将寻找注释的完成。
在这种情况下不建议使用“()”,下面是负责此操作的 grbl 代码。

您在哪里找到可以使用方括号的信息。在您发布的代码中没有可以处理方括号的代码。我认为你错了。

g-code 将注释指定为圆括号 () 之间或之后的文本;分号。没有方括号。

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

@Harvie也许我错了。
这是视频,正在加载代码,b-cnc 是最新版本。
http://cnc.tiven.ru/ssr-2018-11-09_19.03.43.mp4

运行期间停止导致 WCS 发生变化 #1035
合作者
哈维 评论了 2018 年 11 月 10 日  

我已经修复了你的 g 代码并使用最新的 git bcnc 和最新的稳定 grbl 对其进行了测试。
我没有你描述的问题。机器总是在 Z1 和 Z-5 之间停止

绘图修复.ngc.txt

运行期间停止导致 WCS 发生变化 #1035
贡献者作者
斯芬克斯 评论了 2018 年 11 月 10 日  

@Harvie我不会结束这个话题,大概我就能明白问题出在哪里了。
@Harvie 您可以尝试相同的控制器设置吗?特别是,$ 23 = 3 #1035(评论)

运行期间停止导致 WCS 发生变化 #1035
合作者

我附上的固定代码对你有用吗?

运行期间停止导致 WCS 发生变化 #1035
贡献者作者

@Harvie是的,问题解决了。
所以错误是括号不正确。