Jump to content
  • 0

reject gliches as trigger


PeterCo

Question

Hi,

I have the Digital discovery working in Labview to capture random pulses and measure their length.  The pulse length is measured at 10ns resolution, their length is around 100..1000ns.  This is the initialisation :

set TRIGSRC to 3

trigger_slope_set to 0.   

fsedgerise in trigger_set to 1 to measure and trigger on DIN0

trigger_length_set secMin to 1E-7, secMax to 1, idxSync to 0

trigger_auto_timeout to 0

Glitches of less than 100ns need to be ignored as trigger but this is not working.  I haven't used the triggerMatchSet (deserializer ?) as I don't understand its relationship with the trigger_length function.  Would there be an example code somewhere or more detailed doc on setting up this feature of the trigger system ?

Kind regards.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @PeterCo

I hope this works:

dwf.FDwfDigitalInTriggerSourceSet(hdwf, c_ubyte(3)) # trigsrcDetectorDigitalIn
# DIO 7 (DIO 31 for Digital Discovery) positve pulse 100ns-1us
dwf.FDwfDigitalInTriggerResetSet(hdwf, c_int(0), c_int(0), c_int(1<<7), c_int(0)) # reset on rise (low, high, rise, fall)
dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(1<<7), c_int(0), c_int(0)) # count while high (low, high, rise, fall)
dwf.FDwfDigitalInTriggerLengthSet(hdwf, c_double(100e-6), c_double(1000e-6), c_int(0)) # min, max
dwf.FDwfDigitalInTriggerCountSet(hdwf, c_int(1), c_int(0)) # count 1, no restart

See the WF SDK/ samples/ py/ DigitalIn_PulseTrigger.py 

Link to comment
Share on other sites

  • 0

Thanks Attila for this, I didn't realize that the py examples are different from the C examples.

The solution solves the issue I raised but it looks I didn't express myself correctly.  In the proposed solution, the device waits for the end of the trigger pulse before it triggers.  Obviously as otherwise it couldn't figure out if the length if the pulse complies with the max length spec.  In my case that creates a problem.  I don't care about the max length, I just want the trigger to occur after the minimum specified length.  In that way I know how far to prefill the buffer in order to capture some points before the last rising edge.  In fact, what I want to do is really reject pulses shorter then e.g 200ns.  Consequently the device could trigger as soon as 200ns of high level have elapsed.

I would be glad to experiment with the settings of the device but I feel some documentation on the trigger/detector system is lacking (or I didn't find it).  I don't see how the different functions interact making experimenting a bit harder.

Regards,

Peter.

Link to comment
Share on other sites

  • 0

Hi @PeterCo

For timeout trigger set max length to 0, like:

dwf.FDwfDigitalInTriggerSourceSet(hdwf, c_ubyte(3)) # trigsrcDetectorDigitalIn
# DIO 7 (DIO 31 for Digital Discovery) 
dwf.FDwfDigitalInTriggerResetSet(hdwf, c_int(0), c_int(0), c_int(1<<7), c_int(0)) # reset on rise (low, high, rise, fall)
dwf.FDwfDigitalInTriggerSet(hdwf, c_int(0), c_int(1<<7), c_int(0), c_int(0)) # count while high (low, high, rise, fall)
dwf.FDwfDigitalInTriggerLengthSet(hdwf, c_double(200e-9), c_double(0.0), c_int(0)) # min, max = 0 > timeout
dwf.FDwfDigitalInTriggerCountSet(hdwf, c_int(1), c_int(0)) # count 1, no restart

image.png.912fefe198f9d24e3ab64355ac6c0ce3.png

image.png.723cd3d35d3f7ecb5c9234c371a53cbb.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...