From 74ca5a83f24c53c48ad7e6f5b7739649fb411546 Mon Sep 17 00:00:00 2001 From: kazelee <1847801760@qq.com> Date: 星期四, 17 七月 2025 17:19:53 +0800 Subject: [PATCH] 优化部分日志和未使用代码 --- device/ProductionLineDevice.cs | 35 ++++++----------------------------- 1 files changed, 6 insertions(+), 29 deletions(-) diff --git a/device/ProductionLineDevice.cs b/device/ProductionLineDevice.cs index 4eaf326..406c492 100644 --- a/device/ProductionLineDevice.cs +++ b/device/ProductionLineDevice.cs @@ -22,10 +22,14 @@ Port = port; Id = id; } + + public ProductionLineDevice(Config.ProductionLine line) { + Ip = line.PlcIp; + Port = line.PlcPort; + Id = line.Id; + } public string Id { get; set; } - - /// <summary> /// 绯荤粺鐘舵�锛�鏈湴 1鑱斿姩(AGV妯″紡) 2鏁呴殰 @@ -47,20 +51,6 @@ /// </summary> public int AllowAgvPlacePallet { get; set; } - //private int _agvPicking; - //private int _agvPlacingPallet; - - ///// <summary> - ///// AGV 姝e湪鍙栬揣锛氫笅绾緼GV鍐欏叆1锛屽彇璐у畬鎴愬悗鎭㈠0 - ///// </summary> - //public int AgvPicking { - // get => _agvPicking; - // set { - // var isOk = ModbusHelper.WriteSingleRegister(10, value, Ip, Port); - // _agvPicking = isOk ? value : throw new Exception($"淇敼 [AGV 姝e湪鍙栬揣] 涓�'{value}' 澶辫触"); - // } - //} - /// <summary> /// AGV 姝e湪鍙栬揣锛氫笅绾緼GV鍐欏叆1锛屽彇璐у畬鎴愬悗鎭㈠0 /// </summary> @@ -79,17 +69,6 @@ AgvPicking = value; return true; } - - ///// <summary> - ///// AGV 姝e湪鏀炬墭鐩樺灈锛氫笂绾緼GV鍐欏叆1锛屾斁鎵樺畬鎴愬悗鎭㈠0 - ///// </summary> - //public int AgvPlacingPallet { - // get => _agvPlacingPallet; - // set { - // var isOk = ModbusHelper.WriteSingleRegister(11, value, Ip, Port); - // _agvPlacingPallet = isOk ? value : throw new Exception($"淇敼 [AGV 姝e湪鏀炬墭鐩樺灈] 涓�'{value}' 澶辫触"); - // } - //} /// <summary> /// AGV 姝e湪鏀炬墭鐩樺灈锛氫笂绾緼GV鍐欏叆1锛屾斁鎵樺畬鎴愬悗鎭㈠0 @@ -120,8 +99,6 @@ CallPallet = readArray[2]; AllowAgvPlacePallet = readArray[3]; // 鍙啓鍦板潃鏁版嵁 - //_agvPicking = readArray[10]; - //_agvPlacingPallet = readArray[11]; AgvPicking = readArray[10]; AgvPlacingPallet = readArray[11]; -- Gitblit v1.9.1