10-20-2017 11:36 AM
Hi guys, maybe you remember me from an early post asking why my messages from LabVIEW to Arduino were truncated... Now I'm back with this issue:
I managed to "separate by lines" the full "too long string", but the thing is that the message is truncated in the same way than before... But I realize that growing the delay between sending each line, the Arduino received more and more lines from the total string. The thing is that I can't make this delay grow much more than 1 second, so I was wondering... if this happens because of the Arduino Buffer... can I "flush" the buffer or something? if yes, WHERE should I put this flushing thing?
I know that VISA offers "VISA Flush I/O Buffer" and "Visa Clear", but I'm not sure how to use them, at least, by now, none of them works for what I want to...
PS0: I'm attaching a picture of the SubVI that I'm using to write line by line
PS1: Sorry for my english, I hope you understand
PS2: Background: I'm sending "G-Codes" through LabVIEW interface to an Arduino using a RAMPS SHIELD (used for 3d printers) and "too long" G-Codes were truncated exactly at 200 characters (Early Post)
Thanks!
Solved! Go to Solution.
10-20-2017 11:46 AM
If the problem is on the Arduino buffer, then the only thing you can do on the LabVIEW side is send the data at a slower rate. Your issue is on the Arduino side. Concentrate on fixing that (read data faster, increase your buffer size).
10-20-2017 05:13 PM
Its not the first time that someone told me about the limit is from the Arduino... I did check this and in my program I set the Buffer Size from 4 bits to 64 bits (I know that it's not the best option, but it works!)
10-20-2017 06:56 PM
Bits? or Bytes?
10-20-2017 07:24 PM
@lord_nox wrote:
I set the Buffer Size from 4 bits to 64 bits
I think you mean 4 Bytes to 64 Bytes. 4 bits (0, 1) is 1/2 of a Byte (0-255, 8 bits). A single character is a Byte.