NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFileUnload Callback

Hi,

I start a subsequence in a new execution when loading the sequence file. This happens in the SequenceFileLoad Callback.
Now I want to terminate this execution when unloading the sequence file thus I use the SequenceFileUnload Callback.
The problem now is that I'm not sure whether this Callback is ever executed, especially when I use a customized operator interface based on the "Simple CVI TestExec".
When I use this OI the new execution is never stopped although I open other sequence files. This might be because the sequence files are not released... How can I handle this???

Thanks in advance
Steffen
0 Kudos
Message 1 of 16
(4,288 Views)
Hi,

What version of teststand are you using?

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 16
(4,274 Views)
Hi Ray,

I use TS 3.1 and CVI 7.1
0 Kudos
Message 3 of 16
(4,275 Views)
Hi,

To see if the callback is executing, you could trying puting a breakpoint on the first step in your SequenceFileUnload sequence.

If not you could put a step that writes to the Status Bar. There is an example in the TestStand\Examples\DisplayingProgressAndStatus folder.

How are you terminating the execution and does your execution that you start in the SequenceFileLoad sequence
run with a process model?

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 16
(4,269 Views)
Hi Ray,

I've already tried to put a breakpoint. The sequenceFileUnload callback is not executing.

I didn't get why I should put a step to write to the Status Bar... what could I find out with such a step??

The execution I start in the SequenceFileLoad callback doesn't use any process model. But the one where the new execution is started and should be terminated later on uses the sequential model.

I attached a simple sequence file that is configured the same way as my project... I hope this helps you.
The UI Message that is posted in the Monitoring sequence is then evaluated in my operator interface to update a numeric display. This should be done as long as the sequence file is loaded!

regards
Steffen
0 Kudos
Message 5 of 16
(4,270 Views)
Hi Steffen,

>>I didn't get why I should put a step to write to the Status Bar... what could I find out with such a step??
I suggested this case you could use breakpoint and therefore an alternate solution to tell if you execution had stepped into the sequence.

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 6 of 16
(4,268 Views)
Steffen,

Try storing your obj ref 'RefToMonitoringExecution' in FileGlobals or StationGlobals.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 7 of 16
(4,267 Views)
The ref is written to the local variable without any problems (watch window).

The case is that the SequenceFileUnload step is not executed where the new execution should be terminated!
0 Kudos
Message 8 of 16
(4,266 Views)
I think the problem you are running into is that a file cannot be unloaded while a sequence within that file is running. Therefore you need to move your monitoring sequence into a different sequence file. Also, setting the local variable like you are doing might work, but it is a little unusual. You might need to use a station global to store the reference instead.

Hope this helps,
-Doug
0 Kudos
Message 9 of 16
(4,257 Views)
Hi Seffen,

Doug is right, while there is a sequence running from that SequenceFile, the Unload callback will not be invoked.

To demonstrate this, pop a breakpoint in your SequenceFileUnload sequence on the action setp. Now close the SequenceFile. Nothing happens. Now go to the File menu and Unload All modules. This will stop your monitor running, which will then complete. Once that's done the SequenceFileUnload will be called which will stop at your breakpoint.

As Doug suggest, put the monitor sequence in its own SequenceFile. You should see it working.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 10 of 16
(4,243 Views)