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: 

How to get Real-Time Executable version number?

Hello,

 

I'm looking for a way to get the Real-Time executable number that is running on my sbRIOs.

 

We are running several sbRIOs and it would help a lot if I could read programmaticaly the version of the "RTEXE" that is running.

 

I have seen this information but it doesn't seem to work properly:

http://forums.ni.com/t5/forums/postpage/board-id/170/submitted/true?message-subject=How+to+get+Real-...

 

The option "Version Number - Auto Increment" is checked in my Real-Time application builder configuration.

 

Thanks a lot!

 

Vincent

 

0 Kudos
Message 1 of 10
(6,600 Views)

Is this the document you were looking at? 

 

https://decibel.ni.com/content/docs/DOC-21647

 

If so, what do you mean by not working properly? Are you getting errors? Incorrect information?

 

Also, what version of LabVIEW are you using?

 

As a side note, if you have multiple identical targets that you want to keep running the same program, you might want to consider using the RAD Utility to image them all. That way you can be confident they are all running the exact same version. In addition, images are versioned and can be checked just by looking at the System Settings for the target in max.

 

Screen Shot 2014-10-10 at 11.19.38 AM.png

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 2 of 10
(6,589 Views)

Hello Will,

 

Yes, this is the link I meant...

 

When I execute this code, I get Version 2.5.0.0 which as nothing to do with my startup excutable. It should be 1.0.0.21 or so.

 

The name of the executable is not even in that Config.cdf file.

 

If I try the "This application" reference using a  property node (app.version), I get the version of LabVIEW Real-Time (12.0.1).

 

I use LabVIEW Real-Time 12.0.1.

 

I will look at that RAD utility for sure! Thanks for that!

 

Vincent

0 Kudos
Message 3 of 10
(6,573 Views)

I would suggest looking at leveraging the abilityt to create an Application Component from LV.

 

http://www.ni.com/white-paper/12919/en/

 

You can then use the NI System Configuration API to programmatically deploy your application and querry which version is installed.

0 Kudos
Message 4 of 10
(6,523 Views)

Hi Vincent,

 

First, make sure you're looking at the right CDF file. It's likely in the C:\Program Files (x86)\National Instruments\RT Images\User Components\<Project Name> directory.

 

If you open the CDF file and look at the first SOFTPKG tag at the very top under <DEFINITION>, there should be a few parameters, including TYPE="STARTUP" and VERSION="<Your RTEXE VERSION>"

 

Depending on the other components you checked to include in your CDF, there will be other SOFTPKG tags, but it's the first one that shows the version information you're looking for.

 

Using CDFs like JoshuaP mentioned to deploy and track version numbers works too, but keep in mind that CDFs don't apply things like Scan Engine settings or deploy FPGA to flash. The document he linked to lists a few more limitations you should be aware of.

Will
CLA, CLED, CTD, CPI
LabVIEW Champion
Choose Movement Consulting
choose-mc.com
0 Kudos
Message 5 of 10
(6,512 Views)

RT_image_version.png

 

 

When using the CDF method the approaches mentioned in this thread work well. When searching for a way to obtain the image version number (for images deployed using RAD for example), one may use the system configuration property node as shown here. 

0 Kudos
Message 6 of 10
(5,518 Views)

This thread is over a year old, but curious about something...

I'd like to also programmatically get the version of the built executable.  I do not plan to use max to deploy my app.  My process is typically to deploy the executable from the project (and test), and then manage images via RAD (I often use shared variables).  If I create a CDF with NO components checked (or perhaps just LabVIEW RT checked), I assume this simply creates a small CDF file on my host machine under the build directory when the executable is built, containing very basic app info.  When I deploy the executable from the project, will that CDF get deployed with it, or do I need to deploy it manually?  If so, then I assume the executable version info will be in it and I can use it like the original post was attempting.  To confirm, the CDF is ONLY used by Max, when deploying an app via max, correct?  In my process, I would only be using the CDF for the sake of getting the version number.

0 Kudos
Message 7 of 10
(4,591 Views)

Hello,

Here is some information about Using Application Components to Deploy LabVIEW Real-Time Applications.

Hopefully this is what you need to move forward.

 

0 Kudos
Message 8 of 10
(4,558 Views)

As far as I know CDF is the only method to set and get a version number of an application you made.  If you deploy from the project this isn't something that can be queried as far as I know.  Here is an idea exchange item on it.  And the potential work around which is a pre build VI that sets a string constant before building.  This string constant can be read or displayed, or used in a report.  It is not ideal, and not as easy as a Windows EXE which can be set and read pretty easily.

0 Kudos
Message 9 of 10
(4,552 Views)

I have been looking into how I can do this also.

 

I went to this link: https://www.ni.com/en-au/support/documentation/supplemental/11/using-application-components-to-deplo... 

 

In here it states:

"Note: CDF support for all CompactRIOs ends in the 2021 NI Software Release and for all PXIs ends in the 2022 NI Software Release. To continue using application components, please migrate to ipks and refer to NI Linux Real-Time and opkg: Introduction to ipks."

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

Message 10 of 10
(3,702 Views)