NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

ReferenceTrigger.ConfigureDigitalEdgeTrigger Method

  • Updated2023-02-21
  • 2 minute(s) read
ReferenceTrigger.ConfigureDigitalEdgeTrigger Method
Configures the task to stop the acquisition when the device acquires all pretrigger samples, detects a rising or falling edge of a digital signal, and acquires all post-trigger samples.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public void ConfigureDigitalEdgeTrigger(
	string source,
	DigitalEdgeReferenceTriggerEdge edge,
	long pretriggerSamples
)
Public Sub ConfigureDigitalEdgeTrigger ( 
	source As String,
	edge As DigitalEdgeReferenceTriggerEdge,
	pretriggerSamples As Long
)

Parameters

source
Type: SystemString
The name of the terminal where there is a digital signal to use as the source of the trigger.
edge
Type: NationalInstruments.DAQmxDigitalEdgeReferenceTriggerEdge
The edge of the digital signal on which the reference trigger occurs.
pretriggerSamples
Type: SystemInt64
The minimum number of samples to acquire per channel before recognizing the reference trigger.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

The number of post-trigger samples is equal to the value of SamplesPerChannel minus the value of pretriggerSamples. If pretriggerSamples equals SamplesPerChannel, the measurement or generation stops when the reference trigger occurs.

When you use a Reference Trigger, the default value of the ReadRelativeTo property is FirstPretriggerSample with a ReadOffset value of 0.

The NI-DAQmx driver does not determine if the requested settings are possible until the task is verified. ConfigureDigitalEdgeTrigger(String, DigitalEdgeReferenceTriggerEdge, Int64) does not throw an exception for parameter values that are not compatible with your hardware or other settings in your task. To determine if all of the settings for a Task are valid, you must verify the task by starting the task, either with Start or by reading from or writing to the task, or by calling Control(TaskAction) with Verify.

See Also

Log in to get a better experience