b10bf189ab080730b605754b6035da26b17f5d08..3a2b71a09ec682d96023a6b7d5ca30e90d90a681
2025-06-23 jinxin
11
3a2b71 对比 | 目录
2025-06-23 jinxin
11
a7b168 对比 | 目录
2025-06-05 10133
居家
a34fa5 对比 | 目录
3个文件已添加
2个文件已修改
11个文件已删除
1895 ■■■■■ 已修改文件
.vs/VSWorkspaceState.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/slnx.sqlite 补丁 | 查看 | 原始文档 | blame | 历史
.vs/可口可乐/v17/.wsuo 补丁 | 查看 | 原始文档 | blame | 历史
.vs/可口可乐/v17/DocumentLayout.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/read.lock 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/FileContentIndex/21f40bc3-7d62-48db-8eb2-dc814ff6c574.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/v17/DocumentLayout.backup.json 917 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/v17/DocumentLayout.json 894 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
C#/HH.WCS.Mobox3.KeKou/process/DeviceProcess.cs 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.vs/VSWorkspaceState.json
New file
@@ -0,0 +1,7 @@
{
  "ExpandedNodes": [
    ""
  ],
  "SelectedNode": "\\E:\\项目\\Git\\可口可乐",
  "PreviewInSolutionExplorer": false
}
.vs/slnx.sqlite
Binary files differ
.vs/¿É¿Ú¿ÉÀÖ/v17/.wsuo
Binary files differ
.vs/¿É¿Ú¿ÉÀÖ/v17/DocumentLayout.json
New file
@@ -0,0 +1,12 @@
{
  "Version": 1,
  "WorkspaceRootPath": "D:\\\u5DE5\u4F5C\\\u53EF\u53E3\u53EF\u4E50\\",
  "Documents": [],
  "DocumentGroupContainers": [
    {
      "Orientation": 0,
      "VerticalTabListWidth": 256,
      "DocumentGroups": []
    }
  ]
}
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/b5d4cc0d-d072-4a06-b41d-eed5482c7ae2.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.JunzhouLangchao/FileContentIndex/read.lock
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/095323c9-fab1-4a3d-bbb9-e016bdc026ba.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/4a385bfe-ecd2-4870-b27e-b29514f713d2.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/64fc2de3-4821-4c46-8f63-3c1f84a578ce.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Langchao/FileContentIndex/read.lock
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/FileContentIndex/21f40bc3-7d62-48db-8eb2-dc814ff6c574.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/v17/DocumentLayout.backup.json
File was deleted
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.KeKou/v17/DocumentLayout.json
File was deleted
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.Template.csproj.dtbcache.json
File was deleted
C#/HH.WCS.Mobox3.KeKou/.vs/HH.WCS.Mobox3.WeiLi/FileContentIndex/57367193-8890-401b-95eb-fa75f34fc9b1.vsidx
Binary files differ
C#/HH.WCS.Mobox3.KeKou/process/DeviceProcess.cs
@@ -6,6 +6,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Threading;
namespace HH.WCS.Mobox3.KeKou.process
@@ -69,18 +70,73 @@
        {
            if (State == 1023)
            {
                PlcHelper.SendHex("172.31.94.107", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
                PlcHelper.SendHex("172.31.94.108", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
                SendHexOnce("172.31.94.107", 4001, "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
                SendHexOnce("172.31.94.108", 4001, "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
                //PlcHelper.SendHex("172.31.94.107", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
                //PlcHelper.SendHex("172.31.94.108", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 01 00 00 00 00 00 00 00 00 00 00");
            }
            if (State == 1025)
            {
                PlcHelper.SendHex("172.31.94.107", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
                PlcHelper.SendHex("172.31.94.108", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
                SendHexOnce("172.31.94.107", 4001, "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
                SendHexOnce("172.31.94.108", 4001, "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
                //PlcHelper.SendHex("172.31.94.107", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
                //PlcHelper.SendHex("172.31.94.108", "00 00 00 00 00 13 01 10 00 00 00 06 0C 00 00 00 01 00 00 00 00 00 00 00 00");
            }
        }
        private static string SendHexOnce(string ip, int port, string hex)
        {
            var res = string.Empty;
            try
            {
                Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                //client.Connect(ip, port);
                IAsyncResult connectResult = client.BeginConnect(ip, port, null, null);
                if (!connectResult.AsyncWaitHandle.WaitOne(2000))
                {
                    client.Close();
                    return "";
                }
                client.ReceiveTimeout = 2000;
                if (client.Connected)
                {
                    client.Send(Hex2Bytes(hex));
                    byte[] buffer = new byte[1024];
                    var length = client.Receive(buffer, SocketFlags.None);
                    byte[] data = new byte[length];
                    Array.Copy(buffer, data, length);
                    res = BitConverter.ToString(data).Replace("-", "");
                    client.Disconnect(true);
                    client.Dispose();
                }
                client = null;
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex.Message, ex);
            }
            return res;
        }
        internal static byte[] Hex2Bytes(string hexString)
        {
            hexString = hexString.Replace(" ", "");
            if ((hexString.Length % 2) != 0)
                hexString += " ";
            byte[] returnBytes = new byte[hexString.Length / 2];
            for (int i = 0; i < returnBytes.Length; i++)
                returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
            return returnBytes;
        }
        /// <summary>
        /// æŽ¥æ”¶PLC注塑机信号
        /// </summary>