could someone upload an example where you have a Producer/consumer in the main-vi which calls another sub-vi which is a consumer.
I'd like to know how the architecture looks like and also how you use a Queue betweent two distinct VIs.
Personally, I feel that Producer/Consumer belong on the same block diagram since they are accomplishing a single task.
But if you are actually referring to a Queued Message Handler, which is sort of a mix between a State Machine and a Consumer, then that belongs in its own VI. These are sometimes also referred to as Actors. What I like to do with my QMHs is to have a library containing the QMH, an Action Engine for the queue that is private to the library, and public VIs that are used for the messages that can be sent to the QMH. This helps ensure the messages are properly formatted and simple for developers/users of the library to use.
With a queue it's not going to work. You basically want two consumer's, both consuming the same queue. Basically a Producer\Consumer\Consumer (or two separate P\C's)...
For a traditional Producer\Consumer, it's very easy to put the consumer in a sub VI. Simply select the bottom part, and use Create SubVI...
The queue is not fitted for two consumers. A user event is. The producer can send the events and as many consumers as you want can consume them.
..Actor framework in LabVIEW that will definitely make easy architecture for your future projects.
If you'd ask me, AF will make every project architecture much more difficult. Not the place for a flame war though... Just know that some people love AF, some don't. Doesn't seem to be much in between: you love it or you hate it. That's OK, both can co-exist.
I attached a little Project, for better visualization. What I'd like to do is to load the graph to the subpanel, in the main vi`s front panel determine Amplitude and Phase of the sinusoid and then pass These values via a queue to the subvi. How can I make this work?