Error -1074130544: The Session Handle Is Not Valid with NI Device/IVI Driver

Updated May 6, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • I am trying to create a LabVIEW application for my switch hardware using NI-SWITCH I get Error -1074130544.
  • When I try to execute my LabVIEW code that is controlling hardware or instruments, I get Error -1074130544. I am able to communicate with the instruments in NI MAX but the program still throws this error. How do I resolve this?
  • I am trying to change the calibration password from my device per the calibration procedure but I get Error -1074130544.
  • I have a third-party instrument connected via USB. I installed the USB driver, the IVI, and LabVIEW drivers. However, I don't know which channel name to use. When I execute any of the example VIs that came with the driver, I receive Error -1074130544: "The session handle is not valid."
Error -1074130544 ocurred at <Driver & VI>
Possible reason(s):
IVI: (Hex 0XBFFA1190) The session handle is not valid.

Solution

In most cases, this error is caused by an uninitialized instrument or hardware component.
  • Ensure that the initialize VI for your device is called before any other functions are called.
  • Ensure that there is a VI called that closes the communications to the device using the close VI.
  • Ensure that multiple Initialize VI's have not been called for the same device.
  • Make a new VI having only one initialize and once close VI wired to each other and run it. Check if the error still persists by wiring the appropriate error indicator.
  • Try a Reset of the NI-MAX Database
  • If any of the steps above resolve this issue, a reinstallation of the NI drivers related to the instruments that are showing this error could be required. For example, NI-VISA, NI-Serial, NI-488.2, or any other driver related to the hardware in use. 
  • When changing the calibration password or user defined informaton you need to open a calibration session using the open external calibration VIs in order to get a valid calibratioin handle.