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.


  • Modular Instrumentation


  • LabVIEW


  • Other

Code and Documents


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



    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.

        LabVIEW 2012 (or compatible)
        NI-HSDIO driver which is compatible with your hardware and version of LabVIEW

    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.**

Jordan F
National Instruments

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

Todd S.
NI Employee (retired)

Great stuff, thanks for posting!

Todd S.
LabVIEW Community Manager
National Instruments