NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to dynamic change Step Name?

I have a step inside For Loop. I would like that step have different name related to loop Number. how do I do it?
For example
In Test stand,

for i=0; i++;i<10
stepnamei
end

So in this way, If the step fail, I could know on which loop it fails.
Please advise on it.
0 Kudos
Message 1 of 5
(3,531 Views)
0 Kudos
Message 2 of 5
(3,525 Views)
Thanks Ray,

I tried the first method from your example. It works pretty well.
0 Kudos
Message 3 of 5
(3,517 Views)

the link no longer works.

can someone please let me know how to add the loop index to the stepname

0 Kudos
Message 4 of 5
(2,978 Views)

Hello NikolajEgeskovOstergaard, I am uploading a .seq file in which I can change dynamically the step name during execution.

 

In this example I just created a local variable called "Counter".

 

Image1.png

My sequence is just a fixed For Loop of 10 iterations.

 

Image2.png

And in my step Message Popup (the one I want to change step name dynamically), in Properties -> Expressions -> Pre-Expression I wrote:

 

Step.Name = "Step Name # "+Str(Locals.Counter)

 

Image3.pngThe result during execution:

 

Image4.png

 

 

I hope this example help you.

0 Kudos
Message 5 of 5
(2,955 Views)