How to run multiple programs in RevPiPyLoad?

Moderator: RevPiModIO

Post Reply
elboyoloco1080
Posts: 1
Joined: 13 Feb 2021, 02:38

How to run multiple programs in RevPiPyLoad?

Post by elboyoloco1080 »

I am trying to start multiple programs with RevPiPyLoad.
In the file /etc/revpipyload/revpipyload.conf I can add a single program (program_1.py) to the "plcprogram" line and this works.
How do I make 2 programs both run?
Something like:

Code: Select all

plcprogram = program_1.py ; program_2.py
All the examples found in online documentation only show one program.
Thank you for any help.
User avatar
RevPiModIO
KUNBUS
Posts: 335
Joined: 20 Jan 2017, 08:44
Contact:

Re: How to run multiple programs in RevPiPyLoad?

Post by RevPiModIO »

Hi elboyoloco1080!

I'm sorry to say that, but RevPiPyLoad can handle just one program!

As a workaround you could create a "start_all.py" file, where you import the other files with your programs, you like to run.

A little tricky thing is to handle the SIGTERM signal in the start_all.py file. You have to pass the signal to the other modules by calling a ".stop()" function for example.

If you need some code, let me know!

Regards
Sven
python3-RevPiModIO - https://revpimodio.org/ || Der RevPi ist das Beste, was passieren konnte!
Post Reply