Integrating Modular Instruments with TestStand using IO Templates Created in Instrument Studio

Updated May 5, 2025

The goal of this article is to explain the process of integration IO Templates for modular devices created in Instrument Studio and passing them into TestStand for use with LabVIEW code modules.

The steps include creating an IO configuration in Instrument Studio, exporting it to TestStand, and using the configuration in TestStand to link the template to an instrument handle saved as a local variable. Finally, the instrument handle is passed into an action step's LabVIEW code module and we discuss the necessary requirements from a LabVIEW perspective. 

We will discuss the steps from three perspectives that include Instrument Studio, TestStand and LabVIEW.

Instrument Studio

  • First set up your device configuration in Instrument Studio
  • Once the device has been configured, tested and confirmed to work as needed we can create the IO Configuration Template by clicking on Export >> Export to TestStand

 

TestStand

  • Now that we've exported our configuration to TestStand we can find it in the IO Configurations tab
  • Utilizing the "Create Sessions and Apply Configuration" step type we can implement an IO Configuration for use with code modules. 
  • Drop the "Create Sessions and Apply Configuration" step into your sequence and select the IO Configuration of interest. 

  • Once applied you should see the local variables change to reflect the newly applied configuration

  • We will pass this as our instrument handle for our code module.

 

LabVIEW

In the previous step we outlined how to pass in the IO configuration as an instrument handle to your code module; now lets discuss the necessary components for your VI. 

In each case, your MI device will need the following: 

  • Instrument handle
  • Initiate Acquisition (Depending on your MI device, this may be called "Initiate' or "Start Acquisition")
  • Fetch (Depending on your MI Device, the API call may be referred to as a "Read" or "Measure")
  • Abort Session

With the above steps configured users should now be able to pass in Instrument Studio IO configuration into TestStand and subsequently into LabVIEW for use with LabVIEW Code Modules. 

To view the sessions it would also be recommended to run NI IO Trace prior to starting the sequence. 

 

Examples for a similar use case can be found here: 

C:\Users\Public\Documents\National Instruments\TestStand XXXX(64-bit)\Examples\Interfacing with Hardware\InstrumentStudio

  • Note* this example uses NI DC Power and is expected to be used with NI DMM modules. 

Next Steps

Next Steps may include: 

  1. Modifications to your original Instrument Studio configuration. 
    1. Would require new export to TestStand IO Configuration Template.
  2. Modifications to LabVIEW VI (Fetch/Read settings and data output)
Tariff Impact Update Learn more

Was this information helpful?

Yes

No