Код:
if IN then
Window:=Alarm;
return;
else
case iStep of
0:
if not Auto then //Переключатель "Автоматика" выключен
NWindow:=36;
else iStep:=10;
end_if
10:
if HP then
if Y11 then
NWindow:=34; //Дверь закрывается
else
NWindow:=35; //Дверь открывается
end_if
else iStep:=20;
end_if
20:
if GaskVac then //Отсос уплотнения
NWindow:=37;
else iStep:=30;
end_if
30:
RTRIG1(I:=Start);// Подтвердите выбранную программу повторным нажатием кнопки "Старт"
if RTRIG1.Q then
Flag:=true;
end_if
if Start then
if Flag then
Flag:=false;
elsif not Flag then
NWindow:=38;
end_if
end_if
if not Start and not Flag then
iStep:=40;
end_if
40:
NWindow:=10;
iStep:=0;
end_case
Window:=NWindow;
end_if
end_function_block