Configure Triggers and Events
- Updated2025-05-09
- 7 minute(s) read
You can use triggers and events to coordinate the operation of multiple channels and instruments.
Triggers
A trigger is an input signal received by an instrument or instrument channel that causes the instrument or channel to perform an action. Triggers are routed to input terminals to coordinate actions.
An input terminal is a physical trigger line, such as a PXI trigger line, or an output terminal on another instrument or channel, where an instrument or channel awaits a digital edge trigger signal.
For purposes of programming instruments with NI APIs, triggers comprise two parts:
- The action, represented with the name of the trigger, that you want the instrument or channel to take.
- The signal condition you want to serve as the stimulus for that action (for example, a rising or falling digital edge on a signal, or a software-generated edge you configure).
Triggers can be internal (software-generated) or external. You can export external triggers and use them with events to synchronize hardware operation with external circuitry or other instruments.
Most NI-DCPower instruments accept external triggers routed between the instruments using PXI trigger lines. Events assigned to a PXI trigger line can coordinate actions across channels and across instruments.
Events
An event is a signal generated by an instrument or instrument channel that indicates a specific operation was completed or a specific state was reached. Events can be routed to output terminals to coordinate the action of multiple channels or multiple instruments.
For purposes of programming instruments with NI APIs, you can control three aspects of the pulse that represents each discrete event type:
- Polarity
- Width
- Destination
Event output terminals enable you to route an event signal pulse to external devices. You can modify the polarity and duration of the pulse that is generated when an event occurs to be compatible with trigger inputs of external devices.
You typically configure events for a specific hardware condition and then export those events for use in the test program or export them to a PXI trigger line to cause an action in another instrument configured to wait for a trigger on the same PXI trigger line.
NI-DCPower Named Trigger Types
Named trigger types in NI-DCPower define the action you want an instrument or instrument channel to take upon detecting a specific signal condition.
The following named triggers are available for NI-DCPower instruments:
A channel does not perform any source or measure operations until it receives this trigger.
This trigger is not used in Single Point source mode.
This trigger is available only when sourcing DC voltage or DC current.
A channel ignores this trigger if a measurement is already in progress or if Measure When is set to a different value.
Sequence Loop Count must be set to a value greater than one for a sequence to iterate, and thus for this trigger to occur.
This trigger is not used in Single Point source mode.
Trigger Signal Conditions
NI-DCPower includes three possible signal conditions that can serve as the stimulus for an action an instrument or channel can take: digital edge, software edge, and none (disabled).
Digital Edge
A channel performs an operation corresponding to a trigger when the channel detects a rising edge or a falling edge on a physical trigger line. Digital edge triggering is ideal for synchronizing channels.
You can configure each named trigger in NI-DCPower to operate based on a digital edge.
The channels may be on the same or different physical instruments. If they are on different physical instruments, NI-DCPower routes the signal over the PXI backplane trigger lines.
To configure a digital edge trigger, you must specify the input terminal that should be connected to the trigger. The input terminal can be a physical trigger line or an output terminal from another instrument or channel. If you specify an output terminal from another instrument, NI-DCPower automatically finds a route (if one is available) from that terminal to the input terminal via a physical PXI backplane trigger line.
Software Edge
When configured for software edge triggering, channels wait to receive a trigger signal sent when you call Send Software Edge Trigger.
You can configure each named trigger in NI-DCPower to operate based on a software edge trigger.
None (Disabled)
When a trigger is configured as "none" (disabled), channels do not wait for any specific signal condition to occur before performing the action that corresponds to that trigger.
For example, if the Source trigger type is set to "none," a channel does not need to receive a Source trigger to begin a source operation.
NI-DCPower Named Event Types
You can route events on most NI-DCPower instruments. NI-DCPower includes specific events you can use in tandem with triggers to coordinate actions across channels of an instrument and across instruments.
In Single Point source mode, this event is generated whenever the source configuration is modified plus the associated source delay.
In Sequence source mode, this event is generated after each step of the sequence plus the associated source delay for the step.
The amount of configurable delay you can add depends on your instrument.
One event is generated per iteration of the sequence. For example, if the sequence is configured to loop ten times on a channel, the channel generates ten events.
The amount of configurable measure delay you can add depends on your instrument.
NI-DCPower Event Signal Configurations
Each event type in NI-DCPower has its own set of three properties that you can use to configure the polarity, width, and destination of the event pulse signal.
Valid Pulse Widths for Events on the PXI Platform
PXI instruments have an allowable range of pulse widths you can configure for events.
You set the pulse width in terms of the duration, in seconds, the pulse should last. Pulse width applies only to events that are connected to external physical trigger lines, such as the PXI trigger lines. The PXIe instrument event pulse width range is [250 ns, 1.6 µs].
This range is defined by the PXI Express Specification.
NI-DCPower Synchronization Methods
Synchronization allows you to coordinate the action of multiple NI instruments. There are multiple approaches to synchronizing NI instruments; the accuracy (trigger delay and jitter) of the synchronization depends on the approach you take and the system and instruments in use.
NI-DCPower supports the following synchronization methods.
Accuracy: tens of milliseconds
Accuracy: <100 ns + NI-DCPower instrument trigger delay and jitter
- PXI Trigger Routing—Sends a trigger signal, which corresponds to an event, from one
instrument to another through the routes available in a PXI chassis (for PXIe/PXI
instruments). The closer the signal paths between instruments are in length, the
better the synchronization accuracy.
Accuracy: tens of nanoseconds + NI-DCPower instrument trigger delay and jitter
- External Triggering—Sends a signal external to a PXI chassis or, for other
instrument form factors, to an instrument through I/O lines. The closer the signal
paths between instruments are in length, the better the synchronization accuracy. Time
locking improves determinism.Note Most NI-DCPower instruments cannot receive external digital triggers via their front panels. However, for NI-DCPower instruments that support triggering, you can send an external trigger to the instrument through another instrument installed in your chassis that does accept external triggers. You can route these trigger signals through the trigger lines on the chassis backplane.
Refer to the for the trigger delay and jitter of your instrument.
Multichannel Synchronization and Signal Routing in NI-DCPower
You can synchronize multiple channels with NI-DCPower by routing signals—events and triggers—from one channel to another, including channels that span multiple physical instruments.
You can export (route) the trigger and event signals to one of the physical PXI backplane trigger lines using Export Signal With Channels.
Instead of explicitly exporting signals to physical trigger lines, NI-DCPower can automatically create routes for you. To have NI-DCPower automatically create routes, set the digital edge input terminal of one channel to be the event from another channel.
Example: Synchronizing Measure and Source Operations
To make PXI1Slot3/0 wait for the measurement of PXI1Slot3/1 to complete before PXI1Slot3/0 changes the source configuration, route the Measure Complete event of PXI1Slot3/1 to the Source trigger of PXI1Slot3/0.
To do this, configure the Source trigger of PXI1Slot3/0 to anticipate a digital edge and set the input terminal to /PXI1Slot3/Engine1/MeasureCompleteEvent.