|
|
@@ -417,8 +417,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { RecipeQuene.Clear(); InputMaterialQuene.Clear(); OutputMaterialQuene.Clear(); }), "ClearOneRecipes"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { LTwoRecipeQuene.Clear(); LTwoInputMaterialQuene.Clear(); LTwoOutputMaterialQuene.Clear(); }), "ClearTwoRecipes"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { LThreeRecipeQuene.Clear(); LThreeInputMaterialQuene.Clear(); LThreeOutputMaterialQuene.Clear(); }), "ClearThreeRecipes"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { globalVar.PlcInite = 1; }), "StartPlcInite"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { globalVar.PlcInite = 0; }), "EndPlcInite"); |
|
|
|
//ActionManage.GetInstance.Register(new Action(() => { globalVar.PlcInite = 1; }), "StartPlcInite"); |
|
|
|
//ActionManage.GetInstance.Register(new Action(() => { globalVar.PlcInite = 0; }), "EndPlcInite"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { globalVar.ExitLineOneTask = true; LineOneTaskRestart(); }), "LineOneTaskExit"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { globalVar.ExitLineTwoTask = true; LineTwoTaskRestart(); }), "LineTwoTaskExit"); |
|
|
|
ActionManage.GetInstance.Register(new Action(() => { globalVar.ExitLineThreeTask = true; LineThreeTaskRestart(); }), "LineThreeTaskExit"); |
|
|
@@ -727,7 +727,6 @@ namespace FryPot_DosingSystem.Control |
|
|
|
globalVar.LThreeagvArriveUnLoad = true;//AGV到达下料位置 |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region 炒锅到线体4请求上下料 |
|
|
|
if (objData.robotJobId == LFourrobotJobId && objData.command == "LOAD")//同一任务号且处于上料阶段,AGV请求上料 |
|
|
|
{ |
|
|
@@ -930,13 +929,6 @@ namespace FryPot_DosingSystem.Control |
|
|
|
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes); |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 炒锅空桶上下料任务信息回报 |
|
|
|
//线体1任务上报 |
|
|
|
if (objData.state == "ROLLER_LOAD_DOING" && objData.robotJobId == LFourrobotJobId && objData.jobData.startPointCode == "")// AGV正在上料,指炒锅空桶上料 |
|
|
@@ -1315,7 +1307,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
globalVar.agvArriveLineOneLoadEmptyRoller = false; |
|
|
|
globalVar.agvArriveLineOneLoadCom = false; |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线1空桶清洗任务线程"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线1空桶清洗任务重启成功"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线【1】空桶清洗任务重启成功"); |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
@@ -1338,8 +1330,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
globalVar.rollerLineTwo.agvArriveCleanUnLoad = false; |
|
|
|
globalVar.agvArriveLineTwoLoadEmptyRoller = false; |
|
|
|
globalVar.agvArriveLineTwoLoadCom = false; |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线2空桶清洗任务重启成功"); |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => { LineTwoToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线2空桶清洗任务线程"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线【2】空桶清洗任务重启成功"); |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
@@ -1347,8 +1339,6 @@ namespace FryPot_DosingSystem.Control |
|
|
|
{ |
|
|
|
ThreadManage.GetInstance().StopTask("滚筒线3空桶清洗任务线程", new Action(() => |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
globalVar.rollerLineThree.StationEight = 0; |
|
|
|
globalVar.rollerLineThree.EmptyRollerNums.Clear(); |
|
|
|
globalVar.rollerLineThree.EmptyRollerNums.Add(308); |
|
|
@@ -1360,8 +1350,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
globalVar.rollerLineThree.agvArriveCleanUnLoad = false; |
|
|
|
globalVar.agvArriveLineThreeLoadEmptyRoller = false; |
|
|
|
globalVar.agvArriveLineThreeLoadCom = false; |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => { LineOneToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线3空桶清洗任务重启成功"); |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => { LineThreeToCleanProcessExecute(); Thread.Sleep(10); }), "滚筒线3空桶清洗任务线程"); |
|
|
|
MessageLog.GetInstance.ShowUserLog("滚筒线【3】空桶清洗任务重启成功"); |
|
|
|
})); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
@@ -1501,7 +1491,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
//炒锅1状态数据 |
|
|
|
GetFryOneData("D2001", new Action<ushort[]>(data => |
|
|
|
{ |
|
|
|
|
|
|
|
//FryPotMonitorManage.GetInstance.fryOne.Temperature =?; |
|
|
|
})); |
|
|
|
//炒锅2状态数据 |
|
|
|
GetFryTwoData("D2001", new Action<ushort[]>(data => |
|
|
@@ -2122,12 +2112,23 @@ namespace FryPot_DosingSystem.Control |
|
|
|
if (globalVar.agvArriveCleanLoad) |
|
|
|
{ |
|
|
|
globalVar.agvArriveCleanLoad = false; |
|
|
|
WritePlcData("D1066", 1);//AGV空桶出桶就位信号下发PlC |
|
|
|
MessageLog.GetInstance.ShowRunLog("AGV到达清洗台空桶上料位置"); |
|
|
|
// MessageLog.GetInstance.ShowRunLog("清洗台空桶装载完成"); |
|
|
|
if (globalVar.CleadBarrelExitSingle == 0) |
|
|
|
erp: if (AlarmHelper<AlarmInfo>.Alarm.CleanOutputRollerRunning == 0) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.ShowRunLog("警告:清洗台空桶上料信号已发送,出桶滚筒未运行!!"); |
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1066", 1);//AGV空桶出桶就位信号下发PlC |
|
|
|
|
|
|
|
} |
|
|
|
else//有故障 |
|
|
|
{ |
|
|
|
while (AlarmHelper<AlarmInfo>.Alarm.CleanOutputRollerRunning == 1) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
if (globalVar.ExitLineOneTask) |
|
|
|
return; |
|
|
|
} |
|
|
|
MessageLog.GetInstance.ShowRunLog("清洗台空桶出桶滚筒重新运行!!"); |
|
|
|
goto erp; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@@ -2143,7 +2144,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
if (!globalVar.rollerLineOne.IsEpmtyBefore && globalVar.rollerLineOne.CanRun) |
|
|
|
{ |
|
|
|
var res = InputMaterialQuene.FirstOrDefault(p => p.materialType.MaterialLoc == globalVar.rollerLineOne.StationEight); |
|
|
|
if ((globalVar.rollerLineOne.StationEight != 0 && globalVar.rollerLineOne.EmptyRollerNums.Count > 0 && globalVar.rollerLineOne.StationEight == globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0) && InputMaterialQuene.Count > 0 && globalVar.rollerLineOne.StationEight != InputMaterialQuene.ElementAt(0).materialType.MaterialLoc) || (res == null && globalVar.rollerLineOne.StationEight != 0 && globalVar.rollerLineOne.EmptyRollerNums.Count > 0 && globalVar.rollerLineOne.StationEight == globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0)))//工位8上面有桶且不是配方上的原料桶且工位8的桶号和plc上报的桶号一致,即空桶 |
|
|
|
if ((globalVar.rollerLineOne.StationEight != 0 && globalVar.rollerLineOne.EmptyRollerNums.Count > 0 && globalVar.rollerLineOne.StationEight == globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0) && InputMaterialQuene.Count > 0 && globalVar.rollerLineOne.StationEight != InputMaterialQuene.ElementAt(0).materialType.MaterialLoc) || (res == null && globalVar.rollerLineOne.StationEight != 0 && globalVar.rollerLineOne.EmptyRollerNums.Count > 0 && globalVar.rollerLineOne.StationEight == globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0)))//一种情况工位8上面有桶且不是配方上的原料桶且工位8的桶号和plc上报的桶号一致,即空桶,另一种在没有下单的情况下,线体上的桶都认为是空桶 |
|
|
|
{ |
|
|
|
|
|
|
|
//下发AGV去空桶线洗桶任务 |
|
|
@@ -2156,8 +2157,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
Thread.Sleep(500); |
|
|
|
LineToCleanCarryTaskErrorCodeAnalysis(info, 1); |
|
|
|
globalVar.rollerLineOne.IsEpmtyBefore = true; |
|
|
|
//globalVar.rollerLineOne.CanRun = false; |
|
|
|
AgvFromLineOneToClean(globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0));//AGV从线体1到清洗处 |
|
|
|
// AgvFromLineOneToClean(globalVar.rollerLineOne.EmptyRollerNums.ElementAt(0));//AGV从线体1到清洗处 |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
@@ -2192,8 +2192,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
Thread.Sleep(500); |
|
|
|
LineToCleanCarryTaskErrorCodeAnalysis(info, 2); |
|
|
|
globalVar.rollerLineTwo.IsEpmtyBefore = true; |
|
|
|
// globalVar.rollerLineTwo.CanRun = false; |
|
|
|
AgvFromLineTwoToClean(globalVar.rollerLineTwo.EmptyRollerNums.ElementAt(0));//AGV从线体2到清洗处 |
|
|
|
|
|
|
|
//AgvFromLineTwoToClean(globalVar.rollerLineTwo.EmptyRollerNums.ElementAt(0));//AGV从线体2到清洗处 |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
@@ -2227,8 +2227,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
Thread.Sleep(500); |
|
|
|
LineToCleanCarryTaskErrorCodeAnalysis(info, 3); |
|
|
|
globalVar.rollerLineThree.IsEpmtyBefore = true; |
|
|
|
//globalVar.rollerLineThree.CanRun = false; |
|
|
|
AgvFromLineThreeToClean(globalVar.rollerLineThree.EmptyRollerNums.ElementAt(0));//AGV从线体3到清洗处 |
|
|
|
|
|
|
|
//AgvFromLineThreeToClean(globalVar.rollerLineThree.EmptyRollerNums.ElementAt(0));//AGV从线体3到清洗处 |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
@@ -2247,11 +2247,23 @@ namespace FryPot_DosingSystem.Control |
|
|
|
{ |
|
|
|
globalVar.rollerLineOne.agvArriveCleanUnLoad = false; |
|
|
|
MessageLog.GetInstance.ShowRunLog("空桶从线体1到达清洗位置,准备卸桶"); |
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
if (globalVar.CleadBarrelEnterSingle == 0) |
|
|
|
|
|
|
|
erp: if (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 0) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.ShowRunLog("警告:清洗台空桶下料就位信号已发送,进桶滚筒未运行!!"); |
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
|
|
|
|
} |
|
|
|
else//有故障 |
|
|
|
{ |
|
|
|
while (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 1) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
if (globalVar.ExitLineOneTask) |
|
|
|
return; |
|
|
|
} |
|
|
|
MessageLog.GetInstance.ShowRunLog("清洗台空桶进桶滚筒重新运行!!"); |
|
|
|
goto erp; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -2268,11 +2280,22 @@ namespace FryPot_DosingSystem.Control |
|
|
|
globalVar.rollerLineTwo.agvArriveCleanUnLoad = false; |
|
|
|
MessageLog.GetInstance.ShowRunLog("空桶从线体2到达清洗位置,准备卸桶"); |
|
|
|
|
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
if (globalVar.CleadBarrelEnterSingle == 0) |
|
|
|
erp: if (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 0) |
|
|
|
{ |
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
|
|
|
|
} |
|
|
|
else//有故障 |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.ShowRunLog("警告:清洗台空桶下料就位信号已发送,进桶滚筒未运行!!"); |
|
|
|
while (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 1) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
if (globalVar.ExitLineOneTask) |
|
|
|
return; |
|
|
|
} |
|
|
|
MessageLog.GetInstance.ShowRunLog("清洗台空桶进桶滚筒重新运行!!"); |
|
|
|
goto erp; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -2288,13 +2311,30 @@ namespace FryPot_DosingSystem.Control |
|
|
|
{ |
|
|
|
globalVar.rollerLineThree.agvArriveCleanUnLoad = false; |
|
|
|
MessageLog.GetInstance.ShowRunLog("空桶从线体3到达清洗位置,准备卸桶"); |
|
|
|
erp: if (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 0) |
|
|
|
{ |
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
|
|
|
|
//plc交互 |
|
|
|
WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
if (globalVar.CleadBarrelEnterSingle == 0) |
|
|
|
} |
|
|
|
else//有故障 |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.ShowRunLog("警告:清洗台空桶下料就位信号已发送,进桶滚筒未运行!!"); |
|
|
|
while (AlarmHelper<AlarmInfo>.Alarm.CleanEnterRollerRunning == 1) |
|
|
|
{ |
|
|
|
Thread.Sleep(5); |
|
|
|
if (globalVar.ExitLineOneTask) |
|
|
|
return; |
|
|
|
} |
|
|
|
MessageLog.GetInstance.ShowRunLog("清洗台空桶进桶滚筒重新运行!!"); |
|
|
|
goto erp; |
|
|
|
} |
|
|
|
////plc交互 |
|
|
|
//WritePlcData("D1065", 1);//AGV空桶洗桶就位信号下发PLC |
|
|
|
//if (globalVar.CleadBarrelEnterSingle == 0) |
|
|
|
//{ |
|
|
|
// MessageLog.GetInstance.ShowRunLog("警告:清洗台空桶下料就位信号已发送,进桶滚筒未运行!!"); |
|
|
|
//} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
@@ -2813,7 +2853,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
// Sqlite<PotFourStatus>.GetInstance.Save();//保存数据 |
|
|
|
//} |
|
|
|
//FryPotOneRollerTroubleCheck(); |
|
|
|
if (FryPotAlarm == 1 || FryPotFourAlarm == 1)//炒锅滚筒无故障 |
|
|
|
if ((FryPotAlarm == 1 && globalVar.LOneFryPotSerial == 1 )|| (FryPotFourAlarm == 1&& globalVar.LOneFryPotSerial == 4))//炒锅滚筒无故障 |
|
|
|
{ |
|
|
|
if (globalVar.LOneFryPotSerial == 1) |
|
|
|
{ |
|
|
@@ -2854,6 +2894,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
AgvArriveFryPotTwoOrFiveSingleSetDown(); |
|
|
|
globalVar.LTwoagvArriveUnLoad = false; |
|
|
|
globalVar.LTwoPotInputMaterialArrive = true; |
|
|
|
FryPotTwoRollerTroubleCheck(); |
|
|
|
} |
|
|
|
} |
|
|
|
public void LTwoFallMaterial() |
|
|
@@ -2870,8 +2911,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
// Sqlite<PotFiveStatus>.GetInstance.Base.Add(new PotFiveStatus { Temperature = FryPotMonitorManage.GetInstance.fryFive.Temperature, HotPower = FryPotMonitorManage.GetInstance.fryFive.HotPower, Speed = FryPotMonitorManage.GetInstance.fryFive.Speed, FryPotWeight = FryPotMonitorManage.GetInstance.fryFive.FryPotWeight, OilCapacity = FryPotMonitorManage.GetInstance.fryFive.OilCapacity, TotalOilCapactiy = FryPotMonitorManage.GetInstance.fryFive.TotalOilCapactiy, TotalProduct = FryPotMonitorManage.GetInstance.fryFive.TotalProduct, Time = DateTime.Now.ToShortDateString() });//向表中新增数据 |
|
|
|
// Sqlite<PotFiveStatus>.GetInstance.Save();//保存数据 |
|
|
|
//} |
|
|
|
FryPotTwoRollerTroubleCheck(); |
|
|
|
if (FryPotTwoAlarm == 1 || FryPotFiveAlarm == 1)//炒锅滚筒无故障 |
|
|
|
|
|
|
|
if ((FryPotTwoAlarm == 1&& globalVar.LTwoFryPotSerial == 2) ||( FryPotFiveAlarm == 1&& globalVar.LTwoFryPotSerial == 5))//炒锅滚筒无故障 |
|
|
|
{ |
|
|
|
if (globalVar.LTwoFryPotSerial == 2) |
|
|
|
{ |
|
|
@@ -2906,6 +2947,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
AgvArriveFryPotThreeSingleSetDown(); |
|
|
|
globalVar.LThreeagvArriveUnLoad = false; |
|
|
|
globalVar.LThreePotInputMaterialArrive = true; |
|
|
|
FryPotThreeRollerTroubleCheck(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -2915,7 +2957,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
{ |
|
|
|
//Sqlite<PotThreeStatus>.GetInstance.Base.Add(new PotThreeStatus { Temperature = FryPotMonitorManage.GetInstance.fryThree.Temperature, HotPower = FryPotMonitorManage.GetInstance.fryThree.HotPower, Speed = FryPotMonitorManage.GetInstance.fryThree.Speed, FryPotWeight = FryPotMonitorManage.GetInstance.fryThree.FryPotWeight, OilCapacity = FryPotMonitorManage.GetInstance.fryThree.OilCapacity, TotalOilCapactiy = FryPotMonitorManage.GetInstance.fryThree.TotalOilCapactiy, TotalProduct = FryPotMonitorManage.GetInstance.fryThree.TotalProduct, Time = DateTime.Now.ToShortDateString() });//向表中新增数据 |
|
|
|
//Sqlite<PotThreeStatus>.GetInstance.Save();//保存数据 |
|
|
|
FryPotThreeRollerTroubleCheck(); |
|
|
|
|
|
|
|
if (FryPotThreeAlarm == 1)//炒锅滚筒无故障 |
|
|
|
{ |
|
|
|
|
|
|
|