NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parallel/Batch Sockets Using Different I/O's & Com's

Solved!
Go to solution

Guys,

 

I'm working on a test fixture that will utilize the Parallel or Batch model.

For each DUT(testpoints) there is an attached array of relays, connected to a single array of AI's.

 

I want to be able to switch in a different array of relays for each socket.

Example:

Socket 0 - VCC_3.vi , SW0_0on/off 

Socket 1 - VCC_3.vi , SW1_0on/off --> wait for socket 0 to finish with VCC_3.vi ,switch to a different I/O

Etc for all sockets and measurements

 

I also need each socket to utilize a different "com_port.vi". 

Seems like I'd need some hyb Seq/Par model?

 

I couldn't find much in the way relevant discussions on this topic, so I hope you have some knowledge to share!

Any suggestion would be greatly appreciated.

 

-Derrick

 

0 Kudos
Message 1 of 4
(3,189 Views)
Solution
Accepted by topic author derrick.chaney

A couple things regarding your issue:

 

You should be fine with just the Parallel or Batch model.  Personally, if you don't need to switch out UUTs dynamically then I would go with the Batch model.  Why?  Because then you can use synchronized sections.  Synchronized sections give you the ability to run a particular section of your sequence file (i.e. several or a single step) in Parallel, Sequentially or One Socket Only.  With the parallel model you can kind of get there by using Locks and Queues.  Look in the TestStand Reference Manual under Appendices A and B for more info on the Batch model and synchronized sections.  To access the TestStand Reference Manual go to Start>>All Programs>>National Instruments>><TestStand>>>Documentation>>Manuals.

 

Regarding your VIs and how they would handle each socket.  I don't think it's a good idea to make a different VI for each socket.  Just have some sort of case inside the VI that if 3 comes in the set the right wires to populate your switching or COM functions.  For instance: Lets say that Socket 1 is executing and comes to the step to call the com_port.vi.  One of the parameters for that VI could be the socket number.  Inside the VI you set the desired com port to read or write based on that parameter.  You can set the parameter in TestStand by using RunState.TestSockets.MyIndex (that will return the socket you are on). 

 

In fact you wouldn't even need the logic in your com_port.vi.  I would assume that one of the parameters to that VI would be a VISA session to your COM ports.  In TestStand you use the LabVIEWIOControl datatype which has property of DeviceName.  If you set that parameter to be '"COM" + Str(RunState.TestSockets.MyIndex)' then you will achieve the same thing as passing COM3 if you were in TestSocket 3.

 

Anyhow, this is just a few ideas for you.  Obviously you have to implement what makes sense.

 

Hope this helps,

 

 

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

Jigg,

 

Thanks for those suggestions. 

 

That makes a lot of sense, pass the RunState.TestSockets.MyIndex to each measurement vi and have my sequence step set to sync one thread at a time for those vi's. Do something similar to this for my com communications. 

 

Thanks for getting me on the right path!

 

-Derrick

0 Kudos
Message 3 of 4
(3,173 Views)

Attached is a quick and dirty vi that shows how this will work.

I Hope this helps the next person looking for this solution!

0 Kudos
Message 4 of 4
(3,159 Views)