• 0
spri

Function to return remaining wait time when using waitset or trigdelay

Question

For the analog discovery 2 SDK, when using the AnalogOutWaitSet command, is there a function which will tell me how long until the trigger/device start? I am looking for something similar to AnalogOutRunStatus, but which will tell me the remaining wait time.

Thank you.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @spri

Actually, the FDwfAnalogOutRunStatus returns not only the the remaining run but also the wait time.

dwf.FDwfAnalogOutRunSet(hdwf, channel, c_double(2))
dwf.FDwfAnalogOutWaitSet(hdwf, channel, c_double(2))
dwf.FDwfAnalogOutRepeatSet(hdwf, channel, c_int(2))

dwf.FDwfAnalogOutConfigure(hdwf, channel, c_bool(True))
for i in range(10):
    sts = c_byte()
    sec = c_double()
    dwf.FDwfAnalogOutStatus(hdwf, channel, byref(sts))
    dwf.FDwfAnalogOutRunStatus(hdwf, channel, byref(sec))
    print("State: "+str(int(sts.value))+ " time left: "+ str(sec.value))
    time.sleep(1)
State: 7 time left: 1.99928738 // wait
State: 7 time left: 1.00601063
State: 3 time left: 1.99434336 // run
State: 3 time left: 0.97901375
State: 7 time left: 1.97874957 // wait
State: 7 time left: 0.97872712
State: 3 time left: 1.9787507 // run
State: 3 time left: 0.96878297
State: 2 time left: 0.0 // done

@JColvin

The *Get function return the configured value by *Set functions, like if you *Set the sample rate to 60MHz, the *Get will return the actually configured 50MHz, since the device can only do 100MHz, 50MHz, 33.3MHz...1uHz
The *Status function return the monitorized information.

Share this post


Link to post
Share on other sites
  • 0

Hi @spri,

Is the function AnalogOutWaitGet what you are looking for (pg 50 of the WaveForms SDK Reference Manual)? Or are you looking for a slightly different functionality?

Thanks,
JColvin

Share this post


Link to post
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