LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Some help with sound output problem

LabVIEW ships with multiple examples of notifiers.  Launch the example finder (Help->Find Examples...) and type notifier into the search field.  You should get half a dozen or more hits giving simple to more complex examples.

At its simplest form, a notifier is a lossy broadcast mechanism.  You create it, then can post messages to it or read the last message.  There is no buffer.  Only the last message is available.  There is no guarantee of data being received, only of data being transmitted (there is a possibility of a message being overwritten with a newer one while a reader is processing a previous one).

If you absolutely must get all data, use a queue.  It is a point-to-point FIFO.  In use, it is similar to the notifier, but you typically have only one reader (multiple writers are more common).  Once you read a queue element, it is no longer there for other readers.

I would encourage you to make a few examples for yourself to figure out how the different options work.  Queues and notifiers are an important part of efficient LabVIEW programming technique.  Learn their use and they will serve you well.

One final problem solution.  Queues and notifiers are often read in a loop.  How do you exit the loop at the end of execution? Here are some options:
  1. Send a particular command through the queue or notifier that signals an exit.
  2. When the main instance of the queue or notifier finishes, release the reference with force destroy set to TRUE.  This will cause all instances of the queue or notifier which are waiting to immediately return default data and an error.  Look for the error and exit the loop on it.
Good luck.  Let us know if you need more help.
0 Kudos
Message 11 of 12
(303 Views)



Message Edited by Asa_K on 05-28-2008 05:22 PM
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
0 Kudos
Message 12 of 12
(295 Views)