NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

sequencechanged event not firing for new sequences

I'm using the TestStand ActiveX controls in a VS 2010 win forms app (c#). We have several .seq files, each may have several sequences in the file. I'm trying show the currently running sequence and sequence file on the UI that pertains to what the sequence view activex control is currently showing(running).

 

Hooking into the SequenceChanged event only seems to fire once the initial sequence file is loaded. Any subsequent sequences and sequence files that run never fire the event.

 

Our initial sequence eventually calls a sequence in another sequence file, and that file name is dynamically figured out at run time, so I’m not sure if that's why it never fires after the initial sequence file.

 

Any help is greatly appreciated.

 

Thanks, Eric.

 

0 Kudos
Message 1 of 4
(3,396 Views)

Is the execution view manager hooked up to the sequence view? Is your UI based on ones that ship with TestStand? You might be better off getting the UIMessageEvent and handling the trace UIMessage.

 

-Doug

0 Kudos
Message 2 of 4
(3,381 Views)

if by connecting the executionview to the sequenceview you mean doing something like this:

axExecutionViewManager.ConnectExecutionView(this.axSequenceView, ExecutionViewOptions.ExecutionViewConnection_NoOptions);

 

then yes, tried that, looked at the sample UI C# app, and added labels like it was using, as well as the list bar to my app also and connected it just like in the sample. It only showed my first Seq File and the mainsequence in it.  When the sequence file changed or the sequence in the sequence file changed, nothing updated, still said it was the MainSequence in my MasterSequence file. If I paused the sequence while it was running a sequence in another sequence file, the list bar did update its status to paused, but it still thought it was in the starting sequence/sequence file.

 

I'm not sure what you mean by getting the UIMessageEvent, can you fill me in with a little more detail on how to do that?

 

Thanks, Eric.

0 Kudos
Message 3 of 4
(3,365 Views)

1) Make sure you have tracing enabled. Do you see the flow of execution in the sequence view while you are running a sequence?

 

2) You can use UIMessages instead by handling the UIMessageEvent on the Application manager and looking for the trace UI message and if it's a trace UI message you can get info about the execution inside that event handler (before returning, it's not safe to access the executions data outside of the trace event handler) as follows:

 

SequenceContext context = uimsg.Thread.GetSequenceContext(0, notused);

 

String sequenceName = context.Sequence.Name;

String sequenceFileName = context.SequenceFile.AsPropertyObjectFile().DisplayName;

 

Hope this helps,

-Doug

0 Kudos
Message 4 of 4
(3,345 Views)