10-13-2005 03:20 PM
Hello all,
I am very new to LabView and I have a read VISA and counter that are asynchronous.
I need help reading a row from a 2D array (file) then manipulate as follows.
The picture show indices 0,0,1,1,1,1,2,3,3,3,4,4,4 and their respective values
My end result should be 0,1,2,…and their averages
I think I need to use conditional statement as follows
If row(i,j) equals row(i-1,j) then take average of direct result into a array
Else
…
Thanks
10-14-2005 05:04 AM
10-14-2005 06:03 AM
Hi,
I think this solves your problem.
10-14-2005 01:25 PM
Thank you both it's slik it worked
10-14-2005 03:02 PM
I made a quick modification to KC's example (LabVIEW 7.1). It fixes incorrect behavior if there are no entries with a zero in the first column. (KCs will produce a line with [0, NaN]. I am not sure if this situation can occur in your data).
The VI assumes that the 2D array is sorted by the first column. Is this always true? (It would be easy to change so it also works if things are not sorted that way).
10-14-2005 04:27 PM - edited 10-14-2005 04:27 PM
Message Edited by MZD on 10-14-2005 04:27 PM
10-14-2005 05:40 PM
10-16-2005 02:05 PM
Here is the code that generated the asynchronous array above.
I was trying to continuously read a voltage signal and record and index it as I specify with the capture button-snapshots like.