Contact me: hankecnc@gmail.com

realtime_status_report 重置系统 #639

推推 grbl 3年前 (2023-01-22) 168次浏览

关闭
gorazdr 打开了这个问题 2015 年 3 月 27 日 · 10 条评论
关闭

realtime_status_report 重置系统#639

gorazdr 打开了这个问题 2015 年 3 月 27 日 · 10 条评论

注释

realtime_status_report 重置系统 #639

如果我
发出 ? 命令控制器开始发送报告,但随后它重置,我收到欢迎消息。
我尝试注释掉 realtime_status_report 的部分内容,我发现这部分代码是问题所在

// Report serial read buffer status
  if (bit_istrue(settings.status_report_mask,BITFLAG_RT_STATUS_SERIAL_RX)) {
    printPgmString(PSTR(",RX:"));
    print_uint8_base10(serial_get_rx_buffer_count());
  }

我在 atmega2560 上运行 0.9i
如果我为 atmega328p 编译相同的版本它工作正常。

感谢您的建议。

realtime_status_report 重置系统 #639
成员

@gorazdr: 不知道是什么原因造成的。源代码中没有任何看起来可疑的地方。您对已发布的源代码到底做了什么更改?你是如何编译它的?

realtime_status_report 重置系统 #639
作者

除了在 config.h 中我已经定义了 CPU_MAP_ATMEGA2560 之外,其他都是默认的。现在我在没有任何外围设备的情况下在 Arduino mega2560 上运行它。我用 make 编译源代码并用 make flush 上传到 arduino(将 Makefile CPU 更改为 atmeag2560,将 Programer 更改为 stk500v2)

realtime_status_report 重置系统 #639
成员

@gorazdr: 行。我会看看这个周末晚些时候会发生什么。请记住,Mega2560 不受官方支持,但受社区支持,这样的事情很可能会突然出现。如果我不能快速找出错误,我将不得不让这个问题悬而未决。

realtime_status_report 重置系统 #639
作者

谢谢你。这是我的完整编译上传日志:
gorazd@gorazd-EP45-DS4:~/NetBeansProjects/grbl-master$ make flash
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/main.c -o build/main.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/motion_control.c -o build/motion_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/gcode.c -o build/gcode.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/spindle_control.c -o build/spindle_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/coolant_control.c -o build/coolant_control.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/serial.c -o build/serial.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/protocol.c -o build/protocol.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/stepper.c -o build/stepper.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/eeprom.c -o build/eeprom.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/settings.c -o build/settings.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/planner.c -o build/planner.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/nuts_bolts.c -o build/nuts_bolts.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/limits.c -o build/limits.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/print.c -o build/print.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/probe.c -o build/probe.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/report.c -o build/report.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -MMD -MP -c grbl/system.c -o build/system.o
avr-gcc -Wall -Os -DF_CPU=16000000 -mmcu=atmega2560 -I. -ffunction-sections -o build/main.elf build/main.o build/motion_control.o build/gcode.o build/spindle_control.o build/coolant_control.o build/serial.o build/protocol.o build/步进器。 o build/eeprom.o build/settings.o build/planner.o build/nuts_bolts.o build/limits.o build/print.o build/probe.o build/report.o build/system.o -lm -Wl ,–gc-sections
rm -f grbl.hex
avr-objcopy -j .text -j .data -O ihex build/main.elf grbl.hex
avr-size –format=berkeley build/main.elf
文本数据 bss dec hex 文件名
28964 6 1677 30647 77b7 build/main.elf avrdude
-c stk500v2 -p atmega2560 -P /dev/ttyACM0 -D -B 10 -F -U flash:w:grbl.hex:i

avrdude:AVR 设备已初始化并准备好接受指令

阅读 | ################################################## | 100% 0.01s

avrdude:设备签名 = 0x1e9801 avrdude
:读取输入文件“grbl.hex”avrdude
:写入闪存(28970 字节):

写作 | ################################################## | 100% 4.67s

avrdude:写入 28970 字节的闪存
avrdude:根据 grbl.hex 验证闪存:avrdude:
从输入文件 grbl.hex 加载数据闪存数据:avrdude
:输入文件 grbl.hex 包含 28970 字节 avrdude
:读取片上闪存数据:

阅读 | ################################################## | 100% 3.74s

avrdude:正在验证…
avrdude:已验证 28970 字节的闪存

avrdude:安全模式:保险丝正常(H:00,E:00,L:00)

avrdude 完成。谢谢你。

realtime_status_report 重置系统 #639
作者

一方面注意,当我在没有 -D 默认设置的情况下闪烁时,
所有 int 值都是 255 所有 bool 值都是 1 所有掩码都是 1111111 并且所有 mm/min 都是 -217000.00(类似的东西记不清了)

M30 命令执行此操作:

M30

G91 G0 Y1
G91 G0 Y-1
G91 G0 X-1
G91 G0 X1
在我发出软复位之前没有响应并且我得到这个
警报:在循环期间中止
正常

Grbl 0.9i [‘$’寻求帮助]
[‘$H’|’$X’解锁]

我当前的 GRBL 设置:
Grbl 0.9i [‘$’ 寻求帮助]

$$
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=0 (dir port invert mask:00000000)
$4=0 (step enable invert , bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm )
$13=0(报告英寸,布尔)
$20=0(软限制,布尔)
$21=0(硬限制,布尔)
$22=0(归位周期,布尔)
$23=0(归位方向反转掩码:00000000)
$24= 25.000(归位进给,毫米/分钟)
$25=100.000(归位寻道,毫米/分钟)
$26=250(归位去抖动,毫秒)
$27=1.000(归位牵引,mm)
$100=40.000(x,步长/mm)
$101=40.000(y,步长/mm)
$102=40.000(z,步长/mm)
$110=1000.000(x 最大速度,mm /min)
$111=1000.000 (y max rate, mm/min)
$112=1000.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec ^2)
$122=10.000(z 加速度,毫米/秒^2)
$130=4000.000(x 最大行程,mm)
$131=2400.000(y 最大行程,mm)
$132=50.000(z 最大行程,mm)

realtime_status_report 重置系统 #639

当我为 mega2560 编译一个固件时,我遇到了类似的问题。
我增加了缓冲区和其他东西的默认值,固件有问题。
缓冲区在限制范围内,即。低于 256,但谁知道呢。
恢复设置和固件没问题。

2015-03-27 18:11 GMT+01:00,gorazdr notifications@github.com

一方面注意,当我在没有 -D 默认设置的情况下闪烁时,
所有 int 值都是 255 所有 bool 值都是 1 所有掩码都是 1111111 并且所有
mm/min 都是 -217000.00(类似的东西记不清了)

M30 命令执行此操作:

M30

G91 G0 Y1
G91 G0 Y-1
G91 G0 X-1
G91 G0 X1
在我发出软复位之前没有响应并且我得到这个
警报:在循环期间中止
正常

Grbl 0.9i [‘$’寻求帮助]
[‘$H’|’$X’解锁]

我当前的 GRBL 设置:
Grbl 0.9i [‘$’ 寻求帮助]

$$
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=0 (dir port invert mask:00000000)
$4=0 (step enable invert , bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.020 (junction deviation, mm)
$12=0.002 (arc tolerance, mm )
$13=0(报告英寸,布尔)
$20=0(软限制,布尔)
$21=0(硬限制,布尔)
$22=0(归位周期,布尔)
$23=0(归位方向反转掩码:00000000)
$24= 25.000(归位进给,毫米/分钟)
$25=100.000(归位寻道,毫米/分钟)
$26=250(归位去抖动,毫秒)
$27=1.000(归位牵引,mm)
$100=40.000(x,步长/mm)
$101=40.000(y,步长/mm)
$102=40.000(z,步长/mm)
$110=1000.000(x 最大速度,mm /min)
$111=1000.000 (y max rate, mm/min)
$112=1000.000 (z max rate, mm/min)
$120=10.000 (x accel, mm/sec^2)
$121=10.000 (y accel, mm/sec ^2)
$122=10.000(z 加速度,毫米/秒^2)
$130=4000.000(x 最大行程,mm)
$131=2400.000(y 最大行程,mm)
$132=50.000(z 最大行程,mm)


直接回复此邮件或在 GitHub 上查看:
#639(评论)

realtime_status_report 重置系统 #639
成员

@cri-s:就像我之前提到的,Mega2560 没有得到官方支持,可能会有随机错误。如果您注意到了特定问题,请无论如何报告它们或提供帮助并为它们提交修复程序。我通常只有时间确保 328p 构建尽可能稳定。

realtime_status_report 重置系统 #639

因为我没有 2560,只是为朋友编译的,所以我没有
调试和研究的可能性。
此外,源代码是从 i-net 提供/下载的,它是
0.8c 和 0.9g 代码的混合体,并进行了一些修改,以便我
不确定当时的实际源代码是否表现相似。
有一些硬件问题使整个事情变得复杂,
耗费了相当多的时间,而且由于只有远程支持的性质,如果当时 实际来源发生
了同样的事情,我没有验证它。
对不起。

2015-03-27 20:22 GMT+01:00,Sonny Jeon notifications@github.com

@cri-s:就像我之前提到的,Mega2560 没有得到官方支持,
可能会有随机错误。如果您注意到了特定问题,请
无论如何报告它们或提供帮助并为它们提交修复程序。我通常只有
时间确保 328p 构建尽可能稳定。


直接回复此邮件或在 GitHub 上查看:
#639(评论)

realtime_status_report 重置系统 #639
成员

@gorazdr: 行。我刚刚将 Grbl 上传到 Arduino Mega2560 R3 板上。我按照标准程序通过 Arduino IDE 上传 Grbl,并确保选择 Mega2560 作为我要上传到的板。我将$10=15状态报告设置为显示 RX 缓冲区。一切正常。不确定您的情况如何,但我只能说尝试使用 IDE 上传。

realtime_status_report 重置系统 #639
作者

@chamnit:你是对的,我尝试通过 Arduino IDE 上传,它工作正常。

喜欢 (0)