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 creat variabels at run time?

Hi
1- I´am working with TestStand 3.1 and LabView 8.
2- I would like to know how to creat variables at runtime. That i have a while loop in teststand wich call a vi. this vi has 3 variables which should have a different values each time. Is it possible to get thats value from from txt.file or xls.file for each loop?
 
Thanks,,,
0 Kudos
Message 1 of 5
(3,143 Views)

Hi,

You could use the PropertyLoader step for this changing the StartMarker string to point to your new values.

Look at the example in the TestStand\examples\PropertyLoader

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 5
(3,142 Views)

Hi Farmer

that's what i´am trying to do, but if i have the PropertyLoader step inside the while loop how could i have the StartMarker string as a variable. In other words, if the while loops should runs 50 times, and the the PropertyLoader inside the loops, i should have 50 different StartMarker string  and the same for EndMarker string. How could i do that?

Thanks,

0 Kudos
Message 3 of 5
(3,132 Views)
Hi,
 
The simplest solution would be to have a base start string and you modify it using the loop counter.
 
eg
 Locals.StartStringMarker = Locals.InitialStartString + Str(Locals.LoopCounter) or this could be RunState.LoopIndex if you are using this.
 
The End marker doesn't, you can keep the String as default.
 
The property loader locates the start of the data and loads the data down to the end marker. It doesn't matter that all the end markers have the same text in your file.
 
Hope this helps
Ray Farmer
 
Regards
Ray Farmer
0 Kudos
Message 4 of 5
(3,128 Views)

Hi Farmer,

Yes it work perfect Robot Very Happy

Thanks

0 Kudos
Message 5 of 5
(3,122 Views)