Triggers and Events

You can use triggers and events to coordinate the operation of multiple channels and instruments.

Triggers

Triggers are signals that cause the signal generator to perform an action such as starting or stopping a generation operation. Triggers can be internal (software-generated) or external. External digital triggers can be several different types. External triggers can be re-exported and, along with events, can allow you to synchronize the hardware operation with external circuitry or other NI devices. When triggering the PXIe-5433 in standard function, arbitrary waveform, arbitrary sequence, script, or frequency list mode, you can select the trigger type, the trigger source, and the trigger mode that you want to use.

Events

An event is a signal generated by the NI device at a device state. Typically, events are configured to indicate when a specific hardware condition has been met.

Event Output Behaviors

Events can have one of the following output behaviors:

  • Toggle—Each instance of the event toggles between high and low. You can set the initial state of the event.
  • Pulse—Each event triggers a pulse for a specified period of time.
  • Level—While the event is active, it shifts high or low depending on the active state you specify.

Event Status

Events can return their status in two ways.

  • Live—Returns the current state of the event.
  • Latched—Returns whether the event has ever been active.

Refer to the following table for the PXIe-5433-supported event output behaviors and statuses.

Table 9. PXIe-5433-Supported Events
Event Name Description Output Behavior Status
Ready for Start Indicates that the signal generator is configured and ready to receive a start trigger. Level Live
Started Indicates when the signal generator has received a start trigger and is generating a waveform. Level, Pulse Latched
Marker A marker is an event that the device generates in relation to a waveform that is generated. The event is configured to occur at the time that a specific location or sample n if the waveform generates on the analog output connector. If the waveform loops multiple times in a segment, the marker generates each time the waveform loops. Pulse, Toggle Latched, Live
Done Indicates that the generation of the previous waveform is complete. Level, Pulse Latched

Trigger Sources

The PXIe-5433 supports the following possible trigger sources:

  • Immediate, also known as software
  • Digital front panel connector
  • PXI trigger bus lines (backplane of PXI devices)
  • PXI star trigger line
  • PFI inputs (SMA front panel connectors)

The following figure shows the trigger sources for the PXIe-5433.


1378

For the PXIe-5433, trigger sources are software selectable. To set a trigger source, use the parameters in the niFGEN Configure Trigger VI or the niFgen_ConfigureTriggerSource function.

Trigger Modes

The frequency List, arbitrary waveform, and arbitrary sequence output modes on the PXIe-5433 support the following trigger modes that affect the behavior of the signal generator when receiving triggers.

  • Single
  • Continuous
  • Stepped
  • Burst

Trigger Types

You can trigger your signal generator with one of the following types of triggers:

  • Digital Edge
  • Digital Level
  • Software Edge

Refer to the following table for the triggers supported by PXIe-5433.

Table 10. PXIe-5433-Supported Triggers
Trigger Name Supported Types Description
Start
  • Digital Edge
  • Software Edge
The start trigger transitions a device from an idle state to a generation state where the device can respond to sample clocks.
Script
  • Digital Edge
  • Digital Level
  • Software Edge
The script trigger is a general-purpose trigger with a role that is entirely determined by the context of the generation script. A script allows you to create sophisticated generation operations. For example, the script could configure the device to generate waveform A, then wait for the script trigger, then generate waveform B. You can create multiple script triggers for use in your application. After a digital edge script trigger has been received, that trigger remains true for all subsequent instructions until the clear instruction is called or the trigger is reset after being used in the wait, repeat/end repeat, or if instructions.

Digital Edge

Triggers configured to act on a rising or falling edge of a digital signal are called digital edge triggers.

A digital signal has two discrete levels: a high level and a low level. When the signal transitions from high to low or from low to high, a digital edge is created. There are two types of edges:
  • Rising—Occurs when the signal transitions from low level to high level.
  • Falling—Occurs with a transition from high level to low level

You can configure an edge trigger to occur either at the falling edge of signal or at rising edge of signal as the following figure shows.


1378

Digital Level

Triggers configured to act when a signal goes below the defined low level or above the defined high level are digital level triggers. Not all triggers can be configured to be level triggers.

Software Edge

A software edge trigger is generated internally by a programmatic call to the niFgen Send Software Edge Trigger VI or the niFgen_SendSoftwareEdgeTrigger function. Based on the conditions specified in the program, this trigger can occur at any time.

Marker Events


1378

The previous figure shows a pulse that represents a waveform sample n that is one sample clock in width of a waveform being generated on the analog output connector. The second pulse, the marker event, represents the pulse that generates when the corresponding waveform sample n outputs at the analog output connector.

tm1 represents the delay in time of the marker event generated relative to the configured waveform sample n being generated.

tm2 represents the marker event pulse width in time.

NI-FGEN takes into account the factors that affect the delays in the digital and analog paths in assuring that the marker event appears within one sample clock of the waveform output. Therefore, tm1 is less than one sample clock period.

The marker event pulse width, tm2, is at least 150 ns and can be significantly longer than 150 ns for slower sample clocks. You can configure the pulse width by setting the Marker Event Pulse Width property or the NIFGEN_ATTR_MARKER_EVENT_PULSE_WIDTH attribute. Instruments commonly have a minimum pulse width specification for a trigger to be registered, and trigger pulses of smaller width are ignored. The signal generator ensures that a minimum pulse width exists on the marker event by using a pulse stretching circuit. A sample clock rate of 100 MS/s has a period of 10 ns, requiring the pulse to be lengthened for many devices to register the marker as a good trigger pulse.

Markers as Trigger Outputs

A delay of at least 44 sample clocks exists between the start trigger and the analog waveform generation on the output connector. Therefore, synchronizing the signal generator output signal to other devices with fast trigger response times is accomplished using the marker event from the signal generator as the trigger source for the other device for more precise alignment to the generating waveform. For the PXIe-5433, you can do this using the PXI trigger lines or PFI terminals.

Event Delays

Event delays can manually delay Marker, Started, and Done events so that they are aligned on a particular sample clock period.

Delay is applied to the event with respect to the analog output of the signal generator. For example, a delay of 0 sample clocks aligns the event with the analog output signal, while a delay of +2 sample clocks causes the event to appear two sample clock periods after the analog output appears. All event delays are adjusted in increments of sample clock periods, regardless of the units used to set the delay. For example, if you provide a value for delay with units of seconds, the delay is coerced up to the nearest sample clock period.

The event delay attributes must be set before waveform generation is initiated. Any changes made to other attributes during waveform generation may change the analog output delay. NI-FGEN does not compensate for this change in the analog output delay and continues to apply the event delay that you was originally configured.

If an event delay is applied to an event that is being exported to multiple output terminals, NI-FGEN aligns the event on the first terminal you specified.

You can configure event delays by calling the Marker Event Delay property or the NIFGEN_ATTR_MARKER_EVENT_DELAY attribute, the Started Event Delay property or the NIFGEN_ATTR_STARTED_EVENT_DELAY attribute, or the Done Event Delay property or the NIFGEN_ATTR_DONE_EVENT_DELAY attribute.

Synchronization

Synchronization occurs when two or more measurement devices operate in step with a common reference clock. The PXIe-5433 supports synchronization using the NI-TClk API with a single NI-FGEN session per PXIe-5433.

Note NI-TClk synchronization support for the PXIe-5433 was first available in NI-FGEN 18.1.

You can synchronize the PXIe-5433 with other instruments using PXIe_Clk100 as the reference clock source and NI-TClk.

Use the NI-FGEN Absolute Delay property or NIFGEN_ATTR_ABSOLUTE_DELAY attribute to reduce trigger jitter or to maintain synchronization repeatability when synchronizing multiple instruments with NI-TClk. Phase DAC adjustment is not supported.

Synchronization with the Two-Channel PXIe-5433

The channels of a two-channel PXIe-5433 are automatically synchronized when they are in the same NI-FGEN session.

Synchronization with NI-TClk is not supported with multiple channel-based NI-FGEN sessions to a single two-channel PXIe-5433.