LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa read function byte count is N-1?

Solved!
Go to solution

Hi,

 

I make Visa Vi.

The data is received 17bytes every 2ms second.

 

When third Visa read function byte count is 15, data is lose.

But, third Visa read function byte count is 14, data received well.....

So, Visa read function byte count is N-1?

visa.JPG

0 Kudos
Message 1 of 3
(3,013 Views)
Solution
Accepted by Sangkyu

"Visa Read (serial)" reads X bytes from the buffer.

 

If you have 17 bytes in the buffer and you make 2 reads of 1 byte, there should be 15 remaining.

 

If there is not, perhaps you are not waiting long enough for the data to be received into the buffer and you are trying to read out more bytes than it has available at that moment.

 

Deceased

Message 2 of 3
(3,004 Views)
Solution
Accepted by Sangkyu

What do you mean by "data is lost"?  Do you get a timeout error (after 10 seconds)?  Are you sure the message is not 16 bytes?

 

As a side note, you do not need to wire up constants to the Index Array.  The first item is index 0 by default and just increments from there.  Save you some wiring.


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 3 of 3
(2,982 Views)