Session Manager - LabVIEW

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)


This example demonstrates how to use NI Session Manager to share named instrument handles between LabVIEW code modules. Refer to the NI Session Manager Help. located in <Program Files>\National Instruments\Shared\Session Manager, for more information about how to use Session Manager.

Example File Location

Open Example

<TestStand Public>\Examples\Interfacing with Hardware\Session Manager\LabVIEW\Session Manager.seq

Highlighted Features

  • IVI
  • NI Session Manager

Major API



You must complete the following steps before you can run this example.

  1. Ensure that you have the LabVIEW development system installed and you configure the LabVIEW Adapter to use the LabVIEW development system.
  2. Install the following software from the National Instruments Device Driver DVD that comes with TestStand:
    • Measurement & Automation Explorer (MAX)
    • IVI Compliance Package, including the LabVIEW Support portion of the IVI Class Drivers
  3. Complete the following steps to download and install an IVI-compliant instrument driver for the IVI DMM class that the example can use, such as hp34401a.
    1. Refer to the Instrument Driver Network at
    2. Search for the manufacturer or the type of instrument you want to download. In MAX, the driver installer automatically creates a driver session entry under the Driver Sessions item and populates the software module information under the Instrument Driver Software Module item in the Advanced folder.
  4. Complete the following steps to create a logical name for the session.
    1. In MAX, expand the IVI Drivers category.
    2. Right-click the Logical Names item in the configuration tree and select Create New from the context menu.
    3. Complete the configuration panel for the new logical name, which is "SampleDMM". Logical names are case-sensitive. In the Driver Session control, specify the driver session you downloaded.

How to Use This Example

The Get DMM Session step obtains a reference to the session named "SampleDMM", which the Locals.logicalName local variable specifies. When the step creates the session, Session Manager initializes the instrument session and the step stores the reference in the DMM_Reference local variable so the session must continue to exist until the sequence completes.

The remaining steps in the sequence call code modules. Each code module calls Session Manager and obtains the instrument handle for the session the Locals.logicalName local variable specifies. Because the Get DMM Session step ensures that the session exists for the life of the sequence, each module uses the same session and the instrument initializes and closes only once.

Note Note  Class drivers launch simulation dialog boxes if interactive simulation is enabled. These dialog boxes might not have taskbar items and can go behind the sequence editor. In addition, the IVI soft front panels remain visible until you close the Execution window.

See Also

Effectively Using LabVIEW with TestStand

Session Manager Support for 64-bit TestStand


Not Helpful