LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to build a array with collected data

Hi,
I have collected data from serial port with VISA. Now I want to build a array with 100 date points. Should I connect VISA Read with Build Array directly? How to do it?
PS: All of them are in a While Structure.
Thank you!
0 Kudos
Message 1 of 6
(3,126 Views)

An inefficient way to create the array is to use the build array and a shift register as shown below. It's more effecient in terms of memory management to create the array and then use the replace array subset as shown in the other image. Of course, if you don't need the array inside the loop, just wire the value out of the while loop and on the exit tunnel, right click and select 'Enable Indexing'.

Message Edited by Dennis Knutson on 07-03-2007 10:25 PM

Message Edited by Dennis Knutson on 07-03-2007 10:26 PM

Download All
Message 2 of 6
(3,127 Views)
Thank you, Dennis Kn, your suggestion is very helpful. Following is my VI, I still can't get right array and graph. Could  you give me some other suggestions? Thanks again.
0 Kudos
Message 3 of 6
(3,106 Views)
Try attached version and let us know if this solves your problem.
Message 4 of 6
(3,102 Views)
Thank you,JB. That's what I want to gain. Thank you very much!
0 Kudos
Message 5 of 6
(3,094 Views)
Please note that it is really important to remove the flush of the serial port to avoid the loss of data !
0 Kudos
Message 6 of 6
(3,088 Views)