SCADA_Dude
Member
For some reason this code does not work. I get a pump fail even though I am not getting a pump fail from the controller and the pump run works. The alarm reset clears the fail, but after the delay it comes right back. I have checked that expression and it should not be generating a true condition for the TON. Any ideas? It is driving my nuts.
Thanks!
-------
(* FUNCTION DESCRIPTION: This function performs Pump Fail Signal, which latches requiring a manual reset *)
(* If pump has been called but no run, generate alarm *)
(* or if the MCC indicate a fail, generate alarm *)
IF (pump.bools.mot_call and NOT pump.bools.mot_run) OR (pump.bools.mot_fail) THEN
pumpfail_trigger := TRUE;
ELSE
pumpfail_trigger := FALSE;
END_IF;
(* TON timer for the pump alarm *)
pumpfail_counter (IN:=pumpfail_trigger, PT:=pumpfail_delay_sp, Q=>pump_fail_temp) ;
(* Generate the pump fail, latched requiring a manual reset *)
IF pump_fail_temp THEN
pump.bools.pump_fail := TRUE;
END_IF;
(* Manual Pump Fail Reset *)
IF alarm_rst THEN
pump.bools.pump_fail := FALSE;
END_IF;
Thanks!
-------
(* FUNCTION DESCRIPTION: This function performs Pump Fail Signal, which latches requiring a manual reset *)
(* If pump has been called but no run, generate alarm *)
(* or if the MCC indicate a fail, generate alarm *)
IF (pump.bools.mot_call and NOT pump.bools.mot_run) OR (pump.bools.mot_fail) THEN
pumpfail_trigger := TRUE;
ELSE
pumpfail_trigger := FALSE;
END_IF;
(* TON timer for the pump alarm *)
pumpfail_counter (IN:=pumpfail_trigger, PT:=pumpfail_delay_sp, Q=>pump_fail_temp) ;
(* Generate the pump fail, latched requiring a manual reset *)
IF pump_fail_temp THEN
pump.bools.pump_fail := TRUE;
END_IF;
(* Manual Pump Fail Reset *)
IF alarm_rst THEN
pump.bools.pump_fail := FALSE;
END_IF;
Last edited: