Why Does My VISA Executable Not Run on a Target Machine?

Updated Jan 4, 2018

Reported In

Software

  • LabVIEW Full
  • LabVIEW Base

Driver

  • NI-VISA

Operating System

  • Windows

Issue Details

I created a working VISA VI on my LabVIEW development machine, and then I built an executable (.exe) from my application to distribute it. When I run the executable on the target machine my program doesn't return any data or I get error message -1073807343 when accessing the serial ports.

Solution

If your executable is using VISA commands, you should install the NI-VISA Run-Time Engine on the target (nondevelopment) machine. You should use the same version (or higher) of the NI-VISA Run-Time Engine as the version of NI-VISA on the development machine. You will also need NI-Serial if your target is a serial device.  See Drivers and Updates: NI Driver Downloads and search for each package to download the most recent version of the NI-VISA Run Time Engine.  

When entering the VISA resource name input for the VISA Open function or the VISA Serial Config function, your target machine may not support using alias names such as COM1, COM2, LPT1, etc. Instead use the VISA resource name for these ports (COM1 is ASRL1::INSTR, etc.).  For example:
  1. Place a VISA Open function on your block diagram and use the wiring tool to right-click on the VISA Resource Name input. 
  2. Select Create » Control from the right-click menu. 
  3. Go to the front panel and right-click on the newly created control. 
  4. Select Allow Undefined Names from the right-click menu (if it isn't already selected). 
  5. Enter the VISA Resource Name for your port. The name should look something like "ASRL1::INSTR". Note: This name can be found in the Measurement & Automation Explorer (MAX) under Devices and Interfaces » Ports (Serial & Parallel). For example, click on COM1 and you will see its VISA Resource Name in the right-hand portion of the MAX window.
  6. Run your code to see if the error is resolved.
If your target machine is a real time operating system, right click on the item in your project and select Connect.  This will allow the VISA resources detected on the device to display in the VISA Resource Name.  If no names display, or the error message persists after following these steps, try upgrading to the newest versions of NI-VISA and NI-Serial, or re-installing the version of these two packages that you currently have.  

See KnowledgeBase 16BB9RJV: Additional Files Are Required with an Executable Created with the LabVIEW Application Builder for information about specific files that need to be included with your executable. 
 

WAS THIS ARTICLE HELPFUL?

Not Helpful