LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Named Queues in VIs Launched by VI Server - Some Work, Some Don't

Solved!
Go to solution

I have some VIs that are built into packed libraries that communicate with each other through named queues.  The VIs are launched one after another using Invoke Nodes "FP.Open" and "Run VI".  Some of the named queues work, some do not.  A simple example is attached.  In the builds folder, There is a VIServer.exe.  It opens and runs Controller.vi and Controlled.vi. 

JohnEE_0-1715359635893.png

 

Pressing the "OK" button on Controller lights the LED on Controlled.  "ClientData" gets put into a queue when the "OK" button is pressed.  However, text in it is not passed to Controlled.

 

If you go into the SubVIs folder and run Controller.vi and Controlled.vi in LabView, both queues work as expected.

 

Does anyone have any idea what is going on?

 

Thanks!

 

John Madsen

 

 

0 Kudos
Message 1 of 3
(335 Views)
Solution
Accepted by topic author JohnEE

Your error wires are disconnected from your cluster queue in many places:

Kyle97330_0-1715380375277.png

Start by hooking those up, with an error handler that makes a popup.  There is a chance you're getting an error and don't know it.

 

There's a small chance you're closing the queues before the message is taken out. I recommend that you create them once outside the loop, and destroy them once the loop is done.  No need to keep on running the Obtain/Destroy each time.

 

However, I suspect you could be getting error 1094.  That's the "Queue types don't match" error.  You might think they match, but you're using a type defined cluster.  Even if the data is the same, if the type definition is different you will get an error:

Kyle97330_1-1715380777241.png

You might think they match, but the problem is that anything put inside of a PPL that isn't already from another PPL gets put into its own private namespace, so one of your type definitions is "Controller.lvlibp:ClientData.ctl" and the other is "Controlled.lvlibp:ClientData.ctl".

 

If that is your problem, then the solution is either to drop the type definition, or you have to put the type definition into its own LVLIBP file, then reference that type definition in your VIs before building the other two into LVLIBPs on their own.

Message 2 of 3
(307 Views)

Thanks so much, Kyle.  A lot of good information.  The different name spaces is the key.  The example I posted was just a simplified test.  I built my actual set of VIs into PPLs with the "Disconnect type definitions" box checked in "Additional Exclusions" and everything is good.

0 Kudos
Message 3 of 3
(220 Views)