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?