05-20-2019 07:51 AM
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?
05-20-2019 09:12 AM
Implement a module which provides the PLC communication and handles the synchronization of the sockets.
05-20-2019 11:53 PM
What do you mean by module?
I have communication between PLC and Labview implemented (Modbus)
05-21-2019 01:25 AM
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?