LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Notifiers vs occurences

I was wondering if there is a preference amongst Labview Gurus
regarding the use of Notifiers vs occurences. We have an application
that uses occurences. Someone suggested that its better to use
notifiers but didnt give reasons. Can anyone lay down the pros and
cons for both schemes.
0 Kudos
Message 1 of 5
(3,269 Views)
Some pros for notifier that come to my mind :

1) Possibility to pass data. This is like a variable but without the
need of polling --> no CPU usage while waiting.

2) They allow to wait for multiple notifications --> possible to
synchronize more than 2 parts of independent code

3) A notifier can be cancelled easily.

4) It is not absolutely necessary to transmit the reference number of
a notifier to the different parts of code. You can use its name.

There is a description of notifiers in
..\examples\general\notifier.llb\Notifier BASICS Part 1.vi

If you only need to synchronize two independent parts of code, then
occurences will do the job very well. But if you need more
functionnality, then occurences are not the way to go.
0 Kudos
Message 2 of 5
(3,269 Views)
Thanks for a good answer. Few more things:
Do occurences use CPU time by polling? If not then I think I can leave
the code in the form it is now, and that is with occurences. I am
using occurences to sync two pieces of code and thats all, no data
passing etc.
Comments?
0 Kudos
Message 3 of 5
(3,269 Views)
CPU "goes to sleep" when waiting for an occurence --> same as for
notification. No reason to change your code for that.
0 Kudos
Message 4 of 5
(3,269 Views)
Thanks a lot, for your help
0 Kudos
Message 5 of 5
(3,269 Views)