public void S7Start()
 {
     try
     {
         s7NetServer = new SiemensS7Server();
         s7NetServer.ServerStart(102);
     }
     catch (Exception ex)
     {
         Console.Write("Failed:" + Communication.BasicFramework.SoftBasic.GetExceptionMessage(ex));
     }
 }
 public void S7Start2()
 {
     try
     {
         s7NetServer        = new SiemensS7Server();
         s7NetServer.LogNet = new Communication.LogNet.LogNetSingle("logs.txt");        // 配置日志信息
         s7NetServer.ServerStart(102);
     }
     catch (Exception ex)
     {
         Console.Write("Failed:" + Communication.BasicFramework.SoftBasic.GetExceptionMessage(ex));
     }
 }
 public void S7Start3()
 {
     try
     {
         s7NetServer        = new SiemensS7Server();
         s7NetServer.LogNet = new Communication.LogNet.LogNetSingle("logs.txt");        // 配置日志信息
         s7NetServer.SetTrustedIpAddress(new List <string>()
         {
             "127.0.0.1"
         });                                                                               // 仅仅限制本机客户端读写
         s7NetServer.ServerStart(102);
     }
     catch (Exception ex)
     {
         Console.Write("Failed:" + Communication.BasicFramework.SoftBasic.GetExceptionMessage(ex));
     }
 }