Moderator: RevPiModIO

 
elboyoloco1080
Topic Author
Posts: 1
Joined: 13 Feb 2021, 02:38

How to run multiple programs in RevPiPyLoad?

13 Feb 2021, 02:50

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:
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
Posts: 249
Joined: 20 Jan 2017, 08:44
Contact:

Re: How to run multiple programs in RevPiPyLoad?

21 Feb 2021, 19:44

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!

Who is online

Users browsing this forum: No registered users and 5 guests