LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enqueuing and deqeuing clusters of array

there is another vi that reads the data inside the producer loop, and I use the output (as an array) and display it to various graphs(all inside the producer). So yes I do have 100 graphs produced, but they are displayed on 10 graphs only (depending on which one you want to see)

0 Kudos
Message 11 of 17
(725 Views)

In that case you do not necessarily need to use a case statement in the producer. You can build the message using the array from your reader VI and the channel designation. The consumer can then use the 2D array as I suggested. No need for a case structure will 100 cases.



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
0 Kudos
Message 12 of 17
(722 Views)

how do i determine the message ID? 

0 Kudos
Message 13 of 17
(699 Views)

When you read from the HW you should know which channel you are reading. From this you should be able to determine the channel ID. It would be more helpful to see you actual coude that you are using to get the data from the HW. It would be easier to suggest a method to get the ID. The message cluster that I defined could be changed to use a number instead of the string. That couyld be used as the index into the 2D array used in the consumer loop.



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
0 Kudos
Message 14 of 17
(693 Views)

actually the code is way too big to post right now, but I attached a copy of the case structure I already have.

 

 

The 0-99 counter is the index i have from the vi that reads from the hw.

So based on this I would select which case is appropriate...and I guess I could just use "0" and "1" instead of "channel 0" and c"channel 1" to build the message.

Right now i only have 2 cases...but I would need 100 cases right?

 

 

 

 

 

0 Kudos
Message 15 of 17
(688 Views)

@developer001 wrote:

actually the code is way too big to post right now, but I attached a copy of the case structure I already have.

 

 

The 0-99 counter is the index i have from the vi that reads from the hw.

So based on this I would select which case is appropriate...and I guess I could just use "0" and "1" instead of "channel 0" and c"channel 1" to build the message.

Right now i only have 2 cases...but I would need 100 cases right?

 


No, the way that I am suggesting you would not need a case statement at all. At the moment I don't have time to post updated code to illustrate what I am suggesting. I will try to post something later today or over the weekend.



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
0 Kudos
Message 16 of 17
(652 Views)

Ok thanks a lot!!Smiley Happy

0 Kudos
Message 17 of 17
(650 Views)