|
@@ -2107,6 +2107,8 @@ namespace MainForm
|
|
|
stopwatch1.Start();
|
|
|
AddMessage(LogType.Info, stationNameStr + "_进站开始");
|
|
|
string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode; // 产品SN(物料码),现在PLC只有10和50返回
|
|
|
+ sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
|
|
|
+
|
|
|
string MachineId = GlobalContext.S2_MachineId; // 装备ID(可配置)
|
|
|
string StationId = GlobalContext.S2_StationId; // 工位ID(可配置)
|
|
|
string strCarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 产品SN(物料码)
|
|
@@ -2117,7 +2119,11 @@ namespace MainForm
|
|
|
AddMessage(LogType.Error, $"{stationNameStr}_未能查到已绑定的载具信息,无法进行载具绑定产品验证");
|
|
|
}
|
|
|
//这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
|
|
|
- sn = strProductBarcode;
|
|
|
+ //sn = strProductBarcode;
|
|
|
+ if (sn != strProductBarcode)
|
|
|
+ {
|
|
|
+ AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
|
|
|
+ }
|
|
|
AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
|
|
|
|
|
|
// 产品SN(物料码)校验
|
|
@@ -3082,6 +3088,8 @@ namespace MainForm
|
|
|
stopwatch1.Start();
|
|
|
AddMessage(LogType.Info, stationNameStr + "_进站开始");
|
|
|
string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode; // 产品SN(物料码)
|
|
|
+ sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
|
|
|
+
|
|
|
string MachineId = GlobalContext.S5_MachineId; // 装备ID(可配置)
|
|
|
string StationId = GlobalContext.S5_StationId; // 工位ID(可配置)
|
|
|
string strCarrierBarcode = (string)stPLC_MesData.BarcodeSet.strCarrierBarcode; // 产品SN(物料码)
|
|
@@ -3092,7 +3100,12 @@ namespace MainForm
|
|
|
AddMessage(LogType.Error, $"{stationNameStr}_未能查到已绑定的载具信息,无法进行载具绑定产品验证");
|
|
|
}
|
|
|
//这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
|
|
|
- sn = strProductBarcode;
|
|
|
+ //sn = strProductBarcode;
|
|
|
+ if (sn != strProductBarcode)
|
|
|
+ {
|
|
|
+ AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
|
|
|
+ }
|
|
|
+
|
|
|
AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
|
|
|
|
|
|
// 产品SN(物料码)校验
|