From dc18021539bdf4ee176ec9d9b88eb7d9ad581600 Mon Sep 17 00:00:00 2001
From: C3204 <zhengyabo@lanpucloud.cn>
Date: 星期五, 17 四月 2026 17:00:35 +0800
Subject: [PATCH] 新增心跳等常规信号配置&&修改相机轴读取配置等
---
LB_SmartVision/GlobalVar.cs | 47 +++++++++++++++++++++++++++++++++++++++++------
1 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/LB_SmartVision/GlobalVar.cs b/LB_SmartVision/GlobalVar.cs
index 60133bf..473e960 100644
--- a/LB_SmartVision/GlobalVar.cs
+++ b/LB_SmartVision/GlobalVar.cs
@@ -3,8 +3,11 @@
using LB_SmartVision.Forms.Pages.SettingPage;
using LB_SmartVision.ProcessRun;
using LB_SmartVision.Tool;
+using LB_SmartVisionCameraDevice.PHM6000;
+using LB_VisionProcesses.BarcodeReaders;
using LB_VisionProcesses.Cameras;
using LB_VisionProcesses.Communicators;
+using LB_VisionProcesses.Communicators.SiemensS7;
using System.Collections.Concurrent;
namespace LB_SmartVision
@@ -25,15 +28,31 @@
strStartTime = DateTime.Now.ToString("yyyyMMdd_HHmm");
}
+
+ /// <summary>
+ /// 璇荤爜鍣ㄩ泦鍚�(Key:璁惧SN锛孷alue:璇荤爜鍣ㄥ彞鏌�)
+ /// </summary>
+ public static ObservableConcurrentDictionary<string, BarcodeReaderBase> dicBarcodeReaders { get; set; } = new ObservableConcurrentDictionary<string, BarcodeReaderBase>();
+
+
/// <summary>
/// 鍏夋簮鎺у埗閰嶇疆
/// </summary>
public static Dictionary<string, LEDControlParams> dicSerialPort { get; set; } = new Dictionary<string, LEDControlParams>();
+ #region 璇荤爜鍣�
+ public static ConcurrentDictionary<string, string> allBarcodeReadersConnectionString = new ConcurrentDictionary<string, string>();
+ public static string allBarcodeReadersConnectionStringPath
+ => GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_BarcodeReaderConnections.json";
+
+ #endregion
+
public static string AllSerialPortPath
=> GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_SerialPort.json";
-
-
+ /// <summary>
+ /// 褰撳墠閫氳
+ /// </summary>
+ public static string currentCommunicators { get; set; } = string.Empty;
/// <summary>
/// 娴佺▼闆嗗悎(Key:娴佺▼鍚嶏紝Value:杩愯姝ラ闆嗗悎)
/// </summary>
@@ -56,18 +75,27 @@
/// <summary>
- /// 杩愬姩鎺ф暟鎹埗闆嗗悎 Key:浜у搧鍚嶇О锛孷alue: SN,RecordMotionControlData
+ /// 杩愬姩鎺ф暟鎹埗闆嗗悎 Key:浜у搧鍚嶇О锛孷alue: SN,PlcConfig
/// </summary>
- public static Dictionary<string, Dictionary<string, PlcDataItem>> dicMPlcData { get; set; } = new Dictionary<string, Dictionary<string, PlcDataItem>>();
+ public static Dictionary<string, Dictionary<string, PlcConfig>> dicMPlcData { get; set; } = new Dictionary<string, Dictionary<string, PlcConfig>>();
public static string allMPlcDataPath
=> GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_MPlcDatas.json";
+ public static Dictionary<string, PlcConfig> allPlcSettings { get; set; } = new Dictionary<string, PlcConfig>();
+
+ public static string allPlcSettingPath
+ => GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName /*+ "\\A_PlcSetting.json"*/;
+
+ public static string allPlcSettingsPath
+ => GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_PlcSettings.json";
+
+
/// <summary>
- /// 杩愬姩鎺ф暟鎹埗闆嗗悎 Key:浜у搧鍚嶇О锛孷alue: SN,RecordMotionControlData
+ /// 杩愬姩鎺ф暟鎹埗闆嗗悎 Key:浜у搧鍚嶇О锛孷alue: SN,PlcConfig
/// </summary>
- public static Dictionary<string, Dictionary<string, RecordMotionControlData>> dicMotionControlData { get; set; } = new Dictionary<string, Dictionary<string, RecordMotionControlData>>();
+ public static Dictionary<string, Dictionary<string, PlcConfig>> dicMotionControlData { get; set; } = new Dictionary<string, Dictionary<string, PlcConfig>>();
public static string allMotionControlDataPath
=> GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_MotionControlDatas.json";
@@ -121,6 +149,13 @@
=> GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\A_AllCsv.json";
#endregion
+ public static ConcurrentDictionary<string, PHM6000SensorConfig> allLBCameras = new ConcurrentDictionary<string, PHM6000SensorConfig>();
+
+ public static string allCamerasLBPath
+ => GlobalVar.strApplicationPath + "鎵�鏈変骇鍝乗\" + GlobalVar.strProductName + "\\LBCameraSetttings.json";
+
+
+
/// <summary>
/// 杞欢璺緞
/// </summary>
--
Gitblit v1.9.3