Example Code

DAQmx Software Start and Stop trigger

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 starts and stops the generation of a continuous digital pulse using a software trigger.

Description

This VI is a modification of the Gen Dig Pulse Train-Continuous.vi example. A case structure and while loop were added around the DAQmx Start.vi. The case structure is controlled by the Start button on the front panel so the user can start the task with a front panel button. When the task is started, a true constant causes the while loop to exit. The stop button is then used to stop the task.

Requirements

Software

  • LabVIEW 8.5 or compatible
  • DAQmx 8.6.1 or compatible

Hardware

  • NI DAQ card with at least one counter

Steps to Implement or Execute Code

  1. Select the physical channel in the Counter(s) control
  2. Set the Frequency, Duty cycle, and Idle State controls
  3. Run the VI
  4. Press the start button to start the digital pulse
  5. Press the stop button to stop the digital pulse and the VI

Additional Information and References

Front Panel

2013-04-05_171807.png

Block Diagram

2013-04-05_171821.png

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

Regards,

Sara Lewandroski
Applications Engineer | National Instruments

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

Contributors