LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Serial + Arduino

Solved!
Go to solution

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!

0 Kudos
Message 1 of 5
(3,105 Views)
Solution
Accepted by topic author lord_nox

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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,098 Views)

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!)

0 Kudos
Message 3 of 5
(3,050 Views)

Bits?  or Bytes?

0 Kudos
Message 4 of 5
(3,040 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 5
(3,037 Views)