03-28-2013 10:17 AM
Hello,
what is the proposed architecture for consumer that muxes multiple producers with different frequencies ?
Example: DEV1 goes 100 Hz, DEV2 goes 50 Hz. You need to mux the data together in order to get 1 list to simplify programming further and boost searching performance and so on. The cluster contains DEV1,DEV2 , when there is no new DEV2 you keep the last value there.
I am deciding between multi-queue and functionalglobal. The queues seem better option to me.
Let me know your opinions. Thank you !
03-29-2013 03:51 AM
Dear Bublina!
You are correct, queues are generally a safer and more reliable way of transmitting data between loops.
The way I would do it is to have one single queue for all the producers with two items stored in the queue: 1 enumerated type and 1 variant. The ENUM can tell the consumer from which producer loop the data is coming from, and the variant can contain all the data sent. You can store the latest values of DEV1 and DEV2 in a shift register, and overwrite the one that was sent.
Please tell me what you think.
Regards:
Andrew Valko
NI Hungary
03-29-2013 03:59 AM
Howdy,
thanks for reply. I will stick to your solution. I forgot, that this is what queues is primarily for, many producers one consumer 🙂