Add shared_procimg to run_plc function

Shared Procimg can now also be actrivated when using the run_plc function
This commit is contained in:
kellergoech
2026-04-09 11:25:36 +02:00
committed by Sven Sager
parent 8a19959582
commit 8e42527cd0
+2 -1
View File
@@ -1530,7 +1530,7 @@ class RevPiModIODriver(RevPiModIOSelected):
)
def run_plc(func, cycletime=50, replace_io_file=None, debug=True, procimg=None, configrsc=None):
def run_plc(func, cycletime=50, replace_io_file=None, debug=True, procimg=None, configrsc=None, shared_procimg=False):
"""
Run Revoluton Pi as real plc with cycle loop and exclusive IO access.
@@ -1557,6 +1557,7 @@ def run_plc(func, cycletime=50, replace_io_file=None, debug=True, procimg=None,
debug=debug,
procimg=procimg,
configrsc=configrsc,
shared_procimg=shared_procimg
)
rpi.handlesignalend()
return rpi.cycleloop(func, cycletime)