LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

While loop confliction with VISA Read

I already used 4096 but there was the errir about visa read due to too less bytes( i searched it in this website, they said I should increase it).

The vi "Data Read ( adapted) that i attached is the original vi I copied and put into my main VI. This original VI works properly with no issues about reading data. If you looked carefully, all block diagrams are the same as those in my main VI. It should work because of the same stuffs, but it doesn't:(

I will try to set the byte count high but i still believe that it still doesn't work.

Any other ideas?

Thanks for helps 🙂
0 Kudos
Message 11 of 14
(646 Views)

Hi,

 

The byte count that is already high is in the buffer re-size, after the initialization, before the loop.  The Byte count for the read ( in the loop)  should be set high, thus the read will keep reading until either the byte count is meet, the termination is meet, or there is a timeout. 

 

The original data read doesn't use the re-size buffer.  No need to put that in the new Thesis, unless you have a specific reason.

 

The 'too less bytes' means there is probably more data in the buffer, the size to increase there is in the read, not adding a buffer re-size.

 

Hope this helps. 

 

***

 

Is it possible to save the "read" data directly to file, then you can take a look at what is being read.  Or put a probe and a stop so you can look at the read data each loop.

-------
Mark Ramsdale
-------
0 Kudos
Message 12 of 14
(644 Views)
Yes its possible. All values are saved every second. I mean all random values that I talked about are saved too. Every time you run my program, u have to select the file u want to save the data into. I aleady put probes and stops. The visa read obtains the signal from the port, but at the time it converts to strings, its not the real values
0 Kudos
Message 13 of 14
(640 Views)
I think the problem is at the point where the VISA Read obtains the data from the VISA serial port through the while loop. I put a String indicator at the output string of the visa read. It showed the incorrect values
0 Kudos
Message 14 of 14
(635 Views)