From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Selecting diferent sub Vi's from main VI

I have a VI which contains a set of calibration values, this is read by the main VI which applies these values to produce a pressure transducer display in Bar.
I want to have the option that when you run the VI you are given an option to select from a list which subVI supplies the VI containing the data.

This is so that a number of transducer calibration values can be selected.

Is there a way to do this.

Allan
0 Kudos
Message 1 of 6
(2,728 Views)
Allan,

I think that you need to use dynamic loading technique, which was described since LV5.
Take a look at example at ..\labviewX\examples\viserver\dynload.llb

Basically you need to get vi's list from separate directory where you'll put your "calibration" vi's, then wire this list to one of the selection box or list control, select desired file and load it dynamically using open vi reference, as described in mentioned example.

Hope this will give you an idea.
Sergey
0 Kudos
Message 2 of 6
(2,728 Views)
Put the different sub-vis in a case structure. From the main VI select which case to choose and you will select which sub-vi to use.
0 Kudos
Message 3 of 6
(2,728 Views)
Allen,

Put an text ring, menu ring or enumeration ring on your front panel. In each item of the ring put a text description of the calibration that would be used. Wire this ring to a select case. In each of the cases put the sub-vi with those cal constants. The user will select the cal constants to apply by selecting it from the ring.

Jared
Message 4 of 6
(2,728 Views)
How about just using a case statement and a ring control....

Jim

Pazzer wrote:

> I have a VI which contains a set of calibration values, this is read
> by the main VI which applies these values to produce a pressure
> transducer display in Bar.
> I want to have the option that when you run the VI you are given an
> option to select from a list which subVI supplies the VI containing
> the data.
>
> This is so that a number of transducer calibration values can be
> selected.
>
> Is there a way to do this.
>
> Allan
0 Kudos
Message 5 of 6
(2,728 Views)
Another way to do this is to put the calibration data into a
Configuration File (very similar to a WINDOWS-style .ini file).
You could have a Section for each sensor, identified by serial
number. Each parameter could be designated by its own Key.
Something like

[RPT301-54321]
Offset=12.304
scale factor=0.9964
cal date=20010224

The advantage is that the software does not need to be changed
whenever you re-calibrate or get a new sensor. This is important
in places where the software release is strictly controlled.

The VIs to do this are in File I/O/Configuration file VIs. You
can generate/modify the file manually using a text editor, or
maybe automatically from your calibration program.

-----Original Message-----
From: Pazzer [mailto:x@no.email]
Posted
At: 23 February 2001 13:48
Posted To: labview
Conversation: Selecting diferent sub Vi's from main VI
Subject: Selecting diferent sub Vi's from main VI


I have a VI which contains a set of calibration values, this is read
by the main VI which applies these values to produce a pressure
transducer display in Bar.
I want to have the option that when you run the VI you are given an
option to select from a list which subVI supplies the VI containing
the data.

This is so that a number of transducer calibration values can be
selected.

Is there a way to do this.

Allan
0 Kudos
Message 6 of 6
(2,728 Views)