Which PicoScope device are you using?
The values returned by the driver will be 16-bit integers - when loaded into the MATLAB, these values will be converted into the default double data type.
As these are 16-bit ADC count values, the max/min values in ADC counts should be +/- 32767. Depending on the voltage range used, these values will be scaled accordingly to convert into milliVolts. The following code snippet from the 3000A series C example should demonstrate this:
- Code: Select all
int adc_to_mv(long raw, int ch, UNIT * unit)
if(scaleVoltages == 1)
return (raw * inputRanges[ch]) / unit->maxValue;
In the function arguments, raw is the raw ADC value, ch is the index used to determine the voltage range used, and unit is a structure used to hold information about the device.
There is a function call that returns the maximum value for a device, in ADC counts, for a device in the 3000A series API. For the PicoScope 3204B, this is 32512. Anything above this is likely to be returned as invalid number - it may be that MATLAB treats these as an infinite number.
If you have an example file you could send to firstname.lastname@example.org
, we can take a look.