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.
When working in the Windows development environment the application builder has the ability to implement a version number for the built executable. Additionally LabVIEW has the ability to querry this version number through a property node. I would like to see this feature carried over to RT systems as well. It would be very helpful in determining what particular build of the startup.rtexe file is running on the target.
Versioning is an option when you build a component definition file (.cdf), which includes an rtexe and its dependencies. This is an option when you build your rtexe in the Real-Time Application Properties dialog box>>Component Definition. Creating this file allows you to deploy the real-time application using MAX or programmatically with the LabVIEW System Configuration API. You can choose to manually specify the version number when you build the application or LabVIEW will Auto increment the version number each time you build. The first build would be 1.0.0.0 and the next time you build it, it may be 1.0.0.1...etc.
Deborah Burke NI Hardware and Drivers Product Manager Certified LabVIEW Architect
I would also like to see this completed. Using the CDF file is a bit of a hack because you have to write your own custom code to extract the version from the XML file and it only works if it deployed in a specific way. It doesn't prevent someone from deploying code from their local project and getting a different version.
In my developments I have a workaround for this : I store the version number in a constant in the top-level VI of my RT application, and I use a "Pre-Build Action.vi" (see attached vi snippet) to update this constant each time i build the application.
Most often the version string is published by a network-published shared variable but it could be published by many ways.
This solution looks like it would be a good option for many users and easy to implement/control. Many years ago I used a diagram constant to write to a shared variable, but could forget to update the constant before a build. This solution fixes the problem with that method by adding the automation.
Can you also share the contents diagram of the subVI to save people time trying to find the correct properties to drill down to the current Version Information (Major.Minor.Fix.Build) in the Build Specification?
The SubVI "Get Build Specification Version.vi" is part of the "Application Control" -> "Application Builder" palette of Labview and the diagram of this VI is password protected.