4 trigger detector, Trigger detector – Digilent WaveForms User Manual
Page 67

WaveForms™ SDK Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 67 of 85
9.4 Trigger Detector
In order to use trigger on digital in pins, set trigger source with FDwfDigitalInTriggerSourceSet to
trigsrcDetectorDigitalIn.
FDwfDigitalInTriggerInfo(HDWF hdwf,
unsigned
int
*pfsLevelLow,
unsigned
int
*pfsLevelHigh,
unsigned
int
*pfsEdgeRise,
unsigned
int
*pfsEdgeFall)
Parameters:
-
hdwf – Interface handle.
-
pfsLevelLow – Variable to receive the supported low state triggers.
-
pfsLevelHigh – Variable to receive the supported low state triggers.
-
pfsEdgeRise – Variable to receive the supported rising edge triggers.
-
pfsEdgeFall – Variable to receive the supported falling edge triggers.
The function above returns the supported digital in triggers. The bits of the arguments represent pins.
The logic for the trigger bits is: Low and High and (Rise or Fall). Setting a bit in both rise and fall will trigger on any
edge, any transition. For instance FDwfDigitalInTriggerInfo(hdwf, 1, 2, 4, 8) will generate trigger when DIO-0 is low
and DIO-1 is high and DIO-2 is rising or DIO-3 is falling.
FDwfDigitalInTriggerSet(HDWF hdwf,
unsigned
int
fsLevelLow,
unsigned
int
fsLevelHigh,
unsigned
int
fsEdgeRise,
unsigned
int
fsEdgeFall)
Parameters:
-
hdwf – Interface handle.
-
fsLevelLow – Set low state condition.
-
fsLevelHigh – Set high state condition.
-
fsEdgeRise – Set rising edge condition.
-
fsEdgeFall – Set falling edge condition.
The function above is used to configure the digital in trigger detector.
FDwfDigitalInTriggerGet(HDWF hdwf,
unsigned
int
*pfsLevelLow,
unsigned
int
*pfsLevelHigh,
unsigned
int
*pfsEdgeRise,
unsigned
int
*pfsEdgeFall)
Parameters:
-
hdwf – Interface handle.
-
pfsLevelLow – Variable to receive the configured value.
-
pfsLevelHigh – Variable to receive the configured value.
-
pfsEdgeRise – Variable to receive the configured value.
-
pfsEdgeFall – Variable to receive the configured value.
The function above returns the configured digital in trigger detector option.