NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to force testsockets to enter preUUT one by one and not at the same time in parallel model

I have 4 testscokets and I use parallel process model.

 

In preUUT sequence I :

 - first check how many parts were already tested

- and then if number of already tested parts is less than number of parts to be tested, I wait PLC to send me signal "new part ready".

-after that I add +1 to numer of parts already tested (count parts tested++)

 

The problem comes in situations when 2 or more testsockets enter preUUT at the same time and before PLC sends signal to first of the sockets and before I count +1 to parts already tested, the other sockets already wait for PLC signal.

 

I want to create some kind of "Lock" so that testsockets enter preUUT one by one. This will solve problem because there is a "wait" loop insice od preUUT in each of the sockets. 

How this can be realyzed in TS?

0 Kudos
Message 1 of 4
(2,420 Views)

Implement a module which provides the PLC communication and handles the synchronization of the sockets.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,403 Views)

What do you mean by module? 

 

I have communication between PLC and Labview implemented (Modbus)

0 Kudos
Message 3 of 4
(2,394 Views)

This makes it simpler: LV VIs are by default blocking. That means if each socket calls the same standard ("non-reentrant") VI, that VI blocks all sockets except the one it runs for currently.

As a result, you can implement the VI as such that it knows which socket calls it (RunState.TestSockets.MyIndex) and behave accordingly.

Is that already enough for your needs?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,392 Views)