LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

semaphore with data socket

Highlighted

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,

0 Kudos
Message 1 of 3
(975 Views)
Highlighted
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.
Message 2 of 3
(956 Views)
Highlighted

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(954 Views)