LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save large amount of data and memory management

hi guys,

 

I prepared a vi to take measurement of temperature and pressure simultaneously from Agilent 34970A with 34901A. The sampling rate is 1 sample/per second for each channel (20 temperature channel and 2 pressure channel (current). The device has 20 channels and most probably the test will lasts 2 days. So, it means 86400 sample per day totally. Could the attached vi  do this task? I really do not know how the "write to text file.vi" works and use the memory of the pc. And after collecting all data, could I export these data to microsoft office excel to analyse safely? And I really do not know can I work this vi without interrupting. is it possible? I am also open for all other suggests relevant the vi, too. And I wonder that is it possible to build a standalone application to take measurements from DAQ devices (here Agilent 34970A-34901A)  by a pc without labview?

Egemen
0 Kudos
Message 1 of 4
(3,380 Views)

Hey,

 

I think your VI can do the task, but why do you write the same data to two files? Both will be replaced everytime you start (:

If you are not sure how the "write to text file.vi" works, just check the example delivered with your Labview Help - or try writing a small array with it. While you are on it, check out "Write to Spreadsheet File.vi" (just wire your numeric array into it - works nice and does tab separation and so on - exactly what you want). (whyever you want to use excel) Is there still the excel limit of 65k entries as lines? That would be a reall problem in your case (:

 

Some other things I saw:

You do not need the flat sequence structure, as your error wire will handle the order of events just fine.

You might want to check if an error occured and stop dataaquisition instead of just waiting for the counter.

 

While there are many things that could be done better, this VI should do the job - I would say, just give it a try.

 

 

Regarding the Standalone Program: You need a certain version of LV (the most expensive one) to build executables - if you happen to have such a version you are free to build one to use on PCs without LV.

0 Kudos
Message 2 of 4
(3,358 Views)

@Questionmarker wrote:

Hey,

 

I think your VI can do the task, but why do you write the same data to two files? Both will be replaced everytime you start (:

If you are not sure how the "write to text file.vi" works, just check the example delivered with your Labview Help - or try writing a small array with it. While you are on it, check out "Write to Spreadsheet File.vi" (just wire your numeric array into it - works nice and does tab separation and so on - exactly what you want). (whyever you want to use excel) Is there still the excel limit of 65k entries as lines? That would be a reall problem in your case (:

 

Some other things I saw:

You do not need the flat sequence structure, as your error wire will handle the order of events just fine.

You might want to check if an error occured and stop dataaquisition instead of just waiting for the counter.

 

While there are many things that could be done better, this VI should do the job - I would say, just give it a try.

 

 

Regarding the Standalone Program: You need a certain version of LV (the most expensive one) to build executables - if you happen to have such a version you are free to build one to use on PCs without LV.


I appreciated you for answers. I canceled the flat sequence structure from the vi. Maybe I need to write an other vi to split it to import the data to the excel. I really do not understand what you mean with the sentence "You might want to check if an error occured and stop data aquisition instead of just waiting for the counter.". Did you mean that when an error occurs, is there a way to deal with this error and after handling continues the data acquisition? Could you tell me what you mean in a different way? By the way, I use an academic version of LV and I created some vis working good but they are all about basic programming, they do not include a device driver for data acquisition.

Egemen
0 Kudos
Message 3 of 4
(3,350 Views)

Hey,

 

What I meant by check for an error while measuring is the following:

you start the program

If one of your Agilent VIs returns an error (maybe bad initialisation or so) you will still try to continue to measure.

Even if it is not working, you still continue measuring. Instead you could also check at the end of each loop if an error occured, like this:

this will only look for an error and stop right away. If you encounter typical errors with apperatus you might want to handle it. A sufficient way to do so might be a state machine that just re-initializes the setup if an error occurs and then continues with its task. Check out this article: http://www.ni.com/white-paper/3024/en

 

Anyway, I would recommend to just try it out and see what problems arise, as you might spend hours of improving well working code (:

0 Kudos
Message 4 of 4
(3,329 Views)