Reading and writing AIO

Topics about the Software of Revolution Pi
Post Reply
Aandre
Posts: 1
Joined: 24 Sep 2020, 08:16

Reading and writing AIO

Post by Aandre »

Hi !
I have a question about the setting and reading the AIO values.
I have a 4-20 Input and Output.

For setting the Output :

Do I need to send values from 0-100 % ? so 0 would be 4 and 100 would be 20, or do I need to send values from 4 to 20 directly?

For receiving Input :

Basically same questions .. do I get the values in percent? or will I get values ranging from 4-20 ?

Would appreciate the help.
Greets
Andre
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Reading and writing AIO

Post by dirk »

Hi Aandre, Inputs und Outputs are in mV or mA. So for example 10V equals 10000 in the process image.
User avatar
RR4711
Posts: 229
Joined: 22 Feb 2018, 13:28

Re: Reading and writing AIO

Post by RR4711 »

I think that should be uA and mV.
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: Reading and writing AIO

Post by dirk »

Hi RR4711 you are right. Have a look here How to Configure Analog Input:
The scaling can be used for the conversion into other units or for a subsequent calibration of a sensor. When calculating in an AIO Modul, a 32-bit Integer Arithmetic is used. The results are then stored again as 16-bit values in the process image. Should the result Y exceed the limits of a 16-bit signed value, then the error is recognised and the value limited. The initial values always lie in the unit mV or µA respectively.
Post Reply