05-12-2009 06:58 AM
Hi,
Is it possible to pass a semaphore with datasocket? I created an indicator for the semaphore but its Data Binding property is not available. Its property node does not allow a write to the data bindingpath attribute. I have 6 identical executables that monitor data from different machines. Each executable has one read.vi that retrieves data from the machines by a using .dll code, and I'd like to use semaphore to prevent data conflict when the dll is called.
Thank you for your help,
05-12-2009 09:03 AM
05-12-2009 09:10 AM
nathand wrote:
Fundamentally this will not work. Semaphores (like queues and notifiers) exist only within a single LabVIEW instance, so your 6 executables cannot share a semaphore. If you only want one application to call the DLL at a time, one solution would be to write an additional application that calls the DLL, then have all of your executables use VI server to run the VI inside that application that calls the DLL.
Big "thumbs up" for that one.
I used the same technique myself but used an Action Engine instead of the dll. Works good, lasts a long time. The timeout for the VI-Server also helps prevent lock-ups if the connection fails in the middle of the call.
Ben