Will LabVIEW Queues or Semaphores Work Between Executables?

Updated Feb 12, 2018

Reported In

Software

  • LabVIEW

Issue Details

I have created two VIs that communicate with each other through a queue or semaphore. Inside the LabVIEW development environment, the communication works fine. However, when I build one VI (or both VIs) into an exectuable, they no longer communicate with each other. Should queues and semaphores work between executables?

Solution

No, queues and semaphores cannot communicate between LabVIEW executables.

Additional Information

A reference to a queue or semaphore is only valid inside the process in which it was created. When both VIs are running in the LabVIEW development environment, they both belong to the same process. When you build the VIs into executables, each executable becomes its own process. So the reference created inside one executable is meaningless inside the other executable.

In order to accomplish this with semaphores you can access the refnums across executables or even the network through a "Call By Reference" using VI server.  More information about how to set this up can be found here.

Once the VI Server is properly set up, each semaphore reference can be called from multiple VI's or executables across the network to take advantage of the semaphore functionality in your overall system application.

WAS THIS ARTICLE HELPFUL?

Not Helpful