Example Code

Write Multiple Waveforms to File

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This example shows how to write multiple waveforms from a single acquisition to file using the Write Waveforms to File VI and then reading that data back in.

 

Description

When you write a waveform directly to file from a DAQ Assistant and then read it back in you only get the last "chunk" of data that was pulled from the devices buffer. This code provides a work around for reading waveforms back from a file by writing all of your data out as a single "chunk" so that it is read back in its entirety.

 

Requirements

Software

  • LabVIEW 2012 or compatible
  • NI-DAQmx 9.5.5 or compatible

Hardware

  • NI Multifunction DAQ Device with at least 3 AI channels

 

Steps to Implement or Execute Code

  1. Specify a file path on the Front Panel
  2. Configure the DAQ Assistant to use your hardware. This example takes readings on three seperate channels.

 

Additional Information or References

 

FrontPanel.PNGBlockDiagram.PNG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Jonathan L.
Technical Support Senior Group Manager
National Instruments

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