12-15-2025 09:20 AM - edited 12-15-2025 09:25 AM
Let's say I have three tests set up in individual LabVIEW modules - Test 1 has variable x, Test 2 has variable y, Test 3 has variable z. In TestStand, I want to ask the user for values of the variables at the beginning that are only needed based on what tests are in the sequence (Example: Sequence has Tests 1 and 2. I want the pop-up messages to only ask for variables x and y). It's a time-based sequence, so I need to collect variables at the very beginning and not in between calling the modules. I think I should use ThisContext to access the variables, but I don't know how to only limit it to the variables that are present in the current running sequence.
Alternatively, I was thinking to have an if statement that goes through all the possible Tests and asks for variables, but that will be limiting if later we add more tests, change the names of tests, etc.
Any idea?
Solved! Go to Solution.
12-15-2025 11:48 AM
Hello Wootie, and welcome to NI Forums, in order to get the best help from the community it always a good idea to attach the VI's and/or photos of your VI in your post. Do this by using the "Drag and drop here or browse files attach" option in your reply.
12-19-2025 09:10 AM
Unfortunately, I work in a secure facility.
Does my question make sense though?
12-19-2025 09:52 AM
Try something like this:
1.) Create a Shared Container for Inputs
2.) Tag each test step with what it needs
3.) Add a "Collect Inputs" step at the beginning
4.) Bind each test's parameters to FileGlobals
5.) Try it
Accessing Dynamic Properties - NI
01-14-2026 01:24 PM - edited 01-14-2026 01:46 PM
Thank you so much for your help. I'm a TestStand and LabVIEW newb, so it took me a good while to write up your solution. I'm currently stuck on the step 3:
Right now, my subVI results in a 1D string array of variable names needed to run the sequence. I also still have the array that I input to the subvi where each row corresponds to one step
i.e. x y z &
x
y
z
I could display this array and get my user to input their values in another array; however, how do I know how to assign the values they input? There doesn't seem to be a way to name a variable using a string variable. I tried to write a separate subVI that would display the array, make a copy and change to indicator and then ask for user to input values using original as reference for position, but that failed - when I put the subVI into my original subVI, it failed because the control and indicator were connected (i.e. the copying).
I could use setValNumber in TestStand so at least now the element is a number, but still how do I know which variable to link it with. Note: some steps require multiple variables so one by one assignment would not work.
Edit to add: I think I'm going to try one more thing and then report back.
01-16-2026 02:32 PM
Thank you a million times over!
The trick was to use Set Property Value with the TestStand API in LabVIEW - I could use the step name string to identify the correct TestStand array.
Thanks again!
01-16-2026 02:40 PM
That is awesome! LabVIEW can be tricky sometimes but very happy you figured it out!