From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFileUnload / Single Pass

Good morning,

I'm using TestStand 4.1 and am having a bit of trouble.

I have a sequence that runs a CVI code module that brings up a user prompt on SequenceFileLoad and  SequenceFileUnload. I also have a step in my MainSequence that does the same.

 

When I run the MainSequence using Single Pass, my SequenceFileUnload callback does not run when I close the sequence file. It DOES when I close TestStand.

 

In addition, when I run the MainSequence using "Run MainSequence", my SequenceFileUnload callback runs on sequence file close.

 

I have been pouring through the help docs to understand what is happening in the SinglePass entry point that could be affecting the way that SequenceFileUnload runs, but have been unsuccessful.

 

Fernando

0 Kudos
Message 1 of 9
(4,086 Views)

A couple things to test.  If you call a message box only and not the CVI code do you see the same behavior?

 

If you choose File>>Unload All Modules before closing the sequence file do you then get the same behavior?

 

My hunch is that the CVI code is still in memory and not releasing the sequence file for some reason.  Although, it seems like it should be.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 9
(4,067 Views)

Hey Jigg,

So after running the sequence file using single pass, the SequenceFileUnload does not run when I close the sequence.

It does run when I run File>Unload All Modules.

 

Here's another piece of info... I'm using the batch process model.

When I change my sequence process model to sequential model, the SequenceFileUnload runs when I close my sequence file.

 

Is there something that is done in the batch process model that is not allowing for the sequence file to be unloaded upon closure?

 

Fernando

0 Kudos
Message 3 of 9
(4,065 Views)

Do you have other executions still running?  Or is everything complete?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 9
(4,060 Views)

Everything is complete.

0 Kudos
Message 5 of 9
(4,058 Views)

Process models do not impact engine callbacks.  Unless you are using engine callbacks in the process model that start with ProcessModel---.  That being said though there isn't a ProcessModelUnload or ProcessModelLoad so they shouldn't impact what you are doing.

 

Create a new sequence file.

Add the SequenceFileUnload Callback

Put a message box (or even easier a breakpoint) in the Unload callback.

Point the file to the Batch model you are using on the other one.

Save the sequence file and execute it.

Now close it.

 

Is the Unload callback being executed?

 

Just trying to eliminate the process model as the culprit here. 

 

At this point you really just need to try and isolate what is causing the issue.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 9
(4,056 Views)

My next step would be to remove the CVI steps from the SeqFileUnload callback in your original code.

 

Also, are you spawning any threads in your sequence file?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 9
(4,054 Views)

I'll give that a go and get back to you.

Thanks for all of the help so far!

 

Fenando

0 Kudos
Message 8 of 9
(4,033 Views)

Jigg,

I ran some more tests and found that the problem occurs when I run the CVI user prompt anywhere in the main sequence.

In the CVI DLL, there is a close function that is exposed to the TestStand developers, so I am using this on a sequence caqllback after the UUTs have finished running. after doing this, my SeqFileUnload runs every time. Thanks for your help with this!

 

Fernando

0 Kudos
Message 9 of 9
(3,919 Views)