Explorar o código

Reapply "修改与PLC交互出现的BUG,增加锁螺丝XY超限"

This reverts commit f5b56b73fb22e897bdebee1587955a95d98f0f4d.
fanaobo hai 4 meses
pai
achega
523df1a856

+ 25 - 22
TeamAAS-VM/Core/Management.cs

@@ -2128,28 +2128,31 @@ namespace TeamAAS_VP.Core
                                     await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
                                     return;
                                 }
-                                //验证当前锁附点位与设置锁附点位的差值是否超限,超限则报警并停止流程
-                                //目前验证已OK 缺少切换按钮
-                                //try
-                                //{
-                                //    var ScrewLimit = currentProduct.GlobalParamListCollection.FirstOrDefault((p) => p.Number == positionIndex - 1);
-                                //    //判断实际偏差与设置的点位差数是否偏差过大
-                                //    float XOffsetPoint = Math.Abs(PositionPoint.X_Position - (TempPoint.X_Position + TempPoint.X_Offset));
-                                //    float YOffsetPoint = Math.Abs(PositionPoint.Y_Position - (TempPoint.Y_Position + TempPoint.Y_Offset));
-                                //    if (!(XOffsetPoint >= float.Parse(ScrewLimit.Param1) && XOffsetPoint <= float.Parse(ScrewLimit.Param2)) ||
-                                //        !(YOffsetPoint >= float.Parse(ScrewLimit.Param3) && YOffsetPoint <= float.Parse(ScrewLimit.Param4)))
-                                //    {
-                                //        SendTaskMessage($"当前锁附点位{positionIndex}与设置锁附点位差值超限,X偏差:{XOffsetPoint},Y偏差{YOffsetPoint}", MessageLevel.Error);
-                                //        await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
-                                //        return;
-                                //    }
-                                //}
-                                //catch (Exception ex)
-                                //{
-                                //    SendTaskMessage($"当前锁附点位与设置锁附点位差值未设置:" + ex.Message, MessageLevel.Error);
-                                //    await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
-                                //    return;
-                                //}
+                                if (_configService.GetDeviceInfo().EnableXY)
+                                {
+                                    //验证当前锁附点位与设置锁附点位的差值是否超限,超限则报警并停止流程
+                                    //目前验证已OK 缺少切换按钮
+                                    try
+                                    {
+                                        var ScrewLimit = currentProduct.GlobalParamListCollection.FirstOrDefault((p) => p.Number == positionIndex - 1);
+                                        //判断实际偏差与设置的点位差数是否偏差过大
+                                        float XOffsetPoint = Math.Abs(PositionPoint.X_Position - (TempPoint.X_Position + TempPoint.X_Offset));
+                                        float YOffsetPoint = Math.Abs(PositionPoint.Y_Position - (TempPoint.Y_Position + TempPoint.Y_Offset));
+                                        if (!(XOffsetPoint >= float.Parse(ScrewLimit.Param1) && XOffsetPoint <= float.Parse(ScrewLimit.Param2)) ||
+                                            !(YOffsetPoint >= float.Parse(ScrewLimit.Param3) && YOffsetPoint <= float.Parse(ScrewLimit.Param4)))
+                                        {
+                                            SendTaskMessage($"当前锁附点位{positionIndex}与设置锁附点位差值超限,X偏差:{XOffsetPoint},Y偏差{YOffsetPoint}", MessageLevel.Error);
+                                            await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
+                                            return;
+                                        }
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        SendTaskMessage($"当前锁附点位与设置锁附点位差值未设置:" + ex.Message, MessageLevel.Error);
+                                        await plc.WriteNodeAsync(addressConfig.Out_CameraDone.Address, (Int16)2);
+                                        return;
+                                    }
+                                }
                                 await PositionPoint.WriteToPlcAddress(addressConfig.Out_Screw, plc, positionIndex);
                             }
                             //拍2打所有

+ 8 - 0
TeamAAS-VM/Models/DeviceInfo.cs

@@ -51,6 +51,12 @@ namespace TeamAAS_VP.Models
         /// </summary>
         public bool EnableMES { get => _enableMes; set => SetProperty(ref _enableMes, value); }
 
+        private bool _enableXY;
+        /// <summary>
+        /// 是否启用锁螺丝XY超限 通讯功能,默认不启用
+        /// </summary>
+        public bool EnableXY { get => _enableXY; set => SetProperty(ref _enableXY, value); }
+
         private string _mesUrl;
         /// <summary>
         /// URL
@@ -127,6 +133,7 @@ namespace TeamAAS_VP.Models
             LogUrl = string.Empty;
             ApiKey = string.Empty;
             EnableMES = false;
+            EnableXY = false;
             SaveCsvPPID = true;
         }
 
@@ -144,6 +151,7 @@ namespace TeamAAS_VP.Models
                 comp = this.comp,
                 MesUrl = this.MesUrl,
                 EnableMES = this.EnableMES,
+                EnableXY = this.EnableXY,
                 SaveCsv = this.SaveCsv,
                 SaveCsvPath = this.SaveCsvPath,
                 //EnableDoubleMes = this.EnableDoubleMes,

+ 2 - 2
TeamAAS-VM/Properties/AssemblyInfo.cs

@@ -51,5 +51,5 @@ using System.Windows;
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.3.0.3")]
-[assembly: AssemblyFileVersion("1.3.0.3")]
+[assembly: AssemblyVersion("1.3.0.2")]
+[assembly: AssemblyFileVersion("1.3.0.2")]

+ 84 - 84
TeamAAS-VM/Services/ConfigService.cs

@@ -71,7 +71,7 @@ namespace TeamAAS_VP.Services
         // 锟斤拷源锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
         private ObservableCollection<LightControllerConfig> LightControllers { get; set; }
 
-        // Device info - 鏀�寔澶氳�澶
+        // Device info - 鏀�寔澶氳�澶?
         private List<DeviceInfo> _deviceInfoList;
         public CTQ_Data CtqData { get; set; }
 
@@ -101,7 +101,7 @@ namespace TeamAAS_VP.Services
 
         /// <summary>
         /// 锟斤拷始锟斤拷一锟斤拷锟铰碉拷 <see cref="ConfigService"/> 实锟斤拷锟斤拷
-        /// 锟斤拷锟届函锟斤拷锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷锟斤拷锟斤拷锟节癸拷锟斤拷锟节硷拷锟斤拷锟I/O 锟斤拷锟斤拷锟斤拷锟斤拷锟缴碉拷锟斤拷 <see cref="LoadAll"/> 锟斤拷 <see cref="LoadAllAsync"/> 锟斤拷式锟斤拷锟截★拷
+        /// 锟斤拷锟届函锟斤拷锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷锟斤拷锟斤拷锟节癸拷锟斤拷锟节硷拷锟斤拷锟?I/O 锟斤拷锟斤拷锟斤拷锟斤拷锟缴碉拷锟斤拷 <see cref="LoadAll"/> 锟斤拷 <see cref="LoadAllAsync"/> 锟斤拷式锟斤拷锟截★拷
         /// </summary>
         public ConfigService()
         {
@@ -117,7 +117,7 @@ namespace TeamAAS_VP.Services
         {
             lock (_sync)
             {
-                // 锟斤拷取锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷募锟斤拷锟斤拷锟斤拷冢锟斤拷虮3锟DeviceConfig 默锟斤拷值
+                // 锟斤拷取锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷募锟斤拷锟斤拷锟斤拷冢锟斤拷虮3锟?DeviceConfig 默锟斤拷值
                 if (File.Exists(ConfigPaths.CamerasConfigurationPath))
                     Cameras = FileHelper.ReadJsonFile<ObservableCollection<CameraInfo>>(ConfigPaths.CamerasConfigurationPath);
                 else
@@ -211,7 +211,7 @@ namespace TeamAAS_VP.Services
                     FileHelper.WriteJsonFile(_screwDriverConfig, ConfigPaths.ScrewDriverConfigurationPath);
                 }
 
-                // load device info list (鏀�寔澶氳�澶�)
+                // load device info list (鏀�寔澶氳�澶?
                 if (File.Exists(ConfigPaths.DeviceInfoConfigurationPath))
                 {
                     try
@@ -263,7 +263,7 @@ namespace TeamAAS_VP.Services
 
         /// <summary>
         /// 锟斤拷锟节达拷锟叫碉拷锟斤拷锟斤拷锟斤拷锟斤拷写锟截碉拷锟斤拷应锟斤拷锟斤拷锟侥硷拷锟斤拷
-        /// 锟竭程帮拷全锟斤拷锟斤拷锟斤拷锟节诧拷锟斤拷写锟斤拷锟斤拷锟绞癸拷锟<see cref="_sync"/> 锟斤拷锟斤拷锟斤拷
+        /// 锟竭程帮拷全锟斤拷锟斤拷锟斤拷锟节诧拷锟斤拷写锟斤拷锟斤拷锟绞癸拷锟?<see cref="_sync"/> 锟斤拷锟斤拷锟斤拷
         /// </summary>
         public void SaveAll()
         {
@@ -285,7 +285,7 @@ namespace TeamAAS_VP.Services
                     FileHelper.WriteJsonFile(ScrewFeeders, ConfigPaths.ScrewFeedersConfigurationPath);
                 // save plc addresses
                 //FileHelper.WriteJsonFile(PlcAddressConfig, "..//Config//PlcAddressConfiguration.cfg");
-                // save device info list (鏀�寔澶氳�澶�)
+                // save device info list (鏀�寔澶氳�澶?
                 if (_deviceInfoList != null)
                     FileHelper.WriteJsonFile(_deviceInfoList, ConfigPaths.DeviceInfoConfigurationPath);
                 // save card reader config
@@ -297,7 +297,7 @@ namespace TeamAAS_VP.Services
         /// <summary>
         /// 锟届步执锟斤拷 <see cref="SaveAll"/> 锟斤拷锟斤拷锟斤拷
         /// </summary>
-        /// <returns>锟斤拷示锟届步锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟�</returns>
+        /// <returns>锟斤拷示锟届步锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟?/returns>
         public Task SaveAllAsync()
         {
             return Task.Run(() => SaveAll());
@@ -305,19 +305,19 @@ namespace TeamAAS_VP.Services
 
         #region Cameras
         /// <summary>
-        /// 锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷玫锟街伙拷锟斤拷锟斤拷稀锟
+        /// 锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷玫锟街伙拷锟斤拷锟斤拷稀锟?
         /// 锟竭程帮拷全锟斤拷锟斤拷锟节诧拷锟斤拷锟斤拷锟皆憋拷证锟斤拷锟斤拷锟斤拷取锟斤拷一锟斤拷锟皆★拷
         /// </summary>
-        /// <returns>锟斤拷锟斤拷锟斤拷玫锟街伙拷锟斤拷锟斤拷稀锟�</returns>
+        /// <returns>锟斤拷锟斤拷锟斤拷玫锟街伙拷锟斤拷锟斤拷稀锟?/returns>
         public IReadOnlyCollection<CameraInfo> GetAllCameras()
         {
             lock (_sync) { return Cameras.ToList().AsReadOnly(); }
         }
 
         /// <summary>
-        /// 锟斤拷锟捷憋拷识锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较�拷锟
+        /// 锟斤拷锟捷憋拷识锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟较�拷锟?
         /// </summary>
-        /// <param name="id">锟斤拷锟斤拷锟Guid 锟斤拷识锟斤拷</param>
+        /// <param name="id">锟斤拷锟斤拷锟?Guid 锟斤拷识锟斤拷</param>
         /// <returns>锟揭碉拷锟津返回讹拷应锟斤拷 <see cref="CameraInfo"/>锟斤拷锟斤拷锟津返伙拷 <c>null</c>锟斤拷</returns>
         public CameraInfo GetCamera(Guid id)
         {
@@ -327,11 +327,11 @@ namespace TeamAAS_VP.Services
         /// <summary>
         /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟矫★拷
         /// - 锟斤拷锟斤拷锟斤拷 <paramref name="camera"/> 为 <c>null</c> 锟斤拷锟斤拷 <c>null</c>锟斤拷
-        /// - 锟斤拷 Id 锟窖达拷锟斤拷锟斤拷锟芥换锟斤拷锟斤拷锟斤拷追锟接诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 CameraNo 锟斤拷拧锟
+        /// - 锟斤拷 Id 锟窖达拷锟斤拷锟斤拷锟芥换锟斤拷锟斤拷锟斤拷追锟接诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 CameraNo 锟斤拷拧锟?
         /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷峤�拷锟斤拷锟斤拷锟较持久伙拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷
         /// </summary>
         /// <param name="camera">要锟斤拷锟接伙拷锟斤拷碌锟斤拷锟斤拷锟斤拷锟矫★拷</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="CameraInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="CameraInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public CameraInfo AddOrUpdateCamera(CameraInfo camera)
         {
             if (camera == null) return null;
@@ -354,10 +354,10 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟捷憋拷识锟狡筹拷锟斤拷锟斤拷锟斤拷貌锟斤拷锟斤拷卤锟斤拷剩锟斤拷锟斤拷锟斤拷锟CameraNo锟斤拷
+        /// 锟斤拷锟捷憋拷识锟狡筹拷锟斤拷锟斤拷锟斤拷貌锟斤拷锟斤拷卤锟斤拷剩锟斤拷锟斤拷锟斤拷锟?CameraNo锟斤拷
         /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷峤�拷锟斤拷锟斤拷锟较持久伙拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷
         /// </summary>
-        /// <param name="id">要锟狡筹拷锟斤拷锟斤拷锟Guid锟斤拷</param>
+        /// <param name="id">要锟狡筹拷锟斤拷锟斤拷锟?Guid锟斤拷</param>
         /// <returns>锟斤拷锟揭碉拷锟斤拷锟缴癸拷锟狡筹拷锟斤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
         public bool RemoveCamera(Guid id)
         {
@@ -366,7 +366,7 @@ namespace TeamAAS_VP.Services
             {
                 var exist = Cameras.FirstOrDefault(c => c.Id == id);
                 if (exist != null) result = Cameras.Remove(exist);
-                //锟斤拷锟铰憋拷锟
+                //锟斤拷锟铰憋拷锟?
                 int no = 1;
                 //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟紺ameraNo锟斤拷锟斤拷
                 var sortedCameras = Cameras.OrderBy(c => c.CameraNo).ToList();
@@ -386,18 +386,18 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟斤拷欠锟斤拷锟斤拷指锟斤拷 Id 锟斤拷锟斤拷锟斤拷锟斤拷谩锟
+        /// 锟斤拷锟斤拷欠锟斤拷锟斤拷指锟斤拷 Id 锟斤拷锟斤拷锟斤拷锟斤拷谩锟?
         /// </summary>
-        /// <param name="id">锟斤拷锟斤拷锟Guid锟斤拷</param>
+        /// <param name="id">锟斤拷锟斤拷锟?Guid锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
         public bool ContainsCamera(Guid id) { lock (_sync) { return Cameras.Any(c => c.Id == id); } }
         #endregion
 
         #region DeviceInfo
         /// <summary>
-        /// 鑾峰彇鎵€鏈夎�澶囦俊鎭�厤缃�垪琛
+        /// 鑾峰彇鎵€鏈夎�澶囦俊鎭�厤缃�垪琛?
         /// </summary>
-        /// <returns>璁惧�淇℃伅鍒楄〃鐨勫彧璇婚泦鍚�</returns>
+        /// <returns>璁惧�淇℃伅鍒楄〃鐨勫彧璇婚泦鍚?/returns>
         public IReadOnlyCollection<DeviceInfo> GetAllDeviceInfos()
         {
             lock (_sync)
@@ -460,7 +460,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 娣诲姞鎴栨洿鏂拌�澶囦俊鎭
+        /// 娣诲姞鎴栨洿鏂拌�澶囦俊鎭?
         /// </summary>
         /// <param name="deviceInfo">璁惧�淇℃伅瀵硅薄</param>
         public void SaveDeviceInfo(DeviceInfo deviceInfo)
@@ -484,17 +484,17 @@ namespace TeamAAS_VP.Services
                 }
                 else
                 {
-                    // 娣诲姞鏂拌�澶
+                    // 娣诲姞鏂拌�澶?
                     _deviceInfoList.Add(deviceInfo);
                 }
-                // 鎸夎�澶囩紪鍙锋帓搴
+                // 鎸夎�澶囩紪鍙锋帓搴?
                 _deviceInfoList = _deviceInfoList.OrderBy(d => d.DeviceNo).ToList();
                 FileHelper.WriteJsonFile(_deviceInfoList, ConfigPaths.DeviceInfoConfigurationPath);
             }
         }
 
         /// <summary>
-        /// 淇濆瓨鎵€鏈夎�澶囦俊鎭�垪琛
+        /// 淇濆瓨鎵€鏈夎�澶囦俊鎭�垪琛?
         /// </summary>
         /// <param name="deviceInfoList">璁惧�淇℃伅鍒楄〃</param>
         public void SaveAllDeviceInfos(IEnumerable<DeviceInfo> deviceInfoList)
@@ -508,7 +508,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 娣诲姞鏂拌�澶
+        /// 娣诲姞鏂拌�澶?
         /// </summary>
         /// <returns>鏂版坊鍔犵殑璁惧�</returns>
         public DeviceInfo AddDeviceInfo()
@@ -520,7 +520,7 @@ namespace TeamAAS_VP.Services
                     _deviceInfoList = new List<DeviceInfo>();
                 }
 
-                // 璁$畻鏂拌�澶囩紪鍙
+                // 璁$畻鏂拌�澶囩紪鍙?
                 int newDeviceNo = _deviceInfoList.Count > 0 ? _deviceInfoList.Max(d => d.DeviceNo) + 1 : 0;
                 var newDevice = new DeviceInfo { DeviceNo = newDeviceNo };
                 _deviceInfoList.Add(newDevice);
@@ -567,10 +567,10 @@ namespace TeamAAS_VP.Services
 
         /// <summary>
         /// 锟斤拷锟斤拷锟斤拷锟斤拷禄锟斤拷锟斤拷锟斤拷锟斤拷茫锟斤拷锟斤拷锟斤拷锟街久伙拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷
-        /// 锟斤拷锟斤拷时为锟斤拷锟斤拷锟剿凤拷锟斤拷锟斤拷锟斤拷锟斤拷 RobotNo 锟斤拷拧锟
+        /// 锟斤拷锟斤拷时为锟斤拷锟斤拷锟剿凤拷锟斤拷锟斤拷锟斤拷锟斤拷 RobotNo 锟斤拷拧锟?
         /// </summary>
-        /// <param name="robot">要锟斤拷锟接伙拷锟斤拷碌幕锟斤拷锟斤拷锟斤拷锟斤拷谩锟�</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="RobotInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <param name="robot">要锟斤拷锟接伙拷锟斤拷碌幕锟斤拷锟斤拷锟斤拷锟斤拷谩锟?/param>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="RobotInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public RobotInfo AddOrUpdateRobot(RobotInfo robot)
         {
             if (robot == null) return null;
@@ -595,7 +595,7 @@ namespace TeamAAS_VP.Services
 
         /// <summary>
         /// 锟斤拷锟捷憋拷识锟狡筹拷锟斤拷锟斤拷锟斤拷锟斤拷锟矫诧拷锟斤拷锟铰憋拷锟绞o拷锟斤拷锟斤拷锟剿★拷
-        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟
+        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟?
         /// </summary>
         /// <param name="id">要锟狡筹拷锟侥伙拷锟斤拷锟斤拷 Guid锟斤拷</param>
         /// <returns>锟狡筹拷锟缴癸拷锟斤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -607,7 +607,7 @@ namespace TeamAAS_VP.Services
                 var e = Robots.FirstOrDefault(r => r.Id == id);
                 if (e != null)
                     result = Robots.Remove(e);
-                //锟斤拷锟铰憋拷锟
+                //锟斤拷锟铰憋拷锟?
                 int no = 1;
                 //锟斤拷锟斤拷锟叫伙拷锟斤拷锟剿帮拷RobotNo锟斤拷锟斤拷
                 var sortedRobots = Robots.OrderBy(r => r.RobotNo).ToList();
@@ -627,7 +627,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟Id 锟侥伙拷锟斤拷锟斤拷锟斤拷锟矫★拷
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟?Id 锟侥伙拷锟斤拷锟斤拷锟斤拷锟矫★拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟剿碉拷 Guid锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -697,10 +697,10 @@ namespace TeamAAS_VP.Services
 
         /// <summary>
         /// 锟斤拷锟斤拷锟斤拷锟斤拷鹿锟斤拷锟斤拷锟斤拷锟斤拷茫锟斤拷锟斤拷锟斤拷锟街久伙拷锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷
-        /// 锟斤拷锟斤拷时为锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 FeederNo 锟斤拷拧锟
+        /// 锟斤拷锟斤拷时为锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 FeederNo 锟斤拷拧锟?
         /// </summary>
-        /// <param name="feeder">要锟斤拷锟接伙拷锟斤拷碌墓锟斤拷锟斤拷锟斤拷锟斤拷谩锟�</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="FeederInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <param name="feeder">要锟斤拷锟接伙拷锟斤拷碌墓锟斤拷锟斤拷锟斤拷锟斤拷谩锟?/param>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="FeederInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public FeederInfo AddOrUpdateFeeder(FeederInfo feeder)
         {
             if (feeder == null) return null;
@@ -723,8 +723,8 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟捷憋拷识锟狡筹拷锟斤拷锟斤拷锟斤拷锟斤拷锟矫诧拷锟斤拷锟铰憋拷锟绞o拷喙╋拷锟斤拷锟斤拷锟
-        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟
+        /// 锟斤拷锟捷憋拷识锟狡筹拷锟斤拷锟斤拷锟斤拷锟斤拷锟矫诧拷锟斤拷锟铰憋拷锟绞o拷喙╋拷锟斤拷锟斤拷锟?
+        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟?
         /// </summary>
         /// <param name="id">要锟狡筹拷锟侥癸拷锟斤拷锟斤拷 Guid锟斤拷</param>
         /// <returns>锟狡筹拷锟缴癸拷锟斤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -735,7 +735,7 @@ namespace TeamAAS_VP.Services
             {
                 var e = Feeders.FirstOrDefault(f => f.Id == id);
                 if (e != null) result = Feeders.Remove(e);
-                //锟斤拷锟铰憋拷锟
+                //锟斤拷锟铰憋拷锟?
                 int no = 1;
                 //锟斤拷锟斤拷锟叫癸拷锟斤拷锟斤拷锟斤拷FeederNo锟斤拷锟斤拷
                 var sortedFeeders = Feeders.OrderBy(f => f.FeederNo).ToList();
@@ -756,7 +756,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟Id 锟侥癸拷锟斤拷锟斤拷锟斤拷锟矫★拷
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟?Id 锟侥癸拷锟斤拷锟斤拷锟斤拷锟矫★拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟斤拷 Guid锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -774,14 +774,14 @@ namespace TeamAAS_VP.Services
         /// 锟斤拷锟捷憋拷识锟斤拷取锟斤拷锟斤拷 PLC 锟斤拷锟矫★拷
         /// </summary>
         /// <param name="id">PLC 锟斤拷 Guid 锟斤拷识锟斤拷</param>
-        /// <returns>匹锟斤拷锟<see cref="PlcInfo"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <returns>匹锟斤拷锟?<see cref="PlcInfo"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public PlcInfo GetPlc(Guid id) { lock (_sync) { return Plcs.FirstOrDefault(p => p.Id == id); } }
 
         /// <summary>
-        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟PLC 锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷锟斤拷募锟斤拷锟斤拷锟斤拷锟绞憋拷锟斤拷锟斤拷锟斤拷锟� PlcNo 锟斤拷拧锟�
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟?PLC 锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷锟斤拷募锟斤拷锟斤拷锟斤拷锟绞憋拷锟斤拷锟斤拷锟斤拷锟?PlcNo 锟斤拷拧锟?
         /// </summary>
-        /// <param name="plc">要锟斤拷锟接伙拷锟斤拷碌锟PLC 锟斤拷锟矫★拷</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="PlcInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <param name="plc">要锟斤拷锟接伙拷锟斤拷碌锟?PLC 锟斤拷锟矫★拷</param>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="PlcInfo"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public PlcInfo AddOrUpdatePlc(PlcInfo plc)
         {
             if (plc == null) return null;
@@ -804,8 +804,8 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟捷憋拷识锟狡筹拷 PLC 锟斤拷锟矫诧拷锟斤拷锟铰憋拷锟绞o拷锟PLC锟斤拷
-        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟
+        /// 锟斤拷锟捷憋拷识锟狡筹拷 PLC 锟斤拷锟矫诧拷锟斤拷锟铰憋拷锟绞o拷锟?PLC锟斤拷
+        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟?
         /// </summary>
         /// <param name="id">要锟狡筹拷锟斤拷 PLC Guid锟斤拷</param>
         /// <returns>锟狡筹拷锟缴癸拷锟斤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -816,7 +816,7 @@ namespace TeamAAS_VP.Services
             {
                 var e = Plcs.FirstOrDefault(p => p.Id == id);
                 if (e != null) result = Plcs.Remove(e);
-                //锟斤拷锟铰憋拷锟
+                //锟斤拷锟铰憋拷锟?
                 int no = 1;
                 //锟斤拷锟斤拷锟斤拷PLC锟斤拷PlcNo锟斤拷锟斤拷
                 var sortedPlcs = Plcs.OrderBy(p => p.PlcNo).ToList();
@@ -837,7 +837,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟Id 锟斤拷 PLC 锟斤拷锟矫★拷
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟?Id 锟斤拷 PLC 锟斤拷锟矫★拷
         /// </summary>
         /// <param name="id">PLC 锟斤拷 Guid锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -846,13 +846,13 @@ namespace TeamAAS_VP.Services
 
         #region BgTcp
         /// <summary>
-        /// 锟斤拷取 BG TCP/IP 通锟斤拷锟斤拷锟矫o拷锟节达拷锟斤拷螅�锟斤拷锟轿null锟斤拷锟斤拷
+        /// 锟斤拷取 BG TCP/IP 通锟斤拷锟斤拷锟矫o拷锟节达拷锟斤拷螅�锟斤拷锟轿?null锟斤拷锟斤拷
         /// </summary>
         /// <returns>锟斤拷前锟斤拷 <see cref="BgTcpIP"/> 锟斤拷锟矫讹拷锟斤拷</returns>
         public BgTcpIP GetBgTcp() { lock (_sync) { return BgCommunicate; } }
 
         /// <summary>
-        /// 锟斤拷锟斤拷 BG TCP/IP 通锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷锟节达拷锟斤拷螅�锟斤拷锟斤拷远锟斤拷志没锟斤拷锟斤拷锟
+        /// 锟斤拷锟斤拷 BG TCP/IP 通锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷锟节达拷锟斤拷螅�锟斤拷锟斤拷远锟斤拷志没锟斤拷锟斤拷锟?
         /// 锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷 <see cref="SaveBgTcp"/>锟斤拷
         /// </summary>
         /// <param name="cfg">锟铰碉拷 <see cref="BgTcpIP"/> 锟斤拷锟矫讹拷锟斤拷</param>
@@ -866,13 +866,13 @@ namespace TeamAAS_VP.Services
 
         #region BgModbus
         /// <summary>
-        /// 锟斤拷取 BG Modbus TCP 通锟斤拷锟斤拷锟矫o拷锟节达拷锟斤拷螅�锟
+        /// 锟斤拷取 BG Modbus TCP 通锟斤拷锟斤拷锟矫o拷锟节达拷锟斤拷螅�锟?
         /// </summary>
         /// <returns>锟斤拷前锟斤拷 <see cref="BgModbusTcp"/> 锟斤拷锟矫讹拷锟斤拷</returns>
         public BgModbusTcp GetBgModbusTcp() { lock (_sync) { return BgModbusCommunicate; } }
 
         /// <summary>
-        /// 锟斤拷锟斤拷 BG Modbus TCP 通锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷锟节达拷锟斤拷螅�锟斤拷锟斤拷远锟斤拷志没锟斤拷锟斤拷锟
+        /// 锟斤拷锟斤拷 BG Modbus TCP 通锟斤拷锟斤拷锟矫o拷锟斤拷锟斤拷锟斤拷锟节达拷锟斤拷螅�锟斤拷锟斤拷远锟斤拷志没锟斤拷锟斤拷锟?
         /// </summary>
         /// <param name="cfg">锟铰碉拷 <see cref="BgModbusTcp"/> 锟斤拷锟矫讹拷锟斤拷</param>
         public void SetBgModbusTcp(BgModbusTcp cfg) { lock (_sync) { BgModbusCommunicate = cfg; } }
@@ -942,7 +942,7 @@ namespace TeamAAS_VP.Services
         /// <summary>
         /// 锟斤拷锟斤拷系统锟斤拷锟矫碉拷锟斤拷锟斤拷锟侥硷拷锟斤拷锟结覆锟斤拷锟斤拷锟斤拷锟侥硷拷锟斤拷锟斤拷
         /// </summary>
-        /// <param name="systemConfiguration">要锟斤拷锟斤拷锟较低筹拷锟斤拷枚锟斤拷锟�</param>
+        /// <param name="systemConfiguration">要锟斤拷锟斤拷锟较低筹拷锟斤拷枚锟斤拷锟?/param>
         public void SaveSystemConfiguration(SystemConfiguration systemConfiguration)
         {
             lock (_sync)
@@ -1026,16 +1026,16 @@ namespace TeamAAS_VP.Services
 
         #region Feeder锟斤拷锟斤拷锟斤拷锟斤拷
         /// <summary>
-        /// 锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷稀锟
+        /// 锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷稀锟?
         /// </summary>
-        /// <returns>锟斤拷锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷稀锟�</returns>
+        /// <returns>锟斤拷锟斤拷锟斤拷锟斤拷锟街伙拷锟斤拷锟斤拷稀锟?/returns>
         public IReadOnlyCollection<FeederClearWork> GetAllClearanceTasks() { lock (_sync) { return FeederClearanceTasks.ToList().AsReadOnly(); } }
 
         /// <summary>
-        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟绞蔽�拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟TaskCode锟斤拷锟斤拷珊锟街久伙拷锟斤拷锟斤拷锟侥硷拷锟斤拷
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟绞蔽�拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟?TaskCode锟斤拷锟斤拷珊锟街久伙拷锟斤拷锟斤拷锟侥硷拷锟斤拷
         /// </summary>
         /// <param name="task">要锟斤拷锟接伙拷锟斤拷碌锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="FeederClearWork"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="FeederClearWork"/>锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public FeederClearWork AddOrUpdateClearanceTask(FeederClearWork task)
         {
             if (task == null) return null;
@@ -1049,7 +1049,7 @@ namespace TeamAAS_VP.Services
                 }
                 else
                 {
-                    // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷前锟斤拷锟斤拷偶锟�1
+                    // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷前锟斤拷锟斤拷偶锟?
                     task.TaskCode = FeederClearanceTasks.Count > 0 ? FeederClearanceTasks.Max(t => t.TaskCode) + 1 : 1;
                     FeederClearanceTasks.Add(task);
                 }
@@ -1080,7 +1080,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷癫⒊志没锟斤拷占锟斤拷系锟斤拷锟斤拷锟斤拷募锟斤拷锟
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷癫⒊志没锟斤拷占锟斤拷系锟斤拷锟斤拷锟斤拷募锟斤拷锟?
         /// </summary>
         public void ClearAllClearanceTasks()
         {
@@ -1092,7 +1092,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟Id 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟?Id 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟斤拷锟斤拷 Guid锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -1106,14 +1106,14 @@ namespace TeamAAS_VP.Services
         /// 锟斤拷锟捷憋拷识锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟斤拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟斤拷锟斤拷 Guid锟斤拷</param>
-        /// <returns>匹锟斤拷锟<see cref="FeederClearWork"/>锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <returns>匹锟斤拷锟?<see cref="FeederClearWork"/>锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public FeederClearWork GetClearanceTask(Guid id)
         {
             lock (_sync) { return FeederClearanceTasks.FirstOrDefault(t => t.Id == id); }
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟斤拷锟斤拷锟斤拷诺锟斤拷锟斤拷锟斤拷锟斤拷锟
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟斤拷锟斤拷锟斤拷诺锟斤拷锟斤拷锟斤拷锟斤拷锟?
         /// </summary>
         /// <param name="taskNumber">锟斤拷锟斤拷锟脚o拷TaskCode锟斤拷锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -1126,7 +1126,7 @@ namespace TeamAAS_VP.Services
         /// 锟斤拷锟斤拷锟斤拷锟斤拷锟脚伙拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷息锟斤拷
         /// </summary>
         /// <param name="taskNumber">锟斤拷锟斤拷锟脚o拷TaskCode锟斤拷锟斤拷</param>
-        /// <returns>匹锟斤拷锟<see cref="FeederClearWork"/>锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <returns>匹锟斤拷锟?<see cref="FeederClearWork"/>锟斤拷锟揭诧拷锟斤拷锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         public FeederClearWork GetClearanceTaskByNumber(int taskNumber)
         {
             lock (_sync) { return FeederClearanceTasks.FirstOrDefault(t => t.TaskCode == taskNumber); }
@@ -1150,21 +1150,21 @@ namespace TeamAAS_VP.Services
         /// 锟竭程帮拷全锟斤拷锟矫凤拷锟斤拷锟斤拷锟节存集锟较斤拷锟斤拷只锟斤拷锟斤拷锟绞诧拷锟斤拷锟节诧拷锟斤拷锟斤拷锟斤拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷识锟斤拷Id锟斤拷锟斤拷</param>
-        /// <returns>匹锟斤拷锟<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟津返伙拷 <c>null</c>锟斤拷</returns>
+        /// <returns>匹锟斤拷锟?<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟津返伙拷 <c>null</c>锟斤拷</returns>
         public LightControllerConfig GetLightController(int id)
         {
             lock (_sync) { return LightControllers.FirstOrDefault(c => c.Id == id); }
         }
 
         /// <summary>
-        /// 锟斤拷锟斤拷锟斤拷锟斤拷鹿锟皆达拷锟斤拷锟斤拷锟斤拷锟斤拷谩锟
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷鹿锟皆达拷锟斤拷锟斤拷锟斤拷锟斤拷谩锟?
         /// - 锟斤拷 <paramref name="controller"/> 为 <c>null</c> 锟斤拷锟斤拷 <c>null</c>锟斤拷
         /// - 锟斤拷锟斤拷时锟斤拷 Id 匹锟斤拷锟斤拷锟斤拷锟筋并锟芥换锟斤拷
         /// - 锟斤拷锟斤拷时锟斤拷锟斤拷锟斤拷锟斤拷锟侥匡拷锟斤拷锟斤拷 Id锟斤拷锟斤拷为锟斤拷锟斤拷锟斤拷锟节碉拷每锟斤拷通锟斤拷锟斤拷锟斤拷全锟斤拷通锟斤拷锟斤拷牛锟紾lobalIndex锟斤拷锟斤拷
         /// 锟竭程帮拷全锟斤拷锟斤拷锟节诧拷使锟斤拷 <see cref="_sync"/> 锟斤拷锟斤拷锟斤拷锟较★拷
         /// </summary>
-        /// <param name="controller">要锟斤拷锟接伙拷锟斤拷碌锟<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷</param>
-        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
+        /// <param name="controller">要锟斤拷锟接伙拷锟斤拷碌锟?<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷</param>
+        /// <returns>锟斤拷锟斤拷锟接伙拷锟斤拷碌锟?<see cref="LightControllerConfig"/> 实锟斤拷锟斤拷锟斤拷锟斤拷为 <c>null</c> 时锟斤拷锟斤拷 <c>null</c>锟斤拷</returns>
         /// <exception cref="ArgumentException">锟斤拷要锟斤拷锟斤拷/锟斤拷锟铰的匡拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟截革拷时锟阶筹拷锟斤拷</exception>
         public LightControllerConfig AddOrUpdateLightController(LightControllerConfig controller)
         {
@@ -1185,10 +1185,10 @@ namespace TeamAAS_VP.Services
                 else
                 {
                     // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
-                    // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷前锟斤拷锟Id + 1锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷锟斤拷为 1锟斤拷
+                    // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷前锟斤拷锟?Id + 1锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷锟斤拷为 1锟斤拷
                     controller.Id = LightControllers.Count > 0 ? LightControllers.Max(c => c.Id) + 1 : 1;
 
-                    // 锟斤拷锟斤拷锟斤拷一锟斤拷全锟斤拷通锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟窖达拷锟节匡拷锟斤拷锟斤拷锟斤拷通锟斤拷 GlobalIndex 锟斤拷取锟斤拷锟街碉拷锟斤拷锟�1
+                    // 锟斤拷锟斤拷锟斤拷一锟斤拷全锟斤拷通锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟窖达拷锟节匡拷锟斤拷锟斤拷锟斤拷通锟斤拷 GlobalIndex 锟斤拷取锟斤拷锟街碉拷锟斤拷锟?
                     int nextGlobal = 0;
                     if (LightControllers.SelectMany(c => c.ChannelConfigs).Any())
                     {
@@ -1209,17 +1209,17 @@ namespace TeamAAS_VP.Services
                     LightControllers.Add(controller);
                 }
             }
-            // 锟街久伙拷锟斤拷锟铰猴拷墓锟皆达拷锟斤拷锟斤拷锟斤拷锟斤拷锟
+            // 锟街久伙拷锟斤拷锟铰猴拷墓锟皆达拷锟斤拷锟斤拷锟斤拷锟斤拷锟?
             FileHelper.WriteJsonFile(LightControllers, ConfigPaths.LightControllersConfigurationPath);
             return controller;
         }
 
         /// <summary>
-        /// 锟斤拷锟斤拷 Id 锟狡筹拷锟斤拷源锟斤拷锟斤拷锟斤拷锟斤拷锟矫诧拷锟斤拷剩锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷卤锟脚o拷锟斤拷 1 锟斤拷始锟斤拷锟斤拷锟斤拷牛锟斤拷锟
-        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟
+        /// 锟斤拷锟斤拷 Id 锟狡筹拷锟斤拷源锟斤拷锟斤拷锟斤拷锟斤拷锟矫诧拷锟斤拷剩锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷卤锟脚o拷锟斤拷 1 锟斤拷始锟斤拷锟斤拷锟斤拷牛锟斤拷锟?
+        /// 锟斤拷锟斤拷锟斤拷志没锟斤拷锟斤拷锟斤拷募锟斤拷锟?
         /// </summary>
         /// <param name="id">要锟狡筹拷锟侥匡拷锟斤拷锟斤拷 Id锟斤拷</param>
-        /// <returns>锟斤拷锟斤拷晒锟斤拷瞥锟斤拷锟斤拷锟<c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷锟斤拷锟斤拷未锟揭碉拷锟斤拷 Id锟斤拷锟斤拷</returns>
+        /// <returns>锟斤拷锟斤拷晒锟斤拷瞥锟斤拷锟斤拷锟?<c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷锟斤拷锟斤拷未锟揭碉拷锟斤拷 Id锟斤拷锟斤拷</returns>
         public bool RemoveLightController(int id)
         {
             bool result = false;
@@ -1229,7 +1229,7 @@ namespace TeamAAS_VP.Services
                 if (e != null)
                     result = LightControllers.Remove(e);
 
-                // 锟斤拷锟铰帮拷 Id 锟斤拷锟津并达拷 1 锟斤拷始锟斤拷锟铰憋拷牛锟斤拷员锟斤拷锟斤拷锟斤拷锟斤拷锟
+                // 锟斤拷锟铰帮拷 Id 锟斤拷锟津并达拷 1 锟斤拷始锟斤拷锟铰憋拷牛锟斤拷员锟斤拷锟斤拷锟斤拷锟斤拷锟?
                 int no = 1;
                 var sorted = LightControllers.OrderBy(c => c.Id).ToList();
                 foreach (var c in sorted)
@@ -1248,7 +1248,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟Id 锟侥癸拷源锟斤拷锟斤拷锟斤拷锟斤拷
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟?Id 锟侥癸拷源锟斤拷锟斤拷锟斤拷锟斤拷
         /// </summary>
         /// <param name="id">锟斤拷锟斤拷锟斤拷 Id锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -1257,7 +1257,7 @@ namespace TeamAAS_VP.Services
         /// <summary>
         /// 锟斤拷取锟斤拷锟叫癸拷源通锟斤拷锟斤拷只锟斤拷锟斤拷锟较o拷锟斤拷 GlobalIndex 锟斤拷锟津返回★拷
         /// </summary>
-        /// <returns>锟斤拷 GlobalIndex 锟斤拷锟斤拷锟<see cref="ChannelConfig"/> 只锟斤拷锟斤拷锟较★拷</returns>
+        /// <returns>锟斤拷 GlobalIndex 锟斤拷锟斤拷锟?<see cref="ChannelConfig"/> 只锟斤拷锟斤拷锟较★拷</returns>
         public IReadOnlyCollection<ChannelConfig> GetAllLightChannels()
         {
             lock (_sync) { return LightControllers.SelectMany(c => c.ChannelConfigs).OrderBy(ch => ch.GlobalIndex).ToList().AsReadOnly(); }
@@ -1267,14 +1267,14 @@ namespace TeamAAS_VP.Services
         /// 锟斤拷锟斤拷全锟斤拷通锟斤拷锟斤拷锟斤拷锟斤拷取锟斤拷锟斤拷通锟斤拷锟斤拷锟矫★拷
         /// </summary>
         /// <param name="globalIndex">通锟斤拷锟斤拷全锟斤拷锟斤拷锟斤拷锟斤拷GlobalIndex锟斤拷锟斤拷</param>
-        /// <returns>匹锟斤拷锟<see cref="ChannelConfig"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟津返伙拷 <c>null</c>锟斤拷</returns>
+        /// <returns>匹锟斤拷锟?<see cref="ChannelConfig"/> 实锟斤拷锟斤拷锟揭诧拷锟斤拷锟津返伙拷 <c>null</c>锟斤拷</returns>
         public ChannelConfig GetLightChannelByGlobalIndex(int globalIndex)
         {
             lock (_sync) { return LightControllers.SelectMany(c => c.ChannelConfigs).FirstOrDefault(ch => ch.GlobalIndex == globalIndex); }
         }
 
         /// <summary>
-        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟饺�拷锟酵�拷锟斤拷锟斤拷锟斤拷锟酵�拷锟斤拷锟斤拷谩锟
+        /// 锟叫讹拷锟角凤拷锟斤拷锟街革拷锟饺�拷锟酵�拷锟斤拷锟斤拷锟斤拷锟酵�拷锟斤拷锟斤拷谩锟?
         /// </summary>
         /// <param name="globalIndex">全锟斤拷通锟斤拷锟斤拷锟斤拷锟斤拷</param>
         /// <returns>锟斤拷锟节凤拷锟斤拷 <c>true</c>锟斤拷锟斤拷锟津返伙拷 <c>false</c>锟斤拷</returns>
@@ -1356,8 +1356,8 @@ namespace TeamAAS_VP.Services
         public ScrewFeederInfo GetScrewFeeder(Guid id) { lock (_sync) { return ScrewFeeders.FirstOrDefault(s => s.Id == id); } }
 
         /// <summary>
-        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟剿匡拷锟斤拷锟斤拷锟斤拷锟斤拷谩锟
-        /// 锟斤拷锟斤拷时锟斤拷未指锟斤拷 FeederNumber 锟斤拷锟斤拷锟轿�拷锟角帮拷锟斤拷锟�+1锟斤拷
+        /// 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟剿匡拷锟斤拷锟斤拷锟斤拷锟斤拷谩锟?
+        /// 锟斤拷锟斤拷时锟斤拷未指锟斤拷 FeederNumber 锟斤拷锟斤拷锟轿�拷锟角帮拷锟斤拷锟?1锟斤拷
         /// </summary>
         public ScrewFeederInfo AddOrUpdateScrewFeeder(ScrewFeederInfo feeder)
         {
@@ -1401,7 +1401,7 @@ namespace TeamAAS_VP.Services
         public event Action<ScrewFeederInfo> ScrewFeederLowLevelAlarmTriggered;
 
         /// <summary>
-        /// 锟斤拷取指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺锟绞o拷锟斤拷锟剿匡拷锟斤拷锟斤拷锟斤拷也锟斤拷锟斤拷锟斤拷锟-1锟斤拷
+        /// 锟斤拷取指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺锟绞o拷锟斤拷锟剿匡拷锟斤拷锟斤拷锟斤拷也锟斤拷锟斤拷锟斤拷锟?-1锟斤拷
         /// </summary>
         public int GetRemainingCountByFeederNumber(int feederNumber)
         {
@@ -1414,7 +1414,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷取指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺牡锟斤拷锟斤拷锟斤拷锟阶刺�拷锟斤拷也锟斤拷锟斤拷锟斤拷锟false锟斤拷
+        /// 锟斤拷取指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺牡锟斤拷锟斤拷锟斤拷锟阶刺�拷锟斤拷也锟斤拷锟斤拷锟斤拷锟?false锟斤拷
         /// </summary>
         public bool GetLowLevelAlarmStatusByFeederNumber(int feederNumber)
         {
@@ -1452,7 +1452,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 为指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺菁锟街革拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷惴碉拷锟-1
+        /// 为指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷诺菁锟街革拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷惴碉拷锟?-1
         /// </summary>
         public int DecrementScrewCountByFeederNumber(int feederNumber, int decrement = 1)
         {
@@ -1557,7 +1557,7 @@ namespace TeamAAS_VP.Services
                 }
                 catch
                 {
-                    // 锟斤拷锟斤拷锟斤拷锟捷匡拷写锟斤拷锟斤拷螅�锟铰硷拷锟斤拷锟斤拷锟斤拷锟街
+                    // 锟斤拷锟斤拷锟斤拷锟捷匡拷写锟斤拷锟斤拷螅�锟铰硷拷锟斤拷锟斤拷锟斤拷锟街?
                 }
             }
             catch
@@ -1567,7 +1567,7 @@ namespace TeamAAS_VP.Services
         }
 
         /// <summary>
-        /// 锟斤拷锟绞o拷锟斤拷锟剿匡拷欠癖ň锟
+        /// 锟斤拷锟绞o拷锟斤拷锟剿匡拷欠癖ň锟?
         /// </summary>
         public bool CheckAlarm(int feederNumber)
         {

+ 24 - 11
TeamAAS-VM/Views/SettingView.xaml

@@ -540,19 +540,32 @@
                                     Grid.Column="1"
                                     Margin="6,2"
                                     Text="{Binding SelectDeviceInfo.ApiKey, Mode=TwoWay}" />
-
-                                <CheckBox
+                                <StackPanel
                                     Grid.Row="11"
                                     Grid.Column="1"
-                                    Margin="6,2"
-                                    Command="{Binding CheckStatusCommand}"
-                                    Content="启用 MES"
-                                    IsChecked="{Binding SelectDeviceInfo.EnableMES, Mode=TwoWay}" />
-                                <!--<CheckBox Grid.Row="10"
-                                          Grid.Column="1"
-                                          Content="是否启用两次产品编号"
-                                          IsChecked="{Binding SelectDeviceInfo.EnableDoubleMes, Mode=TwoWay}"
-                                          Margin="6,2" />-->
+                                    Orientation="Horizontal">
+                                    <CheckBox
+    Grid.Row="11"
+    Grid.Column="1"
+    Margin="6,2"
+    Command="{Binding CheckStatusCommand}"
+    Content="启用 MES"
+    IsChecked="{Binding SelectDeviceInfo.EnableMES, Mode=TwoWay}" />
+                                    <!--<CheckBox Grid.Row="10"
+          Grid.Column="1"
+          Content="是否启用两次产品编号"
+          IsChecked="{Binding SelectDeviceInfo.EnableDoubleMes, Mode=TwoWay}"
+          Margin="6,2" />-->
+                                    <CheckBox
+                                        Grid.Row="11"
+                                        Grid.Column="1"
+                                        Margin="6,2"
+                                        Command="{Binding CheckStatusCommand}"
+Content="是否启用锁螺丝XY超限"
+IsChecked="{Binding SelectDeviceInfo.EnableXY, Mode=TwoWay}" />
+                                </StackPanel>
+
+                                
                                 <StackPanel
                                     Grid.Row="13"
                                     Grid.Column="1"