NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute desired sequence

HI doug,

I'm using simple GUI example of NI

My file sequence contains two sequences,main sequence and sub sequence.

Now, When I clicked on single test button the main sequence executes,What I want is to clicked on a different button and the sub sequence will be executed.

 

Tnx

0 Kudos
Message 11 of 15
(1,597 Views)

Hi All,

when I clicked a button that statement run but nothing happened.

 

engine.NewExecution(axSequenceViewMgr.SequenceFile, "PowerOn", null, false, ExecutionTypeMask.ExecTypeMask_Normal, Type.Missing, Type.Missing);

 

What to do to execute "PowerOn" sequence???

0 Kudos
Message 12 of 15
(1,594 Views)

@NewSCRUser wrote:

Hi All,

when I clicked a button that statement run but nothing happened.

 

engine.NewExecution(axSequenceViewMgr.SequenceFile, "PowerOn", null, false, ExecutionTypeMask.ExecTypeMask_Normal, Type.Missing, Type.Missing);

 

What to do to execute "PowerOn" sequence???


That should work (Or throw an exception if the parameters are invalid). Maybe it's running, but not being displayed. Have you put something like a messagepopup step in that sequence to see if it's running or not? Have you made any other changes to the UI? Have you tried stepping through the code in a debugger to make sure you are passing the parameters you expect and that no exceptions are being thrown?

 

-Doug

0 Kudos
Message 13 of 15
(1,585 Views)

Hi Doug,

To Answer to your questions,

None of the events occured (axApplicationMgr_StartExecution,axApplicationMgr_EndExecution)

No exceptions happened

Why I don't see it on the execution panel?

 

0 Kudos
Message 14 of 15
(1,563 Views)

Perhaps you made some other changes which are breaking things.

 

I added a button with the following callback to the simple C++ User interface example and it works fine for me:

 

void CTestExecDlg::OnBnClickedButton1()
{
    mApplicationMgr->GetEngine()->NewExecution(mSequenceFileViewMgr->GetSequenceFile(), "myseq", NULL, VARIANT_FALSE, TS::ExecTypeMask_Normal);
}

 

Whenever I have a sequence file loaded, with a sequence named "myseq" and click that button it correctly runs it and shows the trace of the execution in the UI.

 

Here's a screen shot of what happens when I push "Button1":

 

forum.png

 

I recommend you start from scratch with the original source code for the example UI you are using, and then slowly add back in your changes and see which ones are causing the problems you are seeing.

 

Hope this helps,

-Doug

0 Kudos
Message 15 of 15
(1,551 Views)