Table Of Contents

Wait on Notification (G Dataflow)

Last Modified: January 12, 2018

Waits until a notifier receives a notification and returns the notification.

This node continues to execute if the notifier receives a notification. If a notifier reference becomes invalid because another node releases it, this node stops waiting and returns an error.

Programming Patterns

Use Send Notification to send a notification to this node.

connector_pane_image
datatype_icon

notifier

A reference to a notifier.

datatype_icon

ignore previous

A Boolean value that determines whether to ignore notifications that are sent to the notifier before this node executes.

True If the notifier contains a notification before this node executes, this node ignores the previous notification and waits until the notifier receives another notification.
False If the notifier contains a notification that was sent before this node checks for it, then this node does not wait.

How Do Message Timestamps Affect Behavior?

Each unique instance of this node remembers the timestamp of the last notification it receives.

If ignore previous is set to True, this node always waits for a new notification, even if the notification currently in the notifier is one it has never seen before.

If ignore previous is set to False, each instance of this node waits if the notification in the notifier has a timestamp for the same time that the instance of the node last executed. If the notification is new, then this node returns the notification in the notification output.

Default: False

datatype_icon

timeout in milliseconds

Number of milliseconds that the node waits for the notifier to receive a message before timing out.

Default: -1 — The node never times out.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

notifier out

Reference to the notifier.

datatype_icon

notification

The last message the notifier receives.

The data type of this output changes to match the data type of the notifier.

datatype_icon

timed out?

A Boolean that indicates whether the notifier received a notification before the node timed out or an error occurred.

True The notifier did not receive a notification before the node timed out, or this node generated an error.
False The notifier received a notification, or an error occurred before this node executed.
datatype_icon

error out

The node produces this output according to standard error behavior.

This node can return the following error codes.

1122 The reference became invalid while the node was waiting for it.
spd-note-note
Note  

This is not a comprehensive list of errors this node can return.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Preventing Deadlock

If you experience deadlock when you use this node repeatedly with different notifiers, you can replace this node with Wait on Notification with Notifier History, which stores timestamps for each individual notifier and prevents deadlock.

Removing Notifications

This node does not remove the notification from the notifier. The notification remains in the notifier until all Wait on Notification nodes return the notification. While the notification remains in the notifier, each Wait on Notification node will return a given notification only one time. If you want to remove a notification from a notifier before all Wait on Notification nodes return the notification, use Cancel Notification.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics