niScope_ConfigureTriggerWidth
- Updated2023-02-21
- 3 minute(s) read
ViStatus niScope_ConfigureTriggerWidth (ViSession Instrument_Handle, ViChar _VI_FAR Trigger_Source[], ViReal64 Level, ViReal64 Low_Threshold, ViReal64 High_Threshold, ViInt32 Polarity, ViInt32 Condition, ViInt32 Trigger_Coupling, ViReal64 Holdoff, ViReal64 Delay);
Purpose
Configures common properties for width triggering.
A width trigger occurs when a pulse that crosses a vertical threshold you specify and with a polarity you specify also has a duration that is either within or outside a duration range you specify.
Trigger System Operation
When you initiate an acquisition, the trigger system operates in the following manner.
- The digitizer waits for the start trigger, which is configured through the NISCOPE_ATTR_ACQ_ARM_SOURCE attribute. The default is NISCOPE_VAL_IMMEDIATE.
- Upon receiving the start trigger, the digitizer begins sampling pretrigger points.
- After the digitizer finishes sampling pretrigger points, the digitizer waits for a reference (stop) trigger that you specify with a trigger function such as this one.
- Upon receiving the reference trigger, the digitizer finishes the acquisition after completing posttrigger sampling.
With each Configure Trigger function, you specify configuration parameters such as the trigger source and the amount of trigger delay. Additionally, you can adjust the amount of pretrigger and posttrigger samples using the refPosition input of the niScope_ConfigureHorizontalTiming function. The default is half the record length.
For multirecord acquisitions, all records after the first record are started based on the setting of the NISCOPE_ATTR_ADV_TRIG_SRC attribute. The default value is NISCOPE_VAL_IMMEDIATE.
![]() |
Note Some features are not supported by all digitizers. Refer to Features Supported by Device for more information. |
Related topics:
Parameters
| Input | ||
| Name | Type | Description |
| vi | ViSession | The instrument handle you obtain from niScope_init that identifies a particular instrument session. |
| triggerSource | ViConstString | Specifies the trigger source. Refer to NISCOPE_ATTR_TRIGGER_SOURCE for defined values. |
| level | ViReal64 | The voltage threshold for the trigger. Refer to NISCOPE_ATTR_TRIGGER_LEVEL for more information. |
| Low Threshold | ViReal64 | Specifies, in seconds, the lower bound on the range of pulse durations that triggers the oscilloscope. Refer to the NISCOPE_ATTR_WIDTH_LOW_THRESHOLD attribute for defined values. |
| High Threshold | ViReal64 | Specifies, in seconds, the upper bound on the range of pulse durations that triggers the oscilloscope. Refer to the NISCOPE_ATTR_WIDTH_HIGH_THRESHOLD attribute for defined values. |
| Polarity | ViInt32 | Specifies the polarity of the pulses that trigger the oscilloscope for width triggering. Refer to the NISCOPE_ATTR_WIDTH_POLARITY attribute for defined values. |
| Condition | ViInt32 | Specifies whether the oscilloscope triggers on pulses of duration within or outside the range of pulse durations bounded by Low Threshold and High Threshold. Refer to the NISCOPE_ATTR_WIDTH_CONDITION attribute for defined values. |
| triggerCoupling | ViInt32 | Applies coupling and filtering options to the trigger signal. Refer to NISCOPE_ATTR_TRIGGER_COUPLING for more information. |
| holdoff | ViReal64 | The length of time the digitizer waits after detecting a trigger before enabling NI-SCOPE to detect another trigger. Refer to NISCOPE_ATTR_TRIGGER_HOLDOFF for more information. |
| delay | ViReal64 | How long the digitizer waits after receiving the trigger to start acquiring data. Refer to NISCOPE_ATTR_TRIGGER_DELAY_TIME for more information. |
Return Value
| Name | Type | Description | ||||||||
| Status | ViStatus | Reports the status of this operation. To obtain a text description of the status code,
call
niScope_GetErrorMessage.
To obtain additional information concerning the error
condition, use niScope_GetError
and
niScope_ClearError.
The general meaning of the status code is as follows:
|
