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: 

Select Switch Executive Route based on Socket Index

Solved!
Go to solution

Hi,

 

I have a sequence set up in TestStand which simultaneously tests up to 4 UUT's. In order to run a current measurments, I need to be able to switch each device through the DMM. I have the routes properly configured in Swith Executive, and everything runs fine when I switch manually using the Test Panel feature. What I need to do now though, is choose which device is routed to the DMM based on its test socket number. 

 

So, for the "Measure Current" test step on "Test Socket 0", I go to the Properties>Switching window and just select "Connect_UUT0" route group. This works fine for a single test socket, but how can I dynamically switch route when I have more than one UUT?

 

I'm aware of the "RunState.TestSockets.MyIndex" variable, but I can't seem to select a route based on this. ie: In "Routes to Connect" I typed "Str(Connect_UUT)+Str(RunState.TestSockets.MyIndex)" after I read a similar solution on this forum, but I just get an error.

 

I'd really appresciate some help on this,

Thanks,

Kevin

0 Kudos
Message 1 of 3
(3,900 Views)
Solution
Accepted by topic author kevinirving64

Hey Kevin,

 

You shouldn't need to do Str(Connect_UUT). You're likely getting the error because it's trying to interpret Connect_UUT as a variable instead of a string. Try this instead:

 

"Connect_UUT"+Str(RunState.TestSocks.MyIndex)

 

 

I think that will work, but let us know if you run into any more trouble!

Message 2 of 3
(3,896 Views)

Hi Daniel,

 

I didn't get a chance to have a look at this until today, but having quickly tired your solution, it seems to be working exactly as I needed.

 

Thanks for your help,

Kevin

0 Kudos
Message 3 of 3
(3,873 Views)