LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Producer Consumer loop

Solved!
Go to solution

Simply change the type of your queue data. Make the data type a 2D array and enqueue the whole thing.

 

Generally speaking though I don't create queues of a specific data type. I prefer a generic format for the data I queue. I generally use a cluster consisting of 2 elements. The first is either a string or an ENUM which is a message type. The other element is a variant. This simple messaging protocol makes it very easy to send different types of controls messages to your consumer loops. A fixed data type means it is difficult to modify or extend the functionality of the consumer.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 21 of 26
(984 Views)

Mark Thanks once again for your replies and help!



Here is what I tried. The data that's read in from the producer loop  is already
displayed in a 2 D array so I took that wire and tried wired it in to the
enqueue  without having the index array that I initially had. This did not work
because it showed a 2 D array going in to the 1 day array enqueue  input side.
Also when it is dequeued the output element is also a 1 D array.

0 Kudos
Message 22 of 26
(963 Views)

@*E* wrote:

Mark Thanks once again for your replies and help!



Here is what I tried. The data that's read in from the producer loop  is already
displayed in a 2 D array so I took that wire and tried wired it in to the
enqueue  without having the index array that I initially had. This did not work
because it showed a 2 D array going in to the 1 day array enqueue  input side.
Also when it is dequeued the output element is also a 1 D array.


The data type that you endequeue must be the same type that you wired to the Obtain Queue. Change that to a 2D array and all should be fine.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 23 of 26
(961 Views)

thanks!

0 Kudos
Message 24 of 26
(957 Views)

Dear All,

 

Can anybody help me to convert this programming file to 2011 labview file or older version. This file was used version 2012. Thank you for the help.

0 Kudos
Message 25 of 26
(927 Views)

Duplicate.

 

The only thing worse than asking once in the wrong forum, is to ask twice in the wrong forum.

0 Kudos
Message 26 of 26
(922 Views)