LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

queues

Can the same queue be called up from different vi's? I want to use one queue in 3 parallel loops, one to acquire 2D data, one to display the data, and one to send this data to a second queue holding this data in a 3D array. I want to call this second queue with the 3D data from someplace else in my program. I think it can be done ... just need to know for sure.
 
Paul
 
LV 7.1
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 10
(3,461 Views)
Yes you can. Just Obtain a named queue in one vi and Obtain the same queue in the other vi

Paolo

Message Edited by pincpanter on 02-20-2006 04:56 PM

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 10
(3,455 Views)
Use Queues with CAUTION!  They will work fine if you plan to use them with LabVIEW Developer because all VIs share the same PID.  The problem that is not well documented is that if you build these program into an application and run them they as two different program they will have two different PIDs and the queue will NOT work.  This comes from a very painfull experience so I do know this as a fact.
 
If you have LV 8.0 use the Shared Variable and all will be OK for development and deployment.
 
Matt
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 3 of 10
(3,439 Views)
The overall vi total is huge in my application. About 500+. But I build one single application/exe. It should be OK, right?
 
Paul
7.1
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 4 of 10
(3,430 Views)
Yes, as long as it is only one VI. 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 5 of 10
(3,423 Views)
That makes sense. Thanks!
PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 6 of 10
(3,416 Views)
You can launch multiple LabVIEW applications and have them communicate via queues (e.g. NI-SCOPE Soft Front Panel).  The key is to launch them into the same application instance (same run-time engine).  You do this by opening an application reference and launching the VI into that specific reference.  If you use the same port for all the apps, you will launch into the same run-time engine.  See the attached image for an example (taken from a LV7.0 VI).  You will also need to set up the LabVIEW server correctly.  For the attached image, the following was added to the application INI file:

socketsetreuseaddr=false
server.tcp.enabled=true
server.tcp.port=3301
server.tcp.access="+localhost"

These can also be set in the options menus, but not for an application.
Message 7 of 10
(3,388 Views)
DFGray,

That looks really neat.  I am having a hard time finding the example. Do you have any more information about it (filename, etc)?
0 Kudos
Message 8 of 10
(3,366 Views)

In our specific case we wanted separate applications because one was a master program and the other apps were simulators.  We wanted to stop and start the master application without killing the simulators.  We finally ended up using TCP to get around this almost undocumented "feature" of the queue.  Cost me a few weeks so still stings a bit.

Your example shows you if you try hard enough you can find a work around to almost any issue.

Matt

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 9 of 10
(3,348 Views)
That screenshot came from the second VI in the launch sequence for the NI-SCOPE Soft Front Panel (installed with NI-SCOPE).  So far as I know, there is no example of how to do this.  I could not find one and, unfortunately, don't have the time to generate one (project is in crunch time).  It really is as simple as launching your VIs into a specific application instance, so the screenshot and INI snippet are all you need.  If you really need an example, let me know and I will try to find time to generate it.
0 Kudos
Message 10 of 10
(3,322 Views)