From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change/replace default values in action calls

I have multiple measurement sequences for multiple measurement targets. Up to now each sequence uses a communication vi more than 400 times with a fixed Log File name – specified as default!
Now I have to change this name to a variable (generated name).
Find/Replace may change the name but cannot deselect the default button, which is necessary in advance.
How can I change the name and deselect the default button for hundreds of vi calls without selecting/changing every single step?

0 Kudos
Message 1 of 4
(4,288 Views)

What version of TestStand are you using.  I think in 4.1 and later you should be able to highlight all the steps by holding down the ctl or shift button and then deselecting that option.  You can also type in the name of the new variable or value.

 

There are ways to do it dynamically but it would be harder to write that than to just highlight them all.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(4,282 Views)

Hi jiggawax

Thanks for your hint. This helps me some steps forward.

My TestStand Version is 4.1 and so your procedure works.

But it works only for the selection of the same VI call.
In my sequences there are a lot of subsequence calls and between the single calls of the relevant communication VI there are calls of different VIs and different kind of steps. So a block selection is a very limited option.
But it helps, since this selection is quicker and easier than selecting every single VI call and do the required changes.

 

You mentioned a possible dynamic solution. Can you give a hint, what might be that solution? I have no idea where to look right now.

 

kind regards

pmars

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

You would have to use the TestStand API and pass your sequence file into some sort of routine (whether you are in LabVIEW, C# or just another sequence).  Then in that routine you would have to iterate through every step in the sequence file looking for certain properties of thes step (i.e. adapter, parameters exist, which VI is getting called, etc...).  Once you find a step with the right fit then  you can use the API to change the parameter settings and values.

 

For instance:

Step.Module.AsLabVIEWModule.Parameters.Item(1).AsLabVIEWParameterElement.UseDefaultValue = False

 

That is just one API call that will change the second parameter in a LabVIEW step to not use the default value.  You would need to use others for the step as well as some to iterate through the sequence file and sequences within the sequence file.

 

The other thing you have to consider is that some of your steps might have this as index 1 and others as index 2?  So when you are calling one VI you need to look for a certain index and with another VI a different index.

 

If you feel it is worth going down the dynamic road I can help you determine which API calls you need.  My opinion though is that for 400 steps it's not worth it, unless you plan on doing this multiple times.

 

However.....

 

I just discovered another method while playing around with this.  Attached is a document that explains the process.  There were too many images to put up in here.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 4
(4,259 Views)