RBEGamer / K3_LASER_ENGRAVER_PROTOCOL

The serial protocol analysis from the K3 laser
Apache License 2.0
18 stars 7 forks source link

Compatibility with K6 #6

Open JarrettR opened 2 years ago

JarrettR commented 2 years ago

This seems to aaaalmost want to work with the K6.

This link implies that it should work: https://www.mariolukas.de/better-software-for-k3-k5-and-k6-laser-engraver/ But all the comments are talking about an issue in VisiCut that I also get. Related issue here: https://github.com/t-oster/LibLaserCut/issues/170

I'm using WSL / Ubuntu on Windows.


jarrett@Jarrett:~/laser/K3_LASER_ENGRAVER_PROTOCOL/src/k3_laser_api/build$ ./k3_laser_api --port /dev/ttyS4 --if ../
../../documentation/test_images/test_image_1.bmp
file_to_laser= ../../../documentation/test_images/test_image_1.bmp
set serial_port = /dev/ttyS4
Arguments remain = 1
SERIAL_CONNECTED
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_OK
ACK_TIMEOUT
SERIAL_DEVICE_NO_CONNECTION_ANSWER_IS_IT_THE_RIGHT_DEVICE```
mgmax commented 2 years ago

This sentence in the README.md could be the clue: "I found out that at commands where the head has to travel long distances it makes more sense to wait 100ms until the next one is sent to avoid errors."

So I would guess that these 100ms are not enough, maybe one needs to calculate the time based on how far the head moves or so. Would be helpful to look at how the original software reacts - how long does it wait after the ACK before sending the next command?

RBEGamer commented 2 years ago

Yeah thats a good point. In my tests and test images (also for empty lines), 100ms was good working delay time. I think this is calculated per line basis. Maybe a factor for the waittime is the travelspeed of the head...