Page 1 of 1

How to use status signals for modules health

Posted: 08 Feb 2023, 12:15
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

Re: How to use status signals for modules health

Posted: 08 Feb 2023, 14:15
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

Re: How to use status signals for modules health

Posted: 08 Feb 2023, 15:26
by kjkoster
Dear Dirk,

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

Kees Jan

Re: How to use status signals for modules health

Posted: 08 Feb 2023, 21:49
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

Re: How to use status signals for modules health

Posted: 09 Feb 2023, 12:16
by mpandos
Hello Nicolai,

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

thanks

Re: How to use status signals for modules health

Posted: 23 Feb 2023, 16:17
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