How to use status signals for modules health

Topics about the Hardware of Revolution Pi
Post Reply
mpandos
Posts: 10
Joined: 02 Dec 2022, 13:19
Answers: 0

How to use status signals for modules health

Post by mpandos »

Hello,

I want to make some tests regarding the modules (AIO/MIO/DIO) I have connected to my revpi. So if I need to check modules status, and by status I mean connectivity to revpi, power on/off, which variable should I check? Should I only check RevPiStatus bytes 1,2,3,4?
Also are there any specific variables I can monitor, specifically for overall health status, in the modules?

If I understand correctly OutputStatus_1-2 and InputStatus_1-4 for AIO are only for monitoring health of the specific I/O's and not for monitoring health of the module itself.

Thanks
User avatar
dirk
KUNBUS
Posts: 1942
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: How to use status signals for modules health

Post by dirk »

Hello mpandos,
the modules communicate via the PiBridge. The PiBridge consists of RS-485 and Ethernet based communication.
If there is no power connected to the X4 connector, the communication over the PiBridge from this module on is disturbed.
The status of the PiBridge can be checked for example with piTest -x.
There appears an error output that the module is configured but not in operation.
The piTest program is intended as a demo for your own developments and you can find the code either in the "/home/pi/demo" directory or in the download area.
In the video tutorial #13 this is discussed
kjkoster
Posts: 87
Joined: 12 Feb 2022, 10:42
Answers: 2

Re: How to use status signals for modules health

Post by kjkoster »

Dear Dirk,

What about if I wanted to do the same from Python?

Kees Jan
User avatar
nicolaiB
KUNBUS
Posts: 871
Joined: 21 Jun 2018, 10:33
Answers: 7
Location: Berlin
Contact:

Re: How to use status signals for modules health

Post by nicolaiB »

Hi Kees,

I did some experiments a while ago, but haven't found enough time to continue on this. You can find my code, which tries to fetch as much status information as possible on GitHub: https://github.com/nbuchwitz/revpi-diag ... revpi-diag

Hope this gives you some inspiration.

Nicolai
mpandos
Posts: 10
Joined: 02 Dec 2022, 13:19
Answers: 0

Re: How to use status signals for modules health

Post by mpandos »

Hello Nicolai,

If I use the revpimodio library, wouldn't be easier? Are there any variables there for modules health?

thanks
User avatar
RevPiModIO
KUNBUS
Posts: 322
Joined: 20 Jan 2017, 08:44
Answers: 0
Contact:

Re: How to use status signals for modules health

Post by RevPiModIO »

In RevPiModIO, the status of the modules can be read via their variables in the process image. Each DIO/DO/DI module has a status word (16 bits) which indicates various errors, see link.

https://revolutionpi.com/tutorials/over ... o-modules/

In control projects, I generally query these values from each individual module to find out its status and also the RevPiStatus byte. With a DI module, the status value (dec) is 768, since the error bits 8 + 9 are set for the "outputs", but of course they are on a DI

Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Post Reply