Trigger signals can originate from three different sources -- hardware digital signals, hardware analog signals, or software signals. Gate signals can originate from hardware digital signals or hardware analog signals.
Note: Check your device documentation to determine which trigger and/or gate capabilities are implemented.
Hardware Digital Signal Triggering and Gating
A digital signal is usually a transistor-transistor logic (TTL) level signal having two discrete levels -- a high level and a low level. When the signal switches between levels, a digital edge is created, as shown in Figure 1. You can trigger your analog acquisition on the rising or falling edge of your digital trigger signal. A rising edge occurs when the signal changes from low to high. A falling edge occurs when the signal changes from high to low. In Figure 1, the acquisition begins after the falling edge of the digital trigger signal.
Digital Signal Triggering after a Falling Edge
Digital gate signals are characterized by a level, rather than a digital edge, so you can configure a digital gate that pauses an acquisition while the gate signal is either in the high state or the low state. In Figure 2, the scan clock is enabled when the gate signal is high, which means that data is being acquired.
Note: Make sure your National Instruments DAQ board can perform scan clock gating. The scan clock controls the time interval between scans and gates the channel clock on and off.
Digital Scan Clock Gating
Hardware Analog Signal Triggering and Gating
An analog trigger occurs at a selected point on an incoming analog signal, which represents a measurement that can be continuously observed and represented. You can set triggering to occur at a specific level on either an increasing or decreasing signal (positive or negative slope); that is, you specify a threshold level that the signal must cross and whether the signal is rising or falling before the acquisition begins. Figure 3 shows the point -- defined by a level and slope -- that triggers the acquisition.
Note: Make sure your National Instruments DAQ board is equipped with Analog Trigger Circuitry (ATC), which monitors the analog trigger channel. Once the conditions are met, the ATC generates an internal signal to trigger or gate the acquisition.
Analog Trigger Condition of Level and Slope
Analog signals are susceptible to noise, and noise can lead to premature or late triggering. To prevent incorrect triggering, you can specify a window through which the signal must pass before the trigger or gate signal occurs. Hysteresis defines the range of this window. If you wanted to set the trigger conditions for the acquisition shown in Figure 4, you would set level and hysteresis. For example, you might set level to 3.0 V and hysteresis to 0.05 V because you know that the average noise in the system is at least 0.01 V. In this example, level - hysteresis is 2.95 V.
Note: If you configured named channels in National Instruments Measurement & Automation Explorer, the signal level is relative to the physical units specified for the channel. For example, if you configure a channel called Temperature to have a physical unit of Deg. C, the value you specify for the trigger signal level is relative to Deg. C. If you are not using named channels, the signal level is volts.
Triggering or Gating on Rising Edge with Hysteresis
Figure 4 shows a series of situations where data is acquired when the signal exceeds level and the triggering or gating conditions are met. In this rising-edge triggered application, the acquisition begins when the signal passes through the hysteresis window and exceeds level (3.0 V). The acquisition continues until all requested scans are acquired or the acquisition is explicitly stopped. In a gated system, data acquisition is initiated when the signal passes through the hysteresis window and exceeds level. The acquisition continues as long as the signal remains above level - hysteresis (2.95 V). If the signal drops below level - hysteresis, the acquisition pauses and resumes only when the signal exceeds level (3.0 V) again.
In a falling-edge triggered application, the acquisition begins when the signal falls below the hysteresis window defined by level + hysteresis (3.05 V) and level (3.0 V), and the acquisition continues until all requested scans are acquired or the acquisition is explicitly stopped. A falling-edge gate is initiated when the signal falls through the hysteresis window and below level (3.0 V). The acquisition continues as long as the signal remains below level + hysteresis (3.05 V). If the signal rises above level + hysteresis, the acquisition pauses and resumes only when the signal falls below level (3.0 V) again.
If the value of a signal is more important than the slope, you can configure an analog trigger to occur if the signal enters or leaves a window of values, which is useful for detecting and recording fluctuations from the expected signal range. In Figure 5, two values specify the boundary of the window, where the bottom of the window is level and the top of the window is level + hysteresis. In this example, the trigger occurs the first time the signal appears inside the window, and data is acquired until all requested scans have been acquired or the acquisition is explicitly stopped. In a gated acquisition, data is acquired when the signal appears in the window.
Triggering or Gating inside a Window
Tip: Alternatively, you can configure the gate to occur when the signal falls below level - hysteresis or when the signal leaves the window.
Software Analog Signal Triggering
With software triggering, or conditional retrieval, you can simulate an analog trigger using software if your DAQ device does not have ATC. In a conditional retrieval application, you configure your DAQ device, set your triggering conditions, and start collecting data. The Traditional NI-DAQ (Legacy) driver scans the data and compares it with your conditions. When the data meets your conditions, Traditional NI-DAQ (Legacy) returns the data and continues acquiring the data until all requested scans have been acquired or the acquisition is explicitly stopped.
As with hardware analog triggering, you specify the level and hysteresis of the signal. You also can configure software triggers for both rising and falling slopes.