|
@@ -1355,7 +1355,8 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
GVL_BigStation.Recipe1DosingStatus = 3; |
|
|
GVL_BigStation.Recipe1DosingStatus = 3; |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe) |
|
|
|
|
|
|
|
|
//2023-8-21:如果不是MES系统下发的配方,不要返回结束数据。 |
|
|
|
|
|
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource==RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/) |
|
|
{ |
|
|
{ |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
@@ -1375,7 +1376,11 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
double a = DateTime.Now.Subtract(GVL_BigStation.DosingRecipe1Time).TotalSeconds; |
|
|
double a = DateTime.Now.Subtract(GVL_BigStation.DosingRecipe1Time).TotalSeconds; |
|
|
FinishData.ProcessTime = Convert.ToInt16(a); |
|
|
FinishData.ProcessTime = Convert.ToInt16(a); |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
|
|
|
|
|
|
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子。"); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
MessageNotify.GetInstance.ShowRunLog($"配方1,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。"); |
|
|
} |
|
|
} |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.4", true); |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.4", true); |
|
|
GVL_BigStation.Recipe1DosingStatus = 3; |
|
|
GVL_BigStation.Recipe1DosingStatus = 3; |
|
@@ -1468,7 +1473,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
GVL_BigStation.Recipe2DosingFinish = true; |
|
|
GVL_BigStation.Recipe2DosingFinish = true; |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe) |
|
|
|
|
|
|
|
|
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/) |
|
|
{ |
|
|
{ |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
@@ -1490,9 +1495,14 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
MessageNotify.GetInstance.ShowRunLog($"配方2,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。"); |
|
|
|
|
|
} |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", true); |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", true); |
|
|
GVL_BigStation.Recipe2DosingStatus = 3; |
|
|
GVL_BigStation.Recipe2DosingStatus = 3; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (GVL_BigStation.Recipe2DosingStatus == 3 && HKDevice.PlcRead.Recipe2DosingFinish == false) |
|
|
if (GVL_BigStation.Recipe2DosingStatus == 3 && HKDevice.PlcRead.Recipe2DosingFinish == false) |
|
|
{ |
|
|
{ |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", false); |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.5", false); |
|
@@ -1582,7 +1592,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
GVL_BigStation.Recipe3DosingStatus = 3; |
|
|
GVL_BigStation.Recipe3DosingStatus = 3; |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe) |
|
|
|
|
|
|
|
|
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/) |
|
|
{ |
|
|
{ |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
@@ -1604,6 +1614,10 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
MessageNotify.GetInstance.ShowRunLog($"配方3,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。"); |
|
|
|
|
|
} |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.6", true); |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.6", true); |
|
|
GVL_BigStation.Recipe3DosingStatus = 3; |
|
|
GVL_BigStation.Recipe3DosingStatus = 3; |
|
|
} |
|
|
} |
|
@@ -1695,7 +1709,7 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
GVL_BigStation.Recipe4DosingStatus = 3; |
|
|
GVL_BigStation.Recipe4DosingStatus = 3; |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成"); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
ReadStockBinDosingWeight(SiemensRecipes.ElementAt(index)); |
|
|
if (SiemensDevice.IsConnected && !GVL_BigStation.IsUseLocalRecipe) |
|
|
|
|
|
|
|
|
if (SiemensDevice.IsConnected && SiemensRecipes.ElementAt(index).RecipesSource == RecipeSource.远程 /*!GVL_BigStation.IsUseLocalRecipe*/) |
|
|
{ |
|
|
{ |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Order_No = SiemensRecipes.ElementAt(index).RecipeCode; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
|
FinishData.Product_Code = SiemensRecipes.ElementAt(index).RecipeName; |
|
@@ -1717,6 +1731,10 @@ namespace BPASmartClient.JXJFoodBigStation.Model |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
SiemensDevice.Siemens_PLC_S7.WriteClass<DL_Finish_DB>(FinishData, 2361); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:{code},托盘编号:{trayCode},配料完成,将信号反馈给西门子"); |
|
|
} |
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
MessageNotify.GetInstance.ShowRunLog($"配方4,配方编号:【{code}】,托盘编号:【{trayCode}】,配料完成,西门子未连接或配方为本地下发未将完成数据反馈至MES系统。"); |
|
|
|
|
|
} |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.7", true); |
|
|
HKDevice.HK_PLC_S7.Write("DB99.DBX1.7", true); |
|
|
GVL_BigStation.Recipe4DosingStatus = 3; |
|
|
GVL_BigStation.Recipe4DosingStatus = 3; |
|
|
} |
|
|
} |
|
|