Example Code

1D Boolean Array To Digital Waveform

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example demonstrates how to convert a 1D array of Booleans with any number of elements into a Digital Waveform.


Description
Here is a brief description of the example:

This example demonstrates how to convert a 1D array of Booleans with any number of elements into a Digital Waveform. By using a for loop it would be possible to modify the code to take a 2D array of Booleans and convert it into a 2D array of Digital Waveforms.

This is particularly useful for generating patterns to use with DAQmx Digital Outputs


Requirements

  1. LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Define Boolean array using the Array Control
  2. Run code
  3. Display the array into the digital waveform graph

 

Additional Information or References
VI Snippet

 1D Array of Booleans to Digital Waveform 2012 NIVerified.png

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

Regards,

Al C
National Instruments,
Application Engineer

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