MES对接

This commit is contained in:
a88359121
2025-07-28 11:12:06 +08:00
parent 3b8de36d39
commit c45e3622af
13 changed files with 41 additions and 41 deletions
+4 -3
View File
@@ -138,9 +138,9 @@ namespace JinYuan.ControlCenters
{
DicStationFunction = new Dictionary<string, dgStationFunction>();
DicStationFunction.Add("卷芯进站", FeedingStation);
DicStationFunction.Add("外观检测进站", FeedingStation);
DicStationFunction.Add("NG出站", NGStation);
DicStationFunction.Add("卷芯出站", BlankingStation);
DicStationFunction.Add("外观检测出站", BlankingStation);
for (int i = 0; i < CommonMethods.ChatLineCount; i++)
{
@@ -1002,7 +1002,8 @@ namespace JinYuan.ControlCenters
CommonMethods.ProOKQty = CommonMethods.PlcLink.ReadInt32("D17");//良品总数
CommonMethods.Ppm = CommonMethods.PlcLink.ReadInt32("D13");
CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadFloat("D11").ToString("F2"));
//CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadFloat("D11").ToString("F2"))/100;
CommonMethods.JiaDL = Convert.ToDouble(CommonMethods.PlcLink.ReadInt32("D11").ToString("F2"))/100;
#region 开机时间/运行时间
CommonMethods.PlcOpenAndRunTime = GetList<int>(6, 0);
+11 -11
View File
@@ -356,7 +356,7 @@ namespace JinYuan.ControlCenters
}
catch (Exception ex)
{
LogHelper.Instance.WriteError($"卷芯进站线程数据解析:{ex}", "SysErrorLog");
LogHelper.Instance.WriteError($"外观检测进站线程数据解析:{ex}", "SysErrorLog");
}
@@ -380,7 +380,7 @@ namespace JinYuan.ControlCenters
//CommonMethods.PlcLink.WriteInt16("D2100", listRes[0]);//调试结果OK写入PLC
if (result != null)
{
string strres = $"卷心工位发送给PLC: D2100={listRes[0]},D2101={listRes[1]},D2102={listRes[2]},";
string strres = $"外观检工位发送给PLC: D2100={listRes[0]},D2101={listRes[1]},D2102={listRes[2]},";
CommonMethods.AddDataMonitorLog(0, strres);
}
@@ -396,7 +396,7 @@ namespace JinYuan.ControlCenters
sw2.Stop();
////输出上料数据处理耗时:
CommonMethods.AddDataMonitorLog(0, $"卷芯进站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
CommonMethods.AddDataMonitorLog(0, $"外观检测进站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
}
}
@@ -474,7 +474,7 @@ namespace JinYuan.ControlCenters
}
catch (Exception ex)
{
LogHelper.Instance.WriteError($"卷芯上料保存处理异常:{ex}", "SysErrorLog");
LogHelper.Instance.WriteError($"外观检测上料保存处理异常:{ex}", "SysErrorLog");
}
}
#endregion
@@ -922,7 +922,7 @@ namespace JinYuan.ControlCenters
// }
// catch (Exception ex)
// {
// LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog");
// LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog");
// }
// }
@@ -972,7 +972,7 @@ namespace JinYuan.ControlCenters
// #region 数据变量定义
// List<BGearEntity> list = new List<BGearEntity>();//实体
// //int[] MyRes = new int[2];//AB反馈结果
// int[] MyRes = new int[3];//三个卷芯反馈结果
// int[] MyRes = new int[3];//三个外观检测反馈结果
// #endregion
// //高低位转换
// byte[] bytes = bArrays.Content.ByteReverse();
@@ -1551,7 +1551,7 @@ namespace JinYuan.ControlCenters
// }
// catch (Exception ex)
// {
// LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog");
// LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog");
// }
// }
@@ -1592,7 +1592,7 @@ namespace JinYuan.ControlCenters
// sw2.Stop();
// ////输出下料数据处理耗时:
// CommonMethods.AddDataMonitorLog(0, $"卷芯出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
// CommonMethods.AddDataMonitorLog(0, $"外观检测出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
// }
//}
#endregion
@@ -1614,7 +1614,7 @@ namespace JinYuan.ControlCenters
#region 数据变量定义
List<BGearEntity> list = new List<BGearEntity>();//实体
//int[] MyRes = new int[2];//AB反馈结果
int[] MyRes = new int[3];//三个卷芯反馈结果
int[] MyRes = new int[3];//三个外观检测反馈结果
#endregion
//高低位转换
byte[] bytes = bArrays.Content.ByteReverse();
@@ -1889,7 +1889,7 @@ namespace JinYuan.ControlCenters
}
catch (Exception ex)
{
LogHelper.Instance.WriteError($"卷芯出站线程数据解析:{ex}", "SysErrorLog");
LogHelper.Instance.WriteError($"外观检测出站线程数据解析:{ex}", "SysErrorLog");
}
}
@@ -1931,7 +1931,7 @@ namespace JinYuan.ControlCenters
sw2.Stop();
////输出下料数据处理耗时:
CommonMethods.AddDataMonitorLog(0, $"卷芯出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
CommonMethods.AddDataMonitorLog(0, $"外观检测出站共耗时:{sw2.Elapsed.TotalMilliseconds}ms");
}
}
/// <summary>
@@ -101,7 +101,6 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="MES\MESDataCombin.cs.bak" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />