浏览代码

Merge branch 'master' into dev20250217_上传附件

# Conflicts:
#	MainForm/FaForm/Form_Home.cs
WIN-GH9CEESPLTB\Administrator 4 月之前
父节点
当前提交
901d9fe7c3
共有 1 个文件被更改,包括 7 次插入9 次删除
  1. 7 9
      MainForm/FaForm/Form_Home.cs

+ 7 - 9
MainForm/FaForm/Form_Home.cs

@@ -2106,9 +2106,7 @@ namespace MainForm
             {
                 stopwatch1.Start();
                 AddMessage(LogType.Info, stationNameStr + "_进站开始");
-                //正式生产就用PLC中取的
                 string sn = (string)stPLC_MesData.BarcodeSet.strProductBarcode;  // 产品SN(物料码),现在PLC只有10和50返回
-                //测试先用9码,正式直接用PLC得到的SN码,截取成9位码
                 sn = sn.Substring(sn.Length - 11, 4) + sn.Substring(sn.Length - 5, 5);
 
                 string MachineId = GlobalContext.S2_MachineId;  // 装备ID(可配置)
@@ -2122,8 +2120,9 @@ namespace MainForm
                 }
                 //这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
                 //sn = strProductBarcode;
-                if (sn!= strProductBarcode) {
-                    AddMessage(LogType.Info, $"S2进站产品码错误!与S1进展产品码不匹配,S2产品码:{sn};S1产品码:{strProductBarcode}");
+                if (sn != strProductBarcode)
+                {
+                    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
                 }
                 AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
 
@@ -3101,11 +3100,12 @@ namespace MainForm
                     AddMessage(LogType.Error, $"{stationNameStr}_未能查到已绑定的载具信息,无法进行载具绑定产品验证");
                 }
                 //这个地方之后PLC可能会返回SN码,到时用返回的和数据库中的比较下对错,结果faalse怎么办现在不知道
+                //sn = strProductBarcode;
                 if (sn != strProductBarcode)
                 {
-                    AddMessage(LogType.Info, $"S5进站产品码错误!与S1进站产品码不匹配,S5产品码:{sn};S1产品码:{strProductBarcode}");
+                    AddMessage(LogType.Info, $"进站产品码错误!与载具绑定的产品码不匹配,进站产品码:{sn};载具绑定产品码:{strProductBarcode}");
                 }
-                //sn = strProductBarcode;
+
                 AddMessage(LogType.Info, $"载具码:{strCarrierBarcode};产品码:{sn}");
 
                 // 产品SN(物料码)校验
@@ -3633,12 +3633,11 @@ namespace MainForm
                         {
                             if (stPLC_MesData.Right.mesCommFrmPLC.cmd == (byte)eMesCmd.InStation)
                             {
-                                lock (lockObj) 
+                                lock (lockObj)
                                 {
                                     if (!ProgressState)
                                     {
                                         ProgressState = true;
-                                        OnMessage(LogType.Info, $"PLC{plcNo}_{stationNameStr}_Right进站:【载具条码】{stPLC_MesData.Right.BarcodeSet.strCarrierBarcode},【产品条码】{stPLC_MesData.Right.BarcodeSet.strProductBarcode}");
                                         Task.Run(() => S7进站(plcNo, stationNameStr, stPLC_MesData.Right, tagBaseName + ".Right." + tagMesCommName, tagBaseName + ".Right" + tagBarsetName,"Right", out ProgressState, atlasScrewRight));
                                     }
                                 }
@@ -3662,7 +3661,6 @@ namespace MainForm
                                     if (!ProgressState)
                                     {
                                         ProgressState = true;
-                                        OnMessage(LogType.Info,$"PLC{plcNo}_{stationNameStr}_Right出站:【载具条码】{stPLC_MesData.Right.BarcodeSet.strCarrierBarcode},【产品条码】{stPLC_MesData.Right.BarcodeSet.strProductBarcode}");
                                         Task.Run(() => S7出站(plcNo, stationNameStr, stPLC_MesData.Right, tagBaseName + ".Right." + tagMesCommName, stationCode, stationName, "Right", out ProgressState));
                                     }
                                 }