ProjectController.py
changeset 3421 70ef15fca028
parent 3396 8c8cb5c9ff38
child 3476 46a7aac382ef
equal deleted inserted replaced
3420:da8cceaa247d 3421:70ef15fca028
   794 
   794 
   795 
   795 
   796         # Compute offset before ST resulting of transformation from user POUs
   796         # Compute offset before ST resulting of transformation from user POUs
   797         self.ProgramOffset = IECCodeContent.count("\n")
   797         self.ProgramOffset = IECCodeContent.count("\n")
   798 
   798 
   799         IECCodeContent += open(self._getIECgeneratedcodepath(), "r").read()
   799         POUsIECCodeContent = open(self._getIECgeneratedcodepath(), "r").read()
   800 
   800 
   801         IECcodepath = self._getIECcodepath()
   801         IECcodepath = self._getIECcodepath()
   802 
   802 
   803         if not os.path.exists(IECcodepath):
   803         if not os.path.exists(IECcodepath):
   804             self.LastBuiltIECcodeDigest = None
   804             self.LastBuiltIECcodeDigest = None
   805 
   805 
   806         with open(IECcodepath, "w") as plc_file:
   806         with open(IECcodepath, "w") as plc_file:
   807             plc_file.write(IECCodeContent)
   807             plc_file.write(IECCodeContent)
       
   808             plc_file.write(POUsIECCodeContent)
   808 
   809 
   809         hasher = hashlib.md5()
   810         hasher = hashlib.md5()
   810         hasher.update(IECCodeContent)
   811         hasher.update(IECCodeContent)
       
   812         hasher.update(POUsIECCodeContent)
   811         self.IECcodeDigest = hasher.hexdigest()
   813         self.IECcodeDigest = hasher.hexdigest()
   812 
   814 
   813         return True
   815         return True
   814 
   816 
   815     def _Compile_ST_to_SoftPLC(self):
   817     def _Compile_ST_to_SoftPLC(self):