Jump to content

How to handle extra data in a queue?


Recommended Posts

Posted

I'm sending data via a queue to my main VI in which I only care about the latest data. Currently I have the queue setup for a max size of 1 so sometimes I get an overflow in the transmitting VI. I'm wondering if this is a reasonable way to setup the queue. Or is it better to make the queue size bigger so the queue doesn't overflow and read all the data in the queue in my main VI and only use the last element?

 

George

Posted

Thanks. I am using the lossy enque element (figured that out the hard way a while ago) and it does work. I'm just wondering if that's the "right" way to do it. I suppose it probably is since there is a VI that purposely discards data to make room for new data.

Posted

Well the difference between a queue and a notifier is that notifier data is available after read, but you can get event like behavriou upon update.

 

Ton

Posted

If you only care about the latest data, a notifier is the guy you want.  A queue is for lossless data transfer.  A notifier is for lossy data transfer.

Posted

Notifiers are also event-like in that you can have a one to many broadcast: multiple tasks can be waiting on notification from the same refnum.

Posted
Notifiers are also event-like in that you can have a one to many broadcast: multiple tasks can be waiting on notification from the same refnum.

And one can have a single task waiting on multiple notifiers, which is also event like and something one can’t do with queues (though, unlike with the event structure, the notifiers all need to have the same datatype).

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.