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: 

How to display test progress in customized OI progress bar??

Hi all
From the deaf silence of group for my previous  question should i assume it is not possible to store/process the user configuration deatails in database instead of .ini file??
 
also please clarify me the following questions.
 
1. Is it possible to display the test progress in customized OI (like shown in the figure)
i used the method to get the number of steps.

axExecutionViewMgr.GetCaptionText(CaptionSources.CaptionSource_NumberOfSteps,true,""); ( but it returns null  i used it in precommand event of appln. mgr.)

but the teststand  should provide a event so that i can update the progressbar value according to number of steps/ steps completed in UI right??

2. The functionality of ABORT will abort the current execution. but when i say restart it should restart from step that is being aborted. but the current  restart functonality provided in test stand restart from very first step of sequence. is there any way to achieve this?.

3. I try to run sequence file programmatically using the following code

NationalInstruments.TestStand.Interop.API.Engine eg= axApplicationMgr.GetEngine ();

NationalInstruments.TestStand.Interop.API.SequenceFile s =eg.NewSequenceFile ();

s.Path ="D:\\Program Files\\National Instruments\\TestStand 3.1\\Examples\\Demo\\CreateDeleteUsers\\CreateDeleteUsers.seq";

eg.NewExecution (s,"CreateDeleteUsers.seq",

null,true,0,null,null,null);

but it show the following error

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in TestExec.exe

Additional information: Unknown function or sequence name 'CreateDeleteUsers.seq'.

have i anything missed in the code??

Thanks in Advance

Srini

 

 

 

 
0 Kudos
Message 1 of 4
(4,137 Views)
Hi Srini:

Please see the attached example on how to implement a status bar in LabVIEW while tests in TestStand are running. You can modify the example so that it can be used in your operator interface.

The function Abort is meant for the entire sequence, not a single step. Hence when you see click on the abort button, the entire sequence is stopped and has to start again from the beginning of the steps.

Could you send me the link to the previous post you sent that was not answered.

Thank you
Nandini
NI
0 Kudos
Message 2 of 4
(4,118 Views)
Thanks for ur reply,
 
here is the link for my previous question
 
The one u attached is related to labview or VI , I don't have these s/ws  i doing customization in C# .NET could u plz send me some  C# sample code/seq.
 
next thing is u didn't answer to  my second,third question
 
i want achieve the functionality, like if i click abort it should abort the current step and when i say restart it should restart from aborted step is there any way to achieve this.
 
have u seen my posted code in the third question, is this way to programatically open and run a sequence(C#)??
 
Thanks in advance
Srini
0 Kudos
Message 3 of 4
(4,103 Views)
Re 2. Restarting from the middle is not a feature that currently exists. To implement it yourself, you would have to create a step or callback that reads a persisted version of the results, variables, current step group/index, and anything else you need to restore and applies it to newly started execution. You would have to arrange to persist all these items when you terminate, either with a special step/callback or with special code in a OI application that you write. 
 
This is probably not a feature that can be implemented in just a few of lines of code. It could be a simple or difficult project, depending on how much state you need to restore, whether you support restarting from within subsequence, whether you try to restore the system state by rerunning setup and cleanup groups, etc.
 
Re 3. Your code does not work because although you change the path of the new empty file, it is still a new empty file.  To load a file, call ApplicationMgr.OpenSequenceFile.  You can then execute it with a command object. Example:
 

this.axApplicationMgr.OpenSequenceFile(fileName);

// run the current sequence

this.axSequenceFileViewMgr.GetCommand(CommandKinds.CommandKind_RunCurrentSequence).Execute(true);

 

// run an execution entry point (Test UUTs is typically at index 0 and Single Pass is typically at index 1)

this.axSequenceFileViewMgr.GetCommand(CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1).Execute(true);

 

Alternatively, you could create an execution with ApplicationMgr.GetEngine().NewExecution, passing in the SequenceFile that the OpenSequenceFile method returns.  If you are modifying/creating an OI application, I recommend reading Chapter 9 of the TestStand Reference manual if you haven't already.

0 Kudos
Message 4 of 4
(4,087 Views)