From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reliability of SASE (Notifiers)

I pass commands to code all the time.  When I require data back, I usually include a "Self-Addressed Stamped Envelope" in the form of a newly-created Notifier which the receiving code can use as the return channel.

 

Using this method, I recently ran into some unusual behaviour.  Some of the thus created Notifiers seemt o miss notifications.  I'm reading them with "ignore previous" set to false, so no data should go missing but it does.  I manage my many notifiers in an array and test each one repeatedly until it has returned a certain value (meaning the asynchronous process has finished).

 

When I run the code included below, I run into problems but don't quite see why this should be the case.  As usual, I'm probably doing something stupid.

 

I'm using LV 2015 SP1.

Message 1 of 31
(3,835 Views)

Ah I found it out.  This is the reason why the node "Wait on multiple Notifiers" exists.......

 

Two different notifiers with the same timestamp at the same read node will NOT return two values as the node records only a single timestamp and is not aware of the differences between notifiers.

 

Learned something today again.

 

Shane

Message 2 of 31
(3,808 Views)

I suspected the same, in having a look I just noticed the "wait on notification from multiple with notifier history" node, which may also solve the problem.

 

Message 3 of 31
(3,797 Views)

I have also tried the "Wait on Notifier with Notifier History" fromt he Advanced pallette.

 

By feeding this node continually new notifiers, does this not require a large allocation of Timestamps in order to maintain correct functionality?  Or does the list somehow react to destruction of the appropriate notifier.  I ask because after letting it run for approximately 20M unique notifiers, my memory usage did not increase.

 

After over 20 years of programming LV, I finally found out what these other Notifier functions do.  Nice.

Message 4 of 31
(3,789 Views)

I can't comment, I didnt even notice those additional functions until I was looking at your code 10 mins ago....

0 Kudos
Message 5 of 31
(3,785 Views)

Yes, a direct replacement into the original VI of the Wait on Notification with Notifier History works.

 

I never knew the difference between these, thanks for the post.

CLA
0 Kudos
Message 6 of 31
(3,773 Views)

Thanks for the reminder.  This was discussed years ago over on LAVA and I believe the Queue-father (aka Aristos Queue) himself investigated the cause of a similar unexpected behavior and was instrumental in the fix, as found in the Notifier's advanced subpalette.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 7 of 31
(3,747 Views)

Well maybe I need to give AQ a call.  As I see it, the memory usage of the "Wait for Notifier with history" is unbounded.  If I constantly create, read and destroy notifiers, memory usage (presumably due to the node maintaining timestamps for ALL of the notifiers) increases steadily.

 

I have a tight loop running (approx. 100k Notifiers per second) and will leave it running overnight.  Memory has already increased from 1443 MB to 1670 MB. Presumable it will eventually crash LV.  It would be nice to have the option to "reset" the timestamp memory somehow.

Message 8 of 31
(3,737 Views)

Now i'm at 2176 MB and waiting for armageddon....

0 Kudos
Message 9 of 31
(3,727 Views)

As a tangential question, why are you using Notifiers for this use case?   For a single-use "self-addressed stamped envelopes" I use one-element Queues, not Notifiers.  No timestamps, no history.  To wait on multiple replies I just wait on the Queues one after another; I don't poll them.

Message 10 of 31
(3,703 Views)