Similar problem with "FDwfAnalogInChannelRangeSet" and Get.
I used the provided "analogin_acquisition.cpp" example and just called "FDwfAnalogInChannelRangeGet" after the Wait(2) to check if the range on channel 0 is actually set to 5 V.
But the range I get back is always 54.49315154 V.
Below part of the example with the get method added.
// enable channels
for(int c = 0; c < cChannel; c++){
FDwfAnalogInChannelEnableSet(hdwf, c, true);
}
// set 5V pk2pk input range for all channels
FDwfAnalogInChannelRangeSet(hdwf, -1, 5);
// 20MHz sample rate
FDwfAnalogInFrequencySet(hdwf, 20000000.0);
// get the maximum buffer size
FDwfAnalogInBufferSizeInfo(hdwf, NULL, &cSamples);
FDwfAnalogInBufferSizeSet(hdwf, cSamples);
rgdSamples = new double[cSamples];
// configure trigger
FDwfAnalogInTriggerSourceSet(hdwf, trigsrcDetectorAnalogIn);
FDwfAnalogInTriggerAutoTimeoutSet(hdwf, 10.0);
FDwfAnalogInTriggerChannelSet(hdwf, 0);
FDwfAnalogInTriggerTypeSet(hdwf, trigtypeEdge);
FDwfAnalogInTriggerLevelSet(hdwf, 1.0);
FDwfAnalogInTriggerConditionSet(hdwf, trigcondRisingPositive);
// wait at least 2 seconds with Analog Discovery for the offset to stabilize, before the first reading after device open or offset/range change
Wait(2);
double range = 0;
FDwfAnalogInChannelRangeGet(hdwf, 0, &range);
printf("range: %f\n", range);