From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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 add testsocket index to variable?

Solved!
Go to solution

How can I add testsocket index to variable in TestStand.

For different socket the variables will be -

FileGlobals.Url0, FileGlobals.Url1, FileGlobals.Url2 ....etc.

 

Tried using FileGlobals.Url+Str(RunState.TestSockets.MyIndex) in step settings but it does not pass in the value FileGlobals.Urlx, just sends FileGlobals.Url.

 

Thanks!!

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 3
(786 Views)

FileGlobals.GetValStr("Url" + Str(RunState.TestSockets.MyIndex), 0x0, 0x1)  

 

Change to GetValNum or GetValBool for different datatypes.... I'm guessing string because it's a URL.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 3
(769 Views)
Solution
Accepted by topic author lvrat

Other option is to put them all in an array and then just index the array off of MyIndex.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 3 of 3
(766 Views)