dragonLin Posted June 29, 2022 Share Posted June 29, 2022 When I adjust the parameter(1.0V) analog in offset. the data is no show after adjustment offset.(FDwfAnalogInStatusData) But it is showing offset at FDwfAnalogInStatusData16 function. How can I get data from FDwfAnalogInStatusData function with offset shift. Link to comment Share on other sites More sharing options...
0 attila Posted June 29, 2022 Share Posted June 29, 2022 Hi @dragonLin The oscilloscope offset is used to shift the input range to fit the input signal, like below -2V to fit 0V-4V signal in -0.5V to 4.5V The ADC receives shifted voltage, visible in the raw 16bit samples. To obtain the real voltage values use the following (from the manual) : rgs16Data[i] * FDwfAnalogInChannelRangeGet / 65536+FDwfAnalogInChannelOffsetGet This is applied on the float voltage samples function, FDwfAnalogInStatusData If you want to have a math operation you should do it in your application, like here M1 is C1 + 2V for each sample. Link to comment Share on other sites More sharing options...
0 dragonLin Posted June 30, 2022 Author Share Posted June 30, 2022 (edited) I got data with offset from FDwfAnalogInStatusData16 function. But FDwfAnalogInStatusData is no. is it need to set some parameter to get with offset data at FDwfAnalogInStatusData function? Edited June 30, 2022 by dragonLin Link to comment Share on other sites More sharing options...
0 attila Posted June 30, 2022 Share Posted June 30, 2022 Hi @dragonLin Input signal - Offset -> ADC -> -> FDwfAnalogInStatusData16 returns raw data, to convert to voltage samples use: foreach sample[i] = data[i] x Range/65536 +Offset -> FDwfAnalogInStatusData returns converted to voltage samples The offset parameter is meant to shift the input range but keeping voltage samples equal to the input signal, so the hardware offset is compensated with the above conversion. If you want to offset the values compared to the input signal then do it in your application, foreach sample[i] = sample[i] + off Link to comment Share on other sites More sharing options...
0 dragonLin Posted June 30, 2022 Author Share Posted June 30, 2022 got it. thank for your support. attila 1 Link to comment Share on other sites More sharing options...
Question
dragonLin
When I adjust the parameter(1.0V) analog in offset. the data is no show after adjustment offset.(FDwfAnalogInStatusData)
But it is showing offset at FDwfAnalogInStatusData16 function.
How can I get data from FDwfAnalogInStatusData function with offset shift.
Link to comment
Share on other sites
4 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