1
czw
14 小时以前 e97a0f31c187e25d9b2480b6e144648239dae80d
1
10个文件已修改
221 ■■■■■ 已修改文件
HnSx/Build/Project/代码/VS自定义类/AutoThread.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Devices/PlcConfig 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Devices/设备通信.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/HnSx.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Net/Conn.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/RunTime/Code/变量数据库.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/RunTime/Lib/Device.dll 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/RunTime/Lib/VarDB.dll 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Scripts/Script.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Variable/变量数据库.json 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HnSx/Build/Project/´úÂë/VS×Ô¶¨ÒåÀà/AutoThread.cs
@@ -121,10 +121,39 @@
        public void ThreadSettingInit(Tag tag)
        {
            List<Task> tasks = new List<Task>();
            //tasks.Add(GetTask(sa2008, tag, 3000));
            Task.WaitAll(tasks.ToArray());
            tasks.Add(GetTask(wmsPrint, tag, 3000));
            //GZ.Modular.Redis.WriteGroupEntity group = new GZ.Modular.Redis.WriteGroupEntity();
            //group.groupName = "PLC1.ssx2Xplc";
            //group.queueStatus = 1;
            //group.queueTime = DateTime.Now;
            //group.writeList = new List<GZ.Modular.Redis.ParamData>();
            //GZ.Modular.Redis.ParamData barcodeData = new GZ.Modular.Redis.ParamData();
            //barcodeData.paramName = "PLC1.Param4";
            //barcodeData.paramValue = Tag.PLC1.Param4 + 1 + "";
            //GZ.Modular.Redis.ParamData sendData = new GZ.Modular.Redis.ParamData();
            //sendData.paramName = "PLC1.Param5";
            //sendData.paramValue = Tag.PLC1.Param5 + 2 + "";
            //group.writeList.Add(barcodeData);
            //group.writeList.Add(sendData);
            //Conn.默认Redis.SetQueue(group, "PLC1Queue", "PLC1.Param1_LAST", "1") ? "--成功" : "--失败";
            Task.WaitAll(tasks.ToArray());
        }
        private void wmsPrint(Tag tag)
        {
            HttpServer.apiHelper.WebGet($"http://{"test1.wmsdev.net:18980"}/expcenter/WebSocketPrintAction?sysType=OT01&QS01=YANGYZ&QS02={"时间戳"}&QS04=P4EL67LRIWWDCMP7C&clsid=export_header&method=printByWebSocket&origin=http%3A%2F%2Ftest1.wmsdev.net%3A18980&organizationId=FLUX&warehouseId=FLUXWH01&printServer=YYZ&printerName=LocalPrinter&copies=1&functionId=A2002&tableId=BAS_LOCATION&exportCode=YYZ_CN&itemObj=%0A%7B%0A++++%22bizOrgId%22%3A+%22FLUX%22%2C%0A++++%22CHECK.locationId%22%3A+%22001-001-01-01%22%2C%0A++++%22bizWarehouseId%22%3A+%22FLUXWH01%22%0A%7D%0A%0A");
        }
        private Task GetTask(Action<Tag> action, Tag tag, int i = 2500)
        {
            var task = Task.Run(() =>
@@ -1523,8 +1552,42 @@
                if (stream != null) stream.Close();
                if (rsp != null) rsp.Close();
            }
        }
        public string WebGet(string url)
        {
            //using (var client = new HttpClient()) {
            //    //请求结果
            //    string result = client.GetAsync(url).Result.Content.ReadAsStringAsync().Result;
            //    Console.WriteLine(result);
            //    return result;
            //}
            //Console.WriteLine(url);
            WebRequest request = WebRequest.Create(url);
            request.Timeout = 6000;
            request.Method = "GET";
            try
            {
                WebResponse response = request.GetResponse();
                Stream dataStream = response.GetResponseStream();
                StreamReader reader = new StreamReader(dataStream);
                string responseFromServer = reader.ReadToEnd();
                reader.Close();
                dataStream.Close();
                response.Close();
                Console.WriteLine(responseFromServer);
                return responseFromServer;
            }
            catch (Exception ex)
            {
                LogHelper.Error($"WebGet Error:{ex.Message}", ex);
                return "";
            }
        }
        #endregion [自定义类][20250325095622918][HttpHelper]
    }
    public class Clloc
HnSx/Devices/PlcConfig
@@ -15,7 +15,7 @@
          "AddrType": "",
          "Length": 1,
          "Desc": "",
          "Trigger": false,
          "Trigger": true,
          "Reserve1": "",
          "Reserve2": "",
          "Reserve3": ""
@@ -47,12 +47,12 @@
      "Comm": "S7Net",
      "IP": "127.0.0.1:102[0,1]",
      "RedisQueueName": "PLC1Queue",
      "IsSimulate": false,
      "IsSimulate": true,
      "Reserve1": "",
      "Reserve2": "",
      "Reserve3": ""
    }
  ],
  "CreationTime": "2025-07-01 10:23:43",
  "LastWriteTime": "2025-07-04 09:09:38"
  "LastWriteTime": "2025-07-21 11:21:28"
}
HnSx/Devices/É豸ͨÐÅ.json
@@ -2,5 +2,5 @@
  "ProjectSn": "",
  "DeviceList": [],
  "CreationTime": "2025-07-01 10:23:37",
  "LastWriteTime": "2025-07-04 09:09:41"
  "LastWriteTime": "2025-07-21 11:21:31"
}
HnSx/HnSx.json
@@ -9,5 +9,5 @@
  "DevelopVersion": "1.0.6.0",
  "Encode": "1bKKzS3nmbstyerHBqNS0Q==",
  "CreationTime": "0001-01-01 00:00:00",
  "LastWriteTime": "2025-07-21 09:08:19"
  "LastWriteTime": "2025-07-21 11:22:24"
}
HnSx/Net/Conn.json
@@ -173,5 +173,5 @@
  ],
  "Globals": [],
  "CreationTime": "2025-07-01 10:23:39",
  "LastWriteTime": "2025-07-04 11:18:35"
  "LastWriteTime": "2025-07-21 11:22:24"
}
HnSx/RunTime/Code/±äÁ¿Êý¾Ý¿â.cs
@@ -73,9 +73,75 @@
        #endregion
        
        #region å˜é‡ç»„
        private TagGroup1 _Group1 = new TagGroup1();
        public TagGroup1 Group1 { get { return _Group1; } set { _Group1=value; RaisePropertyChanged("Group1"); } }
        #endregion
        
        #region å†…部类
            public class TagGroup1 : System.ComponentModel.INotifyPropertyChanged
    {
        #region å˜é‡
        private System.UInt16 _Param3_LAST;
        public System.UInt16 Param3_LAST
        {
            get
            {
    return _Param3_LAST;
            }
            set
            {
                _Param3_LAST = value;
                RaisePropertyChanged("Param3_LAST");
            }
        }
        private System.UInt16 _Param3;
        public System.UInt16 Param3
        {
            get
            {
    return _Param3;
            }
            set
            {
                _Param3 = value;
                RaisePropertyChanged("Param3");
            }
        }
        private System.UInt16 _Param4;
        public System.UInt16 Param4
        {
            get
            {
    return _Param4;
            }
            set
            {
                _Param4 = value;
                RaisePropertyChanged("Param4");
            }
        }
        #endregion
        #region å˜é‡ç»„
        #endregion
        #region å†…部类
        #endregion
        #region å±žæ€§å˜æ›´
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        public void RaisePropertyChanged(string propertyName)
        {
            System.ComponentModel.PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
    }
        
        #endregion
            
HnSx/RunTime/Lib/Device.dll
Binary files differ
HnSx/RunTime/Lib/VarDB.dll
Binary files differ
HnSx/Scripts/Script.json
@@ -92,8 +92,8 @@
          "ID": "20250704145122680",
          "Name": "高速扫码分拣模块",
          "Desc": "1",
          "Content": "AutoThread.InvokeMethod(AutoThread.Instance, \"ThreadwebSoc\");",
          "ContentCopy": "AutoThread.InvokeMethod(AutoThread.Instance, \"ThreadwebSoc\");",
          "Content": "AutoThread.InvokeMethod(AutoThread.Instance, \"ThreadwebSoc\");\r\n",
          "ContentCopy": "AutoThread.InvokeMethod(AutoThread.Instance, \"ThreadwebSoc\");\r\n",
          "ParentID": "20250701102338326",
          "Children": [],
          "Type": "Program",
@@ -192,6 +192,6 @@
    }
  ],
  "CreationTime": "2025-07-01 10:23:38",
  "LastWriteTime": "2025-07-21 10:11:26",
  "LastWriteTime": "2025-07-21 11:16:15",
  "HasSaved": true
}
HnSx/Variable/±äÁ¿Êý¾Ý¿â.json
@@ -9,10 +9,76 @@
    "ParentFullName": "",
    "FullName": "Tag",
    "Vars": [],
    "Children": [
      {
        "ID": "20250721112111161",
        "Name": "Group1",
        "Desc": "",
        "ParentID": "20250701102337900",
        "ParentFullName": "Tag",
        "FullName": "Tag.Group1",
        "Vars": [
          {
            "ID": "20250721112117949",
            "Name": "Param3_LAST",
            "Desc": "",
            "Type": "System.UInt16",
            "ShortType": "",
            "MinVal": "",
            "MaxVal": "",
            "DefaultVal": "",
            "MapDevice": "PLC1",
            "MapParam": "Param3_LAST",
            "Map": "PLC1.Param3_LAST",
            "Queue": "PLC1Queue",
            "Converter": "",
            "GroupID": "20250721112111161",
            "GroupFullName": "Tag.Group1",
            "FullName": "Tag.Group1.Param3_LAST"
          },
          {
            "ID": "20250721112117933",
            "Name": "Param3",
            "Desc": "",
            "Type": "System.UInt16",
            "ShortType": "",
            "MinVal": "",
            "MaxVal": "",
            "DefaultVal": "",
            "MapDevice": "PLC1",
            "MapParam": "Param3",
            "Map": "PLC1.Param3",
            "Queue": "PLC1Queue",
            "Converter": "",
            "GroupID": "20250721112111161",
            "GroupFullName": "Tag.Group1",
            "FullName": "Tag.Group1.Param3"
          },
          {
            "ID": "20250721112117918",
            "Name": "Param4",
            "Desc": "",
            "Type": "System.UInt16",
            "ShortType": "",
            "MinVal": "",
            "MaxVal": "",
            "DefaultVal": "",
            "MapDevice": "PLC1",
            "MapParam": "Param4",
            "Map": "PLC1.Param4",
            "Queue": "PLC1Queue",
            "Converter": "",
            "GroupID": "20250721112111161",
            "GroupFullName": "Tag.Group1",
            "FullName": "Tag.Group1.Param4"
          }
        ],
    "Children": []
      }
    ]
  },
  "CreationTime": "2025-07-01 10:23:37",
  "LastWriteTime": "0001-01-01 00:00:00",
  "LastWriteTime": "2025-07-21 11:21:21",
  "Sample": {
    "ID": "",
    "Name": "Tag",