Example Code

Retriggerable I/O cDAQ 9178

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)

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This example shows using a pulse train generated by a retriggerable counter task as the sample clock for the analog IO task.

 

Description

Like M Series devices, the cDAQ 9178  features retriggerable counter tasks but not Analog IO tasks. We can get around this by using a pulse train generated by a retriggerable counter task as the sample clock for the analog IO task. Two VIs are attached for this example. The file RetriggerableIOcDAQ9178 is configured to accept an external trigger to retrigger the analog IO. The VI retriggerableIOcDAQ9178Demo demonstrates the retriggerable functionality by using another counter to generate a low frequency pulse train to act as the trigger source.

 

Requirements

Software

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

Hardware

  • NI cDAQ-9178

 

Steps to Implement or Execute Code

  1. Specify your output physical channel and the cDAQ counter 1 (cDAQ/c_tr1) to be used as the sample clock (AO Sample Clock Counter). You may have to right click on the control and click on I/O Name Filtering. Be sure Internal Channels is selected.
  2. Specify your timing and waveform parameters.
  3. Specify your trigger source and edge.For the Demo, you'll want to specify the trigger source as Counter 0 (cDAQ/_ctr0).
  4. Run the VI.

 

Additional Information or References

 retriggerableIOcDAQ9178.png

 

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

Sean Ferguson
Application Engineering Specialist | RF and Reconfigurable Test

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