Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Building an application the contains VISA serial functions

I am trying to build an application that uses VISA serial port calls. This is to communicate with an external device hanging off the serial port (com 1). I have written the VI and all works fine under the development system. However when I go to build an EXE, the program complies OK, but will not run - comes up with an Application error - "The instruction at "0x30164426"referenced memory at "0x00000018". The memory not be "read".
I have sucessfully built other apps before that do not use the VISA fns. I have not been able to build and run any apps containing VISA functions including the example files.
I am runing Labview 6 and Win 2000.

Any Ideas?? Help 🙂
0 Kudos
Message 1 of 6
(3,700 Views)
Does the target machine running the executable have the VISA runtime engine on it as well as the LabView runtime engine?
This could be your problem, if it is, the latest version is available from NI as a download.
0 Kudos
Message 2 of 6
(3,700 Views)
This sounds like a case where NI VISA has not been loaded on the target computer. You can load the NI VISA runtime engine on the target computer. The VISA serial port calls require NI VISA.
The only thing to watch out for is if another version of VISA is loaded (we have 3 different company's GPIB cards in various computers), then the NI VISA will overwrite the other version and something may stop functioning. An example is that we have some HPIB cards here and HP VISA loaded on the computers to run them. If I load NI VISA then the HPIB cards cease functioning. For this reason, I only use the non-VISA serial port calls. The GPIB VISA calls still work with other versions of VISA (if you're careful with the VISA resource names), but the VISA serial port calls do
not.

So - load NI VISA runtime or do not use VISA serial port calls.

Rob
0 Kudos
Message 3 of 6
(3,700 Views)
Thanks for the help Rob,

I've loaded the VISA run time engine V2.5 which I have downloaded. However, I still get the same error. Is there some configuartion required of the run time engine that I have missed?

Will NI's VISA work with a normal serial port on a WIN 2000 PC?

Thanks again for your help
James
0 Kudos
Message 4 of 6
(3,700 Views)
This is difficult to say. If it works in the development environment but not as a .EXE on the same computer, then the problem would be in the compiler or a timing issue (compiled runs faster). I haven't worked much with WIN2000 either (not after Microsoft told us that the driver we had put a decade of development behind would not work in WIN2000), so I can't help much there. Have you asked NI support directly? They usually get information back to me within 24 hours.

Rob
0 Kudos
Message 5 of 6
(3,700 Views)
The answer turns out to be a bug in LabView 6.0. You can not have a VISA control on the front panel of the EXE. Two solutions, remove the control, or upgrade to labview 6.0.2.

Thanks to the Labview support guys for helping out with this one!
Message 6 of 6
(3,700 Views)