LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

consumer for different frequencies

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 !

0 Kudos
Message 1 of 3
(2,270 Views)

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

 

 

Andrew Valko
National Instruments Hungary
Message 2 of 3
(2,239 Views)

Howdy,

thanks for reply. I will stick to your solution. I forgot, that this is what queues is primarily for, many producers one consumer 🙂

0 Kudos
Message 3 of 3
(2,236 Views)