LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making an application configure to a local PCs Com port selection

Hi,
 
I have developed a vi that communicates with my PCs COM1 port (serial). When I turn this into an application to be used on another PC with Labview runtime, the application runs but does not seem to communicate with the port.
I think it is due to not being able to select from the COM port selection on the new PC.
I use VISA serial configure to select COM 1 on my development PC, this selection is saved as a default so that I don't have to select it every time I run the application.
 
I use Labview Developer 6.1 and Application Builder.
 
What do I need to do to ensure that COM1 is selected on the new PC (bearing in mind this PC has runtime installed only).
 
James
0 Kudos
Message 1 of 4
(2,889 Views)
The most reliable thing to do in applications such as this is never depend on front panel default values to hold operational setup data. Save your settings to (for example) the application's ini file, or perhaps the registery. Using default values is bad style because it mixes two things that should be kept seperate until runtime: the algorithm (code) that performs a function and the data that the algorithm uses.
 
Check the examples folder, there should be things there showing how to access either the INI file or the registry. Note: the INI file is less secure in that its a plain text file (of course you might consider this an advantage...) but depending on your computing environment accessing the registry can cause some strange access permission issues.
 
Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,884 Views)
Mike makes some excellent points that I agree with 100%. Let me try to explain what else went wrong with your application. Com1 is an alias for ASRL1::INSTR - the actual VISA resource name. The alias is assigned during the installation of the full version of VISA. At the minimum, you also need to install the VISA run-time engine and you say you only have the LabVIEW run-time installed. If you want to use the alias "Com1", you can also install the visaconf.ini file. This file can be found in C:\VXIpnp\WinNT\NIvisa. I usually use this file instead of an application ".ini" file. For one thing, you don't have to write any extra code in your LabVIEW program to read it.
0 Kudos
Message 3 of 4
(2,875 Views)

Try this link.

http://forums.ni.com/ni/board/message?board.id=70&message.id=975&requireLogin=False

 

search the discussion forums for 'VISA enumerate'

0 Kudos
Message 4 of 4
(2,869 Views)