[BUG] Line number is not Last Liner Number+1
MrKuskov opened this issue · 7 comments
Description
When printing any G-Code with the Command checksum
function enabled, I constantly see errors. For example, in the calibration retraction test, I see the following errors at the beginning of printing.
line: cur=6437, exp =6431.
Line number is not Last Liner Number+1, last line: 6442.
line: cur=6433, exp =6431.
Line number is not Last Liner Number+1, last line: 6434.
line: cur=6440, exp =6435.
This is all when printing this file. The values change for different files, but the essence does not. At the same time, messages like "unknown command *84" or "-1.65 Y23" appear in the upper line, that is, it is clear that these are card reading errors (*84 - X84). Skipping one command has almost no effect on print quality, but when printing a thin-walled part, it is almost always a defect. I have tried using different cards in different connectors and USB FLash, sometimes errors disappear, but most often 1 or 2 per printing session appear. How to set up error-free printing or G-code duplication?
retraction_tower_PETG_16m39s.zip
TFT35 B1 V3
it seems you enabled advanced_ok but it is not properly supported/configured on Marlin side. Disable it on TFT side only (it is enough). Those errors you reported are related to a corruption on Marlin side (data are properly read from SD card)
yes it is enabled. And how to set it up correctly? It seems that I have followed all the instructions for setting up.
the configuration for biqu B1 is set to
#define MAX_CMD_SIZE 96
#define BUFSIZE 32
The instructions say
# - "RX_BUFFER_SIZE" properly configured in Configuration_adv.h in Marlin firmware.
# To be safe you need (MAX_CMD_SIZE * BUFSIZE) RX buffer. By default this is 96 * 4 bytes so
# you would need to at least set RX_BUFFER_SIZE to 512 bytes, practically half of that will
# be enough, but more is better/safer.
but only the following buffer size options are given in the configuration
// :[0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048]
#define RX_BUFFER_SIZE 1024
what buffer size should I set?
what buffer size should I set?
32 * 96 = 3KB, so if your hardware supports it set RX_BUFFER_SIZE to 2048, this should be fine.
Your BUFSIZE of 32 is quite big, you could also consider lowering it to 8 or 16. 4 is the default, and I personally use 8.
Without advanced ok you basically only send 1 command at a time and wait for Marlin to acknowledge it before sending the next command.
I used the following parameters:
config.ini
tx slots:4
Configuration_adv.h:
#define MAX_CMD_SIZE 96
#define BUFSIZE 8
#define TX_BUFFER_SIZE 32
#define RX_BUFFER_SIZE 1024
#if RX_BUFFER_SIZE >= 1024
#define SERIAL_XON_XOFF
#endif
everything seems to be working correctly
@MrKuskov remember that tx_slots
in config.ini
is used by TFT only if ADVANCED_OK is not enabled in Configuration_adv.h
(in Marlin fw). If you enable ADVANCED_OK then you enable the real advanced ok feature provided by Marlin and tx_slots
in config.ini
has no effect at all because the tx slots are dynamically reported by Marlin (in you case it will be at maximum 7 (BUFSIZE - 1)).
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.