LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Dll handling serial port doesn't work with CVI

I created a Dll with my LabView 6.02. This Dll uses NI-VISA to exchange information with a serial (RS232) device. I call this Dll from CVI 6. Everything works fine on the computer where LabView is installed. On another computers where only CVI and VISA are installed, nothing happens and no error message is posted back. Something is probably missing on these NT4 PC but what?
Any advice welcome!
Thanks
0 Kudos
Message 1 of 8
(3,407 Views)
You need to install the LabVIEW run-time engine for a LabVIEW EXE and DLL. Have you done that?
0 Kudos
Message 2 of 8
(3,407 Views)
Thank you Dennis!
Yes, I have installed LV RTE and NI-VISA as I am using the a serial port in the source VIs for this Dll.
0 Kudos
Message 3 of 8
(3,407 Views)
If you already have the RTE installed, then you should consider giving NI's tech support an email. Be sure to include all the files so that it can be reproduced.

Are you able to build any dll(keep it simple) from LabVIEW and use it on the target machines?
0 Kudos
Message 4 of 8
(3,407 Views)
What VISA resource name are you using for the serial port? If it's Com1 and not ASRL1::INSTR, you will have to create an alias in VXIpnp\WinNT\NIvisa\visaconf.ini. It is the installation of MAX that creates the Com1 alias. The actual VISA resource name for a serail port is ASRL1::INSTR.
0 Kudos
Message 5 of 8
(3,407 Views)
Thanks Jeremy!
I will send my customer a simple Dll and CVI project asap so I can tear between a visa or higher level problem. If this doesn't work, this will be a good case support for NI...
0 Kudos
Message 6 of 8
(3,407 Views)
Thank you Dennis!
This is a potential issue as I had to "translate" the serial access from "old fashioned" VIs to their Visa equivalents. It looks like, the old serial Vis are not working in Dlls used with new RTE engine. By the way, usage of such VIs in a Dll is giving a nasty message really difficult to link to Visa and a particular sub-VI�
However, I am building the resource name on the base of the former com port integer parameter:
Resource Name = ASRL(Com Port+1)::INSTR
If Com port was �0� (COM1) the resource name will be �ASRL1::INSTR�
For COM2 -> ASRL2::INSTR
I hope this is correct!
0 Kudos
Message 7 of 8
(3,407 Views)
That is generally the correct mapping. If you are on a system that has a COM10, then for legacy reasons, we assigned LPT1 to ASRL10 (really legacy, thank LabVIEW on Windows 3.1 for that). Otherwise, COMx==ASRLx.

When using NI-VISA 3.0 or higher, you can just use "COMx" and that will work on all Win32 and LabVIEW RT systems, even if MAX is not installed (in NI-VISA 2.x, this alias would work only if MAX were installed). Just remember that "COMx" is a Wintel thing, it won't work cross-platform (but ASRLx will).

Dan Mondrik
National Instruments
0 Kudos
Message 8 of 8
(3,407 Views)