Skip to content
This repository has been archived by the owner on Jan 29, 2018. It is now read-only.

Unexpected terminated connection while executing gcode #208

Closed
cojarbi opened this issue Dec 30, 2016 · 11 comments
Closed

Unexpected terminated connection while executing gcode #208

cojarbi opened this issue Dec 30, 2016 · 11 comments

Comments

@cojarbi
Copy link
Collaborator

cojarbi commented Dec 30, 2016

@cprezzi attached the gcode and screenshot of the workspace and terminal at the moment of freeze.
Running latest grbl 1.1e on a gshield with LW3 on Chrome OSX Sierra

gcode (25) copy.gcode.txt
screen shot 2016-12-29 at 8 01 32 pm

@cojarbi cojarbi changed the title Auto terminate connection while executing gcode Auto terminated connection while executing gcode Dec 30, 2016
@cojarbi cojarbi changed the title Auto terminated connection while executing gcode Unexpected terminated connection while executing gcode Dec 30, 2016
@cprezzi
Copy link
Member

cprezzi commented Dec 30, 2016

@cojarbi I was able to replicate the problem. But I got an additional message in the console:
Error: Writing to COM port (GetOverlappedResult): Unknown error code 31

Now I nedd to investigate, what could cause it. At least it has nothing to do with OSX, as I am on Windows 10.

@cprezzi
Copy link
Member

cprezzi commented Dec 30, 2016

Ok, error code 31 seems to mean:
ERROR_GEN_FAILURE 31 (0x1F) A device attached to the system is not functioning.
which basically means that the serial port of Grbl is blocked.

I don't know if this is something we even can influence from our side.

@chamnit : Do you have an idea what could cause this problem?

@cprezzi
Copy link
Member

cprezzi commented Dec 30, 2016

To resolve the blockage, I had to unplug an replug the USB port. Just disonnecting the serial port by software did not help.

@cojarbi
Copy link
Collaborator Author

cojarbi commented Dec 30, 2016

Did I mention that I was able to complete the gcode via ugs

@chamnit
Copy link

chamnit commented Dec 30, 2016

@cprezzi : This seems like a USB connection issue. These can be problematic with noisy electrical environments. Usually due to a spindle drawing a lot power nearby. Don't know how lasers would effect things. Likely less. Also, I can check with some nodeJS devs to see if they ran into similar issues and how they resolved it.

@cojarbi
Copy link
Collaborator Author

cojarbi commented Dec 30, 2016

@chamnit my error was generated by using a router not a laser. I don't think I have any powerful electronic near the board nor the cable.
@cprezzi is there any coincidence on where it stopped working for you as in mine?

@ghost
Copy link

ghost commented Dec 30, 2016 via email

@cprezzi
Copy link
Member

cprezzi commented Dec 30, 2016

@chamnit: I found that there was some issues like this on node.serialport, but allready some time ago. My test was a flying installation on the desk, just Adruino Uno with CNC-Shield an two steppers, no spindle or laser. Probably it's caused by the USB converter (or it's driver), like Peter suggested.

@openhardwarecoza : I'm using chinese Arduinos with CH340. The CH340 is known to have some issues with fast baudrates, but that should be over 115'000.

@cojarbi : My test stopped somewhere on the very last outlines. That's a part where you have long lines (no big gcode density).
I have now changed the code a bit, mainly to suppress the ugly false error message after connecting and some connection state cleanups, but that seems to have solved the problem (at least I'm not able to replicate anymore). Can you please pull the new version (master) and try if that solved the problem for you?

@cojarbi
Copy link
Collaborator Author

cojarbi commented Dec 30, 2016

@openhardwarecoza Im using a gshield from synthetos
@cprezzi I'm gone for the weekend will try next week

@chamnit
Copy link

chamnit commented Dec 30, 2016

Spindles create a lot of noise on the electrical circuit itself, not just around the spindle and its cord. I would test if it runs without the spindle connected.

The CH380 USB serial chip is known to fail at all baudrates. Just some less than others. It is particularly bad when sending a lot of data, like with the character counting protocol. The CH380 chip has poor buffer management and drops overflow characters without any notifications.

@cojarbi
Copy link
Collaborator Author

cojarbi commented Jan 3, 2017

I cannot duplicate at the moment i could run the complete project without issues. Note it was done via Rpi 2

@cojarbi cojarbi closed this as completed Jan 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants