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
(796 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
(779 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
(776 Views)