LPCBeremiz.py
changeset 576 7fcdc0d3d8d9
parent 575 6765adf58711
child 578 6f5795bdee49
equal deleted inserted replaced
575:6765adf58711 576:7fcdc0d3d8d9
   497                 #    self.StatusTimer.Start(milliseconds=2000, oneShot=False)
   497                 #    self.StatusTimer.Start(milliseconds=2000, oneShot=False)
   498                 
   498                 
   499                 if self.previous_plcstate=="Started":
   499                 if self.previous_plcstate=="Started":
   500                     if self.DebugAvailable() and self.GetIECProgramsAndVariables():
   500                     if self.DebugAvailable() and self.GetIECProgramsAndVariables():
   501                         self.logger.write(_("Debug connect matching running PLC\n"))
   501                         self.logger.write(_("Debug connect matching running PLC\n"))
   502                         #TODO re-enable
   502                         self._connect_debug()
   503                         #self._connect_debug()
       
   504                     else:
   503                     else:
   505                         self.logger.write_warning(_("Debug do not match PLC - stop/transfert/start to re-enable\n"))
   504                         self.logger.write_warning(_("Debug do not match PLC - stop/transfert/start to re-enable\n"))
   506             
   505             
   507             elif self.StatusTimer and self.StatusTimer.IsRunning():
   506             elif self.StatusTimer and self.StatusTimer.IsRunning():
   508                 self.StatusTimer.Stop()
   507                 self.StatusTimer.Stop()
   832         Start PLC
   831         Start PLC
   833         """
   832         """
   834         if self.GetIECProgramsAndVariables():
   833         if self.GetIECProgramsAndVariables():
   835             self._connector.StartPLC()
   834             self._connector.StartPLC()
   836             self.logger.write(_("Starting PLC\n"))
   835             self.logger.write(_("Starting PLC\n"))
   837             #TODO re-enable
   836             self._connect_debug()
   838             #self._connect_debug()
       
   839         else:
   837         else:
   840             self.logger.write_error(_("Couldn't start PLC !\n"))
   838             self.logger.write_error(_("Couldn't start PLC !\n"))
   841         self.UpdateMethodsFromPLCStatus()
   839         self.UpdateMethodsFromPLCStatus()
   842 
   840 
   843 #-------------------------------------------------------------------------------
   841 #-------------------------------------------------------------------------------