LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

store data after each iteration with different header

Hello,

 

I am capturing data from an instrument in a 2D form (x-y data).  I would like to carry out more than one sweep and capture the data after each iteration.  (The x-data is the same after each sweep). I would like to save the data in such a way that after the first iteration, the x-data and y-data is collected with a heading "Iteration 1", on the second iteration, I would just like to save the y-data with a heading of "Iteration 2" and so on.  The final data should look like:

 

       Iteration 1   Iteration 2  Iteration 3

10      1                  2              2

20      2                  2              2

30      1                 10             5

40      20               40            -4

 

I am having problems collecting the data. 

 

Please help!!!

 

Thanks,

hiNi

50      3                  2              3

 

 

0 Kudos
Message 1 of 4
(2,706 Views)

You would just append another line of header text to your text file before the next sweep iteration begins.

 

If you need more help, you'll need to post a VI of what you have so far so we can see where to help you.Smiley Wink

Message Edited by Ravens Fan on 09-10-2008 10:42 PM
Message 2 of 4
(2,704 Views)

Hello,

 

Attached is an example of how I get the data after 1 iteration.  How can I do this for more than 1 iteration and capture the x-data only the first time (since it is the same for each iteration) and then capture more than 1 iteration of the y-data with different headings?

 

Thanks,

hiNi

0 Kudos
Message 3 of 4
(2,679 Views)
The first thing you need to do is add a while or for loop so that you actually have more than one iteration. Then, remove that sequence structure and locals and place it outside the loop. In the main loop, you can use the = comparison function wired to the iteration terminal. Wire the result of this to a case statement. You then have a case statement that can do one thing on the very first iteration and something different on subsequent iterations.
0 Kudos
Message 4 of 4
(2,675 Views)