Page 1 of 1

Output instability issue when running multiple python codes through systemd.

Posted: 10 Jan 2024, 18:32
by Makoto G
I'm using a RevPi Connect SE with an MIO module connected.
When multiple Python codes importing RevPiModIO are executed simultaneously through systemd, both digital and analog outputs become unstable.

I've seen a similar discussion in the forum before, but I remember that it was said that the cause was that the initial value set in PiCtory was referenced every time a different python code was executed.
It was written in the thread that it should be combined into one python code, but is there a way to run multiple codes separately?

For example, I want to use analog input and analog output for completely different purposes. In this case, it makes more sense to manage each feature in separate python code.
Please let me know if there is a better way.

Sincerely yours,

Re: Output instability issue when running multiple python codes through systemd.

Posted: 11 Jan 2024, 11:09
by RevPiModIO
Hi Makoto

Just add "shared_procimg=True" to you RevPiModIO(...) call in all your scripts.

https://revpimodio.org/en/doc2/#shared_procimg

Greeting
Sven