Stanley Kieta asked:
1. Is there an easy way to include VISA with the
Application Installer so the user only needs to
run 1 install program?
2. I need the application to automatically find
the comm ports on each user's PC. The VISA
resource name control on my front panel lists
these ports using the ASRL1::INSTR format. Is
there any way to get the control to list the
conventional COM1 notation? I tried copying
the visaconf.ini into the same directory as the
executable but that did not work.
From my library of forum snippets, it appears
that Mihai Costache is the expert in question 1
with two postings (although Edwin Dickens echoes
the advice). I'm including only the most recent
(which seems to be better) here, but you can find
the other with SearchVIEW if you'd like.
Subject: RE: Communication Error in EXE using serial VISA
From: Mihai Costache [EMAIL PROTECTED]
Date: Mon, 25 Mar 2002 07:50:56 +1200
...
1. Download visa260runtime.exe from the NI site.
2. While creating your application builder script, include it in your
list of Support files.
3. Go to the Installer Setting tab, tick Create installer check-box,
then click Advanced... button.
4. Tick the Run executable after installation check-box and type
visa260runtime.exe in the Executable field.
The VISA installation will begin straight after your application's
complete installation, or after the LV run-time engine installation, if
you choose to distribute that as well.
Hope this helps,
Mihai Costache
Software Engineer
OSCMAR International Ltd.
PO Box 6008 Wellesley St.
Auckland, NEW ZEALAND
Tel: +64 - 9 - 379 0360 extn. 892
Fax: +64 - 9 - 373 9799
e-mail: [EMAIL PROTECTED]
www.oscmar.com
...
For question 2, Jürg Bögli, Edwin, and Dan Mondrik advise Mihai:
Subject: Re: VISA confusing changes
From: Jürg Bögli [EMAIL PROTECTED]
Date: Thu, 16 Aug 2001 09:54:18 +0200
Dear Mihai,
You must define an alias for your ports. (COM1 -- VISA alias, ASRL1::INSTR
-- VISA resource name.
If MAX is installed on your machine you can use it to define the VISA alias
of your ports.
If MAX is not installed, you can manually edit the visaconf.ini file to
define the alias for the ports. Assuming you have 2 COM and 1 LPT port type:
Alias0 = 'COM1','ASRL1::INSTR'
Alias1 = 'COM2','ASRL2::INSTR'
Alias2 = 'LPT1','ASRL10::INSTR'
NumAliases = 3
in the [ALIASES] section. The format of a line is:
ALIASx= 'Alias', 'Resource Name'
NumAliases must be set to the number of aliases.
Unfortunately I don't know if it is possible to hide the LPT port in the
VISA Resource Name I/O control...
Jürg Bögli RD en électronique Sonceboz SA CH - 2605 Sonceboz
Tél: +41 32 488 11 - 70 Fax: - 00 www: http://www.sonceboz.com
Subject: RE: VISA confusing changes
From: Dickens Edwin [EMAIL PROTECTED]
Date: Thu, 16 Aug 2001 07:37:10 -0500
Mihai,
I was just having this same problem with built exe files for customers that
only have the runtime engine installed. I came up with a vi that can find
the visaconf.ini file and edit it with the proper entries so the application
will display Com1, Com2ect. instead of the ASRL1::INSTR. They are much
happier with this than having to edit the file themselves. I've included the
vi in private email.
I've built this into an .exe so all the customer has to do is run it after
installing the runtime engines. As the file sits right now, it sets up
Com1-4 and LPT1. Only the Com ports that actually exist on the machine will
show in the list. If you do not want LPT1 to show in the list, you'll need
to change LPT1 to a space in the constant in the second for loop. This will
cause a blank space in the list that can still be selected, but at least it
does not say LPT1.
If anybody else is interested in the vi, let me know and I'll send it out in
a few days.
--
Edwin O. Dickens
DISTek Integration, Inc.
On assignment to: John Deere Product Engineering Center
phone: (319) 292-6372
email: [EMAIL PROTECTED]
Lvl 3, Aisle U, MS83A
Subject: Re: VISA confusing changes
From: [EMAIL PROTECTED]
Date: Mon, 20 Aug 2001 11:29:03 -0500
Peter, Jurg, et al:
I would like to answer one question from the previous email chain. The
question was basically, Is it possible to hide the LPT port in the VISA
Resource Name I/O control? The answer is yes. Run MAX, expand the Ports
section, right-click on LPT1, choose Properties, and uncheck the Enabled
field at the bottom of the dialog. This will disable it from VISA, and it
should no longer appear in the VISA list of found resources. It does not
affect the ability of the OS to access the port, so you can still print,
etc.
Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
--
EnWirementally,
Paul F. Sullivan
SULLutions (781)769-6869
when a single discipline is not enough
visit http://www.SULLutions.com