Jump to content
  • 0

AD2 FDwfAnalogInTriggerAutoTimeout problems


holla2040

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

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...