NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set expression's variable in the same step

I probably asking a rhetorical question, but does it exist a way to set an expression's variable (say for load sequence dynamically) in the same step (sequence call)?

I have a situation where I need to read a sequence path from the database and then call this sequence. If I try to do that in pre-step it doesn't work, TestStand tries to evaluate the sequence file path expression when call the step and before the pre-step is executed.

So, what I doing now, do this in two steps, read database first and then do sequence call.

Similar problem is for Message Popup, I need to read the message to display from the database.

Two steps works fine but are not convenient to use. We create our test sequences from custom step types and it would be easier to drop just one step instead of pair of steps in order. Or, is it a way to bind two step types together and always drop two if one is selected?

0 Kudos
Message 1 of 4
(3,290 Views)

Hi skof,

 

for this task i would use the templates from insertion palette.

You can draq your modified steps in it. And when you want to reuse it

you can drop it to your current sequence.

 

for automation:

http://decibel.ni.com/content/docs/DOC-4793

 

 

 Hope this helps

 

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 4
(3,277 Views)

"is it a way to bind two step types together and always drop two if one is selected"

 

 

Yes, if they are both your own custom step types. Notice how when you drop an If step, and End step automatically appears? The If step does this in a OnNewStep substep.

0 Kudos
Message 3 of 4
(3,216 Views)

Dah! I didn't know about the OnNewStep when I posted this.

 

Juergen, thank you, this is interesting example but not related to my question.

 

My concern is mostly cosmetical. I can do the job in two steps, but because these two steps will always come together I'd like to combine them in one step in the sequence. This is not possible because the second step depends of the first step output.

Looks like my second example for Message Popup is not true, at least it works if I set the message in the step's Pre-expression. But take a look to my Sequence Call.seq. How to obtain Sequence Path specified by expression in the same SequenceCall step?

 

Download All
0 Kudos
Message 4 of 4
(3,207 Views)