Hello! I have some questions.
1. Is it possible to decrease the RevPiIOCycle value manually?
2. I always get this warning when run the Python script, maybe you have an idea how to fix that.
/usr/lib/python3/dist-packages/revpimodio2/helper.py:622: RuntimeWarning: io refresh time of 20 ms exceeded!
RuntimeWarning
3. On MIO every input shows 10V, however, there is nothing on inputs. What can cause this problem? Otherwise, MIO seems to work correctly.
Thanks in advance.
Some questions
Hello Limpopo,
Thank you, for sharing your inquiry here.
1. It is not possible to decrease the RevPiIOCycle value manually.
We now have to find out what is happening there.
- In the command line, for example, you could use `htop` to display CPU and RAM consumption. Then you can also find the responsible process.
If it is your Python program, I suspect that several times `revpimodio2. RevPiModIO(autorefresh=True)` is called. Only a single RevPiModIO instance may exist, old instances must be terminated cleanly by calling `.exit()`.
For more information about this kind of issue, please look here.
Best Regards,
Ulrich Kouatang Biakoup | Technical Support
Thank you, for sharing your inquiry here.
1. It is not possible to decrease the RevPiIOCycle value manually.
It looks like a resource problem on the RevPi. Of course, when the CPU is busy and the system starts to be unoperable, revpimodio2 can of course no longer maintain the cycle time and these warnings are issued.2. I always get this warning when run the Python script, maybe you have an idea how to fix that.
/usr/lib/python3/dist-packages/revpimodio2/helper.py:622: RuntimeWarning: io refresh time of 20 ms exceeded!
RuntimeWarning
We now have to find out what is happening there.
- In the command line, for example, you could use `htop` to display CPU and RAM consumption. Then you can also find the responsible process.
If it is your Python program, I suspect that several times `revpimodio2. RevPiModIO(autorefresh=True)` is called. Only a single RevPiModIO instance may exist, old instances must be terminated cleanly by calling `.exit()`.
For more information about this kind of issue, please look here.
please have a look at this manual, which could you to troubleshoot the problem .3. On MIO every input shows 10V, however, there is nothing on inputs. What can cause this problem? Otherwise, MIO seems to work correctly.
Best Regards,
Ulrich Kouatang Biakoup | Technical Support
thanks!
2. I have .exit() function. I have this code and still get warnings:
import revpimodio2
import time
rpi = revpimodio2.RevPiModIO(autorefresh=True)
x=0
while (x<2):
sample=rpi.io.AnalogInput_5.value
if (sample>2000):
x=x+1
if (x==1):
time.sleep(5)
print("1st turn")
print("2 turn")
rpi.exit()
3. I have checked MIO manual according to it everything seems fine, however, every input still shows 10V when there is nothing on inputs.
2. I have .exit() function. I have this code and still get warnings:
import revpimodio2
import time
rpi = revpimodio2.RevPiModIO(autorefresh=True)
x=0
while (x<2):
sample=rpi.io.AnalogInput_5.value
if (sample>2000):
x=x+1
if (x==1):
time.sleep(5)
print("1st turn")
print("2 turn")
rpi.exit()
3. I have checked MIO manual according to it everything seems fine, however, every input still shows 10V when there is nothing on inputs.