Example Code

Synchronized Analog Input/Output with an Analog Trigger and Pre-Triggered Samples Using LabVIEW with DAQmx

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 VI demonstrates how to continuously acquire and generate analog data at the same time, synchronized with one another, started by an external analog start trigger.

 
Description

This VI uses an external analog trigger to start and synchronize data generation and acquisition.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Select the physical channel to correspond to where your signal is input on the DAQ device.  Also, select the corresponding channel for where your signal is being generated.
  2. Enter the minimum and maximum voltage ranges. Note:  For better accuracy try to match the input range to the expected voltage level of the measured signal.
  3. Set the sample rate of the acquisition. Note:  The rate should be at least twice as fast as the maximum frequency component of the signal being acquired.
  4. Set the physical channel in which the external digital trigger is connected to.  (Default is PFI0.) 
  5. Select the update rate for the generation.
  6. Select what type of signal to generate and the amplitude.

Additional Information or References
VI Snippet

014.png

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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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