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.
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.
Overview
The following code with allow you to retrieve the version number of your real-time executable if your real-time executable was deployed using a component definition file.
Description
When you build your real-time executable, there is an option in the Real-Time Application Properties dialog box in the Component Definition Category to "Create a component definition file (.cdf) and specify dependencies." Creating this file allows you to deploy the real-time application using MAX or the LabVIEW System Configuration API. Within this dialog box you can also choose how to represent the version number. You can choose to manually specify the version number each time you build the application or you can choose to let LabVIEW Auto increment the version number each time you build. Thus, the first time you build the application, the version number will be 1.0.0.0 and the next time you build it, it may be 1.0.0.1 (indicating that this is the second build but there weren't any major changes made).
Keeping track of the versions can be very useful as you develop and change your code. Finding out what version of the code is running on your target may be important in understanding why the code is functioning a certain way or in determining whether or not the code needs to be redeployed.
This example VI simply parses the configuration definition file, config.cdf, located in the c:\ni-rt\system\ directory of the Real-Time target and grabs the version information.
Steps to Execute Code
Requirements
Software
LabVIEW 2011 or later
LabVIEW Real-Time Module 2011 or later
Hardware
A real-time target
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Why don't you simply use the INI VIs to read the token instead of parsing the entire file?
Any idea where this file lives on the Linux cRIOs (cRIO-9066)?
Damien, check here: /etc/natinst/share
(I'm looking at it on a 9031 but I would expect it to be the same)
Thanks for the quick response Alisha!