LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving data to a file efficiently

Solved!
Go to solution

Hi again 🙂

 

I am acquiring data from an engine using LabVIEW and NI-DAQmx, and I use an E-series device. I wish to acquire data and store it in the most efficient way.

I am aware of the Write to measurement File and Wrtite to Spreadsheet VI's, but the problem with them is that they directly write on to the hard disk, which slows down the data acquisittion process.

 

I therefore wish to know, if there is any other method, where data can be stored into an array temporarily while the VI is being run, and then saved to the harddisk at a later time leisurely.

 

Thanks 🙂

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 1 of 5
(2,538 Views)

Hi Dheeraj,


Of course you can do it. Use shift registers for storing the data temporarily. Run the vi and you can see the array gettin updated with real time values. When you press the stop button it is saved to a txt file. (A pop up will appear for you to browse the file). If you set the path in the block digaram or by a control on the front panel, this popup also can be avoided. Check the attached vi to see how it functions.


Regards,

Nitzz

(Give Kudos to good Answers and Mark it as a Solution if your Problem is Solved;)) 

Message 2 of 5
(2,537 Views)

Thanks again Nitzz 🙂 But the VI you provided has a broken link. And can you please tell me what shift registers do? Why are we connecting the shift registers to build array, and why is there an array constant outside the loop attached to a shift register?

 

Thanks a ton again 🙂

Dheeraj Bharadwaj
IIT-Madras
0 Kudos
Message 3 of 5
(2,534 Views)
Solution
Accepted by topic author dheeraj2102

Hi Dheeraj,

 

Oh boy, you must seriously think of reading the LabVIEW basics doccument provided with your LV package and also from the ni.com. 

 

Well, Shift registers are for holding the values from each itration of a loop. The array constant which you can see outside the while loop is the initial value of the shift register and once it enters the loop, that means when the loop starts running, the value from the random vairable will be inserted into the first row of the array and this array will be passed into the shift register at the right side of the loop. In the next itration the left side part of the shift register will hold this array value which was passed in the previous itration and in this itration, the new value from the random variable is appended to the array at index 0. You can read more about shift registers from here.

 

Regarding the broken wire, i am not sure whats going wrong there. Its working fine here. Try downloading it again. I have attached it again.


Regards,


Nitzz

(Give Kudos to good Answers and Mark it as a Solution if your Problem is Solved:smileywink:

 

Message 4 of 5
(2,523 Views)

@dheeraj2102 wrote:

Thanks again Nitzz 🙂 But the VI you provided has a broken link. And can you please tell me what shift registers do? Why are we connecting the shift registers to build array, and why is there an array constant outside the loop attached to a shift register?

 

Thanks a ton again 🙂


Yes, the VI is fine.  You must have broken it unintentionally.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 5 of 5
(2,493 Views)