I used the default buffer size setting which is 4K for analog out and 1K for digital out. Since my analog out setting is 5 MHz sample frequency and run for 4 ms, the captured buffer size is 20 K which already exceeded the buffer size, however, the system seems still working in set time duration. For the digital out, I used 20 as divider and digitaloutcounterset to define the pattern, which would capture 30800 bits (impulseTime*5000+100+ringdownTime*5000+700) for one cycle, this seems also exceeded the 1K limit but still work. I am wondering is my calculation wrong or the setting I used does not require that much buffer size?
Question
Thomas Lee
Hi,
I am using the analog out and digital out functions with the following settings:
hzAcq=C_double(5e6)
freq=180
impulsetime=4
ringdowntime=2
Analog out:
dwf.FDwfAnalogOutTriggerSourceSet(hdwf,c_int(0),c_int(12))
dwf.FDwfAnalogOutNodeEnableSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_bool(True))
dwf.FDwfAnalogOutNodeFunctionSet(hdwf, c_int(0), AnalogOutNodeCarrier, funcSine)
dwf.FDwfAnalogOutNodeFrequencySet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double((freq/10.000)*hzAcq.value/500.000))
dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, c_int(0), AnalogOutNodeCarrier, c_double(excitation))
dwf.FDwfAnalogOutRunSet(hdwf,c_int(0), c_double((4/0.00002)/(hzAcq.value*10))) # run for 4 ms
dwf.FDwfAnalogOutRepeatSet(hdwf, c_int(0), c_int(1))
Digital out pattern generator:
dwf.FDwfDigitalOutDividerSet(hdwf, c_int(0), c_int(20))
dwf.FDwfDigitalOutDividerSet(hdwf, c_int(1), c_int(20))
dwf.FDwfDigitalOutDividerSet(hdwf, c_int(2), c_int(20))
dwf.FDwfDigitalOutDividerSet(hdwf, c_int(3), c_int(20))
dwf.FDwfDigitalOutCounterInitSet(hdwf, c_int(0), c_uint(0), c_uint(1))
dwf.FDwfDigitalOutCounterInitSet(hdwf, c_int(1), c_uint(1), c_uint(1))
dwf.FDwfDigitalOutCounterInitSet(hdwf, c_int(2), c_uint(0), c_uint(1))
dwf.FDwfDigitalOutCounterInitSet(hdwf, c_int(3), c_uint(1), c_uint(1))
dwf.FDwfDigitalOutEnableSet(hdwf, c_int(0), c_int(1))
dwf.FDwfDigitalOutCounterSet(hdwf, c_int(0), c_uint(int(ringdownTime*5000+650)), c_uint(int(impulseTime*5000+150)))
dwf.FDwfDigitalOutEnableSet(hdwf, c_int(1), c_int(1))
dwf.FDwfDigitalOutCounterSet(hdwf, c_int(1), c_uint(int(impulseTime*5000+50)), c_uint(int(ringdownTime*5000+750)))
dwf.FDwfDigitalOutEnableSet(hdwf, c_int(2), c_int(1))
dwf.FDwfDigitalOutCounterSet(hdwf, c_int(2), c_uint(int(impulseTime*5000+1050)), c_uint(int(ringdownTime*5000-250)))
dwf.FDwfDigitalOutEnableSet(hdwf, c_int(3), c_int(1))
dwf.FDwfDigitalOutCounterSet(hdwf, c_int(3), c_uint(int(impulseTime*5000+100)), c_uint(int(ringdownTime*5000+700)))
I used the default buffer size setting which is 4K for analog out and 1K for digital out. Since my analog out setting is 5 MHz sample frequency and run for 4 ms, the captured buffer size is 20 K which already exceeded the buffer size, however, the system seems still working in set time duration. For the digital out, I used 20 as divider and digitaloutcounterset to define the pattern, which would capture 30800 bits (impulseTime*5000+100+ringdownTime*5000+700) for one cycle, this seems also exceeded the 1K limit but still work. I am wondering is my calculation wrong or the setting I used does not require that much buffer size?
Best regards,
Thomas
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