qinchulong
2025-03-29 039a4a5433e7f80adc88b491b549e5d9486e4f9a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
 
namespace WIDESEA_WCS
{
    class Program
    {
        //static List<PLCClient> clients;
        static void Main(string[] args)
        {
            //clients = new List<PLCClient>();
            //List<DBGroup> dBGroups = new List<DBGroup>()
            //{
            //    new DBGroup()
            //    {
            //        DBGroupName = "SC1",
            //        DBGroupIPAddress = "127.0.0.1",
            //        Port = 102,
            //        Rack = 0,
            //        Slot = 0,
            //        DBGroupItems = new System.Collections.Generic.List<PLCDBItem>() { new PLCDBItem { StackerNum = "SC1", ItemAddress = "DB1.0.0", ItemDataType = "bool", ItemName = "心跳" } }
            //    }
            //};
            //for (int i = 0; i < dBGroups.Count; i++)
            //{
            //    PLCClient client = new PLCClient(HslCommunication.Profinet.Siemens.SiemensPLCS.S1200);
            //    clients.Add(client);
            //}
 
            //StartHeart(clients);
            //this.thread = new Thread(() => { while (true) { action(this); Thread.Sleep(2000); }; }) { IsBackground = true };
            //this.thread.Start();
            Console.Read();
        }
        //void StackExecute(Dictionary<string, PLCClient> clientsDic)
        //{
        //    try
        //    {
                
        //    }
        //    catch (Exception ex)
        //    {
 
        //    }
        //}
    }
}