LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Three Data Sets Into One Text File

Solved!
Go to solution

Hello again,

 

I've tried to set up a consumer/producer structure but I'm unsure of what to do next for it, such as what further wires do I need to place etc. I tried looking at examples on here but the vi's all looked too complicated for me to learn from.

 

The latest version of my vi is attached if anyone cares to look at it.

 

Thanks.

0 Kudos
Message 11 of 19
(695 Views)

I've cleaned the structure up a bit and have attached it to this post, but still I can't get it to work. I can't wire the merge signals into the enqueue function?

 

I would really appreciate some help to get this working, so it would be great if someone could modify my vi slightly? Smiley Sad

 

 

0 Kudos
Message 12 of 19
(680 Views)
Solution
Accepted by topic author AT12

You need to supply the data type to the queue.  I would use a cluster with the signals and a boolean for the stop.  Also, the two loops cannot have any data dependency or else they can't run in parallel.  To visualize it better, put the consumer loop below the producer loop.  I also tend to let the consumer loop close out the queue just to make sure all of the data was processed.  If you don't understand something, ask.  The point here is for you to learn.


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 13 of 19
(667 Views)

Many thanks, it helps to see it on a vi as I'm very new to this! Much appreciated.

 

I follow what you say and have done, however I'm still not sure about the Bundle by Name function: do I have to name the three elements before it works? The other thing I don't understand is the box in pink above it, what is this and what do I have to do to it?

 

Sorry if these questions are on the boring scale by the way!

 

Thanks again. Smiley Happy

 

 

0 Kudos
Message 14 of 19
(660 Views)

@AT12 wrote:

Many thanks, it helps to see it on a vi as I'm very new to this! Much appreciated.

 

I follow what you say and have done, however I'm still not sure about the Bundle by Name function: do I have to name the three elements before it works? The other thing I don't understand is the box in pink above it, what is this and what do I have to do to it?

 

Sorry if these questions are on the boring scale by the way!

 

Thanks again. Smiley Happy

 

 


Actually, there are only 2 items in the main cluster.  Apparently the dynamic data is really a cluster of array of cluster.  I think the little pink box you are referring to is a cluster shown in icon form (right click it and uncheck "view cluster as icon" if you don't believe me).  I did that only to save space.  To use the bundle by name, just label the constants inside the cluster.  Looking at my code again, it looks like I labeled the array inside the cluster that is inside the cluster (confusing enough?).  All you care about is the dynamic data and the boolean.


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 15 of 19
(649 Views)

Right, thank you! I'll do battle with it again and let you know how I get on.

 

Cheers!

0 Kudos
Message 16 of 19
(646 Views)


Actually, there are only 2 items in the main cluster.  Apparently the dynamic data is really a cluster of array of cluster. OK  I think the little pink box you are referring to is a cluster shown in icon form (right click it and uncheck "view cluster as icon" if you don't believe me). YES  I did that only to save space.  To use the bundle by name, just label the constants inside the cluster How is this done?.  Looking at my code again, it looks like I labeled the array inside the cluster that is inside the cluster (confusing enough?).  All you care about is the dynamic data and the boolean.

 

I've highlighted some sections of your above reply including one question. Also, my second question is do I have to do the same to the Cluster Icon that feeds into the Obtain Queue function.

0 Kudos
Message 17 of 19
(640 Views)

Right click on an element inside the cluster and choose Visibile Items->Label.  Change the labels to whatever you want.  Whatever you label them is what will show up in the Bundle By Name and Unbundle by Name.


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 18 of 19
(637 Views)

Brilliant, thanks for that. I shall give it a go.

0 Kudos
Message 19 of 19
(632 Views)