LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about the process of deploying code to cRIO

Hi,

I am developing a cRIO application.

 

To test my code on the actual hardware, I often open the top-level VI of my cRIO application and press the run arrow (or press Ctrl + R). This brings up the Deployment Progress window, as seen below.

 

2 (obfuscated).png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This starts the process of "Deploy a LabVIEW VI to Volatile Memory" as explained in the CompactRIO Developers Guide (Chapter 11, section Deploying Applications to CompactRIO, page 208).

 

My questions are:

  1. Once the deployment is complete and the VI has started running, is it possible to:
    • Get a list of each and every LabVIEW file that was deployed to the cRIO? In other words, a list of the filenames of each and every VI, CTL, lvclass, lvlib?
    • Get the total code size of the application? I.e. how many MB does the source code occupy in memory?
  2. Does the deployment transfer across strictly project files that are used by the top-level VI? In other words, are files that exist in the project, lvlib's, or lvclasses, but are not used by the top-level VI omitted from being deployed?
    • Example 1: There is an lvlib that contains 100 VI's named VI 1.vi, VI 2.vi, VI 3.vi, ..., VI 100.vi. The top-level cRIO VI uses five of these VIs, say VI 1.vi to VI 5.vi. Do all 100 VIs of the library get deployed to the cRIO, or do only the 5 VIs that are used get deployed?
    • Example 2: There is an lvclass that contains 100 VI's named VI 1.vi, VI 2.vi, VI 3.vi, ..., VI 100.vi. The top-level cRIO VI uses five of these VIs, say VI 1.vi to VI 5.vi. Do all 100 VIs of the class get deployed to the cRIO, or do only the 5 VIs that are used get deployed?
      • This example is identical to Example 1, only that the 100 VIs are stored in an lvclass instead of an lvlib.
    • Example 3: There is an lvlib that contains three classes: a parent class, and two child classes. Let these be named P.lvclass, C1.lvclass, and C2.lvclass. The top-level cRIO VI uses C1.lvclass, but does not use C2.lvclass.
      • Do all three classes get deployed? In other words, does C2.lvclass get deployed even though it is not used by the top-level VI?
  3. Is there a detailed explanation of what "deploying" a VI (and its dependencies) involves behind the scenes? What are the sequence of actions that happen behind the scenes?
    • Do the VIs get compiled on the Windows machine (the development machine) and the compiled code is sent across (uploaded) to the cRIO?
    • Do the VIs get sent to the cRIO first, and are then compiled on the cRIO?
    • Does the "Separate compiled code from source file" setting have any influence on the deployment process?
    • Does clearing the compiled object cache (Tools >> Advanced >> Clear Compiled Object Cache...) have any influence on the deployment process?
    • Are there any "sanity checks" that are performed during the deployment process? Does failing any of these sanity checks result in deployment errors such as those highlighted in this and this forum posts?
  4. Is there a way to execute the Deploy and/or Deploy All actions programmatically?
    • In other words, to programmatically execute the behaviour that results from right-clicking the cRIO target and selecting the Deploy and/or Deploy All options.

3 (obfuscated).png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   5. What exactly is the difference between Deploy and Deploy All options when executing them from the right-click menu of the cRIO Target?

 

If relevant, my setup is: Development machine = Windows 11 PC running LabVIEW 2024 Q3 (24.3.2f2) 64-bit; Target = cRIO-9045.

 

Many thanks!

Message 1 of 3
(134 Views)

This is just a theory that I haven't tested, but if you are looking to be able to "hot swap" rtexes, it may be possible to have some sort of configuration host application that FTP or webdav the correct rtexe to the startup folder then restarts the cRIO. An easier way might be to have all of the possible rtexes on the cRIO constantly and have the configuration app simply move around the files so that everything is happy

0 Kudos
Message 2 of 3
(118 Views)

Hi kabudiba, thanks for the idea. My questions so far revolve around the "Deploy a LabVIEW VI to Volatile Memory" process (as defined in the CompactRIO Developers Guide). Your suggestion applies to the "Deploy a LabVIEW VI to Nonvolatile Memory" process, which involves building a Real-Time Application (.rtexe) first. I may try using the latter avenue (rtexe) if the first option continues to work unreliably (see this post).

0 Kudos
Message 3 of 3
(110 Views)