ConfigureAcquisitionTime(TimeSpan, TimeSpan, string, AnalogEdgeTriggerSlope, double)
- Updated2025-01-08
- 2 minute(s) read
Configures the acquisition time and trigger parameters for data acquisition using an analog edge trigger.
Syntax
Namespace: NationalInstruments.PowerSignalsDaq
public void ConfigureAcquisitionTime(TimeSpan totalAcquisitionTime, TimeSpan pretriggerTime, string triggerSource, AnalogEdgeTriggerSlope triggerSlope, double triggerLevel)
Remarks
To ensure the desired acquisition time parameters are applied, you must call the ConfigureAcquisitionTime(TimeSpan, TimeSpan, string, AnalogEdgeTriggerSlope, double) method after creating all the required input channels with the CreateCurrentInputChannel or CreateVoltageInputChannel method.
NI recommends using TimeSpan.FromTicks() when providing values for the totalAcquisitionTime and pretriggerTime parameters to avoid unintended data rounding. 1 tick = 100 ns, e.g. TimeSpan.FromTicks(10000) = 1 ms.
Parameters
| Name | Type | Description |
|---|---|---|
| totalAcquisitionTime | TimeSpan | Specifies the total duration of the acquisition. |
| pretriggerTime | TimeSpan | Specifies the minimum duration of time for which data is acquired per channel before recognizing the Reference Trigger. The post-trigger time is equal to totalAcquisitionTime minus pretriggerTime . The pretrigger samples per channel is calculated by multiplying the pretrigger time by the maximum Sample Clock rate supported by the session. |
| triggerSource | string | Specifies the name of a channel or terminal where there is an analog signal to use as the source of the trigger. |
| triggerSlope | AnalogEdgeTriggerSlope | Specifies on which slope of the signal the Reference Trigger occurs. |
| triggerLevel | double | Specifies at what threshold to trigger. |
Exceptions
| Type | Description |
|---|---|
| PowerSignalsDaqException | Thrown when one of the following error conditions occurs:
|