领胜LDS 键盘AOI检测项目
wells.liu
2020-07-02 8527a31907a30c1b9f15dae1e0bdcf76e7e1f123
src/Bro.M071.Process/M071Process.cs
@@ -164,6 +164,12 @@
                throw new ProcessException("未输入产品条码,请勿开始测量");
            }
            //检查产品放置OK
            //气缸推动压板移动到产品上方
            //压板压紧产品
            OnMeasureStart?.BeginInvoke(null, null);
            var measurements = Config.MeasurementUnitCollection.Where(u => u.IsEnabled).ToList().DeepSerializeClone();
@@ -195,18 +201,19 @@
                  {
                      _pauseHandle.WaitHandle.WaitOne();
                      IDevice device = DeviceCollection.FirstOrDefault(u => u.Id == s.MotionDevice);
                      IDevice device = DeviceCollection.FirstOrDefault(u => u.Id == s.MotionOp.Device);
                      if (device == null)
                          throw new ProcessException($"{s.Name}拍照点位未设置运动设备");
                      IMotion motionDevice = device as IMotion;
                      IMotionCard motionDevice = device as IMotionCard;
                      if (motionDevice == null)
                          throw new ProcessException($"{s.Name}拍照点位设置{device.Name}不是运动设备");
                      if (!motionDevice.MoveToPoint(null))
                      var response = motionDevice.Run(s.MotionOp.OpConfig);
                      if (!response.Result)
                      {
                          throw new ProcessException("运动中止", null, ExceptionLevel.Info);
                          throw new ProcessException($"{device.Name}异常,{response.Message}", null, ExceptionLevel.Info);
                      }
                      CameraBase camera = DeviceCollection.FirstOrDefault(u => u.Id == s.CameraOp.Device) as CameraBase;
@@ -223,6 +230,7 @@
                  });
            BarCode = "";
            return new ProcessResponse(true);
        }