Jump to content
  • 0

Looking for guidance on waveforms SDK API functions


Leo_W

Question

4 answers to this question

Recommended Posts

  • 0

Hi @Leo_W

> Which API can I use?

The term API is a bit ambiguous; it can refer to an entire set of functionality (eg a library or python package), or to a specific function within a given library. Which one do you mean?

And which language do you want to use?

Link to comment
Share on other sites

  • 0

Hi, this is my question.
Yes, I have done according to WF SDK/ samples/ py/ AnalogOut_Custom.py, step by step.
1. Output signal from AO1 successfully, like that waveform in that picture.
2. But I can't sample anothe signal by AI2 at the "210us" time.
3. Please be advised, Trigger and 210us. We need starting sampling at the "210us" time.
Thanks a lot.

Link to comment
Share on other sites

  • 0

Hi @YuQiang

See for instance the AnalogOut_Sweep.py example.

Configure AnalogIn...

dwf.FDwfAnalogInFrequencySet(hdwf, c_double(hzRate))
dwf.FDwfAnalogInBufferSizeSet(hdwf, c_int(cSamples))
dwf.FDwfAnalogInTriggerSourceSet(hdwf, trigsrcAnalogOut1) 
dwf.FDwfAnalogInTriggerPositionSet(hdwf, c_double(230e-6 + 0.5*cSamples/hzRate)) # capture starts 230us after trigger, after AWG start
dwf.FDwfAnalogInConfigure(hdwf, c_int(1), c_int(1))

(alternatively you could use FDwfAnalogInTriggerConditionSet DwfTriggerSlopeFall AWG stop and Position of 210us)

Configure AnalogOut...

dwf.FDwfAnalogOutConfigure(hdwf, channel, c_int(1))

Wait for AnalogIn DwfStateDone

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