NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

interactive

Hi. I need to build a custom Operator's Interface (with CVI 9) for running sequence files. My problem is how to run a selected steps using single pass.  I'm using the TestStand API for most other things. But I just can't seen to find the way to "select" several steps and then run them.

Thanks,

Yariv

yariv@enertec.co.il

0 Kudos
Message 1 of 9
(3,586 Views)

Hello Yariv,

Which version of TestStand are you using?

You should be able to ctrl-click a number of steps, then right click and select Run Selected Steps.

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 9
(3,571 Views)

Hi,

I'm Using TS 4.2. I need to imitate the "Run selected steps" in a UI that I'm developing with CVI 9.5 and not via TestStand's applications.

0 Kudos
Message 3 of 9
(3,564 Views)

yariv,

 

If you have connected your SequenceView control correctly then you should be able to do as Jacob suggested.

 

However, if you are looking to do this dynamically there is an API call: SequenceFileViewMgr.RunSelectedSteps().  You can read about that function in the TestStand help.

 

If you need to know how to connect the control correctly then look at the source code for the UI that ships with TestStand.  There is a CVI one in there.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 9
(3,561 Views)

Hi,

I'm using the TS API (tsutil.fp). I'm trying to run selected steps. There is no GUI where the user can actualy mark the steps that needs to run using Single Pass. These steps are loaded from a configuration file.

The help on all the functions are no help at all. The function "TS_EngineNewExecution" has a parameter called InteractiveArgs of type VARIANT. There is no help to which field in the variant I'm supposed to use.

In general, I perform the following actions:

1. Open a sequence file (TS_EngineGetSeqFile followed by AddModelEntryPoints)

2. Load the steps to run from a configuration file (Each step is a sequence call located in the MainSequence). The configuration file contains the Steps ID.

3. Here is the problem: I need to "Tell" the engine what steps to run from the main sequence in the Single Pass execution when calling the TS_EngineNewExecution function.

 

Thanks.

 

0 Kudos
Message 5 of 9
(3,521 Views)

 

 

 

Not sure which help you are looking at yariv.  I find the TestStand help to be very helpful whenever I use it.

 

I understand that you are using the tsutil.fp but I'm almost positive the functions are the same as what you find in the TestStand help.

 

Here is the info from the help:

 

InteractiveArgs

When you call the Engine.NewExecution or Thread.DoInteractiveExecution methods to create an interactive execution, use an object of this class to pass information about the current state of the user interface. These methods use the object to determine which steps are currently selected in the user interface.

Create objects for this class using the Engine.NewInteractiveArgs method.

Properties

LoopCount
NumSteps (Read Only)
Sequence
StepGroup
StopExpression

Methods

AddStepIndex
AsPropertyObject
ClearStepList
ContainsStep
GetStepIndex

 

 

My guess is that before you call the NewExecution function you would need to call TS_NewInteractiveArgs and then use the AddStepIndex function to add steps to the InteractiveArgs object.  It also looks like you would use the Thread object to call DoInteractiveExecution once you have everything set up correctly.

 

Not sure exactly what the order or calls would be but I'm guessing that should get you on the right track.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 6 of 9
(3,518 Views)

Hi,

The TS_EngineNewExecution function takes a VARIANT type as the last parameters. How do I pass the InteractiveArgs into this function? In the helt it says:

InteractiveArgsParam As Variant

[In] [Optional] Pass an InteractiveArgs object that indicates which steps are currently selected in the user interface and contains looping information necessary for an interactive execution. Pass this parameter only for interactive executions.

 

I understand that there is a mix-up here. The InteractiveArgsParam is supposed to be an InteractiveArgs object (CAObjHandle) and not a VARIANT. Can anyone shed some light on this issue? 

0 Kudos
Message 7 of 9
(3,502 Views)

Hello yariv,

Sometimes a function will accept the CAObjHandle and convert it internally. I tried passing an CAObjHandle to the EngineNewExecution function and got the same error saying that the function was expecting a VARIANT.

The VARIANT data type is a structure that can hold any ActiveX data type. What you need to do is use one of the CVI ActiveX functions in the Assigning Value to Varients class.

This will convert the CAObj into a VARIENT that you can pass to EngineNewExecution.

The function name is CA_VariantSetObjHandle (VARIANT *Variant, CAObjHandle Value, unsigned int Desired_Variant_Type);

Jacob R. | Applications Engineer | National Instruments

Message 8 of 9
(3,484 Views)

It works!!! That function was just what I needed. Thank you very much.

0 Kudos
Message 9 of 9
(3,456 Views)