runtime/PLCObject.py
changeset 339 6dbde4a0c31d
parent 336 ae3488c79283
child 344 25b7b7f854bc
equal deleted inserted replaced
338:e19c78831d41 339:6dbde4a0c31d
   272                 self._DoStopPLC()
   272                 self._DoStopPLC()
   273         return False
   273         return False
   274 
   274 
   275     def _DoStopPLC(self):
   275     def _DoStopPLC(self):
   276         self.PLCStatus = "Stopped"
   276         self.PLCStatus = "Stopped"
       
   277         self.StatusChange()
   277         self._stopPLC()
   278         self._stopPLC()
   278         if self._FreePLC():
   279         if self._FreePLC():
   279             self.PLCStatus = "Dirty"
   280             self.PLCStatus = "Dirty"
   280         self.StatusChange()
   281         self.StatusChange()
   281         return True
   282         return True
   391                       "LREAL" :      (ctypes.c_double, lambda x:x.value),
   392                       "LREAL" :      (ctypes.c_double, lambda x:x.value),
   392                       } 
   393                       } 
   393                            
   394                            
   394     def GetTraceVariables(self):
   395     def GetTraceVariables(self):
   395         """
   396         """
   396         Return a list of variables, corresponding to the list of requiered idx
   397         Return a list of variables, corresponding to the list of required idx
   397         """
   398         """
   398         if self.PLCStatus == "Started":
   399         if self.PLCStatus == "Started":
   399             tick = self._WaitDebugData()
   400             tick = self._WaitDebugData()
   400             if tick == -1:
   401             if tick == -1:
   401                 res = None
   402                 res = None