Jump to content
  • 0

Waveforms SDK setting AIO voltage range


recharged95

Question

Hi, I was using the latest Waveforms SDK and was getting a lot of noise that I narrowed down to range setting.

I'll run this:

        FDwfAnalogInChannelRangeSet(hdwf, 0, 5);
        FDwfAnalogInChannelRangeSet(hdwf, 1, 5);
        FDwfAnalogInChannelAttenuationSet(hdwf, 0, 0.01);
        FDwfAnalogInChannelAttenuationSet(hdwf, 1, 0.01);

And system reports Chan0 range as 0.60590172535 and Chan1 range as 0.60395088311

But in WaveForms GUI,  I can set it by hand where it reports this in the log:    #Channel 1: Range: 10 uV/div Offset: 0 V Attenuation: 0.01 X  and the data looks great, no noise.

So I assume you just set the range--       
FDwfAnalogInChannelRangeSet(hdwf, 0, 0.00001);
FDwfAnalogInChannelRangeSet(hdwf, 1, 0.00001);

And system reports Chan0 range as 0.05515644288 and Chan1 range as 0.05499558692 ... and I still get noise and a different output than if I used the GUI. Any suggestions? Am I setting range correctly? 

 

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi @recharged95

The AD Scope inputs have two input gains/ranges, ~50Vpk2pk and ~5Vpk2pk. In reality ~60Vpk2pk and ~5.5Vpk2pk to have tolerance, reserve for calibration.
https://reference.digilentinc.com/reference/instrumentation/analog-discovery-2/reference-manual#scope_input_divider_and_gain_selection
The Attenuation refers to external attenuation or amplification applied, so the software will scale the range, offset, trigger levels, data accordingly.
For instance with a 10x probe the devices receives 1/10th of signal so the scaling is 10x, the ranges will be ~500Vpk2pk and ~50Vpk2pk
If you use 100x external amplifier you can specify 0.01x attenuation, this way the ranges will be 1/100 like: ~0.5Vpk2pk and ~0.05Vpk2pk

Link to comment
Share on other sites

Thanks I think I got it setup (my program measurements are the same as the WaveForms GUI running the same test).

 

Another question: Is there a way to setup the Analog channels to record the data after a trigger on a one-shot acquisition. On the digitial side, I use  FDwfDigitalInTriggerPositionSet(hdwf, cSamples) is there an equivalent on the analog side (hence I can time-sync/event-sync the analog and digital). I think it's the analog scenario of this, but I don't want to use the entire memory footprint (8192) while throwing out 1/2 the samples manually calculating zero point to skip to it- thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...