LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read application directory

I am writing a program to be compatible with two Vector Network Analyzers from seperate companies (this makes the GPIB commands incompatible).  I would like to place a configuration file in the same directory as the application); this program will tell the program which netwrok analyzer it is attached to, and therefore which set of commands to utilize.   The program will know to look in the directory in which the application resides to find this configuration file.  Is there a VI, or a set of code that I could use to find this directory programmatically and therefore find the configuration file?

I am using Windows XP Professional Service pack 2 with LabView 8.2
0 Kudos
Message 1 of 6
(3,114 Views)
I don't have sure. Are you just asking how to do the following that I've on attached files?


Software developer
www.mcm-electronics.com





PORTUGAL
Download All
0 Kudos
Message 2 of 6
(3,109 Views)
That is what I needed, I actually figured it out right after I posted.

Thank you!
0 Kudos
Message 3 of 6
(3,107 Views)

Just a quick note. I have a VI that does what was posted in 11.png. It strips 2 levels off the current VI's path. I place this in a subdirectory one level below my main VI. This way it will always return the main directory of the program, whether it's being run in the development environment or as an executable.

A small point, but something to make this task a little easier for any program you make.

0 Kudos
Message 4 of 6
(3,099 Views)
Versus having to wire the boolean for executable or not, look at the attached.
I use the property node Application>>application>>kind.
 
This is a run-time method for determining if the application is a build Exe, or a VI.
Message 5 of 6
(3,079 Views)
A concept that I have been using for several years is the idea of a "Dynamic Instrument Driver". The basic purpose of a DID is to perform a particular instrument function - say, set the output of a power supply, or read a voltage or audio signal level. The driver itself is a shell for dynamically linking to a subVI that actually performs the desired operation. The subVI that gets called is dependent upon what instrument is installed in the system for that particular function. The thing that really makes everything work well is that all this configuration information is maintained in a database.

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 6 of 6
(3,071 Views)