Issue with Input Multiplier on AIO Card – Unexpected Negative Values with RevPiModIO

Moderator: RevPiModIO

Post Reply
XavSPM
Posts: 1
Joined: 01 May 2025, 09:02

Issue with Input Multiplier on AIO Card – Unexpected Negative Values with RevPiModIO

Post by XavSPM »

Hello,

I am currently in the testing phase with AIO cards and I am encountering an error that I have been unable to resolve.
I have connected the OUT 1 output to the IN 1 input and configured both in 4–20 mA mode.
schéma
schéma
When the multiplier values are set to 1, everything works correctly: I can see the OUT 1 value correctly reflected on IN 1.

However, when I apply a multiplier value to the INT1 input, I get the following behavior:

Code: Select all

pi@RevPi-cyc-eau:~$ python3
Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import revpimodio2
>>> a=revpimodio2.RevPiModIO(autorefresh=True)
>>> a.io.OutputValue_1_i06.value =4000
>>> a.io.InputValue_1_i06.value
8000
>>> a.io.OutputValue_1_i06.value =19000
>>> a.io.InputValue_1_i06.value
-27514
>>> a.io.InputStatus_1_i06.value
4
>>> a.io.Input1Multiplier_i06.value
2
>>> 
When I check with piTest:

Code: Select all

pi@RevPi-cyc-eau:~$ piTest -r InputStatus_1_i06
1 Byte-Value of InputStatus_1_i06: 4 dez (=04 hex)

pi@RevPi-cyc-eau:~$ piTest -r InputValue_1_i06
2 Byte-Value of InputValue_1_i06: 38020 dez (=9484 hex)

pi@RevPi-cyc-eau:~$ piTest -r OutputValue_1_i06
2 Byte-Value of OutputValue_1_i06: 19000 dez (=4a38 hex)
Could you please let me know if there is anything wrong in my configuration?
Do you think this could be a bug in RevPiModIO?
Post Reply