03-19-2008 12:21 AM
03-19-2008 10:39 AM
03-19-2008 10:41 AM
03-24-2008 12:05 AM
HI All,
Thanks for your comments...
But my requirement is, I want to know whether a step is executed by multiple threads dynamically. I believe the lock methodology pointed out by you is static in nature. However I need to determine the step nature(multiple thread executing a single thread at a time) dynamically at run-time and once this scenario occurs.. I need to obtain the lock dynamically to that step. So in this case, even when multiple threads trying to exectue a step.. my module will create a lock dynamically on that step and that in turn allows the step to permit only one thread to execute at any point of time...
waiting for your reply,
Thanks
ArunPrasath E G
03-24-2008 10:01 AM
03-24-2008 10:03 AM
03-24-2008 11:19 AM
03-24-2008 11:42 PM
Thanks All for your comments
Thanks
ArunPrasath E G
12-08-2016 06:56 PM
Hi Doug,
I've an application with steps that have a locks set at the Properties>Synchronization>"Use Lock to Allow......".
These steps call the VI "X" and it handles or use some HW resources which are shared among the threads (Test Sockets of a Parallel Model). But now I have to expand the functionallity and sometimes the VI "X" will be called into anothers VIs but not from another steps anymore.
Possible solution would be to get the Lock name or object programatically and somehow get into this lock queue (or whatever way it works) or at least call it progamatically to get a chance to use the VI "X" as well the HW resource associated to it.
Definitally the VI is set to non-reentrant which seems to be a lock to the VI but I wonder of Test Stand and LabView are able to handle that simple because reentrance is not hold by a explicity lock but probable a implicity one.
Seems that you know how to call it programatically by your comment.
I've been digging into APIs but still not find that. Might you kindly share you finds about it if you got my ideia.
Best regards
Arminio
12-09-2016 08:18 AM
It is possible to access and use TestStand locks programmatically, however if all of your code is written in LabVIEW, you might want to use a labview Semaphore internally in the VIs instead (see LabVIEW help for details).
To access a TestStand lock in labview you will need a reference to the SyncManager which you can get from the TestStand engine API Engine.GetSyncManager. You can then use that reference with invoke and poperty nodes for the TestStand Synchronization Manager COM server. The Mutex object type is the one that corresponds to a TestStand lock. See the TestStand help file for more details.
Hope this helps,
-Doug