LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I display the VI Version number on the front panel?

I want to show the VI version on the front panel. Most of my front panels are from Sub-VIs where the main VI controls which panels are displayed and when.

Eventually, the entire set of VI's will be built into a Labview executable so the solution needs to work for the executable as well.

Any thoughts?
0 Kudos
Message 1 of 18
(7,240 Views)
Hi,
you can do it by usage of VI reference property "History.Revision". You must do the following thing:
1.Open application reference with "Functions->Application Control->Open application reference.vi"
2. Then create reference to your vi or subvi with "Functions->Application Control->Open VI reference.vi"
3. Then call "Property node" to this VI reference and select "Properties->History->Revision Number"
4. Get this number and close all references with "Functions->Application Control->Close LV Object reference"

The example is attached.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 18
(7,241 Views)
Thanks Oleg,

It works when running a VI but not when running an application built with the Application Builder.

I've attached your application in it's built form. The version is always zero.

Any ideas?
Download All
0 Kudos
Message 3 of 18
(7,241 Views)
This is by design.

Go to the property node with "History.Revision Number" and make a right click. From the menu choose "Help for History:Revision Number" and you will get to the help for this topic. In the help is table and is says "Available in runtime engine: No".

You have to make your own version numbering.

We handle this in the following way:
Create a VI named About.vi to hold the version info. Allow the user to select "About..." from the menu bar. The about VI will be displayed automatically.
This VI contains something about the version of the app.
After you have created your app move the VIs to your source code control system and label the VIs with the same version information as in the app.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 4 of 18
(7,241 Views)
You could create a program that will "stamp" all VIs with the current version. This is how I imagine it.

In your "shipping" VI, create a hidden control and label it "version".

Create a VI that opens the shipping VI via VI server, gets the VI version (property node), sets the "version" control via (invoke node), makes current values default (invoke node), saves the VI, closes the VI.

Run that on each VI you want to stamp.
0 Kudos
Message 5 of 18
(6,963 Views)
Waldemar,

>"This is by design."
Your right, however it's a point to discuss if this is designed, just happened or ???
No articles I've found about version/revision numbering gives a reason WHY the version/revision number is reset to zero by the applicationbuilder. I only see reason to keep it (or to generally set it in the appl.builder)
Henrik
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 18
(7,241 Views)
I have been told that this works in LV7.

I have not checked.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 18
(7,241 Views)
Ben,

it will not work in 7.0. I have check it. This is also true for all history properties.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 8 of 18
(7,241 Views)
Henrik,

the version number is not reset to zero by the application builder. The error cluster states error 1043 (feature not supported) and 0 is the default vlaue for all integer numbers. I think the application builder removes all VI properties data which is not neccessary during runtime.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 9 of 18
(7,241 Views)
The reason I wanted to display the version is for support reasons. My customer requires the VI's to be delivered with the application.

My fear is that someone will change a VI and rebuild the application then call me with some new bug. I wanted a way to automatically detect changes to either the VI or the compiled application to make sure everyone is discussion the same version.
0 Kudos
Message 10 of 18
(7,241 Views)