lw.comm-server icon indicating copy to clipboard operation
lw.comm-server copied to clipboard

Random issue: machine disconnection - reconnect - queue continues when clicking jog

Open ghost opened this issue 8 years ago • 37 comments
trafficstars

Not exactly sure when or why this happens, too random to put a finger on it yet. But has always been an issue for me:

  1. Sometimes randomly machine disconnects (I'll blame Smoothieboard's known usb noise issues for that)
  2. Reconnect: machine is not moving because smoothie was reset, but i think LW queue is "active" just waiting for an OK back
  3. As is usually after a fuckup like loosing comms to your machine, your first action tends to need a jog: so you hit jog to start moving.
  4. And viola lw.comm-server resumes sending the queue when it gets the OK back from the Jog commands (or i think thats why) and starts running. Endmills break, curses are uttered and days are ruined

ghost avatar Jun 27 '17 12:06 ghost

It's not the ok from the jog that causes the queue to continue (this is fed at the end of the queue), it's the jog command from the frontend itself that kicks the queue on.

What do you suggest to do? I could clear the queue on each machine connect, so nothing unexpected happens.

cprezzi avatar Jun 27 '17 16:06 cprezzi

Not sure actually. If you only lost connection (but board didnt reset, so current position is held) you can usually resume queue. In other cases, you will definately need to clear queue. Depends on what happened. Not sure. Perhaps after reconnect, check if a Queue, then warn user: "You just reconnected a machine, which has a queue, would you like to Resume, or Clear?"? Open to discussion here - as i said, i havent even nailed down under exactly which circumstances it happens. I do feel like the jog gets through though, as I had two instances where it disconnected while down in a cut. And i clicked Z+ to back out of the hole: The resulting move when to next point while retracting out of the hole. That was very weird. I hit the emergency stop as soon as that happened (both times unfortunately) as i realised queue resumed, but wasnt sure if i want to or not, so estop was quickest instinct.

ghost avatar Jun 27 '17 16:06 ghost

Jog should not be able to jump over an exisitng queue, because I use addQ which adds the command to the end of the queue (see: https://github.com/LaserWeb/lw.comm-server/blob/master/server.js#L2602). I will try to simulate that issue by unplugging the cable while job is running.

cprezzi avatar Jun 27 '17 16:06 cprezzi

Just some input: We have random disconnections reported by a few users. Most of the time it was solved by switching to a different USB port or computer. We have not been able to find a common denominator with respect to hardware or O/S either.

Please let me know if there is a specific test or situation you would like us to try.

With respect to what happens after a disconnect, I would think the 'safest' approach would be to alert the users and not continue with the queue. Clearing the queue is the safest.

I have always wanted to see a more prominent status shown on the left tab for connection status and queue information. Having it always there and visible regardless of what tab you are in would be very useful. At the moment you need to switch between either COMMS or CONTROL to see whether you are connected to your machine.

ghost avatar Jun 27 '17 22:06 ghost

Seconding connection status and button always visible. (; #bringbacktgetopnav lol

Lpc1769's USB can be temperamental. Wonder if grbl-lpc improves on it? I have a few hardware fixes to help with that too. Next rev of your pcb (;

On Jun 28, 2017 12:30 AM, "Domenic Di Giorgio" [email protected] wrote:

Just some input: We have random disconnections reported by a few users. Most of the time it was solved by switching to a different USB port or computer. We have not been able to find a common denominator with respect to hardware or O/S either.

Please let me know if there is a specific test or situation you would like us to try.

With respect to what happens after a disconnect, I would think the 'safest' approach would be to alert the users and not continue with the queue. Clearing the queue is the safest.

I have always wanted to see a more prominent status shown on the left tab for connection status and queue information. Having it always there and visible regardless of what tab you are in would be very useful. At the moment you need to switch between either COMMS or CONTROL to see whether you are connected to your machine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-311504603, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr242hfdCefeVPUhrPKfAAKAazJRYoks5sIYKCgaJpZM4OGlyE .

ghost avatar Jun 27 '17 22:06 ghost

Since this is widespread I also have had random disconects with my GrBL board. I'm on OSx also but haven't been able to replicate. At some point I thought it was interference on the cable

cojarbi avatar Jun 27 '17 22:06 cojarbi

Its most likely hardware. Wont be LW. Check your event viewer / dmesg and you'll see the OS complain lower down the stack

On Jun 28, 2017 12:36 AM, "Ariel Yahni" [email protected] wrote:

Since this is widespread I also have had random disconects with my GrBL board. I'm on OSx also but haven't been able to replicate. At some point I thought it was interference on the cable

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-311505714, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2xn-aKaTyK7rqpJwpBGG3MOl7acWks5sIYP6gaJpZM4OGlyE .

ghost avatar Jun 27 '17 22:06 ghost

@cojarbi We also tested this with customers who reported the issue but once again it was not conclusive. We supplied new USB cables with correct ferrites installed but it didn't appear to make a difference.

ghost avatar Jun 27 '17 22:06 ghost

@openhardwarecoza Thanks for this info. We will have users check this next time its reported.

ghost avatar Jun 27 '17 22:06 ghost

Domenic, are you guys running your 5v rail off the usb power, or from a 5v PSU onboard? (smoothieboard stock runs off usb power. Unless you solder in the expensive recom regulator. I find that on USB power it performs worse)

On Jun 28, 2017 12:41 AM, "Domenic Di Giorgio" [email protected] wrote:

@cojarbi https://github.com/cojarbi We also tested this with customers who reported the issue but once again it was not conclusive. We supplied new USB cables with correct ferrites installed but it didn't appear to make a difference.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-311506421, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2xfZK5aHzz2Hgq1lr-h-DMQfdh4_ks5sIYUMgaJpZM4OGlyE .

ghost avatar Jun 27 '17 22:06 ghost

@openhardwarecoza We don't run it off the USB power.

ghost avatar Jun 27 '17 23:06 ghost

Has anyone seen this with GRBL-LPC?

tbfleming avatar Jun 27 '17 23:06 tbfleming

Havent tried grbl-lpc on this yet, but since this particular board is so wonky, it would make a good test subject. Will install tomorrow (today i have alu parts to mill that cant be delayed)

Seperate thing, we really need to get LW to support SD card usage more (ascii upload, list sd, play file) - would also really help. I know upload will be slow but we havent tested bulk ascii upload yet (in contrast to m28, it doesnt use line, ok, line. It uses bulk transfer with seri buffer maxed out, then md5 afterwards to ensure it was successful

On Jun 28, 2017 1:19 AM, "Todd Fleming" [email protected] wrote:

Has anyone seen this with GRBL-LPC?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-311512614, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr22wjEmEKyxzegLFdYAOEKlu4XNfOks5sIY3qgaJpZM4OGlyE .

ghost avatar Jun 28 '17 04:06 ghost

I have started implementing SD card support on backend side (https://github.com/LaserWeb/lw.comm-server/blob/SD_support/server.js#L2157) but got stuck at the frontend part. I could use some help with the frontend from the GUI specialists ;) We need some sort of File Manager popup.

cprezzi avatar Jul 03 '17 10:07 cprezzi

In the LW3 codebase i had a Upload SD button next to Play (control tab) the idea was a Modal to list the sd, and a Play button next to gcode files

On Jul 3, 2017 12:29 PM, "Claudio Prezzi" [email protected] wrote:

I have started implementing SD card support on backend side ( https://github.com/LaserWeb/lw.comm-server/blob/SD_support/server.js#L2157) but got stuck at the frontend part. I could use some help with the frontend from the GUI specialists ;) We need some sort of File Manager popup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312610162, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2_4X_OtFsWDmT_AKro2a7f4Nv62nks5sKMJqgaJpZM4OGlyE .

ghost avatar Jul 03 '17 11:07 ghost

Button: https://github.com/LaserWeb/deprecated-LaserWeb3/blob/master/public/index.html#L340

Modal never finished https://github.com/LaserWeb/deprecated-LaserWeb3/blob/master/public/index.html#L1234

Had working SD in https://github.com/openhardwarecoza/CoPrint though, check it out

On Jul 3, 2017 1:55 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

In the LW3 codebase i had a Upload SD button next to Play (control tab) the idea was a Modal to list the sd, and a Play button next to gcode files

On Jul 3, 2017 12:29 PM, "Claudio Prezzi" [email protected] wrote:

I have started implementing SD card support on backend side ( https://github.com/LaserWeb/lw.comm-server/blob/SD_support/ server.js#L2157) but got stuck at the frontend part. I could use some help with the frontend from the GUI specialists ;) We need some sort of File Manager popup.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312610162, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2_4X_OtFsWDmT_AKro2a7f4Nv62nks5sKMJqgaJpZM4OGlyE .

ghost avatar Jul 03 '17 11:07 ghost

What kind of file manager do you need? Only loading files or uploading, renaming, etc.

jorgerobles avatar Jul 03 '17 12:07 jorgerobles

Upload and List (with play button next to list) will suffice.

Must accommodate subfolders and recursion

On Jul 3, 2017 2:04 PM, "jorgerobles" [email protected] wrote:

What kind of file manager do you need? Only loading files or uploading, renaming, etc.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312627971, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr28mpHRs7rnTG-kZVlmidHP0NJ0Xuks5sKNivgaJpZM4OGlyE .

ghost avatar Jul 03 '17 12:07 ghost

https://github.com/woodpig07/react-nested-file-tree

jorgerobles avatar Jul 03 '17 12:07 jorgerobles

Smoothieware reports current directory. You dont need a tree. (up one level) and (open folder). Clone and run my CoPrint please, point it as a smoothie and see what i did there

On Jul 3, 2017 2:20 PM, "jorgerobles" [email protected] wrote:

https://github.com/woodpig07/react-nested-file-tree

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312631006, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr29JA3W3riKq3uW5DxahlV8xJJZopks5sKNx-gaJpZM4OGlyE .

ghost avatar Jul 03 '17 13:07 ghost

@openhardwarecoza If I understand your code correctly, you use the smoothie sd card via the mounted device, not over USB serial commands, right?

cprezzi avatar Jul 03 '17 13:07 cprezzi

Yes, that was the experiment. Sadly it wasnt the solution, because doing serial and msd at the same time, corrupts the SD. So using it as the usb-storage option isnt the way to go. But i did like my file browser, upload dialogues, etc. For lw4 it just needs to move to a modal i think (less space available than we had in coprint). And of course using the correct 'upload' as linked couple replies above

On Jul 3, 2017 3:53 PM, "Claudio Prezzi" [email protected] wrote:

@openhardwarecoza https://github.com/openhardwarecoza If I understand your code correctly, you use the smoothie sd card via the mounted device, not over USB serial commands, right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312651601, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2-Us8DXWgw1ldDDATMV6PYytzH6Jks5sKPJlgaJpZM4OGlyE .

ghost avatar Jul 03 '17 13:07 ghost

Correct upload method: LaserWeb/deprecated-LaserWeb3#138 (comment)

On Jul 3, 2017 3:56 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

Yes, that was the experiment. Sadly it wasnt the solution, because doing serial and msd at the same time, corrupts the SD. So using it as the usb-storage option isnt the way to go. But i did like my file browser, upload dialogues, etc. For lw4 it just needs to move to a modal i think (less space available than we had in coprint). And of course using the correct 'upload' as linked couple replies above

On Jul 3, 2017 3:53 PM, "Claudio Prezzi" [email protected] wrote:

@openhardwarecoza https://github.com/openhardwarecoza If I understand your code correctly, you use the smoothie sd card via the mounted device, not over USB serial commands, right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312651601, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2-Us8DXWgw1ldDDATMV6PYytzH6Jks5sKPJlgaJpZM4OGlyE .

ghost avatar Jul 03 '17 13:07 ghost

Oops, wrong link:: upload as per wolfman https://github.com/LaserWeb/deprecated-LaserWeb3/issues/138#issuecomment-253009463

ghost avatar Jul 03 '17 13:07 ghost

https://plus.google.com/+JérémieTarot/posts/HqLcZVv2Vz8 https://plus.google.com/+J%C3%A9r%C3%A9mieTarot/posts/HqLcZVv2Vz8

On Jul 3, 2017 3:59 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

Oops, wrong link:: upload as per wolfman https://github.com/ LaserWeb/deprecated-LaserWeb3/issues/138#issuecomment-253009463

On Jul 3, 2017 3:59 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

Correct upload method: LaserWeb/deprecated-LaserWeb3#138 (comment)

On Jul 3, 2017 3:56 PM, "Peter van der Walt (Gmail)" < [email protected]> wrote:

Yes, that was the experiment. Sadly it wasnt the solution, because doing serial and msd at the same time, corrupts the SD. So using it as the usb-storage option isnt the way to go. But i did like my file browser, upload dialogues, etc. For lw4 it just needs to move to a modal i think (less space available than we had in coprint). And of course using the correct 'upload' as linked couple replies above

On Jul 3, 2017 3:53 PM, "Claudio Prezzi" [email protected] wrote:

@openhardwarecoza https://github.com/openhardwarecoza If I understand your code correctly, you use the smoothie sd card via the mounted device, not over USB serial commands, right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/lw.comm-server/issues/40#issuecomment-312651601, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2-Us8DXWgw1ldDDATMV6PYytzH6Jks5sKPJlgaJpZM4OGlyE .

ghost avatar Jul 03 '17 14:07 ghost

Yes, I also prefer not to use USB MSD as it's better to switch that off for performance reason (also less disconnect problems). I already have the USB implementation (mostly) ready, I just need a react compatible presentation in the frontend.

@openhardwarecoza I will check your frontend solution and also the link @jorgerobles posted.

cprezzi avatar Jul 03 '17 14:07 cprezzi

Cool, all in agreeance (;

I only keep msd on for that initial config tweaking. (; someday we can have a Firmware config modal too (;

ghost avatar Jul 03 '17 14:07 ghost

Can Smoothie report if MSD is present so we can warn?

tbfleming avatar Jul 03 '17 14:07 tbfleming

Perhaps: use config-get commands http://smoothieware.org/console-commands#config-get , check the http://smoothieware.org/troubleshooting#how-to-disable-msd-permanently parameters?

ghost avatar Jul 03 '17 14:07 ghost

Oops all this sd talk should've been in #30

Oh well.

Sidenote, fixed a little of my random disconnects by throwing out the Nexbook and stealing the wifes old Asus for the workshop. But that has allowed me to reproduce the original issue in this thread reliably:

Run a mill job Hit Abort while its moving Hit Clear All. (typo... Clear Alarm i meant) Hit Z+ (obviously after an abort i want to withdraw the endmill out of the cut) The Z+ move is accompanied by an unasked for XY move. (no idea where it comes from). Expected result is a straight up Z move.

(note still an issue on latest build downloaded this morning, and since its a different PC thats also eliminated some...)

The only thing i dont have nailed down is why it doesnt always happen. But its probably two thirds of the time

ghost avatar Jul 03 '17 16:07 ghost