NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure a "SequenceCall" step with Labview

Solved!
Go to solution

Hi, 

 

I'm working with TestStand API for LabView.

For the moment, I can only create  a new Sequence File, create some sequences , add them to my sequence file.

I can also create some step,  as "action" or "Sequence Call'. And add them to a sequence.

But i'm unable to configure my new Step "SequenceCall", and select an other sequence to call.

 

Could somebody explain me how to do it ?

 

 

0 Kudos
Message 1 of 8
(3,506 Views)

Assuming your other sequences are within the same .seq file, I want to check the setting of the checkbox Use current file. When that box is checked, you should be able to choose the other sequences in the .seq file.

 

0 Kudos
Message 2 of 8
(3,492 Views)

Thank you for your answer.

Yes, my sequences are in the same sequenceFile.

 

The problem isn't with TestStand.

But, that I don't know how to "check" "Use Current File"  programmaticaly with Labview. And how to select sequence (from my sequence, and why not, from an other sequece file).

0 Kudos
Message 3 of 8
(3,489 Views)
Solution
Accepted by topic author Alexandre.R

I'm attaching an image that shows you how to access the sequence call properties via the LabVIEW API.  Let me know if you have additional questions.

 

It's kinda tricky but you also have to use the Variant To Data node to typecast the step module to a SequenceCallModule.  And then close a whole bunch of references.

 

Cheers,

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

Hello jjiggawax, 

 

thank you for your answer. It's what I needed.

Currently I have no more question about it, but I 'm sure I will have some question on other Method/property of TestStand API.

0 Kudos
Message 5 of 8
(3,450 Views)

Finally, I have an other question, similar to the first.

 

Now, I 'd like to add programmatically a "MessagePopup" step (I already did this, it's ok).But I want to set the "Message expression", and I don't know how to do it.

 

In a general way, how to configure a step? It seems to be radically different between step type. I found nothing in the TestStand's Help, in the API part.

0 Kudos
Message 6 of 8
(3,448 Views)
Solution
Accepted by topic author Alexandre.R

The first thing you have to understand is that Step types are just large data types.  You can always go to the definition and see the subproperties.  Then you can use them as property objects to set and get different subproperties. 

 

What makes one step type different from another is simply the subproperties.  Like I mentioned above the subproperties can be found by going to where the step type is defined.  This is generally in one of the INI files in the type pallette.  OR you can place down a step of that type in TestStand and on the Properties tab choose the Property Browser.  Everything in the property browser is relative to Step. 

 

However, most of the step type subproperties are also called out in the TestStand help.  For example if you open the TestStand help and on the Index tab type "Message Popup step Type" it will bring up the Message Popup Step page.  It then shows all of the subproperties and what they are used for.  Specific to your example you will see Step.MessageExpr.  So in LabVIEW you can use an invoke node to call AsPropertyObject on your step.  Then another invoke node to call SetValString.  If the type is an Expression you have to include all of the proper formatting such that it will evaluate properly as an expression.  In this case the quotes need to be injected as well.  I've attached a simple example.

 

I think once someone really figures out the PropertyObject in TestStand and how to use the API for it then they have it made.  It is what drives TestStand in my opinion.  Everything revolves around property objects.

 

As a side note:  all of the tabs that you use to configure a step are simply setting those sub properties. If you knew what you were doing you could go directly to the Property Browser and simply set a bunch of stuff in there.  Technically thats what you are trying to do through the API.

 

For some steps NI was kind enough to create direct API calls depending on the module type or adapter type.  That's why with the previous example we used the API. Always use the API if it is available.  If not then use PropertyObject.  The reason the API is better is because it might be setting multiple subproperties.  And that is true for the Sequence Call paths.  Because not only are you setting the Step.TS.SData.SeqName sub property but you are also setting the SpecifyByExpr to False.  Most of the time if the subproperty is in the TS and especially the SData containers then there are API calls for them.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 7 of 8
(3,436 Views)

Hello, 

 

thank you jiggawax. It's reaaaaaaaaaally helpfull.

Yesterday, I was looking for all the day to find something like the "The property browser". 

 

When I used the TestStand Held, I looked only the API part, that's probably why I missed  the" Message Popup step type" page and the subproperties.

 

 

0 Kudos
Message 8 of 8
(3,415 Views)