NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

List of TestStand modules loaded in the engine cache

Solved!
Go to solution

Dear TestStand Developers and Users,

 

I spent quite a while trying to figure out one thing and still haven't found a satisfactory solution. This is why I am here.

 

At work I have to maintain hundreds of TestStand sequences which use many custom steps. Every time I launch a sequence

it takes 2-3 minutes to preload all the modules (custom steps). If something goes wrong and I need to change one of the

custom steps I need to unload required VIs from TestStand engine before I can edit them:

1. Go to File -> Unload all modules.

or

2. Go to Types Palettes -> find required custom steps -> (right click) -> Properties -> Substeps -> Specify Module -> Edit VI.

The first option is nice and quick, however after the VI is edited it takes another 2-3 minutes to preload all modules back.

The second option takes 40-50 clicks to do what I want. Both options are not desirable and I am looking for a quicker

way to load/unload specific modules.

 

What I recently did was I made a VI Action Step (Module Monitor), which is executed in the very beginning of the sequence.

It analyses recursively every sequence, every step and stores references to VI modules in the TestStand User Directory.

Then I can open that file with a developed Module Manager and unload the particular VI. Please find the code attached.

This approach works, however every single sequence has to be modified and as soon as the sequence file is closed all modules'

references are dead. However references to the Custom Steps are still alive in TestStand's Engine cache, regardless of the sequence file

being in memory or not and VIs are obviously reserved (not editable). As a result, this approach only works for VI Action steps.

 

Another approach is to use StationCallback (Pre or PostStep) to create a database of steps that executed. It has the same issue as the approach

above (only works for VI Action steps). The listed approaches also don't work for Edit VIs of custom steps, because these are loaded not

during the sequence execution, but during the development.

 

I did a lot of research and it seems that TestStand doesn't have an API to get the data stored in its cache (since 2003):

https://forums.ni.com/t5/NI-TestStand/Getting-a-list-of-loaded-sequence-files/td-p/76801

 

Does anybody have any idea of how to access TestStand memory to see what is loaded and to get references to these modules?

 

Thank you!

Kind Regards,

Max

0 Kudos
Message 1 of 2
(2,475 Views)
Solution
Accepted by topic author M.Kuznetsov

 Hi Max, 

 

I've looked into this for you and the only way to unload the modules is to follow either of the process' you've already mentioned.

 

It looks like the Teststand API has some cache functionality but not for unloading modules.

 

I did find some alternative options, for example setting all modules to unload after execution, and it appears you can customize this for specific steps so you won't unload modules you don't regularly edit (initialization, clean up etc). There are outlined here: http://www.ni.com/product-documentation/7559/en/

 

Hope this helps!

Dan

Message 2 of 2
(2,359 Views)