NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute desired sequence

Highlighted

Hi All,

I'm using one of the GUI examples of NI and

I have a file that contain two sequences,Main sequence & Sub Sequence.

How can I execute only the sub sequence?

How can I execute a sequence by name only?

Thanks,

Liran

 

0 Kudos
Message 1 of 15
(2,816 Views)

You may select the subsequence and then execute it in 2 ways.

 

  1. Goto Execute Menu and select "Run Sequence"

  2. Right Click the sequence and select  "Run Sequence"

0 Kudos
Message 2 of 15
(2,786 Views)

Hi Ranjith,

What I ment is how to execute the desired sequence by code.(programmatically) using c#

Thanks,

Liran

0 Kudos
Message 3 of 15
(2,782 Views)

Hi

 

 You may use the NewExecution method in the Execution class for executing a new Sequence. The name of the subsequence can be passed as a parameter.

 

Ranjith

0 Kudos
Message 4 of 15
(2,779 Views)

Do you have any example to show?Will be very helpful...

Tnx

 

0 Kudos
Message 5 of 15
(2,774 Views)

Honestly, this is NOT how TS is meant to work.

 

From a TestStand point of view, you load a sequence file and there is ONE MainSequence which is the "entry point" for your custom test routine. Selecting to execute this using a process model ensures that framework tasks (like checking for serial number, creating reports, ...) are handled "around" your custom test.

 

Sure, there are situations where design is challenging in order to get to this generic setup, but i NEVER encountered any situation where this is impossible.

So instead of trying to bend (and potentially break) the UI, the process model and the complete process of usage of TS, you really should reconsider your design. By stating this, i assume that all your previous questions relate to the same project.

 

Maybe it is a good time to consult your local NI branch if they are able to provide some sort of architectural consulting regarding TS. I recommend this as i got the feeling that you are not using TS to its full extend and therefore stumbling from issue to issue....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 15
(2,768 Views)

Hi Norbet,

Yes you right it related to the same c# project,

To anybody else I'm looking for a way to execute a sequence by name using c#

 

By the NI editor I can add new sub sequences to the same file.

On Execute Menu Item you can select which sequence you can run solitary.

 

 

p.s :  When you load a file sequence that assembled with two sequences (main sequence & sub sequence) the axSequenceViewMgr object has contained the two sequences.....So it seems to me very reasonable to be able to execute by name.

 

 

 

 

Thank you 4 your time,

Liran

 

 

0 Kudos
Message 7 of 15
(2,763 Views)

engine.NewExecution(sequenceFile, "SequenceName", null, false, ExecTypeMask_Normal, args /* or System.Type.Missing if no args */, System.Type.Missing, System.Type.Missing)

 

You can get the engine from ApplicationMgr.GetEngine() if needed. Or if calling from a step in a sequence, you can get the engine from the SequenceContext (I'd recommend using a sequence call step though if you are doing this from a sequence since that is easier).

 

-Doug

0 Kudos
Message 8 of 15
(2,750 Views)

Hi Doug,

Nothing happens,

What sould I do with the object execution??

Liran

0 Kudos
Message 9 of 15
(2,741 Views)

Executions run asynchronously from the call to NewExecution. If you are in an existing UI, you don't need to hold onto the execution, you can just release it (or allow it to be released automatically depending on the programming language you are using). In the full featured UI's the new execution should appear automatically.

 

Which UI are you using? When/where are you calling NewExecution? What exactly are you trying to do?

 

-Doug

0 Kudos
Message 10 of 15
(2,681 Views)