1. 写入分档增加起始默认值31(以G结尾、不包括NG、扫码NG)
2. 将mes异常为99的情况改为97
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2005,7 +2005,7 @@ namespace JinYuan.ControlCenters
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
listGradeResult[i] = (short)(99);// 走分档NG
|
listGradeResult[i] = (short)(97);// 走分档NG
|
||||||
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OKMES反馈档位:{mesResType[0]},MES未反馈正确档位";
|
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OKMES反馈档位:{mesResType[0]},MES未反馈正确档位";
|
||||||
throw new Exception("MES未反馈正确档位");
|
throw new Exception("MES未反馈正确档位");
|
||||||
}
|
}
|
||||||
@@ -2015,7 +2015,7 @@ namespace JinYuan.ControlCenters
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
//listGradeResult[i] = (short)(CommonMethods.MESGradingSet[5] + 20); //(short)26;
|
//listGradeResult[i] = (short)(CommonMethods.MESGradingSet[5] + 20); //(short)26;
|
||||||
listGradeResult[i] = (short)(99);// 走分档NG
|
listGradeResult[i] = (short)(97);// 走分档NG
|
||||||
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OK分档NG,MES未反馈正确档位";
|
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OK分档NG,MES未反馈正确档位";
|
||||||
LoggerHelp.WriteLog("解析出站MES分档数据异常:{ex.Message}", "SysErrorLog");
|
LoggerHelp.WriteLog("解析出站MES分档数据异常:{ex.Message}", "SysErrorLog");
|
||||||
|
|
||||||
@@ -2024,7 +2024,7 @@ namespace JinYuan.ControlCenters
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OK分档,MES断连";
|
list[i].Remark = $"出站条码[{list[i].BarCode}]外观检OK分档,MES断连";
|
||||||
listGradeResult[i] = 99; //(short)26;
|
listGradeResult[i] = 97; //(short)26;
|
||||||
// list[i].Result = "MES NG";
|
// list[i].Result = "MES NG";
|
||||||
CommonMethods.PlcLink.WriteValue("D80", 1, Data_Type.Short);
|
CommonMethods.PlcLink.WriteValue("D80", 1, Data_Type.Short);
|
||||||
//反馈MES结果
|
//反馈MES结果
|
||||||
|
|||||||
@@ -310,235 +310,84 @@ namespace JinYuan.VirtualDataLibrary
|
|||||||
if (plcDevice != null && plcDevice.IsConnected)
|
if (plcDevice != null && plcDevice.IsConnected)
|
||||||
{
|
{
|
||||||
DateTime Date = DateTime.Now;
|
DateTime Date = DateTime.Now;
|
||||||
|
|
||||||
#region 档位写入
|
#region 档位写入
|
||||||
MESGradingSet = new short[] { 0, 0, 0, 0, 0, 0 };
|
MESGradingSet = new short[6];
|
||||||
//1
|
var gradingMap = new Dictionary<string, short>();
|
||||||
MESGradingSet[0] = (short)21; // 21 22 23 24 25 26
|
var gGradingMap = new Dictionary<string, short>();
|
||||||
//2
|
short normalStart = 21;
|
||||||
if (mesConfig.Grading2.Trim().Equals(mesConfig.Grading1.Trim()))
|
short gStart = 31;
|
||||||
MESGradingSet[1] = MESGradingSet[0];
|
string[] specialGrading = new string[] { "NG", "扫码NG" };
|
||||||
else
|
|
||||||
MESGradingSet[1] = (short)(MESGradingSet[0] + 1);
|
var gradings = new[] {
|
||||||
//3
|
mesConfig.Grading1.Trim(),
|
||||||
if (mesConfig.Grading3.Trim().Equals(CommonMethods.mesConfig.Grading1.Trim()))
|
mesConfig.Grading2.Trim(),
|
||||||
MESGradingSet[2] = MESGradingSet[0];
|
mesConfig.Grading3.Trim(),
|
||||||
|
mesConfig.Grading4.Trim(),
|
||||||
|
mesConfig.Grading5.Trim(),
|
||||||
|
mesConfig.Grading6.Trim()
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i = 0; i < gradings.Length; i++)
|
||||||
|
{
|
||||||
|
string grading = gradings[i];
|
||||||
|
if (!specialGrading.Contains(grading) && grading.EndsWith("G"))
|
||||||
|
{
|
||||||
|
if (gGradingMap.TryGetValue(grading, out short value))
|
||||||
|
MESGradingSet[i] = value;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CommonMethods.mesConfig.Grading3.Trim().Equals(CommonMethods.mesConfig.Grading2.Trim()))
|
MESGradingSet[i] = gStart;
|
||||||
MESGradingSet[2] = MESGradingSet[1];
|
gGradingMap.Add(grading, gStart);
|
||||||
else
|
gStart++;
|
||||||
{
|
|
||||||
var maxGrade = MESGradingSet.Max();
|
|
||||||
MESGradingSet[2] = (short)(maxGrade + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//4
|
|
||||||
if (CommonMethods.mesConfig.Grading4.Trim().Equals(CommonMethods.mesConfig.Grading1.Trim()))
|
|
||||||
MESGradingSet[3] = MESGradingSet[0];
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CommonMethods.mesConfig.Grading4.Trim().Equals(CommonMethods.mesConfig.Grading2.Trim()))
|
if (gradingMap.TryGetValue(grading, out short value))
|
||||||
MESGradingSet[3] = MESGradingSet[1];
|
MESGradingSet[i] = value;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (CommonMethods.mesConfig.Grading4.Trim().Equals(CommonMethods.mesConfig.Grading3.Trim()))
|
MESGradingSet[i] = normalStart;
|
||||||
MESGradingSet[3] = MESGradingSet[2];
|
gradingMap.Add(grading, normalStart);
|
||||||
else
|
normalStart++;
|
||||||
{
|
|
||||||
var maxGrade = MESGradingSet.Max();
|
|
||||||
MESGradingSet[3] = (short)(maxGrade + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//5
|
#region 更新默认档位
|
||||||
if (CommonMethods.mesConfig.Grading5.Trim().Equals(CommonMethods.mesConfig.Grading1.Trim()))
|
for (int i = 0; i < gradings.Length; i++)
|
||||||
MESGradingSet[4] = MESGradingSet[0];
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (CommonMethods.mesConfig.Grading5.Trim().Equals(CommonMethods.mesConfig.Grading2.Trim()))
|
switch (gradings[i])
|
||||||
MESGradingSet[4] = MESGradingSet[1];
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if (CommonMethods.mesConfig.Grading5.Trim().Equals(CommonMethods.mesConfig.Grading3.Trim()))
|
/* 性能NG */
|
||||||
MESGradingSet[4] = MESGradingSet[2];
|
case "NG":
|
||||||
else
|
MESGradingSet[i] = 98;
|
||||||
{
|
break;
|
||||||
if (CommonMethods.mesConfig.Grading5.Trim().Equals(CommonMethods.mesConfig.Grading4.Trim()))
|
/* 外观检NG
|
||||||
MESGradingSet[4] = MESGradingSet[3];
|
case "E63yG":
|
||||||
else
|
MESGradingSet[i] = 31;
|
||||||
{
|
break;
|
||||||
var maxGrade = MESGradingSet.Max();
|
case "F63yG":
|
||||||
MESGradingSet[4] = (short)(maxGrade + 1);
|
MESGradingSet[i] = 32;
|
||||||
|
break;
|
||||||
|
*/
|
||||||
|
/* 其它NG */
|
||||||
|
case "拦截":
|
||||||
|
case "扫码NG":
|
||||||
|
case "其它":
|
||||||
|
MESGradingSet[i] = 97;
|
||||||
|
break;
|
||||||
|
/* 性能NG */
|
||||||
|
case "不设置":
|
||||||
|
MESGradingSet[i] = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
//6
|
|
||||||
if (CommonMethods.mesConfig.Grading6.Trim().Equals(CommonMethods.mesConfig.Grading1.Trim()))
|
|
||||||
MESGradingSet[5] = MESGradingSet[0];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (CommonMethods.mesConfig.Grading6.Trim().Equals(CommonMethods.mesConfig.Grading2.Trim()))
|
|
||||||
MESGradingSet[5] = MESGradingSet[1];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (CommonMethods.mesConfig.Grading6.Trim().Equals(CommonMethods.mesConfig.Grading3.Trim()))
|
|
||||||
MESGradingSet[5] = MESGradingSet[2];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (CommonMethods.mesConfig.Grading6.Trim().Equals(CommonMethods.mesConfig.Grading4.Trim()))
|
|
||||||
MESGradingSet[5] = MESGradingSet[3];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (CommonMethods.mesConfig.Grading6.Trim().Equals(CommonMethods.mesConfig.Grading5.Trim()))
|
|
||||||
MESGradingSet[5] = MESGradingSet[4];
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var maxGrade = MESGradingSet.Max();
|
|
||||||
MESGradingSet[5] = (short)(maxGrade + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//其他if
|
|
||||||
#region 性能NG
|
|
||||||
if (CommonMethods.mesConfig.Grading6=="NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[5] = 98;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading5 == "NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[4] = 98;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading4 == "NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[3] = 98;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading3 == "NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[2] = 98;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading2 == "NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[1] = 98;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading1 == "NG")
|
|
||||||
{
|
|
||||||
MESGradingSet[0] = 98;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 外观检NG
|
|
||||||
if (CommonMethods.mesConfig.Grading6 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[5] = 31;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading5 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[4] = 31;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading4 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[3] = 31;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading3 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[2] = 31;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading2 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[1] = 31;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading1 == "E63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[0] = 31;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CommonMethods.mesConfig.Grading6 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[5] = 32;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading5 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[4] = 32;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading4 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[3] = 32;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading3 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[2] = 32;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading2 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[1] = 32;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading1 == "F63yG")
|
|
||||||
{
|
|
||||||
MESGradingSet[0] = 32;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 其它NG
|
|
||||||
if (CommonMethods.mesConfig.Grading6 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[5] = 97;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading5 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[4] = 97;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading4 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[3] = 97;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading3 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[2] = 97;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading2 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[1] = 97;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading1 == "拦截" || CommonMethods.mesConfig.Grading6 == "扫码NG" || CommonMethods.mesConfig.Grading6 == "其它")
|
|
||||||
{
|
|
||||||
MESGradingSet[0] = 97;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 性能NG
|
|
||||||
if (CommonMethods.mesConfig.Grading6 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[5] = 0;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading5 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[4] = 0;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading4 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[3] = 0;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading3 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[2] = 0;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading2 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[1] = 0;
|
|
||||||
}
|
|
||||||
if (CommonMethods.mesConfig.Grading1 == "不设置")
|
|
||||||
{
|
|
||||||
MESGradingSet[0] = 0;
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var isWrite1 = PlcLink.WriteValue("D2600", MESGradingSet[0], Data_Type.Short);
|
var isWrite1 = PlcLink.WriteValue("D2600", MESGradingSet[0], Data_Type.Short);
|
||||||
var isWrite2 = PlcLink.WriteValue("D2601", MESGradingSet[1], Data_Type.Short);
|
var isWrite2 = PlcLink.WriteValue("D2601", MESGradingSet[1], Data_Type.Short);
|
||||||
var isWrite3 = PlcLink.WriteValue("D2602", MESGradingSet[2], Data_Type.Short);
|
var isWrite3 = PlcLink.WriteValue("D2602", MESGradingSet[2], Data_Type.Short);
|
||||||
|
|||||||
@@ -125,19 +125,19 @@ namespace JinYuan.VirtualDataLibrary
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// OK3分档
|
/// OK3分档
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Grading3 = "E63yG";
|
public string Grading3 = "NG";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OK4分档
|
/// OK4分档
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Grading4 = "F63yG";
|
public string Grading4 = "E63yG";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OK5分档
|
/// OK5分档
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Grading5 = "拦截";
|
public string Grading5 = "F63yG";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// OK6分档
|
/// OK6分档
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Grading6 = "NG";
|
public string Grading6 = "拦截";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设备状态
|
/// 设备状态
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ MES
|
|||||||
存储服务器IP地址=192.168.2.108
|
存储服务器IP地址=192.168.2.108
|
||||||
Grading1=E63y
|
Grading1=E63y
|
||||||
Grading2=F63y
|
Grading2=F63y
|
||||||
Grading3=E63yG
|
Grading3=NG
|
||||||
Grading4=F63yG
|
Grading4=E63yG
|
||||||
Grading5=拦截
|
Grading5=F63yG
|
||||||
Grading6=NG
|
Grading6=拦截
|
||||||
员工权限校验=http://10.22.160.1/core/api/public/equipment/base/user/login/verify
|
员工权限校验=http://10.22.160.1/core/api/public/equipment/base/user/login/verify
|
||||||
设备参数设定值请求=http://10.22.160.2/core/api/public/param/setting/request
|
设备参数设定值请求=http://10.22.160.2/core/api/public/param/setting/request
|
||||||
设备参数设定值变更=http://10.22.160.2/core/api/public/param/setting/change
|
设备参数设定值变更=http://10.22.160.2/core/api/public/param/setting/change
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||||
<InstallUrlHistory />
|
<InstallUrlHistory />
|
||||||
<SupportUrlHistory />
|
<SupportUrlHistory />
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ MES
|
|||||||
存储服务器IP地址=192.168.2.108
|
存储服务器IP地址=192.168.2.108
|
||||||
Grading1=E63y
|
Grading1=E63y
|
||||||
Grading2=F63y
|
Grading2=F63y
|
||||||
Grading3=E63yG
|
Grading3=NG
|
||||||
Grading4=F63yG
|
Grading4=E63yG
|
||||||
Grading5=拦截
|
Grading5=F63yG
|
||||||
Grading6=NG
|
Grading6=拦截
|
||||||
员工权限校验=http://10.22.160.1/core/api/public/equipment/base/user/login/verify
|
员工权限校验=http://10.22.160.1/core/api/public/equipment/base/user/login/verify
|
||||||
设备参数设定值请求=http://10.22.160.2/core/api/public/param/setting/request
|
设备参数设定值请求=http://10.22.160.2/core/api/public/param/setting/request
|
||||||
设备参数设定值变更=http://10.22.160.2/core/api/public/param/setting/change
|
设备参数设定值变更=http://10.22.160.2/core/api/public/param/setting/change
|
||||||
@@ -43,9 +43,9 @@ Grading6=NG
|
|||||||
风速仪=https://iot.eveportal.com:9470/eve_api/ems/iot/upload_device_collect_data
|
风速仪=https://iot.eveportal.com:9470/eve_api/ems/iot/upload_device_collect_data
|
||||||
分档参数=http://10.22.160.2/core/api/public/eve/pm/eqm/auto/grading
|
分档参数=http://10.22.160.2/core/api/public/eve/pm/eqm/auto/grading
|
||||||
安全设备状态=http://10.22.161.62:804/device-status
|
安全设备状态=http://10.22.161.62:804/device-status
|
||||||
guid=cdc9d92f-42b5-441e-8eb2-8b40905d98e6
|
guid=0353591d-f3d0-4bdb-a1a2-8203d4690bbf
|
||||||
DeviceState=3
|
DeviceState=1
|
||||||
run_AlarmMark=1
|
run_AlarmMark=0
|
||||||
run_IdleMark=0
|
run_IdleMark=0
|
||||||
|
|
||||||
[统计计数]
|
[统计计数]
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user