Example #1
0
 //Runs continuously and gets data from the PLC.
 private void UpdateReadingProc()
 {
     try
     {
         Thread.Sleep(300);
         while (_runUpdate)
         {
             lock (_commLock)
             {
                 ConnectedDevice.UpdateReadings();
             }
             Thread.Sleep(50);
         }
     }
     catch (ThreadAbortException)
     {
         // Do nothing
     }
 }