public static bool X214_Ejector_D_Up_and_Check() { if (Motion_Control.Got_Rotary_Speed() > 0) { return(false); } if (Hardware.IO_LIST.Input.X214_Ejector_D_Up()) { if (!Hardware.IO_LIST.Input.X215_Ejector_D_Down()) { return(true); } } DateTime Start_Time = System.DateTime.Now; if (Hardware.IO_LIST.Output.Y203_Ejector_D_Up()) { do { TimeSpan ts = System.DateTime.Now - Start_Time; if (ts.TotalMilliseconds > 2000) { Hardware.IO_LIST.Output.Y203_Ejector_D_Down(); return(false); } }while (Hardware.IO_LIST.Input.X215_Ejector_D_Down() || !Hardware.IO_LIST.Input.X214_Ejector_D_Up()); } return(true); }
public static bool X208_Ejector_A_Up_and_Check() { Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "In Function"); if (Motion_Control.Got_Rotary_Speed() > 0) { Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "Motor still running, speed:" + Motion_Control.Got_Rotary_Speed()); return(false); } Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "X208_Ejector_A_Up"); if (Hardware.IO_LIST.Input.X208_Ejector_A_Up()) { Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "X208_Ejector_A_Up, result true"); if (!Hardware.IO_LIST.Input.X209_Ejector_A_Down()) { Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "X209_Ejector_A_Down, result false"); return(true); } } Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "X208_Ejector_A_Up, result false. continue Y200_Ejector_A_Up"); DateTime Start_Time = System.DateTime.Now; if (Hardware.IO_LIST.Output.Y200_Ejector_A_Up()) { do { TimeSpan ts = System.DateTime.Now - Start_Time; if (ts.TotalMilliseconds > 2000) { Common.Reports.LogFile.DebugLog(MethodBase.GetCurrentMethod(), "Y200_Ejector_A_Up time out"); Hardware.IO_LIST.Output.Y200_Ejector_A_Down(); return(false); } }while (Hardware.IO_LIST.Input.X209_Ejector_A_Down() || !Hardware.IO_LIST.Input.X208_Ejector_A_Up()); } return(true); }