Replies: 8 comments 10 replies
-
Hi @GrblGru, Strange behavior...? Where do you see than the planner buffer is 120? Maybe we can increase the sizes as long as the memory of the processor is not full... I didn't made the calculation. It should be possible to add a debug message that returns the GCode line when an error occurs, it shouldn't be too complicated to do... @++; |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer.
The user has already tried extra short cables with gold contacts, unfortunately without success. I have also seen the error a few times on my test system (without laser).
Sorry, I meant the serial receive buffer. It is 128 character. For security I wrote only max. 120 characters. Thanks, for your offer to make the error causing command visible. Thanks for your help :) |
Beta Was this translation helpful? Give feedback.
-
Hi @GrblGru, The ability to debug the GCode line is already present in Grbl: @++; |
Beta Was this translation helpful? Give feedback.
-
Hi guys, |
Beta Was this translation helpful? Give feedback.
-
Hi Sergej, this is really great ! Thanks a lot :) |
Beta Was this translation helpful? Give feedback.
-
Hi @sergeyshap1981, Thanks for your report. What I understand in your patch proposal is your code don't send the "OK" reply when the serial buffer is half full. In this case (serial_get_rx_buffer_available() > RX_MIN_BUFFER_SIZE), the "OK" response of the current GCode line will never be send! This can hang a sender which is waiting for all lines responses. What I also see, is you have suppressed the "OK" output when Grbl receive an empty (blank) line... This OK is needed by some GCode sender for synchronization. I thing the problem can be come from the "character counting" streaming method worsen by the difference between the end line in Linux which is 1 byte (LF) and the Windows end line which is 2 bytes (CR LF). Perhaps this difference can lead to buffer overflows if the sender sends a lot of small lines in the Grbl serial buffer. In fact, the Grbl's serial interrupt doesn't send error message when the serial buffer is in overflow condition. I think I need to add this error report soon 😄 @++; |
Beta Was this translation helpful? Give feedback.
-
Hi Gauthier, I am not sure, but can it be that the timing has changed ? |
Beta Was this translation helpful? Give feedback.
-
Just a quick feedback. So far I did not get the error again. However, I have also not been able to test for very long. |
Beta Was this translation helpful? Give feedback.
-
Hi Gauthier,
I have a question about the USB interface. A user of my program uses Grbl and also sometimes Mega-5X for lasering.
The traverse paths are often very short. Thereby a lot of commands are generated like e.g.
s0
F2000 x0 Y9.800 z0
S250
F600 x0.1 Y9.800
S0
F2000 x0 Y9.700 z0
S250
F600 x0.1 Y9.700
etc.
During the execution of the program sometimes after some time one of the two errors appears :
25 A G-code word was repeated in the block...
2 Numeric value format is not valid or missing an expected value
Because this happens at different places in the program I suspect an error in the interface protocol.
I have created the interface according to the Streaming Protocol: "Character-Counting" and never had problems with it so far.
Testing is very time consuming, because the error occurs only intermittently. But it looks like the problems only occur in interaction with the Laser commands. When I change the S250 command to S0, the error has never occurred until now.
Could it be that the S250 command sometimes takes so much time that the protocol is disturbed ?
Is it possible to increase the size of the planner buffer (currently 120) ?
I save the commands that I have sent. Can I see somewhere which command caused error 25 or 2 ?
What can I do to make the interface more secure ?
I would be very grateful for tips on how to debug such an error.
Thanks for your time
Beta Was this translation helpful? Give feedback.
All reactions