User Manual

PicoScope 4000 Series Programmer's Guide 71
Copyright © 2008-2011 Pico Technology Ltd. All rights reserved. ps4000pg.en
4.10.49
ps4000SetPulseWidthQualifier
PICO_STATUS ps4000SetPulseWidthQualifier
(
short handle,
PWQ_CONDITIONS * conditions,
short nConditions,
THRESHOLD_DIRECTION direction,
unsigned long lower,
unsigned long upper,
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 conditions 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, a pointer to an array of 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 set to 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.
direction, the direction of the signal required for the trigger to
fire
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 PW_TYPE_IN_RANGE or
PW_TYPE_OUT_OF_RANGE.
type, the pulse width type, one of these constants: -
PW_TYPE_NONE (do not use the pulse width qualifier)
PW_TYPE_LESS_THAN (pulse width less than lower)
PW_TYPE_GREATER_THAN (pulse width greater than lower)
PW_TYPE_IN_RANGE (pulse width between lower and upper)
PW_TYPE_OUT_OF_RANGE (pulse width not between lower and
upper)
Returns
PICO_OK
PICO_INVALID_HANDLE
PICO_USER_CALLBACK
PICO_CONDITIONS
PICO_PULSE_WIDTH_QUALIFIER