User manual

PicoScope 6000 Series Programmer's Guide 69
Copyright © 2009-2013 Pico Technology Ltd. All rights reserved. ps6000pg.en r9
3.9.42
ps6000SetPulseWidthQualifier
PICO_STATUS ps6000SetPulseWidthQualifier
(
short handle,
PS6000_PWQ_CONDITIONS * conditions,
short nConditions,
PS6000_THRESHOLD_DIRECTION direction,
unsigned long lower,
unsigned long upper,
PS6000_PULSE_WIDTH_TYPE type
)
This function sets up pulse-width qualification, which can be used on its own for pulse-
width triggering or combined with window triggering to produce more complex
triggers. The pulse-width qualifier is set by defining one or more structures that are
then ORed together. Each structure is itself the AND of the states of one or more of
the inputs. This AND-OR logic allows you to create any possible Boolean function of
the scope's inputs.
Applicability
All modes
Arguments
handle, the handle of the required device
* conditions, an array of PS6000_PWQ_CONDITIONS structures
specifying the conditions that should be applied to each channel. In
the simplest case, the array consists of a single element. When there
are several elements, the overall trigger condition is the logical OR of
all the elements. If conditions is NULL then the pulse-width
qualifier is not used.
nConditions, the number of elements in the conditions array.
If nConditions is zero then the pulse-width qualifier is not used.
Range: 0 to PS6000_MAX_PULSE_WIDTH_QUALIFIER_COUNT.
direction, the direction of the signal required for the trigger to
fire. See ps6000SetTriggerChannelDirections for the list of possible
values. Each channel of the oscilloscope (except the AUX input) has
two thresholds for each direction—for example, PS6000_RISING and
PS6000_RISING_LOWER—so that one can be used for the pulse-
width qualifier and the other for the level trigger. The driver will not
let you use the same threshold for both triggers; so, for example, you
cannot use PS6000_RISING as the direction argument for both
ps6000SetTriggerConditions and ps6000SetPulseWidthQualifier at the
same time. There is no such restriction when using window triggers.
lower, the lower limit of the pulse-width counter
upper, the upper limit of the pulse-width counter. This parameter is
used only when the type is set to PS6000_PW_TYPE_IN_RANGE or
PS6000_PW_TYPE_OUT_OF_RANGE.