11-26-2015 06:13 AM - edited 11-26-2015 06:30 AM
The way my main seq is set up is it does nothing by itself, just makes calls to other sequences (call them seq1, seq2, etc.). I now want to have two UUTs using the parallel model but, since I only have one multimeter, wanted to use locks. Will a UUT in seq2, for example, recognize a lock that was set up in seq1??
All sequences use the dmm in one way or another. The reason I dont want to use the locks in the main sequence is that there are things inside the individual calls(serial writing, waits, etc.) that I have no problem doing in paralell, because in those instances I have more than one piece of hardware.
So, for example, when UUT1 is measuring current in seq2, UUT2 is reading/writing diagnostics through its own serial port in seq 1 . After UUT1 releases the dmm, UUT2 gets access.
Also, the calls need to be in order (seq2 after seq1 is completed) for every UUT.
Solved! Go to Solution.
11-30-2015 08:52 AM
If you begin a lock name with an asterisk (*) then it becomes global to the station. For example "*DMM" as the name of your lock will be shared across the station.
11-30-2015 10:13 AM
I've been playing around with it today, one thing I was trying is putting an early unlock in the main's cleanup (in case of individual sequence failure, the test goes straight to the main's cleanup). I'm getting a run-time exception "Attempted to unlock a lock that is not locked by this thread".
Isn't this better than putting the unlock in every sequence's cleanup?
12-01-2015 01:19 PM
I wouldn't say that is better. It works against modularity to unecessarily separate the unlocks from the locks. Better to have the sub-sequences cleanup properly in all cases rather than hard-code assumptions about how they are implemented into calling sequences.