Web sockets stops working after 6 commands


#1

Hi

I’m using web sockets to connect to my Line Us, and send movement commands with GCode. The movements work, and I receive an ‘ok X:1000 Y:750 Z:0’ after each command. But after usually 6 commands, it stops responding. Any ideas? I’ve checked if the socket closes, but it is still open.


#2

You need to read the responses, but it sounds like you’re doing that. Could you share some example code so I could take a look?


#3

Thanks for the quick answer. I found the problem and fixed it. I wasn’t responding with an API response and the browser was limited to 6 sockets. =)


#4

If you’re using Javascript I’d definitely recommend taking a look at the javascript library created by Beardicus. It does a lot of the work for you!


#5

Thanks, it’s a great library. I just wanted to learn it for myself.


#6

I see - just been playing with it. Great fun!


#7

Thanks, there is a good community growing there too.