Hello All,
I'm trying to design a general PLC function block that can assign lead and lag order to pumps based on runtime regardless of the number of pumps. Right now, I'm listing all combinations of runtime (max, min, middle, etc.) to determine the pump assignments (Ex. the pump the runs the least is assigned to lead while the pump that runs the least becomes the lowest lag pump). Is there a way to write the PLC function block in a way that prevents me from explicitly defining all combinations of runtimes for every pump? I was thinking recursive function, but what data type would allow this (bytes, integer, boolean array) and how would I even begin thinking about it in terms of PLC logic. The bit locations would represent lag order and the runtime values are converted to integers and compared using a comparison block.
I'm using Siemens TIA Portal S7 Version 13.0 with PLC Sim Version 13.0
Could anyone please lend me a hand?
Best,
Adanovinivici
I'm trying to design a general PLC function block that can assign lead and lag order to pumps based on runtime regardless of the number of pumps. Right now, I'm listing all combinations of runtime (max, min, middle, etc.) to determine the pump assignments (Ex. the pump the runs the least is assigned to lead while the pump that runs the least becomes the lowest lag pump). Is there a way to write the PLC function block in a way that prevents me from explicitly defining all combinations of runtimes for every pump? I was thinking recursive function, but what data type would allow this (bytes, integer, boolean array) and how would I even begin thinking about it in terms of PLC logic. The bit locations would represent lag order and the runtime values are converted to integers and compared using a comparison block.
I'm using Siemens TIA Portal S7 Version 13.0 with PLC Sim Version 13.0
Could anyone please lend me a hand?
Best,
Adanovinivici