Example Code

Generating More Than 2 Pulse Trains Using CompactDAQ

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 generate four pulse trains of the same frequency and  out of 90 degree phase on cDAQ 9178.

 

Description

The CompactDAQ 9172 chassis has 2 counters on the back plane. This limits the user to 2 separate pulse train generation tasks for all modules on the chassis. This example program demonstrates the use of correlated digital output to create 4 pulse trains of the same frequency that are 90º out of phase. This example was written for the NI-9401 High-Speed Bidirectional Digital I/O Module, but may work with other modules as well. Please note that the module must be in slot 1,2,3, or 4 for this example to run.

 

Requirements

 Software

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

 Hardware

  • NI cDAQ-9178
  • NI cDAQ module(e.g.NI-9401)

 Steps to Implement or Execute Code

  1.Insert NI-9401 into 1,2,3 or 4 slot of cDAQ 9178.

  2.Configure the following settings in the block diagram.

   (1)Select the port to output pulse trains.

   (2)Set the frequency you want to generate

  3.Run the VI.

搜狗截图16年12月25日1741_4.png

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

John Passiak

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