LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

saving and loading 1D array to/from file

Hi,

i have some problems with my NI application. for the first, i have case structure with two cases: true and false.

FALSE: in this case i have a for loop with 100 samples. i catch signal from my DAQ (now just Simulate Signal) and what i want is to save it in a 1D array and at the end of the loop the COMPLETE array into one text file. Problem in my vi: just the values from the last iteration are saved.

TRUE: now i have while loop. AT THE BEGINN of the loop i need to load my array from the file and not in the middle of the loop. Why? The data from the file are needed during the loop.

thanx in advance

Vedran Divkovic
RUB GERMANY
0 Kudos
Message 1 of 3
(2,607 Views)
Vedran

not too sure what the problem is since it seems to work ok for me. can you explain the problem further ??

Dan
0 Kudos
Message 2 of 3
(2,607 Views)
According to your code, what you are saving is an array of means (one from each iteration), and NOT the last iteration. If you want to keep the entire data, it would be a 2D array.

Why are you generating an entire waveform at each iteration? Shouldn't you just generate one point?
0 Kudos
Message 3 of 3
(2,607 Views)