LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i have 3 tasks. i want to enqueue them and have at the dequeue VI only the information providing to the most priority tasks.

i am working in a real time application. i have 3 tasks. i want to enqueue them  and have at the dequeue VI only the information providing to the most priority tasks. please, how can i do.i tried for a long time ago but  i cannot do it and i don't speak english very much so, an example will help me very much. thanks.

0 Kudos
Message 1 of 4
(3,263 Views)

As you know, elements are removed from a Queue ("dequeued") in the order they were put on the Queue.  If you have a loop looking at the Queue and trying to dequeue from it, whatever is "first" will be the next thing to be dequeued.

 

The concept of "priority" is interesting -- how do you decide on a priority?  How does the Queue (which is just a wire with data, after all) distinguish between High and Low priority requests?

 

One technique that might work (but think carefully about this) is to use "Enqueue at Other End".  For example, if I have operation A, B, and C on the Queue, and while doing Operation A I discover an error that makes me want to do Operation Q (for Quit) next instead of B (which is "next"), I can Enqueue Operation Q "at the opposite end" so the Queue looks like Q, B, C, and will do Q next (which, one hopes, flushes the Queue and exits).

 

Bob Schor

0 Kudos
Message 2 of 4
(3,224 Views)

It sounds like you're looking for a Priority Queue, and I found these. I cannot test them on a Real Time system.

https://decibel.ni.com/content/docs/DOC-18938

https://decibel.ni.com/content/docs/DOC-18274

0 Kudos
Message 3 of 4
(3,212 Views)

OK you don't speak English much--

 

To be honest you're english is better than my Mandarin.  Show what you have done.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(3,178 Views)