Example Code

HSDIO Multi-Device Dynamic Generation (TClk) One HWS File

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

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview
    This example shows how to generate synchronized digital data with multiple HSDIO devices using only one HWS File.

 

Description

    This example shows how to generate synchronized digital data with multiple HSDIO devices using only one HWS File.  Specifically, this example shows how to output 40 signals (created in Digital Waveform Editor) to two PXI-655x devices using Tclk for synchronization.

     The figure below is the front panel representation of the program.  You will have to input a valid file path to the HWS file with 40 signals (attached below).  Also, you will need to specify two HSDIO compatible devices with corresponding channels.


Requirements
    Software
        LabVIEW 2012 (or compatible)
        NI-HSDIO driver which is compatible with your hardware and version of LabVIEW
    Hardware
        PXI-655x


Instructions
    1. Select HWS file.
    2. Run the VI. 

 

 

Additional Information or References 

 

Front Panel.jpg

    The figure below is the block diagram representation of the program.  The NI-HWS Express Load vi is used to import in the HWS file with 40 signals.  The array of signals is then split by the DWDT Digital Signal Subset vi and input into the HSDIO Write Named Waveform vi.  The array that is input into the DWDT Digital Signal Subset vi represents the number of signals to be written (length of array) and the what signal to write for each channel (numeric value in each array position).

 

Block Diagram.jpg

 

Caveats and Additional Notes

    This example is pretty specific in using two HSDIO devices with 40 signals but can be quickly modified to allow multiple devices with any number of signals.

 

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

Regards,
Jordan F
National Instruments

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

Comments
Todd S.
NI Employee (retired)
on

Great stuff, thanks for posting!

Todd S.
LabVIEW Community Manager
National Instruments