From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Load more than one sequence file with c#

Hi,

when i start Teststand 2013 i can open more than one File. When i press F5 for each sequence file they  run asynchronous.

My question is, how can i do this with c#. That means how i can load more than one sequence file and start asynchronously.

 

regards,

 

René

0 Kudos
Message 1 of 25
(5,441 Views)

Hello Rene,

 

a good starting point to run sequences without the TestStand Development System are the User Interfaces. 

There are two delivered a Simple and a Full Featured they can be found there:

 

C:\Program Files (x86)\National Instruments\TestStand 2013\UserInterfaces\Simple\CSharp

C:\Program Files (x86)\National Instruments\TestStand 2013\UserInterfaces\Full-Featured\CSharp

 

Best Practices for NI TestStand User Interface Development

 

Hope it helps.

best regards
Alexander
0 Kudos
Message 2 of 25
(5,416 Views)

Hi,

 

thanks for the answer. I look at the Userinterfaces. My problem is, that i had to programm an WPF Application.

I want to test asynchronous Multi DUTs. In that case i had to load 5 Sequences. The User can start every Sequence at any time.

The part which control Teststand is an DLL. So i have noch GUI to place any ActivX Control or so like in the sample.

Load, start, stop and read the results are automatically do.

I hope you understand now what i will do :).

 

regards,

 

René

 

 

 

0 Kudos
Message 3 of 25
(5,228 Views)

Hello Rene,

 

normally for this you can use the parallel model from teststand this allows you to run the same sequence in the instances you want. If your User can start a sequence then you have a GUI or a external button which start the sequence. The activeX references TS UI Application manager, TS UI SequenceFile manager and TS UI Execution manger  can be used to controlling TS and running your sequences. this controls are also used in the simple user interface. The other controls for showing the results and so on must not be used, if you do not need them.

 

Creating a custom User Interface

 

Hope this helps.

best regards
Alexander
0 Kudos
Message 4 of 25
(5,222 Views)

Hi,

 

thanks for the help. I insert all Managers.

 

AxApplicationMgr _appMgr = new AxApplicationMgr();
AxSequenceFileViewMgr _seqMgr = new AxSequenceFileViewMgr();
AxExecutionViewMgr _exeMgr = new AxExecutionViewMgr();

later i open a sequencefile with

 

_seqMgr.Sequence = _appMgr.OpenSequenceFile(_currentSequenceFile).GetSequence(0);

With this handle it is no Problem to start or stop the testplan. Also is no Problem to receive the results.

My question is, how can i open a second file to do  asynchronous testing?

If find no parameter to say Teststand to load a second file.

 

regard,

 

René

0 Kudos
Message 5 of 25
(5,199 Views)

Hello Rene,

 

normally we do this with the parallel model inside of TestStand.

 

If you want to run it independent you have start the sequences as new execution with an attched model.

 

In LabVIEW it look like this

 

Unbenannt.PNG

 

Hope this helps.

best regards
Alexander
0 Kudos
Message 6 of 25
(5,196 Views)

Hi,

 

i do some tests. With this code i can load 2 files.

 

_seqMgr.Sequence = _appMgr.OpenSequenceFile("Dummy1.seq").GetSequence(0);
_seqMgr.Sequence = _appMgr.OpenSequenceFile("Dummy2.seq").GetSequence(0);

Console.WriteLine("Sequencefiles: " + _appMgr.SequenceFiles.Count);

            
Command testStart = _seqMgr.GetCommand(CommandKinds.CommandKind_ExecutionEntryPoints_Set, 0);
testStart.Execute(true);

When i create a command i can start only the latest testplan. How i can start any of the testplan in the "sequences" list?

Is there any pointer i can set?

 

regards,

 

René

0 Kudos
Message 7 of 25
(5,169 Views)

Hello Rene,

 

should the sequence run seperate without a model attached?

 

The easiest way ist to split the sequence file into more so each sequence can be started individual.

 

The sequence combo box should show the include sequences and you can programmatically select the sequence you want to run but then only the sequence runs without a model. This feature is implemented in the simple user interface.

 

In my opinion you should use the parallel or batch model to make the simultaneous runs of the devices you want to test.

 

best regards
Alexander
0 Kudos
Message 8 of 25
(5,145 Views)

Hi,

 

i test the BatchModel. It looks good.

With the exeMgr_Trace Event i become the Testresults. But I become only one Event for all UUTs. So were i found the results for each UUT?

With path i had to go to read out the results?

 

I think i need HAL structure to test the three different UUTs. Have someone a example in .net?

 

regards,

 

René

0 Kudos
Message 9 of 25
(5,098 Views)

Hello Rene

 

With the exeMgr_Trace Event i become the Testresults. But I become only one Event for all UUTs. So were i found the results for each UUT?

This depends on the setting for the result processing in TestStand, normally one batch has one report.

 

With path i had to go to read out the results?

 This depends on the setting for the result processing in TestStand.

 

I think i need HAL structure to test the three different UUTs. Have someone a example in .net?

I do not know one.

 

best regards
Alexander
0 Kudos
Message 10 of 25
(5,095 Views)