public static void TimeOut1(Object myObject, EventArgs myEventArgs) { int cycleNo = Globals.Tags.InCycle.Value; int timer = Globals.Tags.InCycleTimer.Value; int loop = Globals.Tags.LoopCounter.Value; int isOn = Globals.Tags.prewashRestTime.Value; int isOn1 = Globals.Tags.prewashWaterTime.Value; if (timer <= 0) { if (isOn == 0 && isOn1 == 0) { loop = 0; Stop(); } else if (loop > 0) { CycleTimerScript.Start(); } else { Stop(); } } }
public static void TimeOut1(Object myObject, EventArgs myEventArgs) { int cycleNo = Globals.Tags.InCycle.Value; int timer = Globals.Tags.InCycleTimer.Value; int loop = Globals.Tags.LoopCounter.Value; if (timer <= 0) { if (loop >= 0) { CycleTimerScript.Start(); } } }
public static void Stop() { Globals.Tags.WashTimer.Value = 0; Globals.Tags.CycleTimer.Value = 0; Globals.Tags.InCycleTimer.Value = 0; Globals.Tags.LoopCounter.Value = 0; PrewashScript.Stop(); WashingScript.Stop(); WashDryingScript.Stop(); CycleTimerScript.Stop(); Globals.Tags.Automatic_Washing.ResetTag(); Globals.Tags.Washing_Pump.ResetTag(); Globals.Tags.Pressure_Valve.ResetTag(); Globals.Tags.Yellow_Light.SetTag(); Globals.Tags.Buzzer.SetTag(); Globals.Tags.Green_Light.ResetTag(); BuzzerScript.Start(); try { timer1.Enabled = false; } catch (Exception) {} }