Output instability issue when running multiple python codes through systemd.

Topics about the Hardware of Revolution Pi
Post Reply
Makoto G
Posts: 15
Joined: 11 Oct 2022, 06:11

Output instability issue when running multiple python codes through systemd.

Post 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,
User avatar
RevPiModIO
KUNBUS
Posts: 335
Joined: 20 Jan 2017, 08:44
Contact:

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

Post 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
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Post Reply