NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unload Sequence

Michael,

What are you looking at for memory usage?

There are three processes in teststand that show up in the task manager.

 

1.SeqEdit.exe

2. TestStandService.exe

3. TSAutoMgr.exe

 

If you watch the SeqEdit.exe when you first execute the sequence.  You should see the memory go up to some value.

When it first executes it will load all your steps into memory (VIs,dlls,.net,..etc). You may also see the memory change as you record steps to a report on the fly and at the end when it creates the report.

 

After it is done executing the sequence.  All those VIs will remain in memory until you unload all the moduals.  The reason Teststand keeps them in memory is for faster recalling of the various steps and modules.  

 

The Load Option and Unload Option change how TS does this on that particular step and nothing else.

 

I guess the best question to answer is what is you end goal here?  If you answer that we may be able to help you.

 

 

Glenn Ellis
0 Kudos
Message 11 of 20
(3,503 Views)
Hi,My goal is to run many sequences, without getting message from TS after 10 hours that it is out of memory.I know that at the beginning the memory is increased and I have no problem with that, but when I finish running each Test (sequence) I expect the memory to decrees. All my Tests are with record results. I run on the fly mode with conserve memory, so it should not keep the data in the memory (for report) for long time. Is there any way to keep memory stable during the execution?

Thanks.

0 Kudos
Message 12 of 20
(3,482 Views)

Hi Michael,

 

What version of Teststand are you using?

 

regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 13 of 20
(3,479 Views)

Hi Ray,

TS version: 4.0.1f1

0 Kudos
Message 14 of 20
(3,477 Views)

I'd like to rise this topic because the problem what Michael described is exectly the same one what I experienced now. I have about 3000 sequences what can be selected and ran or can be executed all together. Sequences are organized in the hierarchical tree with one root sequence. So, what I noticed, the memory usage for my application is constantly growing up untill the execution is active. Final number only depends of how many sequences you have loaded till the moment. As we started to add more sequences into our test suite the peak memory usage started to grow and now comes up to 1.7GB!

 

I've tried the same Run Options settings (Load Dynamically, Unload after step executes, uncheck "optimize non-reentrant calls") as Michael described for my major parent sequences in hierarchy and I haven't seen any drops in memory usage during execution. UnloadAllModules is a kind of overkill, it closes everithing together with the reference to our device under test, so all configuration should be set again.

I observe this for TS4.2 and TS4.0. Diagram for memory usage for 8 hours execution is attached. The drop in memory at the beginning is for terminated execution, after that the memory usage goes always up untill the execution end despite of "unload after step executes" unload option set for sequence calls.

Why Unload Option does not work?

0 Kudos
Message 15 of 20
(3,355 Views)

Hi,

 

This maybe due to the size the report takes up memory as the execution progresses rather than the code modules.

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 16 of 20
(3,332 Views)

Nope, I'm using On-the-fly reporting with Conserve Memory option.

 

I found the answer.

Ray, this is you said in this topic "no other reference to that Sequence File in you Sequence". Ok, I don't have any references to sequence files open by me, but that makes me think that something may keep a reference open and prevent to execute the unload option. Then I found this topic. It says "In the Sequence Properties of the MainSequence of the SubSequence, Uncheck the 'Optimize Non-Reentrant Calls to This Sequence'".

So, "Optimize Non-Reentrant Calls to This Sequence" is the evil what prevents the Unload option to be executed for the Sequence Call step. If the Optimize Non-Reentrant Calls is set for any single sequence deep inside the hierarchy, then the branch is not unloaded if the unload option "Unload after step executes" is set for the top-level parent sequence call step only. Opposite, when the Optimize Non-Reentrant Calls is not set for all sequences in hierarchy, then it is enought to set "Unload after step executes" just for the parent sequence call step to unload all its subsecuences when the parent sequence is unloaded.

I've attached the example (in TS4.2) Sequence files Indent1 and Indent2 are unloaded when Call Indent1 step is completed. If check "Optimize Non-Reentrant Calls to This Sequence" for Indent3 sequence then the Indent2 file is unloaded only at the end of execution. New Memory usage for my application is attached as well. All sequences have unchecked "Optimize Non-Reentrant Calls to This Sequence" and sequence call steps for the major branches have "Load dynamically" and  "Unload after step executes". It was run for a different hardware, but at least the first 4 hours does the same as in my first memory usage picture. 

Download All
Message 17 of 20
(3,315 Views)

Hi Sergey,

 

can you tell me, how to get the actual memory usage by a process in LabVIEW? I want to monitor it on the same way, as it is shown on your screenshot.

 

thanks

Mitulatbati

0 Kudos
Message 18 of 20
(2,723 Views)

Hi Sergey,

 

I have tried your sample sequences in TS2010, but I can't reproduce the behaviour, which I expect.

 

I expect, that a message box pops up while unloading the sequences, but this doesn't happen. i.e. Ident1.seq has a SequenceFileUnload callback with a message box, it pops up only if I manually close the sequence. Do I do anything wrong?

0 Kudos
Message 19 of 20
(2,715 Views)

Hi Mitulatbati,

 

I've used small monitor application UsageMonitor.exe to log memory usage by processes (as you see it it Windows Task Manager) and then just parsed and graphed these data in LabVIEW.

Regarding the example, only Indent0 should be open and run in SequenceEditor, then you will see the behavior. If Indent1 and Indent2 are also open, TestStand won't unload them no matter what settings you have in subsequence call step's load/unload options (Indent1 and 2 will be always in memory until you close them).

0 Kudos
Message 20 of 20
(2,690 Views)