| | |
| | | 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]);//ç³è¯·è¿å
¥åºå |
| | |
| | | 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) |
| | |
| | | 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("æ¡æ¶å¨åºåå
ï¼"); |