LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can not access serial port while upgrading from LabVIEW 6.1 to 7.0

Hi,

I built an application under LabVIEW 6.0.2. few years ago. This application uses LabVIEW serial features. When I upgraded to LabVIEW 6.1, my application was still working correctly.
Today, I upgraded to LabVIEW 7.0, mass compile all VIs and now my application can not communicate with my peripheral !!!
The program is sending the command to the peripheral. The peripheral answers but LabVIEW serial driver does not see any datas on buffer even if datas are available ... "Bytes At serial port.vi" always returns 0. I am sure that datas are available, using a COM port psy.

Does anyone has an idea?
I saw a lot of solutions in the forum, but I would like to know the best solution with minimum work, te
st, and so on ... on my program.

Regards,
Pascal.
0 Kudos
Message 1 of 3
(2,888 Views)
LabVIEW 7 changed the serial VIs to work with VISA instead of the old and error-prone "serpdrv". You need to ensure that you have at least part of VISA installed on the system for serial I/O to work. I would have expected that you'd receive an error, though. Are you checking for errors from the serial VIs?

When you say that you "built an application", are you talking about a standalone executable that you're taking to another machine? If so, you need to turn on an option when you build the executable to include serial I/O support in the installer. Alternatively, you can install the entire VISA Runtime on the target machine.

I hope this helps.

Brian
Message 2 of 3
(2,887 Views)
Hi Pascal,

Which is your version of NI-VISA?

Please see the link bellow :
http://digital.ni.com/manuals.nsf/websearch/E8D86CD680B0753D86256D2C005D8EA0


The first test to be made is to test the communication with your serial port using MAX (Measurement and Automation Explorer) :
Open MAX, Go to "Devices and Interfaces", then "Ports", select COM1 (or ASRL1::INSTR). Right clic on it and select "Open VISA Session" the go the "Basic I/O" then Write data, execute, Read data, execute.
Be sure that the communication is OK. Be sure that you use the same Alias existing in MAX in your LabVIEW program.

Now, if all is OK, try to use Serial communication examples existing in LabVIEW Help>>Examples Finder. These examples use NI-VISA VIs.

If all above is OK and you
still have the same problem, try to follow these instructions :
"In order to use the old Serial Compatibility VIs in LabVIEW 7.x, you must copy the following files from a previous version of LabVIEW to the LabVIEW 7.x directory:

Replace the serial.llb in LabVIEW 7.x with the serial.llb from a previous version of LabVIEW. This file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.


Replace the _sersup.llb file in LabVIEW 7.x with the _sersup.llb from a previous version of LabVIEW. In LabVIEW 6i and 6.1 this file is located in C:\Program Files\National Instruments\LabVIEW\vi.lib\platform. In LabVIEW 7.x (and 5.x) this file is found in C:\Program Files\National Instruments\LabVIEW\vi.lib\instr.


Copy the file serpdrv to the C:\Program Files\National Instruments\LabVIEW 7.x directory. This file is not installed with LabVIEW 7.x, so it only needs to be copied from a previous version of LabVIEW, not replaced."

I hope that my answer will help you.

Sa
naa T
National Instruments
0 Kudos
Message 3 of 3
(2,887 Views)