LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

storing data

Target: Three integer values arrive at different times. The values needs to be stored (in a excel spreadsheet or any other text format) in three separate columns. The columns should expand down when the “next three values” are available and so on. However, rows in the table are not fixed and so when the program stops the file should contain the data recorded before. Functions tried:Tried storing the data in array using a loop. But the loop will update only after it reaches the end count and comes out of the loop. This means that if my program stops in between, I will loose of the previous data. Also tried using “format into file” function or similar functions but then the data will just over write the previous one. Suggestions appreciated:
0 Kudos
Message 1 of 6
(2,743 Views)

Hi ABM26,

do you mean a "real" Excel file or do you only need something like a csv file? For a real Excel file you need ActiveX, otherwise you can use the "write to spreadsheet file" function the the option append.

 

Mike

0 Kudos
Message 2 of 6
(2,742 Views)

Hi,

I don't need excel. Any text data logging should do fine. I tried "write to xl" function but then as I mentioned before, I need fill an array and finish the loop so as to transfer the data to excel. If the loops end abrupltly , it won't data log and I will loose some of the data which I do not want.

Thanks.

0 Kudos
Message 3 of 6
(2,736 Views)

Hi ABM26,

can you show what you have done so far? You can store your data in a shiftregister and write it every 10 iterations. If your aquisition loop needs to run much faster, then you should use two loops and transfer the data with queues from one to the other.

 

Mike

0 Kudos
Message 4 of 6
(2,720 Views)

Here are two examples on our community that shows how to write to a spreadsheet after each iteration through a while loop.

http://decibel.ni.com/content/docs/DOC-2049  

http://decibel.ni.com/content/docs/DOC-2275

0 Kudos
Message 5 of 6
(2,691 Views)

Hi,

 

I think I have made progress on the issue. One can use a shifter rgister loop and have the array inside it. So even if the program stops arbitrarily, the array will all its previous values.

Thanks to all for replying/feedback to my question..

0 Kudos
Message 6 of 6
(2,668 Views)