Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphing All Data Acquired from DAQ Assistant

Overview
This VI shows how to graph all data accumulated since the start of the program on a single waveform graph, updating each time a new set of data points are acquired.

Description:
This VI demonstrates how to combine new data acquired from the DAQ Assistant with data stored in a shift register from previous iterations of the DAQ Assistant.  This method allows you to see your front panel waveform graph update with new data each time new data it is acquired, yet continue to show data acquired on previous iterations.  This example uses the DAQ Assistant, but could be adapted to use the DAQmx API.  The intent of this VI is to show how to use shift registers and the Get Waveform Components and Build Waveform functions to append new data points with previously acquired data.
Note that since this example simply uses the Build Array function each time new data points are added, it does not manage memory optimally, and therefore may exhibit significant performance decreases once a large number of points have been acquired.  It is intended only as a starting point, and may need to be modified to handle large data sets optimally.
**By default, the DAQ Assistant is set to acquire from the first four analog input channels of the device selected in the "Device Name" control.  You will need to alter the DAQ Assistant settings if you require fewer or more channels.

Steps to implement or execute code
To implement this example:

  1. Configure the channels
  2. Run the VI
  3. (Optional) Turn on the Highlight Execution to see the flow of the VI


To execute this example:

  1. Install the required software.
  2. Connect the DAQ hardware that supports the Analog Input features
  3. Confirm the connection with the MAX with TestPanel
  4. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible
NI-DAQmx 9.0 or compatible

Hardware
cDAQ with C series Analog Input Module

 

fp.JPGbd.JPG

 

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

Cody A.
Comments
Member seohunee
Member

For my acceleration recording, I just changed several settings of DAQ Assistant function based on this VI and it worked well.  But when I tried to build this on my own, I failed to find how I can make the box of empty array of empty waveforms (located left-bottom-outside of the while loop).  It will be grateful if you can give my some advice.  Thank you very much.