轮胎外观检测添加思谋语义分割模型检测工具
C3204
8 小时以前 ef75346ebe57d56cec0c33ad5abd8b2aa218da95
LB_SmartVision/VisionForm.cs
@@ -821,11 +821,19 @@
            }
            if (LoadAllPLCSettings(GlobalVar.allPlcSettingsPath))
            {
                LogInfo("PLC通讯加载成功", LogInfoType.PASS);
                LogInfo("PLC通讯配置加载成功", LogInfoType.PASS);
            }
            else
            {
                LogInfo("PLC通讯加载失败", LogInfoType.ERROR);
                LogInfo("PLC通讯配置加载失败", LogInfoType.ERROR);
            }
            if (LoadAllMPlcDatas(GlobalVar.allMPlcDatasPath))
            {
                LogInfo("运动控制配置加载成功", LogInfoType.PASS);
            }
            else
            {
                LogInfo("运动控制配置加载失败", LogInfoType.ERROR);//LoadAllMPlcDatas
            }
            //加载相机
            foreach (BaseCamera camera in GlobalVar.dicCameras.Values)
@@ -1022,6 +1030,7 @@
            SaveSerialPorts();
            SaveAllBarcodeReaders();
            SaveAllPLCSettings();
            SaveAllMPlcDatas();
        }
@@ -1080,6 +1089,29 @@
            return true;
        }
        public bool SaveAllMPlcDatas()
        {
            try
            {
                ConfigManager<Dictionary<string, Dictionary<string, PlcConfig>>>.SaveConfig<Dictionary<string, Dictionary<string, PlcConfig>>>(GlobalVar.dicMPlcDatas, GlobalVar.allMPlcDatasPath);
                return true;
            }
            catch { return false; }
        }
        public bool LoadAllMPlcDatas(string allBarcodeReadersConnectionStringPath)
        {
            try
            {
                GlobalVar.dicMPlcDatas = ConfigManager<Dictionary<string, Dictionary<string, PlcConfig>>>.LoadConfig<Dictionary<string, Dictionary<string, PlcConfig>>>(allBarcodeReadersConnectionStringPath);
            }
            catch
            {
                return false;
            }
            return true;
        }
        public bool SaveAllBarcodeReaders()
        {
            try