NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I add(.net APi's\Ax) station Configuration options to a simple User interface

Hi,

 

I need to set different sequential model for example..

 

Thanks,

Ori

 

0 Kudos
Message 1 of 7
(4,545 Views)

I'm not sure what you are asking, you might want to provide more details.

 

If you just want to know how to set the process model programmatically, you can do so using:

 

engine.StationOptions.StationModelSequenceFilePath = "SequentialModel.seq";

 

-Doug

0 Kudos
Message 2 of 7
(4,508 Views)

Thanks,this helps

 

But I finally took the 'full featured' .net UI example, which has this option built in

 

Another related questions:

 

1.  How do I pass Params from .net UI code to the sequential model Locals.

to illustrate :

 

TestExec->Seq_Model -> TestSequence->TestDLL

 

I load TestDLL on TestExec GUI code, and the I want to pass its version to Seq_Model local.how ?

 

2. Is there any way to edit\modify visually  the 'PreUUT Callback' in the sequential model

 

Thanks

0 Kudos
Message 3 of 7
(4,497 Views)

To clarify, I need to "catch" events on my testexec code durinng sequntial model run  and I only manged to catch with the trace event " _ExecutionViewMgrEvents_TraceEvent ", when the test sequnce starts already.

 

0 Kudos
Message 4 of 7
(4,493 Views)

What exactly do you mean and intend to accomplish by doing this? Do you just want it in the report? If so, you can use the "Additional Results" feature of the step to store a result for the version number, then the report generation code can automatically pull it in when the report is generated.

 

If you are trying to do something else, please explain in more detail what you are trying to accomplish since passing a variable back to the process model is not something that is typically done, at least not as directly as what you are asking for.

 

-Doug

0 Kudos
Message 5 of 7
(4,485 Views)

Ok I will try to explain

 

I am developing a customized testexec GUI,I took the full featured .net UI project, and customized it according to my company needs.

 

One of our needs for example is to change this mechanisim of getting serial number from user:

 

uut.png

 

Insted I want the serial number to be taken from TestExec GUI directly.To do so, I need to trace the events before each step of sequential model starts.The problem is Trace event fires per each step on test sequnce,and no on sequential model.

 

I need the ability to pass data(from testexec GUI) to Sequential model locals at its runtime. 

another image to illustrate on which exact stage I want to update "UUT.SerialNumber" 

uut2.png

 

0 Kudos
Message 6 of 7
(4,482 Views)

The simplest way to do something like this is to post a synchronous custom UIMessage from the process model (where it would normally display the dialog) to the UI. Something like this in the location where the dialog would normally have been displayed:

 

RunState.Thread.PostUIMessageEx(UIMsg_UserMessageBase + 1, 0, "", Locals.SerialNumber, True)

 

Then in your UI, whenever you get the UIMessage UIMsg_UserMessageBase + 1, do something like the following:

 

PropertyObject myVar = msg.ActiveXData as PropertyObject;

myVar.SetValString("", 0, theSerialNumberToSet);

 

Hope this helps,

-Doug

0 Kudos
Message 7 of 7
(4,458 Views)