08-21-2013 03:22 PM
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)
08-21-2013 03:26 PM
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.
08-22-2013 01:26 PM
how do i determine the message ID?
08-22-2013 01:38 PM
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.
08-22-2013 02:01 PM
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?
08-23-2013 09:50 AM
@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.
08-23-2013 10:00 AM
Ok thanks a lot!!