gerritv / Grbl-Panel

A control panel for Grbl
MIT License
180 stars 102 forks source link

The program stops work with an error #72

Closed AutoRich closed 7 years ago

AutoRich commented 7 years ago

Hi! The program stops work with an error. I use GRBL 0.9j. Failure happened in versions of the program: GrblPanel-Release-1.0.9.3 and GrblPanel-Release-1.0.9.7 Help to solve this problem please.

2016-10-30_8-56-19

Complete description of an error in the file: Error-1.txt

gerritv commented 7 years ago

Is Status Report Mask $10 set to 31?

AutoRich commented 7 years ago

It was succeeded to find out a cause of error. At the beginning of 10$ =3 - the error appeared. Then set $10 in 17 and 31 - the error appeared. When set $10 in 0 - the error ceased to appear!!! But now in the program coordinates are not displayed. 2016-10-31_7-48-06 Also tried 10$ =1 - the error appeared. Most likely this error is caused by the instruction of Try ... Catch is also caused by the incorrect data obtained from GRBL. Perhaps this check can be cleaned. If from GRBL not right data came, then it is possible to pass them also coordinates in the program not to update, and to accept the following data and to update coordinates in the program.

gerritv commented 7 years ago

There is no Try/Catch in that subroutine. Can you screen shot with Verbose on, I need to see what Grbl is sending. There is something not correct with the message being parsed. I expect to see both Mpos: and Wpos: on Grbl 0.9 so $10 must have 2 lowest bits set, e.g. 3

AutoRich commented 7 years ago

Hi! Here that causes an error. 1-1

And here a code which was sent to the machine ($10=3). 1-2

gerritv commented 7 years ago

I am going to guess that you have an electrical noise problem with all those M3/M5 pairs. The last line shown has an extra ':' in the sequence 62.703,3:62 as well as the pattern of numbers being quite different from those above it. I have tested with 0.9j and $10=3 with no problem. I gather that the file runs for a while before giving the error?

AutoRich commented 7 years ago

Installed $10 =17 the error jumped out at once at connection - always.

gerritv commented 7 years ago

That is because I expect both Mpos and Wpos to be present, thus the 2 low order bits of $10 must be set, e.g. 3 or 31. Otherwise I would get complaints that the program is not showing both :-)

electrokean commented 7 years ago

Definitely looks like some data getting lost in the communications stream. You're not using an Arduino with a CH340 serial to USB chip are you?

AutoRich commented 7 years ago

Yes, I have Arduino with a CH340. Programmed Arduino on new, changed an USB cable - fulfilled the first time without errors, and the second time the error appeared. ($10=3)

gerritv commented 7 years ago

The data corruption can be due to many things. E.g. PC gets busy and can't keep up with data coming from Grbl or electrical noise or ... There is unfortunately not much I can do in Grbl Panel to help with figuring that out. I can't protect everything with Try/Catch to avoid an Exception.

AutoRich commented 7 years ago

If to you it is not difficult, make please in Grbl Panel an opportunity to trace this problem. On a power supply of problems should not be - I have a powerful power supply unit - 12V, 20A. Still tried other programs - there did not notice problems. But from all programs that I tried - your the BEST!!! Thanks!

gerritv commented 7 years ago

Thank you for the compliment :-)

Please try http://psgv.ca/Files/Debug.zip

AutoRich commented 7 years ago

Hi! Today tried to start the program and here what error appeared almost right at the beginning. GRBL v1.1d firmware Parameter is 10$ =3 2016-11-14_12-34-01 2016-11-14_12-17-37 2016-11-14_12-23-29 Error.txt

gerritv commented 7 years ago

I fixed/worked around it based on your using 0.9j ! I will do another for you for 1.1D, the internal code is quite different. You still have a serious problem somewhere :-(

AutoRich commented 7 years ago

Hi! Thanks for the help in a solution of the arisen problem. No, more problems are not present. I decided to try 1.1d - thought can on this firmware of problems not will, but you saw result. At 10$ =0 works well, did not notice any failures.

gerritv commented 7 years ago

I want to be clear, I am not actually fixing your problem, only letting things progress in spite of it. Whatever your PC/machine combination is, it is losing some data on the way in to GrblPanel. That is why there is an error, the message is corrupted. $10=0 also hides the problem, not fixes it. The last line of the message above has 1.053,0.0s where the 0s is clearly showing that MPo is missing.

gerritv commented 7 years ago

Please try http://psgv.ca/Files/Debug.zip . To repeat, this does nothing to fix your actual problem, it only lets the message get past checks. This work around will not be in any actual release.

AutoRich commented 7 years ago

Hi! Made testing - the error jumped out: $10=3 (GRBL v1.1d) 2016-11-15_13-04-48 Error.txt

gerritv commented 7 years ago

Ok, you need to find out why your setup is losing so much data. In the last line above there are 2 Ov: sections and the first one is garbled. I don't see how me modifying my program to accept these incorrect messages is helping. If I accept garbage then you still have a problem even if it looks like it runs ok. What is your PC, what is the OS (Windows 7/8/10?) When you run another GUI and look closely at the responses are there errors in those messages as well? Can you recompile Grbl with slower baud rate to see if that solves your communication problem?

electrokean commented 7 years ago

@AutoRich have you replaced your Arduino with one that doesn't use a CH340? If so, what type are you using and what chip does it use for USB to serial? Also, as @gerritv mentions, please provide info on your PC (CPU speed, RAM, OS, etc). One of these is going to be the cause of this corrupt communications, not grbl or grbl-panel.

gerritv commented 7 years ago

Closing this as no new news.