LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I know which VI is running at my target

I am running a VI inside a NI cRIO-9067 FPGA target from some months without issues.

 

I can connect to this target through Ethernet VPN with a Static IP, with NI Measurement Explorer, NI LabVIEW, and also through SSH into the NI Linux RT ARM operating system.

 

Now i want to check the latest VI compiled and downloaded into the target, for making a maintenance and introduce some minor changes. Because some time has passed, i want to make sure which was the original VI file compiled, and currently running and configured for startup.

 

How can I check which was that VI file, or somehow compare which is the currently binary compiled file running, or the original VI name or date, without stopping its operation?

 

Thanks in advance,

Hyp

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(2,411 Views)

There are a number of methods for doing this.  A good place to start is to rigorously use some form of Version Control to manage your LabVIEW Project.  I use Subversion, and update regularly.  When I build an Executable, I update the Version Number (a cluster of four parts -- Major, Minor, Patch, Build) by setting the Build component to the current Revision Number of the Project in Subversion.  There's now a function "FileVersionInfo" that returns the Version Cluster -- I display this in a Front Panel Indicator ("My Program 1.2.0.2748") -- by knowing the Subversion Revision Number (2748), I can get the exact code base that made the Executable.

 

If I'm dealing with a Real-Time (or multi-target) Project, when I build an Executable, I also Deploy to the Remote Host (even if it hasn't changed).  Thus knowing the Revision Number (or the LabVIEW Version Build element), I know the Code Base.

 

If I wanted to (but I haven't done this), I could also put code in both Host and Remote to ensure that Host Version N "matches" Remote Version N (at run time, instead of "manually" ensuring it at Compile/Deploy time).  Once the Host verifies that it is communicating with the correct Target Version, you can simply look at the Host's Front Panel (if you display the Version there, as I do) and know the Target Version.  [Did that make sense?].

 

Bob Schor

Message 2 of 3
(2,379 Views)

Hello hypfco,

 

Bob's post on versioning schemes of (future) projects and executable is fully correct. However I understand that you want to find out which software your CompactRIO is currently running.

 

This is more about computer forensics than programming, however it might still be usefull.

 

  1. When you deploy your code onto the cRIO, only a compiled version of it gets stored on the cRIO.
  2. Decompiling this exe file could be possible, but is probably worth years of work.
  3. However if you have the code itself at hand and just want to know if it was deployed, this could help
    1. The deployed exe file is stored here: /c/ni-rt/startup/startup.rtexe which is soft-linked to /home/lvuser/natinst/bin/startup.rtexe
    2. Little more information on the project is stored in /etc/natinst/share/lvrt.conf
  4. Re-Compiling your code and then comparing the exe files could maybe tell you more. Keep in mind that the result of your compilation is dependent on your compiler version, LabVIEW version, code changes, compiling OS (in case timestamps or user information in compiled into the code) etc, so getting matching exe files is a matter or luck as well.

 

 

 


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 3 of 3
(2,341 Views)