![]() ![]() So for a longer print check a log and count how many resend requests you see from printer and how many timeouts you see.Ī resend happens when a firmware receives a command with checksum and the checksum does not match, so it means the line we did send is not identical to the received one. Something between step 5 and 1 changed the content or dropped part of the data send.Įspecially with real serialUSB converter a modification happens easily. There is no timing line, so if clocks of devices are not running at exactly same speed they might misinterpret a bit every now and then. When the printer allows switching baud rate you can try switching 115200 with 250000 or the other way around. Sometimes one of them creates less errors. Speed wise it makes not much difference as usb latency is the main speed limiter. If you get very frequent resends, like 1 every 5-10 lines, your setting for input buffer size is too high and we are sending more data then the printer firmware can cache. If that does not help switch to ping-pong-mode where we only send a new command when firmware marks the last send command as finsihed. Timeouts are a result of communication errors in the other direction from printer firmware to server. For every command we send, we need to receive one line that starts with “ok”. A typical case is that the “o” is missing and “k” is not “ok”. ![]() So we wait and wait for it and firmware is waiting for next command not knowing that we did not receive the “ok”. So after the set value of “timeout” seconds and when we know the command should be fast, we assume this case, write the timeout message and continue sending data. Here you need to watch out to shoose a good value. Modern firmwares support a busy protocol, meaning if a command takes longer it send “busy” resetting the timeout every 2 seconds. In this time you can set timeout to 3 seconds and have a fast recover. ![]() If this is not supported, timeout should be 30 seconds or at least longer then the longest slowest move you plan to execute. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |