LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port

I am building application,the application refers to
the Serial Port,But after the application building,the
serial port can not select? Which can not use.
I want to know why and what should I do?

Thanks in advance.

ying
0 Kudos
Message 1 of 13
(4,217 Views)
If you are using VISA to sommunicate over the serial port, you need to make sure than VISA is included in the installation of the executable file. In most LabVIEW versions, there is an option to automatically include VISA in the installation generated by the application builder.

If you use aliases for the Serial ports, make sure to set up VISA appropriately on the new computer or else the software won't work either.

If you'te not using VISA, the serpdrv file needs to be in the same folder as the EXE to make the serial communication work.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 13
(4,210 Views)
Thanks Shane.

I understand what you said.But I have a problem.

In my application , I used the VISA , But What you said

"there is an option to automatically
include VISA in the installation generated by the application builder."

I can not find it .

Which part include the option of VISA in the Application builder?

I use Labview 6.1.

ying.
0 Kudos
Message 3 of 13
(4,182 Views)
The build option Shane mentioned came as part of LV 7.X.

In your case installing VISA explicitly will get teh driver installed.

Then you have to check you VISAconfig.ini to enusre your ports are listed. Edit as required.

There is also a line in the LabVIEW.ini file

serialDevices="COM1;COM2;COM3;COM4;COM5;COM6;COM7;COM8;COM9;LPT1;LPT2;LPT3;LPT4;

that may do the same thing. Copy your LabVIEW.ini as your exe name and include it in the folder where the exe is run from.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 13
(4,179 Views)
Hello Ben.

In my computer, I can not find the VISAconfig.ini ,why?

I found the LabVIEW.ini file, but there isn't

serialDevices="COM1;COM2;COM3;COM4;COM5;COM6;COM7;COM8;COM9;LPT1;LPT2;LPT3;LPT4;

which you said.

I want to know the function of the LabVIEW.ini?

Thanks again.

ying.
0 Kudos
Message 5 of 13
(4,168 Views)
Search your hard drive for the Visaconfig.ini.

I do not think it was under the NI folder.

If you carefully examine the LabVIEW.ini file you will see that all of the preferences available in LV are stred therin.

These preference are also available in the built if the built find a ".ini" file in the same folder from which it was opened.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(4,149 Views)
liying wrote:
> In my computer, I can not find the VISAconfig.ini ,why?

Bedause it is called visaconf.ini and resides by default under
C:/VXIPnP/<platform>/NIVisa/. Use WinNT or Win95 for <platform>
depending if you are using an NT system (NT4, W2000, WXP) or an older
one (Win9x, Me).

> I found the LabVIEW.ini file, but there isn't
> serialDevices="COM1;COM2;COM3;COM4;COM5;COM6;COM7;COM8;COM9;LPT1;LPT2;LPT3;LPT4;
> which you said.

This entry does nothing for VISA. IT was used for the old sepdrv driver
in LabVIEW 5 and earlier.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 7 of 13
(4,120 Views)
Hi Ying:

Can you still select your VISA Resource name on the development computer when you run your application? If this is only happening on a different computer you will have to either have VISA or the VISA runtime engine installed which you can get here:

http://digital.ni.com/softlib.nsf/954feaeea92d90918625674b00658b83/29a81c222112038f8625695700795810?OpenDocument

Also, check to be sure you can communicate in Measurement & Automation Explorer by opening a VISA session for the COM port in question. This is also where you can check what your VISA resource name is.

Emilie S.
National Instruments
0 Kudos
Message 8 of 13
(3,913 Views)
Rolf wrote

"Because it is called visaconf.ini..."

Thank you for correcting!

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 9 of 13
(4,094 Views)
Thanks for everyone.

Hello Emilie S.

Now, I build application about the Serial Port,

In the program i use VISA ,I found If i install

the VISA runtime engine , the application of the

serial port can use ,but if not install , the application

cann't use.So ,can I build Application contain the

VISA runtime engine?

Thanks.

ying.
0 Kudos
Message 10 of 13
(3,844 Views)