From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Synch AI-AO to an External Sample Clock Generate by Onboard Counter 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 Example Program synchronizes an analog output and an analog input task to a external sample clock generated by a counter on the same board.


Description

This Example Program synchronizes an analog output and an analog input task to a external sample clock generated by a counter on the same board. This is done using a counter output frequency task.  The AI and AO tasks reference the output terminal of the counter output task and therefore sample/update at the rate that the counter task is going.

Requirements

  • LabVIEW 2012 (or compatible)
  • DAQmx 9.5.5 (or compatible)

 

Steps to Implement or Execute Code

  1. Configure the Controls on the front panel to fit your application
    1. Select the counter output and the sample clock frequency
    2. Select the physical channels for the AI and AO tasks.
    3. Select the Waveform parameters for the AO Task.
  2. Select run.

 

Additional Information or References

This Program could easily be scaled for multiple AI and Multiple AO channels if needed. a simple modification of the physical channels and the polymorphic DAQmx Write or Read VI would be in order.


VI SnippetMulti-Function-Synch AI-AO to Internal Counter LV 2009 Express VI Snippet.png**This document has been updated to meet the current required format for the NI Code Exchange.**

Charley Dahan

Global Account Manager

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

Comments
dtraxler
Member
Member
on

Does not appear to be anything in the zip file.