Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I log to a file in the background?

I'd like to use a USB-6008 analog-input card to log a voltage to a file every few seconds, 24 hours a day.  I'm running on Windows.  I want to be able  to run whatever I like in the foreground (ie that logging doesn't lock out the processor).  I am just starting to plan this out, so even the most general help would be appreciated.  In the end, I'm going to ask Matlab to read in the log file in order to set certain parameters.
0 Kudos
Message 1 of 4
(3,310 Views)
Is your Data acquisition program also on MatLab itself??
0 Kudos
Message 2 of 4
(3,305 Views)
Here's a fuller picture of what I'm trying to do: I have a complicated set of analog and digital outputs which run a set program of waveforms, run using MEX scripts from Matlab.  I would like the details of the analog outputs to be a function of a single analog voltage (which measures an ambient magnetic field), and which doesn't change very quickly (but does require a little bit of computation to understand).  My idea is to read in this analog voltage on a regular basis and either process it a bit and store a pair of values, or not process it in the logging, and store all the values (and do all the processing in Matlab when deciding what values to use for the analog outputs).

Matlab is not threaded (only one script/program can run at once), so I can't run both the long-term, slow logging function and the waveform generation from Matlab at the same time.

Thanks for your help,
Asa
0 Kudos
Message 3 of 4
(3,302 Views)

Hi Asa,

There are many great example of writing to file that ship with LabVIEW. These can be found under Help » Find Examples… » Fundamentals » File Input and Output. If you have more questions, please post what version of LabVIEW you are using. Also, please post what “processing” you want to do. Depending on what your processing is, you may be able to do it in LabVIEW.

David L.
Systems Engineering
National Instruments
0 Kudos
Message 4 of 4
(3,290 Views)