Example Code

Logging Fewer Samples of Data Than Acquired in LabVIEW With The Write to Measurement File

Code and Documents

Attachment

Overview

Some applications require a set sampling rate and sample size for other purposes of the code. When data logging is involved, this may cause a generated measurement file to be overly saturated with sample data, making analysis difficult. This example provides a workaround using condition logging.

Description

This example can be used to generate a measurement file that has fewer samples than the sampling rate and sample size provides. When the sample size to sampling rate ratio cannot be adjusted for logging purposes, this is an option for having a simplified data log. The Number of Total Data Samples Written in the measurement file is the Number of Total Samples Written divided by the Sample Rate Divisor rounded to the nearest number divisible by Number of Samples.

Steps to Implement or Execute Code

  1. Download the VI from below.
  2. Open and configure the Front Panel controls.
  3. Run the VI.

Requirements

Software

LabVIEW

Hardware

DAQ

Additional Images or Video

Conditional Logging by Iteration.PNG


Briana P.
Licensing
Sr SW Engineering Manager | NI R&D
ni.com/support

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors