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
How to use status signals for modules health
Re: How to use status signals for modules health
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
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
Dear Dirk,
What about if I wanted to do the same from Python?
Kees Jan
What about if I wanted to do the same from Python?
Kees Jan
Re: How to use status signals for modules health
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
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
Hello Nicolai,
If I use the revpimodio library, wouldn't be easier? Are there any variables there for modules health?
thanks
If I use the revpimodio library, wouldn't be easier? Are there any variables there for modules health?
thanks
- RevPiModIO
- KUNBUS
- Posts: 335
- Joined: 20 Jan 2017, 08:44
- Contact:
Re: How to use status signals for modules health
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
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!