LibTiePie  0.7.1
Library for interfacing TiePie engineering instruments
Oscilloscope channel trigger

Each oscilloscope channel can be used as trigger source. To use an oscilloscope channel as trigger input, enable it using ScpChTrSetEnabled.

To control how and when the channel trigger responds to the channel input signal, several properties are available:

Kind

The kind property is used to control how the channel trigger responds to the channel input signal. The other properties depend on the trigger kind that is selected. Use ScpChTrGetKinds() to find out which trigger kinds are supported by the channel. Available kinds are:

Rising edge (TK_RISINGEDGE)

The channel trigger responds to a rising edge in the input signal. The trigger uses Level[0] and Hysteresis[0] below the level to determine the rising edge.

Falling edge (TK_FALLINGEDGE)

The channel trigger responds to a falling edge in the input signal. The trigger uses Level[0] and Hysteresis[0] above the level to determine the falling edge.

Any edge (TK_ANYEDGE)

The channel trigger responds to any edge, either rising or falling, in the input signal. The trigger uses Level[0], Hysteresis[0] above the level and Hysteresis[1] below level to determine the edges.

Inside window (TK_INWINDOW)

The channel trigger responds when the input signal is inside a predefined window. The trigger uses Level[0] and Level[1] to determine the window, there is no restriction to which level must be high and which must be low. The trigger remains active as long as the signal is inside the window.

Outside window (TK_OUTWINDOW)

The channel trigger responds when the input signal is outside a predefined window. The trigger uses Level[0] and Level[1] to determine the window, there is no restriction to which level must be high and which must be low. The trigger remains active as long as the signal is outside the window.

Enter window (TK_ENTERWINDOW)

The channel trigger responds when the input signal enters a predefined window. The trigger uses Level[0] and Hysteresis[0] to define one limit of the window and Level[1] and Hysteresis[1] to determine the other limit of the window, there is no restriction to which level must be high and which must be low. The hysteresis is outside the window defined by the levels.

Exit window (TK_EXITWINDOW)

The channel trigger responds when the input signal exits a predefined window. The trigger uses Level[0] and Hysteresis[0] to define one limit of the window and Level[1] and Hysteresis[1] to determine the other limit of the window, there is no restriction to which level must be high and which must be low. The hysteresis is inside the window defined by the levels.

Pulse width positive (TK_PULSEWIDTHPOSITIVE)

The channel trigger responds when the input signal contains a positive pulse with a length longer or shorter than a predefined value. The trigger uses Level[0] and Hysteresis[0] to determine the rising and falling edges of the pulse. It also uses Time[0] to define the required length of the pulse and Condition to indicate whether the pulse must be longer or shorter than the defined time.

Pulse width negative (TK_PULSEWIDTHNEGATIVE)

The channel trigger responds when the input signal contains a negative pulse with a length longer or shorter than a predefined value. The trigger uses Level[0] and Hysteresis[0] to determine the falling and rising edges of the pulse. It also uses Time[0] to define the required length of the pulse and Condition to indicate whether the pulse must be longer or shorter than the defined time.

Read more about the channel trigger kind related functions.

Level

Most trigger kinds use one or more level properties to indicate at which level(s) of the input signal the channel trigger must respond. Use ScpChTrGetLevelCount() to find out how many trigger levels are used by the currently set trigger kind.

The trigger level is set as a floating point value between 0 and 1, corresponding to a percentage of the full scale input range:

  • 0.0 (0%) equals -full scale
  • 0.5 (50%) equals mid level or 0 Volt
  • 1.0 (100%) equals full scale.

Read more about the trigger level related functions.

Hysteresis

Most trigger kinds use one or more hysteresis properties to indicate the sensitivity of the channel trigger. With a small hysteresis, the trigger system responds to small input signal changes, with a large hysteresis, the input signal change must be large for the channel trigger to respond. Use ScpChTrGetHysteresisCount() to determine the number of trigger hystereses for the currently set trigger kind.

The trigger hysteresis is set as a floating point value between 0 and 1, corresponding to a percentage of the full scale input range:

  • 0.0 (0%) equals 0 Volt (no hysteresis)
  • 0.5 (50%) equals full scale
  • 1.0 (100%) equals 2 * full scale.

Read more about the trigger hysteresis related functions.

Condition

Some trigger kinds require an additional condition to indicate how the channel trigger must respond to the input signal.

The available trigger conditions depend on the currently set trigger kind. Use ScpChTrGetConditions() to determine the available trigger conditions for the currently selected trigger kind. Available conditions are:

Larger than (TC_LARGER)

This trigger condition is available with pulse width trigger and uses property Time[0]. The trigger system responds when a trigger pulse lasts longer than the selected time.

Smaller than (TC_SMALLER)

This trigger condition is available with pulse width trigger and uses property Time[0]. The trigger system responds when a trigger pulse lasts shorter than the selected time.

Read more about the trigger condition related functions.

Time

Some trigger kinds and conditions use one or more Time properties to determine how long a specific condition must last for the channel trigger to respond. Use ScpChTrGetTimeCount() to determine the number of trigger time properties for the currently set trigger kind and condition.

The Time property is set as a value in seconds.

Read more about the trigger time related functions.