分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-02-23 538f1f0db8d02103d040b96a489b1a5803750a11
´úÂë¹ÜÀí/PCS/WCS_Server/WIDESEA_WCS/Common/AGVandGantry.cs
@@ -32,7 +32,7 @@
                var Gantryplc = FreeDB.Select<dt_plcinfohead>().Where(x => x.plcinfo_name == Gantry_client.PLCName).First();
                List<string> numbers = new List<string>() { "1单元防呆", "2单元防呆", "3单元防呆", "上料区防呆" };
                var details = FreeDB.Select<dt_plcinfodetail>().Where(x => x.plcdetail_iotype == Gantryplc.plcinfo_iotyep && x.plcdetail_number == numbers[requestin.AreaNr - 1]).ToList();
                if (MethodName == "AGVRequestin")
                if (MethodName == "AGVRequestin")//请求进入区域
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    Gantry_client.WriteByOrder("W_AGV_Request_In", true, numbers[requestin.AreaNr - 1]);//申请进入区域
@@ -41,7 +41,7 @@
                    if (!Release) throw new Exception("桁架未允许进入!");
                    if (!Gantry_Out_of_Area) throw new Exception("桁架在区域内!");
                }
                else if (MethodName == "EnteriorLeav")
                else if (MethodName == "EnteriorLeav")//进入离开区域
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    if (requestin.Type == 1)
@@ -57,12 +57,12 @@
                        if (Area_Occupied_by_AGV) throw new Exception("桁架未反馈AGV离开信号");
                    }
                }
                else if (MethodName == "AGVOutofArea")
                else if (MethodName == "AGVOutofArea")//AGV不在区域内
                {
                    Gantry_client.WriteByOrder("W_AreaNr", (Int16)requestin.AreaNr, numbers[requestin.AreaNr - 1]);//区域号
                    Gantry_client.WriteByOrder("W_AGV_OUT_OF_Area", requestin.OUTOFArea == 1 ? true : false, numbers[requestin.AreaNr - 1]);//AGV不在该区域
                }
                else if (MethodName == "GantryOutofArea")
                else if (MethodName == "GantryOutofArea")//桁架不在区域内
                {
                    var Gantry_Out_of_Area = (bool)DBExtension.Read(details.Where(x => x.plcdetail_name == "R_Gantry_Out_of_Area").First(), Gantry_client);//桁架不在该区域
                    if (!Gantry_Out_of_Area) throw new Exception("桁架在区域内!");