• 0
Sign in to follow this  
holla2040

AD2 FDwfAnalogInTriggerAutoTimeout problems

Question

Folks,

I'm writing a python object for the AD2 trigger, when I set the autotimeout value with dwf.FDwfAnalogInTriggerAutoTimeoutSet isn't returned with FDwfAnalogInTriggerAutoTimeoutGet. 

My unittest sets autotimeout value to 1.213, get returns 1.25494304. do autotimeout values have to be some subdivided range of values?

    @property
    def autotimeout(self):
        v = c_double()
        self.dwf.FDwfAnalogInTriggerAutoTimeoutGet(self.hdwf,byref(v))
        return v.value
    @autotimeout.setter
    def autotimeout(self,value):
        self.dwf.FDwfAnalogInTriggerAutoTimeoutSet(self.hdwf,c_double(value))
def test_autotimeout(self):
    self.ad2.trigger.autotimeout = 1.213
    print self.ad2.trigger.autotimeout
    self.assertEqual(1213,int(round(self.ad2.trigger.autotimeout*1000)),"trigger autotimeout incorrect")

All the other trigger variables set and get correctly. 

Thanks,
Craig

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @holla2040

The Get functions usually return the actually configured values, like the actual offset of the DAC, the range of the ADC...

The purpose of the AutoTimeout is not about precision. It is settable for up to ~21sec, in 255 steps at ~84ms resolution, more exactly N[1..255] * 2^23/1e8

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
Sign in to follow this