Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa serial application returns error 1073807346

I have built and tested the serial VISA example on an NT 4.0 system with LabVIEW 6i. The app works fine. I then built the app and ftp'ed it to a Windows 2000 machine, which has the run time engine installed. The serial VISA app returns the error code -1073807346 and the message "... given session or object reference is invalid." I have tried com1 as on the NT machine, but still does not work. A simple button and indicator app does work, though. Ideas?
0 Kudos
Message 1 of 3
(3,721 Views)
This error is from trying to access the VISA functions when the VISA session is not open. Possibility: the initialize VI could not initialize the port and the VISA session is closed. This can also happen when some other VISA VI encounters an error.

Make sure that your run-time engine matches the version of LabVIEW used.

If possible, add in indicators for the error out from each VISA call and see exactly where the error is being generated.

Remember that the VISA call requires that the object have the EXACT same name. If your development machine calls the port "COM1" and the other machine "COM 1" then you can get this error. Check the VISA names of the ports.

Have fun checking the VIs.

Rob
0 Kudos
Message 2 of 3
(3,721 Views)
The answer is to make sure that the NI-VISA runtime module is installed on the target machine. When loading the LabVIEW runtime engine, the VISA module is not necessarily loaded at the same time. The NI-VISA runtime is available on the NI site, under "Downloads and Drivers". This module is needed if you are using VISA architectures, but not if your applications don't use VISA. The current version as of February 2002 is called 'visa260runtime.exe'.
Message 3 of 3
(3,721 Views)