Jump to content
  • 0

wait state after trigger in DwfDigitalIn


Bjorn

Question

To increase the time-resolution when measuring delays between pulses with the Analog Discovery 2 (using the SDK)  I would like to have a wait-state after a trigger have occurred when sampling digital in-data. For example, I expect that after a high signal on IO pin 1 a high signal will occur on IO pin 2 after about one second. I can set the maximum buffer size to 4096 and a divider so that the sampling after the trigger on IO pin 1 will sample for about one second. But that means that the timing resolution of each sample is about 1/4096, or about 0,2 ms. If I could set a wait-counter for 0,99 seconds and then sample at maximum frequency from 0,99 seconds to 1.01 seconds I could increase the resolution for the second pulse detection to 0,02/4096, or about 5 us.

Is there a solution to increase the sampling resolution at a delayed offset to a trigger in digital in?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @Bjorn

You can set the trigger position to 1 second and perform acquisition on a small time span, like 80us with 100Mhz of 8000 samples. With this the trigger position + 1 second will be in the middle of the capture. With 0.99996 second (1-40us) it will be the beginning of the capture.

Link to comment
Share on other sites

I cannot see how to do this for DigitialIn. AnalogIn have the posibility to set a triggerPosition which defines a horzontal trigger position in seconds. However the DigitalIn TriggerPositionSet sets a "number of samples to acquire after the trigger" and does not define a wait time in seconds. One possibility might be to instead use the analog channels and detect the pulses there, but since the pulses are digital the digitalIn is a better match. DigitalOut have a wait state. Maybe I could trigger DigitalOut, let that wait for 0.99996 seconds and then let that somehow trigger the DigitalIn capturing?

 

Link to comment
Share on other sites

Hi @Bjorn

Oh... for Digital In... sorry
With FDwfDigitalInTriggerPositionSet for single/repeated acquisition you specify the end of the acquisition relative to trigger event. With FDwfDigitalInBufferSizeSet the number of samples to acquire.
So for 100MHz acquisition and position of 100M the last sample of the capture will be 1 second after the trigger event.
To have the trigger position + 1 second in the middle of the capture set position to = (1 second) x (sample rate) + (buffer size)/2

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...