Jump to content

"Wait on Notification from Multiple" output notifier values are wrong on error


Jim Kring

Recommended Posts

[CAR 45E9BHJ1]

If an error occurs while waiting on notifiers, previously fired notifiers are lost, as the \"notifiers out\" array is emptied. This bug is caused by \"Wait for All Notifications Sub.vi\" (vi.lib\\utility\\Wait for All Notifcations.llb\\Wait for All Notifications Sub.vi) clearing the \"fired notifiers\" array.

post-17-1168813290.png?width=400

Link to comment

Regarding the handling of errors in this VI, I just posted some additional comments (here), which are shown quoted below.

One more thing... the description of the "notifiers out" indicator (which is shown in the context menu when you hover over the indicator) states: "notifiers out is the entire array of notifiers in, unless an error occurs. If an error occurs, notifiers out contains only those notifier refnums that caused the error." However, this is not the actual (or the desired, IMO) behavior. If some notifiers are received before the error occurs (for example, if one notifier becomes invalid after others are received), then the notifiers and notifications received should be output to "notifiers out" and "notifications" (respectively). I don't think that it is entirely possible to know which notifiers caused the error, since the "Wait on Notification from Multiple" primitive does not tell you which notifier generated the error. We could infer which notifiers caused the error by checking if any of them are Not a Refnum. But, in any case, the user of this VI could make this check, themselves, if an error did occur. If this VI does actually need to output an array of notifiers that caused the error, then I would prefer if this were an additional output ("notifiers with errors") and we used "notifiers out" to contain the notifiers that were actually fired.
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.