Basic Digital Write Using DAQmx API in LabVIEW

Updated Jan 23, 2019

Reported In


  • LabVIEW


  • NI-DAQmx

Issue Details

  • I am trying to write a DC output to a port on my PXI-6238. DAQ Assistant is no longer working as I desire in the While loop, causing the output to oscillate like a square wave. How do I write a boolean output by using DAQmx code?


For most LabVIEW projects, especially when you are new to LabVIEW, it is beneficial to start from a working example and modify the code to fit your needs.The following shipping examples provide some places with which to start building the DAQmx code for your application.

Location of the Digital Output shipping examples in NI Example Finder :
  • Hardware Input and Output --> Digital Output:
    1. Digital - Finite - Generate a finite amount of digital data based off of a sample clock.
    2. Digital - Continuous - Generate a continuous amount of digital data based off of a sample clock.
    3. Digital - SW-Timed - Generate digital output data based on software timing or user inputs. (Some of this code can be seen in Figure 1)
Figure 1. NI Example - Digital - SW-Timed


Not Helpful