Jump to content
  • 0

WaveForms SDK - Issues with FDwfAnalogInTriggerConditionSet()


oeser

Question

I am currently working on a C# data logger application. I want to read measurement data of an Analog Discovery Pro ADP 3450 oscilloscope with the WaveForms SDK. The data aquisition should be performed when a Rising Edge is detected.

I set the trigger condition with the following command

dwf.FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive) 

However, the aquisition is still triggered on rising and falling edge conditions.

 

The behaviour can be reproduced with the python example "AnalogIn_Trigger.py" provided in the WaveForms SDK and e. g. a function generator connected to oscilloscope channel 1 (Sine wave, 5 kHz, 2 Vpp). Even though the trigger condition is defined as  rising edge, the aquisition is perfomed on rising and falling edge conditions as can be seen in the attached pictures. (Trigger Level is 0.5 V, Position at sample 4096)

I tried to read back the trigger condition with "FDwfAnalogInTriggerConditionGet()" which gives the value I expected (trigcondRisingPositive). The function "FDwfAnalogInTriggerConditionInfo()" returns 0b111 which means that the device supports rising edge, falling edge, and both. "DwfTriggerSlopeEither", as written in the reference manual, is not defined in the WaveForms SDK (C# and Python). I assume that the third bit corresponds to this value.

What can I do to perform an ONLY rising edge triggered aquisition. Is there a workaround?

Thank you in advance.

 

falling_edge.png

rising_edge.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @oeser

Use FDwfAnalogInTriggerHysteresisSet to prevent triggering on noise, so the actual triggering window will be level +/-hyst.
The WaveForms app's default auto hyst option uses 1% of the specified range, but the optimal value depends on the signal. According to your screenshot you need about 0.02-0.05 V

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...