Table Of Contents

Trigger Detector (G Dataflow)

Last Modified: March 15, 2017

Finds the first level-crossing location in a signal.

connector_pane_image
datatype_icon

trigger slope

The edge or slope in which the node detects the trigger.

This input accepts a ring or a 1D array of rings. This input accepts a 1D array of rings when signal is a 1D array of waveforms or a 2D array of double-precision, floating-point numbers.

Name Value Description
falling 0 Detects a trigger on the falling edge, or negative slope.
rising 1 Detects a trigger on the rising edge, or positive slope.

Default: rising

datatype_icon

reset

A Boolean specifying whether the history, or internal state, of the node has to be reset.

True Resets the internal state of the node.
False Does not reset the internal state of the node.

This input accepts a Boolean or a 1D array of Booleans. This input accepts a 1D array of Booleans when signal is a 1D array of waveforms or a 2D array of double-precision, floating-point numbers.

The internal state contains the final state of the input signal. This node uses this as the initial state the next time this node is called.

Default: False

datatype_icon

signal

Input signal.

This input accepts the following data types:

  • Waveform
  • 1D array of waveforms
  • 1D array of double-precision, floating-point numbers
  • 2D array of double-precision, floating-point numbers
datatype_icon

level

The threshold value that the input signal must cross before a trigger is detected.

This input accepts a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers. This input accepts a 1D array of double-precision, floating-point numbers when signal is a 1D array of waveforms or a 2D array of double-precision, floating-point numbers.

Default: 0

datatype_icon

hysteresis

Amount above or below the threshold level through which the input signal must pass before a trigger level crossing is detected.

This input accepts a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers. This input accepts a 1D array of double-precision, floating-point numbers when signal is a 1D array of waveforms or a 2D array of double-precision, floating-point numbers.

Using Hysteresis to Detect A Trigger Level Crossing

Trigger hysteresis is used to prevent noise from causing a false trigger. For a rising edge trigger slope, the signal must pass below level - hysteresis before this node detects a trigger level crossing. For a falling edge trigger slope, the signal must pass above level + hysteresis before this node detects a trigger level crossing.

Default: 0

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

dt

Sample period of the time-domain signal in seconds.

Set this input to 1/fs, where fs is the sampling frequency of the time-domain signal.

This input is available only if you wire a 1D array of double-precision, floating-point numbers or a 2D array of double-precision, floating-point numbers to signal.

Default: 1

datatype_icon

location mode

Mode in which to retrieve the trigger location.

This input accepts a ring or a 1D array of rings. This input accepts a 1D array of rings when signal is a 1D array of waveforms or a 2D array of double-precision, floating-point numbers.

Name Value Description
Index 0 Retrieves the trigger locations as array indexes.
Time 1 Retrieves the trigger locations as time in seconds.

Algorithm for Calculating the Trigger Location by Time

This node computes Time by the following equation:

Time = Index * dt

When the input signal is a waveform or a 1D array of waveforms, dt is contained in the input signal.

Default: Index

datatype_icon

trigger detected?

A Boolean that determines whether the node detected a valid trigger.

True This node detects a valid trigger.
False This node does not detect a valid trigger.

This output can return a Boolean or a 1D array of Booleans.

datatype_icon

trigger locations

The index or time of the detected trigger.

This output can return a double-precision, floating-point number or a 1D array of double-precision, floating-point numbers.

datatype_icon

error out

Error information.

The node produces this output 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.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices


Recently Viewed Topics