I have distributed a LabVIEW executable that controls hardware. The code works on my development PC, but when I deploy it, I receive error -1073807346. Why is this happening? When I attempt to open a new VISA session to my instrument or use an existing session, I receive Error – 1073807346 VISA: (Hex 0xBFFF000E) The given session or object reference is invalid.
This error can happen for a number of reasons:
Missing driver: Install the correct driver and version for the hardware. For NI hardware, this information can be found under Supported Devices in the driver version's readme.
Incorrect Addressing: Verify that the instrument is being addressed correctly.
Ensure that LabVIEW is using the same Resource Name as shown in the following:
Windows: NI MAX on the main configuration page (Settings) of your VISA resource.
Mac/Linux: Refer to Communicate with Third-Party Instrument in Linux.
If you are currently using VISA Alias, try using the VISA Resource Name.
For example: using the Resource Name, ASRL3::INSTR, instead of the Alias, "COM3"
Device Not Powered On: Verify that the device is connected correctly and powered on.
VISA Session Was Previously Closed: This error can also occur if the VISA session was unexpectedly closed during communication. The most common case in which this can happen is if the VISA resource is stored in a Global Variable. Disabling the Automatically Close VISA Sessions option can prevent the error: Note: If disabling this option, then ensure that VISA Close is called when device communication finishes.
Select Tools » Options to display the Options dialog box.
Select Environment from the Category list.
Uncheck the Automatically Close VISA Sessions checkbox.
Incorrect Build Specification: If building and deploying an executable, ensure that:
The instrument driver VIs are included in the LabVIEW Project.
The instrument driver VIs are set as "Always Included" in the Source Files tab of the Build Specifications.
If using a 3rd party device, ensure that the device has been configured for remote control if applicable.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.