From 9c4d9f98c100f8f891f60d0706dd3d4111eeaebd Mon Sep 17 00:00:00 2001 From: zhaowc <526854230@qq.com> Date: 星期五, 14 二月 2025 08:52:45 +0800 Subject: [PATCH] 修改数据库配置,增加PLC入库前信号交互 --- Admin.NET/WCS.Application/PLC/PLCService.cs | 14 ++++++++++++++ Admin.NET/WCS.Application/Configuration/Database.json | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Admin.NET/WCS.Application/Configuration/Database.json b/Admin.NET/WCS.Application/Configuration/Database.json index 8e1405e..a586878 100644 --- a/Admin.NET/WCS.Application/Configuration/Database.json +++ b/Admin.NET/WCS.Application/Configuration/Database.json @@ -11,8 +11,8 @@ //"ConnectionString": "PORT=5432;DATABASE=xxx;HOST=localhost;PASSWORD=xxx;USER ID=xxx", // PostgreSQL 搴撹繛鎺ュ瓧绗︿覆 //"ConnectionString": "Server=localhost;Database=xxx;Uid=xxx;Pwd=xxx;SslMode=None;", // MySql 搴撹繛鎺ュ瓧绗︿覆", //"ConnectionString": "User Id=xxx; Password=xxx; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL)))", // Oracle 搴撹繛鎺ュ瓧绗︿覆 - //"ConnectionString": "Server=10.18.99.10;Database=WCSnet6;User Id=sa;Password=sql2024;", // SqlServer 搴撹繛鎺ュ瓧绗︿覆 - "ConnectionString": "Server=192.168.62.200;Database=WCSnet6;User Id=sa;Password=sql2019;", // SqlServer 搴撹繛鎺ュ瓧绗︿覆 + "ConnectionString": "Server=10.18.99.10;Database=WCSnet6;User Id=sa;Password=sql2024;", // SqlServer 搴撹繛鎺ュ瓧绗︿覆 + //"ConnectionString": "Server=192.168.62.200;Database=WCSnet6;User Id=sa;Password=sql2019;", // SqlServer 搴撹繛鎺ュ瓧绗︿覆 //"SlaveConnectionConfigs": [ // 璇诲啓鍒嗙/涓讳粠 diff --git a/Admin.NET/WCS.Application/PLC/PLCService.cs b/Admin.NET/WCS.Application/PLC/PLCService.cs index be78de6..92a5551 100644 --- a/Admin.NET/WCS.Application/PLC/PLCService.cs +++ b/Admin.NET/WCS.Application/PLC/PLCService.cs @@ -1749,8 +1749,22 @@ #endregion + } break; + #region 灏忚溅鍙斁淇″彿 + case "150": + { // 鑾峰彇宸ヤ綅浠诲姟鍙蜂俊鎭� + var strMsg = ""; + var http = new HttpService(); + var modPosPallet = modDevice.listStation.FirstOrDefault(m => m.Text == "鎵樼洏鐮�"); + var (res, palletVal) = plcConn.GetPlcDBValue(PLCDataTypeEnum.String, modDevice.DbNumber, modPosPallet.PlcPos); + // 鑾峰彇鎵樼洏浠诲姟鍙� + var modPosTask = modDevice.listStation.FirstOrDefault(m => m.Text == "浠诲姟鍙�"); + var (res1, val) = plcConn.GetPlcDBValue(modPosTask.PosType, modDevice.DbNumber, modPosTask.PlcPos); + } + break; + #endregion default: break; } -- Gitblit v1.8.0