Occurrences have been around since LabVIEW 3, I think. Notifiers have
not.

I don't know who recommended Notifiers over occurrences IN GENERAL.

All you're interested in is the fact that an update OCCURRED. When
that happens, you will call the Data Source VI and ask for some
channel's new data.

A notifier has a data type and carries data when it's triggered.  In
this case, what would you carry via the Notifier?
I suppose you could carry the whole new data array, but that's making
copies of the big array again. Yuck.

I suppose you could tell the Data Source that Notifier X is now
assigned to channel Y, so when updated, it could poke channel Y's data
into the Notifier.  That's not too bad.  You have to call the Data
Source with a Notifier ID, and a channel ID, and a function of "Set
Channel". Whenever the channel selector changed, you would do that
again.  Whenever the notifier fired, the data would be right there.  I
suppose that's workable.

My idea was that each window generated an occurrence upon opening. It
called the Data Source with a function of NOTIFY ME, passing its
occurrence.
The Data Source appends that occurrence to an internal array.
When Updated, the Data Source went thru the array and triggered every
occurrence (there might be 1 window or 9 windows open).

When a window closed, it called the Data Source with a function of
"STOP NOTIFYING ME", and the occurrence.  The Data Source would find
that occurrence and remove it from its list.

In the Window code, there would be a WAIT ON OCCURRENCE - this would
wait for 500 mSec or something.  If Timed out, it just checks for the
DONE button or something.
If NOT timed out, it was triggered. So call the Data Source with the
current channel number and replot the data you get back.

Reply via email to