06-24-2011 03:58 AM
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 🙂
Solved! Go to Solution.
06-24-2011 04:03 AM - edited 06-24-2011 04:06 AM
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;))
06-24-2011 04:08 AM
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 🙂
06-24-2011 04:20 AM - edited 06-24-2011 04:22 AM
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)
06-24-2011 10:33 PM
@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.