Page 1 of 1

AIO module scale

Posted: 21 Apr 2021, 11:36
by mdr
Hello,

I have a question regarding the scale of data received from AIO module using RevPiModIO2. I have a sensor connected to the AIO module but no way to test the full scale of the sensor(no physical access to the sensor and the pi).
In pictory Input 1 is set as follow:
-Range: -10V/+10V
- Multiplier:1
-Divisor:1
-Offset:0
-ADC_DataRate:640Hz
And in python I am reading the value using rpi.io.InputValue_1() in cycleloop(100ms).
How the rpi.io.InputValue_1() is scaled exactly (8 bit,16bit,24bit) it really not clear for me? from what i understand, Its a 24bits ADC so it should give me the following result;
-10V->0
0V->2^23(8388608)
10V->2^24(16777216)
but that doesn't match with the data that I have...
Could somebody help me,please ,to better understand ?

Best regards,
Martin

Re: AIO module scale

Posted: 26 Apr 2021, 08:05
by RevPiModIO
Hi Martin!

The AIO module will process the data internally and gives us the "real" value. So if you configure the Input for -10 to 10 V you will get the value in mV directly from the AIO module. So the range is -10000 - 10000.

So in the piControl bus is already a processed value from the AIO module and all programs (piTest, RevPiModIO and so on) will show the real, processed value.

Regards
Sven

Re: AIO module scale

Posted: 26 Apr 2021, 08:54
by mdr
Thank you very much for your answer! It's a shame that I figured out the answer just before you reply! That is what happens when you don't read properly the manual...:
The initial values always lie in the unit mV or µA respectively.
Best Regards
Martin