Page 1 of 1

How to run multiple programs in RevPiPyLoad?

Posted: 13 Feb 2021, 02:50
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.

Re: How to run multiple programs in RevPiPyLoad?

Posted: 21 Feb 2021, 19:44
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