From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Complex architecture - design pattern?

 


@grahamwebb wrote:

Ok, so can I create three queues, write the same value to each queue and read from one of the queues? Like this ..


you need a bit of data dependancy on the releas queue functions!  they will fire as soon as the queues are created!  wire error in from the producer loop output.   But, that is another way to get your desired operation.

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 16
(540 Views)

That looks good. I think I have another solution, modified from code on a different thread on the forum, which makes arrays of queues ..

0 Kudos
Message 12 of 16
(539 Views)

 


@grahamwebb wrote:

That looks good. I think I have another solution, modified from code on a different thread on the forum, which makes arrays of queues ..


Careful!  elements in an array must have the same data type!  so all of the queues are forced to use the same data type.  It can cause a mainteance headache if one of the consumers starts needing to do more things.  Yet, it solves this example well Smiley Happy

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 16
(536 Views)

I guess it could use an array of clusters

0 Kudos
Message 14 of 16
(532 Views)

 


@grahamwebb wrote:

I guess it could use an array of clusters


That doesn't get around the limitation- the clusters in an array must be identical!

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 15 of 16
(522 Views)

@grahamwebb wrote:

That looks good. I think I have another solution, modified from code on a different thread on the forum, which makes arrays of queues ..


Your attached vi cannot be stopped.  Press the stop button, nothing happens.  Your event structure is waiting for an event.  You need to add a Timeout case with nothing in it.  Also add a Stop Value Change event.  Put the stop button in this event case.  Wire a true constant out to the stop sign.  This is better stop handling.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 16 of 16
(515 Views)