예제 #1
0
파일: Service1.cs 프로젝트: tomyqg/CGUST
 private void objTimerModbusTCP_Elapsed(object sender, EventArgs e)
 {
     ModbusTCP.ModbusTCP objModbusTCP = new ModbusTCP.ModbusTCP();
     try
     {
         // Do something here!
         g_oLogger.Info("TimerModbusTCP Run Time--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
         objModbusTCP.Start();
     }
     catch (Exception ex)
     {
         g_oLogger.ErrorException("Service1.objTimerModbusTCP_Elapsed", ex);
     }
     finally
     {
         if (objModbusTCP != null)
         {
             objModbusTCP = null;
         }
     }
 }
예제 #2
0
파일: Service1.cs 프로젝트: FTCEEP/CGUST
 private void objTimerModbusTCP_Elapsed(object sender, EventArgs e)
 {
     ModbusTCP.ModbusTCP objModbusTCP = new ModbusTCP.ModbusTCP();
     try
     {
         // Do something here!
         g_oLogger.Info("TimerModbusTCP Run Time--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
         objModbusTCP.Start();
     }
     catch (Exception ex)
     {
         g_oLogger.ErrorException("Service1.objTimerModbusTCP_Elapsed", ex);
     }
     finally
     {
         if (objModbusTCP != null) { objModbusTCP = null; }
     }
 }