LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically change the number of producers in a producer/consumer architecture

Solved!
Go to solution

Hi All,

 

I've got 3 SoMat eDAQ's that I am streaming data from at 10Hz. I'm planning on 3 producer loops and one consumer loop to handle processing.

 

I'm pretty certain when I show my customer they will want to increase the number of devices. This then scuppers the producer/consumer model unless I can programatically change the number of producers and the rest of the associated architecture.

 

Is there a way to do this or a better architecture?

 

Phil

0 Kudos
Message 1 of 2
(2,085 Views)
Solution
Accepted by topic author therealkilkenny

As long as there is an ID of some sort in your Queue command, I don't see why your consumer can't handle as many producers as you might need.  I would turn the producer code into a subVI.  Make that subVI reentrant.  Then you can dynamically call that VI as many times as is needed, one per instrument.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(2,083 Views)