(*泄壓閥與液位控制*)
if XYMo3=1 and P221_to_HMI>Pxy3 then
XYDCFQT3_m:=1;
else if XYMo3=1 and P221_to_HMI<Pxy3 and LV1_to_HMI<LVMIN then
XYDCFQT3_m:=1;
end_IF;
END_IF;
if XYMo3=1 and P221_to_HMI<Pxy3-Pxy then
XYDCFQT3_m:=0;
ELSE IF XYMo3=1 and P221_to_HMI<Pxy3 and LV1_to_HMI>LVMAX then
XYDCFQT3_m:=0;
END_IF;
end_if;