844184169 6 сар өмнө
parent
commit
99483aa944

+ 13 - 7
TeamAAS-VM/Core/Management.cs

@@ -1340,13 +1340,13 @@ namespace TeamAAS_VP.Core
                     return;
                 }
 
-                //获取产品编码
-                _productService.CurrentProductCode = plc.ReadNode<string>(string.Format(addressConfig.In_Code.Address, 0));
-                //如果产品编码为空,则以当前的时间戳作为编码
-                if (string.IsNullOrEmpty(_productService.CurrentProductCode))
-                {
-                    _productService.CurrentProductCode = DateTime.Now.ToString("yyyyMMddHHmmssfff");
-                }
+                ////获取产品编码
+                //_productService.CurrentProductCode = plc.ReadNode<string>(string.Format(addressConfig.In_Code.Address, 0));
+                ////如果产品编码为空,则以当前的时间戳作为编码
+                //if (string.IsNullOrEmpty(_productService.CurrentProductCode))
+                //{
+                //    _productService.CurrentProductCode = DateTime.Now.ToString("yyyyMMddHHmmssfff");
+                //}
 
                 // 触发下相机拍照
                 if (addressConfig.In_DowmCameraExe.Address.Contains(tuple.nodeId))
@@ -2390,6 +2390,12 @@ namespace TeamAAS_VP.Core
                                     }
                                     else
                                     {
+                                        ProductMainSN[i] = DateTime.Now.ToString();
+                                        if (i == 0)
+                                        {
+                                            _productService.CurrentProductCode = ProductMainSN[i];
+                                        }
+
                                         LogHelper.WriteLogMes($"【未启用mes】");
                                         SendTaskMessage($"未启用mes", MessageLevel.Info);
                                         await plc.WriteNodeAsync(addressConfig.Out_ScrewFeederIsChanged.Address, (Int16)1); //不发生改变

+ 1 - 1
TeamAAS-VM/Services/CalibrationService.cs

@@ -344,7 +344,7 @@ namespace TeamAAS_VP.Services
             Matrix<double> matrix = Matrix<double>.Build.DenseOfArray(calib.AffineTransformationMaterial);
 
             // 某些安装方式需要取反角度以匹配机器人坐标系定义
-            if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4|| calib.CameraMount == CameraMount.MobileDown_XYPlatform)
+            if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4 || calib.CameraMount == CameraMount.MobileDown_XYPlatform)
             {
                 angle *= -1;
             }

+ 2 - 2
TeamAAS-VM/ViewModels/Product/TestProductPageViewModel.cs

@@ -414,7 +414,7 @@ namespace TeamAAS_VP.ViewModels.Product
                 var campos = await Photo(SelectProcedure, Camera);
 
                 double angle = campos.Item3;
-                if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4)
+                if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4 || calib.CameraMount == CameraMount.MobileDown_XYPlatform)
                 {
                     angle *= -1;
                 }
@@ -495,7 +495,7 @@ namespace TeamAAS_VP.ViewModels.Product
                 var campos = await Photo(SelectProcedure1, Camera1);
 
                 double angle = campos.Item3;
-                if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4)
+                if (calib.CameraMount == CameraMount.FixedDown || calib.CameraMount == CameraMount.MobileJ2 || calib.CameraMount == CameraMount.MobileJ4 || calib.CameraMount == CameraMount.MobileDown_XYPlatform)
                 {
                     angle *= -1;
                 }