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,
ArunPrasath E G
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.
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,