Archived:DAQExpress Task Periodic Logging to File

Updated May 1, 2024

NI does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Reported In

Software

  • DAQExpress

Issue Details

I have an input task that needs to run for hours and I want to make sure I am logging to disk periodically so that I do not lose all my data if something happens.  How do I do that in DAQExpress?

Solution

Periodic logging cannot be implemented in a task, you need to implement this adding a LabVIEW VI to your DAQExpress project and call the task from the LabVIEW VI.

Once you have your task being called from a LabVIEW VI, there are two ways to implement periodic logging in DAQExpress, using the DAQmx Task Properties or the Storage palette functions.

Configure Logging Using the DAQmx Task Properties
  1. Add a DAQmx Task Properties node to the task in the LabVIEW VI.
  2. Add the Read >> Logging properties shown in the screenshot to the task and configure as required.
 

You can define the time of each log file based on the acquisition rate and the number of samples per file. This is the simplest method, requiring minimal programming, but also offering minimal flexibility and control of the TDMS file. For more control and flexibility, refer to the next method.


Configure Logging Manually Using the Storage Palette
The Storage palette provides you with the VIs you will need to manually open/create, close, and write to a TDMS file. 
 

Refer to the Periodic Logging shipping example in DAQExpress by going to Learning >> Examples >> Built Applications from the welcome screen to learn how to implement periodic logging with the VIs in the Storage palette.

There are two GVIs in the example:
 
  • Continuous Logging.gvi shows you how to log continuously saving the data in multiple files, creating a new file when the time specified in the New File Interval in Minutes control is reached.
  • Periodic Logging.gvi is useful if you don’t to save all the data, because it allows to save a new file every time the Logging Interval in Minutes is reached, saving only the amount of data specified in Logging Duration in Seconds.

Additional Information

It might be easiest to start with the Automation Examples provided with your project to have a base for the input task in your VI. 
 

Refer to the Read Write TDMS File example project in DAQExpress if you need help with TDMS logging. 
 

DAQExpress automatically periodically saves data to a temporary TDMS file while recording for a task. However, the better option is to not rely on the periodic saving that happens in the background and to manually write to disk periodically.

Update on DAQExpress Versions: NI will no longer release new versions of DAQExpress software. The final versions for DAQExpress was 5.1. Users are encouraged to transition to the FlexLogger™ Lite edition, companion software for compatible DAQ hardware. FlexLogger Lite ensures comprehensive sensor compatibility, instant offline setup, and a programming-free interface for streamlined data logging. Download FlexLogger Lite to simplify data acquisition processes.