LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Certain subVIs that all use the same queue

Hello again,

 

I just had a problem fixed with calling a subVI and having it flash on and off. Now I come with a separate problem.

 

I'm testing different front panels that all process the same data, just in different ways. I tried to use an event structure to call on my subVIs similar to the example "New Event Handler". However, the data from the VISA connection would only update once every time I closed a subVI front panel.

 

Is there a way I can do something similar but have my data constantly streaming? So far I have one subVI programmed and am looking to program others once I figure out the proper way to call them.

 

Here's the code for my main VI and my sub VI, respectively.

scale_to_sub_vi2.PNG

scale_to_sub_vi_subvi1.PNG

 

I apologize for asking multiple questions in a row, I just keep hitting walls.

 

And thanks in advance.

_____________________________

0 Kudos
Message 1 of 3
(2,073 Views)

Attach your code (replace the VISA stuff with a random number generator). Your picture only shows one subVI, so it does not correspond to what you are saying.

From a picture, we also cannot tell anything how the calls are configured.

 

If several subVIs nibble on the same queue, only one of them will get the data. That seems obvious.

0 Kudos
Message 2 of 3
(2,065 Views)

@altenbach wrote:

If several subVIs nibble on the same queue, only one of them will get the data.


I feel that this is exactly what the OP is running into.

A queue is a multiple writer/single reader tool. Having multiple readers to a single queue messes up the expected functionality.

So either you have to work with multiple queues, or with mechanism supporting multiple readers like

Notifier

User Event

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 3
(2,056 Views)