02-28-2008 12:20 PM
02-28-2008 11:56 PM
Hello,
Thanks for ur response, tst. I will try the LV2 style global method.
Has anyone got this (synchronisation of VI execution) working on PDA? If yes, what was the method used? Actually, what i need is this: The same Sub-VI (what we have developed) gets called in multiple parallel running loops of a LabVIEW application & hence some mutex is needed in this Sub-VI to avoid getting clobbered. I hope i have made myself clear...I need to get this working asap.
Thanks & Regards,
Subhashini
02-29-2008 02:04 AM
If the VI contains all the code it needs, then it serves as a mutex without needing anything else.
By default, any VI is reused whereever it's called, so that if it is called from more than one place at the same time, the other places will wait until the first call was finished.
Unless you explicitly change the VI to be reentrant, it will continue to behave like this, so it's already mutexed, but this comes with the important condition that all the code must be inside the subVI.
02-29-2008 03:44 AM
Hello tst,
The mutex is needed because the Sub-VI accesses hardware & it is necessary that the Sub-VI does not execute at the same time when it is called from multiple loops. I feel that the behaviour of the VI is different from what you have said, so i guess it doesn't have all the necessary code.
Thanks & Regards,
Subhashini
02-29-2008 04:14 AM
Here's an example - the subVI has a 2 seconds wait.
As you can see, this causes the loops to alternate, because when one loop is inside the subVI, the other loop has to wait until the call is finished. This guarantees a lock and I believe it should work the same on the PDA. If you put all your hardware calls inside the subVI, it should be protected.
03-18-2008 07:17 AM
Hello All,
Wanted to share this news with u all:
1. When i replaced the 'Release Semaphore_71.vi' call with 'Release Semaphore.vi' call, the application on PDA works ok!:) But i found some issues - Sometimes, on a 'Acquire Semaphore' call or 'Release Semaphore' call, the application crashes.:(
2. I found that the 'semaphores' & 'queues' work better in the actual application on PDA rather than the LabVIEW semaphore example programs!
Thanks & Regards,
Subhashini