Hello
How do I know if an I / O extension module is no longer responding? When I remove the bridge between the CPU and an input / output module, the input values seems frozen with revpimodio2. Is there a status that indicates that an extension module is no longer responding?
input status
Moderator: RevPiModIO
There's a global counter of PiBridge i/o errors in the input portion of the RevPi Core's (or Connect's) process image.
Type "piTest -d" to retrieve a list of devices. Look for device 0 and the value specified as "input offset". The error counter has an additional offset of 2, so if the "input offset" is given as 113, the error counter is at 115. You can then retrieve the error counter with "piTest -r 115,1,d". If this returns 255, communication to at least one of the modules has broken down.
In addition you'll get messages like this repeatedly in /var/log/kern.log:
This gives you a clue which of the devices on the PiBridge is no longer reachable. In this is case it's the second device (as listed by "piTest -d").
Type "piTest -d" to retrieve a list of devices. Look for device 0 and the value specified as "input offset". The error counter has an additional offset of 2, so if the "input offset" is given as 113, the error counter is at 115. You can then retrieve the error counter with "piTest -r 115,1,d". If this returns 255, communication to at least one of the modules has broken down.
In addition you'll get messages like this repeatedly in /var/log/kern.log:
Code: Select all
[ 7091.067477] piControl: too many communication errors -> set inputs to default 0 255 0 0 0 0 0 0
Simon
Thank you for your reply.
It seems that you can also get this from python using
It gives the information that there is a problem on the piBridge.
But how to find which module is faulty ?
piControl knows it, because it write it in /var/log/kern.log.
And also, why the inputs (DI or analog) retain their values and do not fall back?
It seems that you can also get this from python using
Code: Select all
print (rpi.core.ioerrorcount)
But how to find which module is faulty ?
piControl knows it, because it write it in /var/log/kern.log.
And also, why the inputs (DI or analog) retain their values and do not fall back?
thanks for your information and question.
Yes, you are right, the information can be obtained with python or any other programming languages.
Currently the presentation of faulty of specific module is not provided, it is under development, will be provided in future.
Right now, I think you can get them by parsing the log file.
The inputs should be fall back when the pribridge failed.
We are going to confirm it, if it's indeed a problem, we are going to fix it in next version.
Best regards,
Simon
Yes, you are right, the information can be obtained with python or any other programming languages.
Currently the presentation of faulty of specific module is not provided, it is under development, will be provided in future.
Right now, I think you can get them by parsing the log file.
The inputs should be fall back when the pribridge failed.
We are going to confirm it, if it's indeed a problem, we are going to fix it in next version.
Best regards,
Simon
Simon
- RevPiModIO
- KUNBUS
- Posts: 335
- Joined: 20 Jan 2017, 08:44
- Contact:
Well, I think each IO module has got its own "Status" and "Output_Status" Input. So check the names in piCtory (if you use more than one IO-Module) and get the status with python.
You should rename them in piCtory for each IO module...
Did they change, if a module is gone?
Regards, Sven
Code: Select all
# For example
rpi = revpimodio2.RevPiModIO(autorefresh=True, direct_output=True)
print(rpi.io.Status.value)
print(rpi.io.Output_Status.value)
Did they change, if a module is gone?
Regards, Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!