The supported divisions are 1, 2, 4 and 8*N, N=1,2,3...
The number of samples is 6.000.000
The divider and number of samples are configured :
# get internal clock frequency
internal_frequency = c_double()
dwf.FDwfDigitalInInternalClockInfo(device_handle, byref(internal_frequency))
# set clock frequency divider (needed for lower frequency input signals)
dwf.FDwfDigitalInDividerSet(device_handle, c_int(int(internal_frequency.value / self.sampling_frequency)))
# set 8-bit sample format
dwf.FDwfDigitalInSampleFormatSet(device_handle, c_int(16))
# set buffer size
dwf.FDwfDigitalInBufferSizeSet(device_handle, c_int(self.buffer_size))
Other configuration :
dwf.FDwfDigitalInTriggerPositionSet(device_handle, c_int(int(self.buffer_size/2))) # trigger in the middle
# number of samples before trigger
dwf.FDwfDigitalInTriggerPrefillSet(device_handle, c_int(0))
dwf.FDwfDigitalInInputOrderSet(device_handle, c_int(0))
dwf.FDwfDigitalInConfigure(device_handle, c_bool(True), c_bool(False))
I did few runs with the same sampling frequency and number of samples and print the time :
Question
mms14
Hello,
I set my AD3 digitalIn to record 60s and the recording lasts about 55s.
Frequency is set to 100kHz, gives a divider of 1000 which is a multiple of 8 :
The number of samples is 6.000.000
The divider and number of samples are configured :
# get internal clock frequency internal_frequency = c_double() dwf.FDwfDigitalInInternalClockInfo(device_handle, byref(internal_frequency)) # set clock frequency divider (needed for lower frequency input signals) dwf.FDwfDigitalInDividerSet(device_handle, c_int(int(internal_frequency.value / self.sampling_frequency))) # set 8-bit sample format dwf.FDwfDigitalInSampleFormatSet(device_handle, c_int(16)) # set buffer size dwf.FDwfDigitalInBufferSizeSet(device_handle, c_int(self.buffer_size))
Other configuration :
dwf.FDwfDigitalInTriggerPositionSet(device_handle, c_int(int(self.buffer_size/2))) # trigger in the middle # number of samples before trigger dwf.FDwfDigitalInTriggerPrefillSet(device_handle, c_int(0)) dwf.FDwfDigitalInInputOrderSet(device_handle, c_int(0)) dwf.FDwfDigitalInConfigure(device_handle, c_bool(True), c_bool(False))
I did few runs with the same sampling frequency and number of samples and print the time :
print(time.time()) result, recordTime = logic.record(device.hdwf) print(time.time())
the record function is the same as in examples and I get different execution time :
55.1014998
54.0307646
55.8770659
54.8211658
57.0943558
55.5126603
And with frequency of 10kHz and 600.000 samples, it lasts about 32s
How to configure to record for 60s ?
Thanks
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now