pry il y a 2 ans
Parent
révision
f05d7a16f0
2 fichiers modifiés avec 41 ajouts et 20 suppressions
  1. +1
    -1
      FryPot_DosingSystem/App.xaml.cs
  2. +40
    -19
      FryPot_DosingSystem/Control/DosingLogicControl.cs

+ 1
- 1
FryPot_DosingSystem/App.xaml.cs Voir le fichier

@@ -204,7 +204,7 @@ namespace FryPot_DosingSystem
});
DeviceMonitor.Add(new SubMenumodel()
{
SubMenuName = "炒锅状态数据监控",
SubMenuName = "炒锅状态数据",
SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员, Permission.观察员 },
AssemblyName = "FryPot_DosingSystem",
ToggleWindowPath = "View.FryPotMonitorView"


+ 40
- 19
FryPot_DosingSystem/Control/DosingLogicControl.cs Voir le fichier

@@ -737,32 +737,34 @@ namespace FryPot_DosingSystem.Control
if (objData.equipmentId == 1 && objData.command == "LOAD")//同一任务号且处于上料阶段,AGV请求上料
{
globalVar.agvArriveUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【1】号滚筒线上料请求");
}
if ((objData.equipmentId == 5 || objData.equipmentId == 8) && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.agvArriveUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【{globalVar.LOneFryPotSerial}】号炒锅下料请求");
}
//线体2请求上下料
if (objData.equipmentId == 2 && objData.command == "LOAD")
{
globalVar.agvArriveLTwoUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【2】号滚筒线上料请求");
}
if ((objData.equipmentId == 6 || objData.equipmentId == 9) && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.LTwoagvArriveUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【{globalVar.LTwoFryPotSerial}】号炒锅下料请求");
}
//线体3请求上下料
if (objData.equipmentId == 3 && objData.command == "LOAD")
{
globalVar.agvArriveLThreeUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【3】号滚筒线上料请求");
}
if (objData.equipmentId == 7 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.LThreeagvArriveUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【{globalVar.LThreeFryPotSerial}】号炒锅下料请求");
}
#endregion
#region 炒锅到线体4请求上下料
@@ -770,38 +772,39 @@ namespace FryPot_DosingSystem.Control
if ((objData.equipmentId == 5 || objData.equipmentId == 8) && objData.command == "LOAD")//同一任务号且处于上料阶段,AGV请求上料
{
globalVar.agvArriveUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"AGV到达【{globalVar.LOneFryPotSerial}】号炒锅空桶上料位置");
MessageNotify.GetInstance.ShowRunLog($"编号【{objData.agvCode}】AGV到达【{globalVar.LOneFryPotSerial}】号炒锅空桶上料位置");
AgvArriveFryPotOneOrFourOutEmptyRollerSingleSetDown();//发送AGV到位信号
}
if (objData.equipmentId == 40 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.rollerLineOne.agvArriveLineFour = true;//AGV到达下料位置
//AgvViewModel.GetInstance().Set滚筒线状态(4, IsRun.Start);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV回桶下料请求");
}
//炒锅2,5到线体4
if ((objData.equipmentId == 6 || objData.equipmentId == 9) && objData.command == "LOAD")
{
globalVar.agvArriveLTwoUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"AGV到达【{globalVar.LTwoFryPotSerial}】号炒锅空桶上料位置");
MessageNotify.GetInstance.ShowRunLog($"编号【{objData.agvCode}】AGV到达【{globalVar.LTwoFryPotSerial}】号炒锅空桶上料位置");
AgvArriveFryPotTwoOrFiveOutEmptyRollerSingleSetDown();//发送AGV到位信号

}
if (objData.equipmentId == 41 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.rollerLineTwo.agvArriveLineFour = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV回桶下料请求");

}
//炒锅3到线体4
if (objData.equipmentId == 7 && objData.command == "LOAD")
{
globalVar.agvArriveLThreeUpLoad = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"AGV到达【{globalVar.LThreeFryPotSerial}】号炒锅空桶上料位置");
MessageNotify.GetInstance.ShowRunLog($"编号【{objData.agvCode}】AGV到达【{globalVar.LThreeFryPotSerial}】号炒锅空桶上料位置");
AgvArriveFryPotThreeOutEmptyRollerSingleSetDown();//发送AGV到位信号
}
if (objData.equipmentId == 42 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.rollerLineThree.agvArriveLineFour = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV回桶下料请求");
}
#endregion
#region 线体123到清洗台请求上下料
@@ -809,44 +812,49 @@ namespace FryPot_DosingSystem.Control
if (objData.equipmentId == 11 && objData.command == "LOAD")//同一任务号且处于上料阶段,AGV请求上料
{
globalVar.agvArriveLineOneLoadEmptyRoller = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【1】号滚筒线上料请求");
}
if (objData.equipmentId == 10 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{
globalVar.rollerLineOne.agvArriveCleanUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV洗桶机下料请求");
}
//线体2到清洗台
if (objData.equipmentId == 22 && objData.command == "LOAD")
{
globalVar.agvArriveLineTwoLoadEmptyRoller = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【2】号滚筒线上料请求");

}
if (objData.equipmentId == 20 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{

globalVar.rollerLineTwo.agvArriveCleanUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV洗桶机下料请求");
}

if (objData.equipmentId == 33 && objData.command == "LOAD")
{
globalVar.agvArriveLineThreeLoadEmptyRoller = true;//AGV到达上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV【3】号滚筒线上料请求");
}
if (objData.equipmentId == 30 && objData.command == "UNLOAD")//同一任务号且处于下料阶段
{

globalVar.rollerLineThree.agvArriveCleanUnLoad = true;//AGV到达下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV洗桶机下料请求");
}
#endregion
#region 清洗台到线体4请求上下料
if (objData.equipmentId == 10 && objData.command == "LOAD")
{
globalVar.agvArriveCleanLoad = true;//agv到达清洗台上料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV洗桶机上料请求");
}
if (objData.equipmentId == 44 && objData.command == "UNLOAD")
{
globalVar.agvArriveLineFour = true;//agv到达线体4下料位置
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.agvCode}】AGV回桶线下料请求");
}
#endregion
}
@@ -963,6 +971,7 @@ namespace FryPot_DosingSystem.Control
{
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.yc_1_4);
}
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体1→炒锅【{globalVar.LOneFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}

//线体2任务上报
@@ -980,7 +989,7 @@ namespace FryPot_DosingSystem.Control
{
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.yc_2_5);
}
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体2→炒锅【{globalVar.LTwoFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}
//线体3任务上报
if (objData.state == "LOAD_COMPLETED" && objData.robotJobId == LThreerobotJobId && objData.jobData.startPointCode == "HHif8Z")//指定上料点上料完成,这里指线体上料
@@ -990,7 +999,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set滚筒线上数量(3, (--globalVar.LThreeMaterialNum).ToString());
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.Yes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.yc_3_3);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体3→炒锅【{globalVar.LThreeFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}
//线体1任务上报
if (objData.state == "ROLLER_UNLOAD_DOING" && objData.robotJobId == LOnerobotJobId && (objData.jobData.targetPointCode == "DXDnMJ" || objData.jobData.targetPointCode == "naFssQ"))//指定下料点正在下料,指线体到炒锅下料
@@ -1023,6 +1032,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hj);
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LOneFryPotSerial}】下料完成信号,任务号【{objData.robotJobId}】");
}
//线体2任务上报
if (objData.state == "DONE" && objData.robotJobId == LTworobotJobId && (objData.jobData.targetPointCode == "CDPGde" || objData.jobData.targetPointCode == "sxSX88"))//指定下料位置下料完成,指线体到炒锅下料
@@ -1039,6 +1049,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hj);
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LTwoFryPotSerial}】下料完成信号,任务号【{objData.robotJobId}】");
}
//线体3任务上报
if (objData.state == "DONE" && objData.robotJobId == LThreerobotJobId && objData.jobData.targetPointCode == "biZG87")//指定下料位置下料完成,指线体到炒锅下料
@@ -1048,6 +1059,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hj);
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LThreeFryPotSerial}】下料完成信号,任务号【{objData.robotJobId}】");
}
#endregion
#region 炒锅空桶上下料任务信息回报
@@ -1089,6 +1101,7 @@ namespace FryPot_DosingSystem.Control
{
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hs_4);
}
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LOneFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}
//线体2任务上报
if (objData.state == "LOAD_COMPLETED" && objData.robotJobId == LFiverobotJobId && (objData.jobData.startPointCode == "CDPGde" || objData.jobData.startPointCode == "sxSX88"))//指定上料点上料完成,这里指炒锅空桶上料
@@ -1113,6 +1126,7 @@ namespace FryPot_DosingSystem.Control
{
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hs_5);
}
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LTwoFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}
//线体3任务上报
if (objData.state == "LOAD_COMPLETED" && objData.robotJobId == LSixrobotJobId && objData.jobData.startPointCode == "biZG87")//指定上料点上料完成,这里指炒锅空桶上料
@@ -1121,6 +1135,7 @@ namespace FryPot_DosingSystem.Control
globalVar.LThreeagvFryPotEmptyRollerArrive = true;
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.hs_3);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LThreeFryPotSerial}】上料完成信号,任务号【{objData.robotJobId}】");
}


@@ -1161,7 +1176,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], AgvViewModel.GetInstance().GetCommandValue("hj"));
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV炒锅【{globalVar.LOneFryPotSerial}】→回桶线下料完成信号,任务号【{objData.robotJobId}】");
}
//线体2任务上报
if (objData.state == "DONE" && objData.robotJobId == LFiverobotJobId && objData.jobData.targetPointCode == "w2jZhM")//指定下料位置下料完成,指炒锅空桶下料
@@ -1179,6 +1194,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], AgvViewModel.GetInstance().GetCommandValue("hj"));
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV【{globalVar.LTwoFryPotSerial}】→回桶线下料完成信号,任务号【{objData.robotJobId}】");
}
//线体3任务上报
if (objData.state == "DONE" && objData.robotJobId == LSixrobotJobId && objData.jobData.targetPointCode == "w2jZhM")//指定下料位置下料完成,指炒锅空桶下料
@@ -1196,6 +1212,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], AgvViewModel.GetInstance().GetCommandValue("hj"));
AgvViewModel.GetInstance().Set小车停止(agvCode[objData.jobData.agvCode]);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV【{globalVar.LThreeFryPotSerial}】→回桶线下料完成信号,任务号【{objData.robotJobId}】");
}
#endregion
#region 线体123空桶到清戏台
@@ -1208,6 +1225,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.tqx_1);
//到清洗处
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体1→洗桶机上料完成信号,任务号【{objData.robotJobId}】");
}
//线体2任务上报
if (objData.state == "LOAD_COMPLETED" && LEightrobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.startPointCode == "PChS6R")//指定上料点上料完成,这里指线体2空桶上料
@@ -1218,7 +1236,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.tqx_2);
//到清洗处
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体2→洗桶机上料完成信号,任务号【{objData.robotJobId}】");
}
//线体3任务上报
if (objData.state == "LOAD_COMPLETED" && LNinerobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.startPointCode == "HHif8Z")//指定上料点上料完成,这里指线体3空桶上料
@@ -1229,7 +1247,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.tqx_3);
//到清洗处
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体3→洗桶机上料完成信号,任务号【{objData.robotJobId}】");
}


@@ -1242,6 +1260,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.qxt_hj);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
AgvViewModel.GetInstance().SetCleanRollerNum(++CleanNum);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体1→洗桶机下料完成信号,任务号【{objData.robotJobId}】");
}
if (objData.state == "DONE" && LEightrobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.targetPointCode == "TitRYC")//指定下料位置下料完成,指从线体2到清戏台空桶下料
{
@@ -1252,6 +1271,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.qxt_hj);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
AgvViewModel.GetInstance().SetCleanRollerNum(++CleanNum);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体2→洗桶机下料完成信号,任务号【{objData.robotJobId}】");
}
if (objData.state == "DONE" && LNinerobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.targetPointCode == "TitRYC")//指定下料位置下料完成,指从线体3到清戏台空桶下料
{
@@ -1262,6 +1282,7 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.qxt_hj);
AgvViewModel.GetInstance().Set停车桩(agvCode[objData.jobData.agvCode], IsBool.Yes);
AgvViewModel.GetInstance().SetCleanRollerNum(++CleanNum);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV线体3→洗桶机下料完成信号,任务号【{objData.robotJobId}】");
}
#endregion
#region 清洗台到线体4
@@ -1273,12 +1294,12 @@ namespace FryPot_DosingSystem.Control
AgvViewModel.GetInstance().Set小车是否承载物品(agvCode[objData.jobData.agvCode], IsBool.OnllYes);
AgvViewModel.GetInstance().Set小车运动(agvCode[objData.jobData.agvCode], CartMotionTrajectory.qxt_4);//去四号空桶线
AgvViewModel.GetInstance().SetCleanRollerNum(--CleanNum);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV洗桶机上料完成信号,任务号【{objData.robotJobId}】");
}
if (objData.state == "ROLLER_UNLOAD_DOING" && LTenrobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.targetPointCode == "TitRYC")//指定下料点正在下料,指清洗台空桶到线体4下料
{
AgvViewModel.GetInstance().Set滚筒线状态(4, IsRun.Start);
MessageNotify.GetInstance.ShowRunLog($"收到编号【{objData.jobData.agvCode}】AGV回桶线下料完成信号,任务号【{objData.robotJobId}】");
}

if (objData.state == "DONE" && LTenrobotJobId.FirstOrDefault(p => p == objData.robotJobId) != null && objData.jobData.targetPointCode == "w2jZhM")//指定下料位置下料完成,指清戏台空桶到线体4下料


Chargement…
Annuler
Enregistrer