LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a better way to save these data?

Hi, all,
 
Could you guys help me to think of a better way to save my data from 10 channels?
 
I have 10 channels input from DAQ. I have a stacked sequence structure to each channel. I also have a case structure because not all the channels have data, the user can choose from the front panel if the channel has data. I attached a picture of the first frame.
 
My question is, I use sequence local to save data in each channel, then at the end of stacked sequence, save all the data into a spreadsheet. This works fine when there are only 2 or 3 channels. But since I have 10 channels now, I need to set up 9 sequence local, this leads to too much wire in the program.
 
Is there any other way to do this? Thank you very much.
0 Kudos
Message 1 of 4
(2,732 Views)

By the way, the whole program is inside a while loop. And I want to save my data after each iteration, not when it finished the while loop.

 

Thanks

Message Edited by J3000 on 05-01-2007 12:30 PM

0 Kudos
Message 2 of 4
(2,727 Views)
The snapshot is not at all useful in understanding what you want to do.

However- in general- sequence locals AND sequence structures are to be avoided. Partly for the reason you mention. Partly because you get no respect if you use them.

Why not just (1) collect the data from all channels (2) insert zeros for channels that are inactive (3) save the data into an array and (4) write array to a spreadsheet file?
0 Kudos
Message 3 of 4
(2,705 Views)
You want to use loops. Get rid of the sequence structure entirely.

Have a 10 iteration for loop. Have an empty array go into a shift register on the left of a for loop. Then if you have data for that channel, then append it to the array. Out of the for loop you wil have a vector of N items where N is the number of active channels. THen write this to a file and then send it on out the enclosing while loop and it will index to a 2-D array of N channels by number of loop iterations.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 4 of 4
(2,701 Views)