NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Parameter Value from C# to TestStand

Solved!
Go to solution

Hi,

I am currently customizing the full futured User Interface,

I have Master Test.seq which has all the tests and i need to run only the user selected test in UI.

so i thought of passing the user selected test form C# UserInterface code to Master Test.seq.

how can i pass the parameter value or is there any other way i can share data between USerINterce and seq file?

 

 

Thanks in Advance

IVI

0 Kudos
Message 1 of 12
(5,731 Views)

UI Messages are the best way to do this:

 

http://zone.ni.com/devzone/cda/tut/p/id/4532

http://zone.ni.com/devzone/cda/tut/p/id/7560

 

Generally information flows from the sequence file to the UI.  However, if you need to flow information back to the sequence file then pass the sequence context as a UI message from the sequence file to the UI.  Once you have the sequence context in the UI you can then access Locals and FileGlobals and change them. 

 

Hopefully this gets you started,

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

What you are doing sounds a lot like what interactive executions are for. You might consider using that functionality.

 

-Doug

0 Kudos
Message 3 of 12
(5,715 Views)

Hi  Doug,

can you please get me more information on intractive executions.

ThanKs

0 Kudos
Message 4 of 12
(5,705 Views)

IVI,

 

If you open the TestStand help and look for interactive execution there is a section about it.

 

The way I think about it is that it is an execution that runs without an entry point (i.e. it does not use the process model to run).  However, the definition in the help is more accurate. If you were in the Sequence Editor and you right click on a step and say Run Selected Step then you are kicking off an interactive execution.

 

I think what Doug is saying is that it seems you have a sequence file with a bunch of sequences in it.  You want the user to select a sequence and just run that sequence without using the process model or callbacks (MainSequence).  Although Doug will have to speak for himself as he is much more knowledgeable than I am.

 

I think maybe if you explained your situation a little better then we could offer the right solution.  The problem with TestStand is it is so customizable and open.  The best thing about TestStand is that it is so customizable and open.  In other words...You can get into trouble quite easily but on the other hand you can make it do some freakin' awesome things.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 12
(5,701 Views)

My requiremrnt is quite simple, i need to pass a data from OI to my MasterSequenceFile, any ways should be fine for me.

 Thanks

 

0 Kudos
Message 6 of 12
(5,698 Views)

Then you should use UI Messages.  Interactive executions just start a new execution.

 

Read through the documentation I posted earlier and it should become more clear.  Just know that you can only pass data from the sequence file to the UI.  However, by passing the sequence context you can manipulate data in the sequence file from UI.  Therefore you have access to data in your sequence file from the UI.

 

Cheers,

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

Hi,

I used below code to get acesst to the sequence file for setting value for a FileGlobal variable in TestMaster.seq

Engine myegine = axApplicationMgr.GetEngine();

 

SequenceFileseq= myegine.GetSequenceFileEx(@"C:\SelfTest\TPS\TestMaster.Seq", 0,TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);

 

am getting error  as "Array Index Empty" on using "GetSequenceFileEx" method.

can you please help me on this

 

Thanks

0 Kudos
Message 8 of 12
(5,668 Views)

What happens when you try to open the same file in the sequence editor?

 

-Doug

0 Kudos
Message 9 of 12
(5,663 Views)

it's opening properly.......

 

 

Thanks

 

0 Kudos
Message 10 of 12
(5,659 Views)