LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanel & queues

I'm trying to develop an application that involves a number of
subpanels that contain subvis which communicate with the main vi
through queues.

I think that what I want to do is have the main vi create a named
queue (obtain queue, create if not found = TRUE) and have the subvi
call obtain queue with the same name and create if not found = FALSE.

The problem arises when I wire things up this way and then run the
main vi. The subpanel loads the subvi's front panel (invoke
node->insert vi), but even when I wire up a "Run VI" or "Open FP" node
with the reference branched fron the "Insert VI" node's input, I get
hung execution because the "Obtain Queue" in the subvi can not find
the queue created by the main vi.

I have reviewed the Queued Message Logg
ing example and wonder how the
three vis in that example are linked to open one another when run or
edited. I wonder if I need to link my vis in a similar fashion to
make the queue from the mian visible to the sub.

I welcome ideas...

For the record, I'm using LabVIEW 7 Express.
--
Todd Trimble
trimble@sep.com
0 Kudos
Message 1 of 3
(2,896 Views)
Use data flow to ensure that the que is created prior to running the VI...

Are you sure it's the obtain que that hangs? It would normally just return immediately with error code 1100.
Perhaps it's the subVI that has a loop in it so that the caller's loop hangs when the VI is run due to it waiting for the subVI to return(?)

If the subVIs are to run in parallell call them using an invoke node with the run metod and the wait until finished set to false. Do it after you have created the que, or make the subVIs wait until error 1100 goes away..or let them create the named que if it does not already exist... You already have the front panel loaded into the subpanel haven't you(?)..no need to open the panel.

Separate the subPanel concept with how you call and serv
e data to the subVIs...those things are done just as before, the subpanel just gives you a view of the subVIs panel.
Message 2 of 3
(2,896 Views)
Thanks.

Turns out my problem was even more silly than I thought. A reboot
fixed the problem.

My largely uneducated opinion is that I had run the thing so many
times debugging (mostly creating, but never destroying the queue) that
I was experiencing memory allocation problems.

Todd
0 Kudos
Message 3 of 3
(2,896 Views)