Вам осталось совсем чуть-чуть дажать и получилось бы так:
Код:function_block Control var_input level : real; // Текущий уровень level1 : real; // Максимальный level2 : real; // Средний level3 : real; // Минимальный end_var var_output pump1 : bool; // Насос 1 pump2 : bool; // Насос 2 end_var if level >= level1 then pump1:=false; pump2:=false; elsif level < level1 and level >= level2 then pump1:=true; pump2:=false; elsif level < level2 and level >= level3 then pump1:=false; pump2:=true; elsif level < level3 then pump1:=true; pump2:=true; end_if end_function_block




Ответить с цитированием
