NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents
Product DocumentationNI-DAQmx .NET Framework 4.0 API ReferenceReferenceTrigger.ConfigureAnalogWindowTrigger MethodCurrent page
Table of Contents

ReferenceTrigger.ConfigureAnalogWindowTrigger Method

ReferenceTrigger.ConfigureAnalogWindowTrigger Method

ReferenceTriggerConfigureAnalogWindowTrigger Method

Configures the task to stop the acquisition when the device acquires all pretrigger samples; an analog signal enters or leaves a range you specify; and the device acquires all post-trigger samples.

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

Syntax

public void ConfigureAnalogWindowTrigger(
	string source,
	AnalogWindowReferenceTriggerCondition condition,
	double top,
	double bottom,
	long pretriggerSamples
)
Public Sub ConfigureAnalogWindowTrigger ( 
	source As String,
	condition As AnalogWindowReferenceTriggerCondition,
	top As Double,
	bottom As Double,
	pretriggerSamples As Long
)

Parameters

source
Type: SystemString
The name of a virtual channel or terminal where there is an analog signal to use as the source of the trigger. For E Series devices, if you use a virtual channel, it must be the only channel in the task. The only terminal you can use for E Series devices is PFI0.
condition
Type: NationalInstruments.DAQmxAnalogWindowReferenceTriggerCondition
Specifies if the reference trigger occurs when the signal enters the window or leaves the window. Use bottom and top to specify the limits of the window.
top
Type: SystemDouble
The upper limit of the voltage window, in the units of the measurement or generation.
bottom
Type: SystemDouble
The lower limit of the voltage window, in the units of the measurement or generation.
pretriggerSamples
Type: SystemInt64
The minimum number of samples per channel to acquire 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. ConfigureAnalogWindowTrigger(String, AnalogWindowReferenceTriggerCondition, Double, Double, 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

Was this information helpful?