NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Associating a comm port with a TS test socket

Hello,
In order to run several test platforms on one machine (parallel model), I must be able to associate each test socket with a unique serial port. Each hardware platform has it's own serial connection which is built in Labview. So my question is, "how can I use a single test sequence calling LV VIs where each test socket must use a different comm port?"
Thank you for helping,
Adam
0 Kudos
Message 1 of 4
(2,957 Views)
What I do is create an array of VISA Resource Names and then use RunState.TestSockets.MyIndex to index the correct for the socket that's running.
0 Kudos
Message 2 of 4
(2,944 Views)
Hey Dennis,
Thanks for the reply. I was thinking along those lines; but, how do I make it dynamic enough so that different comm port configurations work in a deployed system? Do I have to alter the UI to allow manual USER entry or is there a simpler approach?
Also, did you mean hardcoding an array of valid comm ports in LV and then passing the Test Socket Index from TS to LV?
I'm fairly new at Laview so thanks for the help,
Adam
0 Kudos
Message 3 of 4
(2,930 Views)
How dynamic is the com port configurations? Will some testers only differ in the number of ports? If that's the case, then you'll also need to dynamically change how many sockets you're testing. This could be done, probably in a sequence file load callback and with the LabVIEW function VISA Find Resource. Searching for all ASRL resources will return a count and their names. You could populate a station global string array with the names. Right now, I have a fixed count of resources so I just populate a main sequence local variable with all of the possible names. I assign the resource name for the VI as Locals.VISAResource and in a pre-expression for the VI, Locals.VISAResource = Locals.AllVISAResources[RunState.TestSockets.MyIndex]
0 Kudos
Message 4 of 4
(2,925 Views)