04-14-2010 01:32 PM
Hello,
The Labview code works on some computers but not others. When I get copy over the library and install Labview runtime engine. I assume that it should work on a newer computer. The code is done with Labview 7.1 on Windows XP pro, it uses the following VI for com ports
So it does not use VISA. I can communicate with the serial device using Max, hyperterm, and Labview 7.1 (using VISA calls). But when I try to use the Labview 7.1 code that utilizes the 4 Sub-vi's mentioned above the code cannot even initialize the port. The error output from the Serial Port init has a value of 37 (decimal) so I cannot even init the port
04-14-2010 01:41 PM - edited 04-14-2010 01:42 PM
Kaspar wrote:Hello,
The Labview code works on some computers but not others. When I get copy over the library and install Labview runtime engine. I assume that it should work on a newer computer. The code is done with Labview 7.1 on Windows XP pro, it uses the following VI for com ports
- Serial Port Init
- Serial Port Write
- Bytes at Serial Port
- Serial Port Read
So it does not use VISA.
Unless someone messed around with the serial libraries that ship with LabVIEW 7.1 (such as replacing serial.llb and _sersup.llb with those from an earlier version of LabVIEW), those VIs are using VISA.
Here is what the Serial Port Init VI looks like:
And the Open Serial Driver looks like this:
See? VISA.
04-14-2010 01:47 PM
Thanks for the response. I will look at the libraries to see if the date and/or size is different.....
04-14-2010 02:07 PM
Hello,
The serial libraries are the same. So I decided to look into the Sub-vi's that are used for the serial port, the ones I am using do not use VISA. There are numerous comments in the code and Windows and Sparc workstations. Should I post the init vi and all of it sub-vi's?
04-14-2010 02:47 PM
Hello,
How about we try something simple, just init the serial port and assume that a zero return code indicates success and the 37 (positive number) indicates a error "device not available". So here is the init vi and a calling vi for testing out the init.
04-14-2010 02:56 PM
04-15-2010 06:52 AM
Hello,
Thanks for getting back to me. I will have to get the library issues cleared up. not quite sure why the standard NI libraries were not used, but I guess I will find out!
04-15-2010 01:33 PM
Hello,
I have looked into this some more and the cause of the problem is that a old vi "Open Device" is no longer supported by NI and the "general consenus" is that I should convert the code I inherited to use VISA. Well I have several systems that already work with the current code, I am just getting into problems when I try to have more computers run the same code.
So I am leaning towards trying to understand how to get the existing code working that uses the "old serial port" drivers. So if anyone knows what libs and/or drivers need to be put on the new systems, please let me know. I will starting looking around today for any drivers and/or libraries that are on the existing systems that need to be copied over to the new systems.
04-15-2010 02:33 PM
There is a method for using the "old serial port" VIs. It is not supported (meaning don't go crying to NI if it doesn't work), and requires you to change existing libraries in the LabVIEW installation. This means you have to do this for each computer.
This is what you do:
04-16-2010 06:39 AM
Hello,
Thank you for your help and advice. I support a lab that tests every product our company makes and I need to increase test capacity quickly, right now I do not have the time to modify the code and test it to make sure that the new code still produces the same results.