Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Pre-Load All Steps Option Doesn't Work in TestExec 5.1 Mass-Compiled by LV 5.0.1

Primary Software: LabVIEW Toolkits>>Test Executive
Primary Software Version: 5.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem: If I install test executive without mass compiling, I am able to:
  1. load cpu_lv.seq
  2. set preload mode (for all the steps of the sequence)
  3. run the cpu_lv.seq
  4. move or rename lvexec51\tests\test_vi.llb
  5. rerun cpu_lv.seq without getting any error in force of the preload mode
But if I mass compile the LVexec51 directory, I get a loading-error at step 5, which means preload mode didn't work. In other words, if I haven't mass-compiled it, I can set it to preload all, save, close the sequence, reopen the sequence, move the llb, and it will still run (it has already loaded what it needs from the llb). If I have mass-compiled it and I set the same preload settings, reopen it, move the llb, and then run it, there is a prompt for VIs in the llb. Setting the sequence preference to use the options set in the individual steps (pre-load) doesn't work either.

Solution: In LabVIEW, if a VI is loaded into memory (either as part of a hierarchy of VIs or by using the Open VI Reference function), only the executable portion of code is loaded into memory. Neither the front panel nor the block diagram of the VI is loaded unless needed. Things that can require the front panel or block diagram to be loaded into memory include:
  • Opening the front panel window.
  • Opening the diagram window.
  • Having an attribute node on the diagram of the VI will cause the panel to be loaded.
  • If the version of LabVIEW is newer than the version of LabVIEW that the VI was last saved with then everything will be brought into memory so that the VI can be recompiled.

When the LabVIEW Test Executive 5.1 (LV TE) pre-loads a VI, it calls Open VI Reference on that VI. Therefore, unless a recompile of the VI is needed or if there exists an attribute node on the diagram of the VI, the panel of the VI is NOT loaded into memory.

When the LV TE calls a test VI, it does a "Set Control Value" operation on the VI. This operation requires that the VI's panel be in memory. If the panel is not already in memory, LV must go back to disk and retrieve the panel portion of the code. This is necessary only the FIRST time that the panel is needed. LabVIEW won't throw the panel out of memory until the whole VI is released.

The behavior described in the above problem description is correct. When the VI is called the first time, LabVIEW must go and retrieve the panel of the VI from disk (unless it already happened to be loaded). If the internal path to the VI is no longer valid, LabVIEW will then prompt the user to find the VI.

Now, why does the TE behave differently if it has not been mass compiled? Well, it actually has nothing to do with the TE itself. It has to do with recompiling the test VIs. The example mentioned above calls test VIs that are found in the LVexec51 directory. If you mass compile that directory, then those test VIs are recompiled.

If you don't mass compile the TE, the test VIs need to be recompiled when they are loaded. Therefore, LabVIEW loads the entire VI, panel and all, into memory when the test VI is pre-loaded. In this case, LabVIEW does NOT need to go back to disk when running the VI for the first time.

The fact that the TE seems to work correctly in this case is really just a side effect of having the current version of LabVIEW be different than the version that the test VIs were saved with.

LabVIEW shouldn't load all parts of a VI unless they are needed. In addition, you should avoid moving the test VIs after they are loaded.

Related Links:

Attachments:





Report Date: 11/20/1998
Last Updated: 11/30/2004
Document ID: 1FJDAE8U

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit