graphics/DebugDataConsumer.py
branch1.1 Korean release
changeset 1384 02fe382c4511
parent 1365 debc97102b23
child 1571 486f94a8032c
equal deleted inserted replaced
1280:72a826dfcfbb 1384:02fe382c4511
   195         Set value IEC data type
   195         Set value IEC data type
   196         @param data_type: Value IEC data type
   196         @param data_type: Value IEC data type
   197         """
   197         """
   198         self.DataType = data_type
   198         self.DataType = data_type
   199     
   199     
   200     def NewValue(self, tick, value, forced=False, raw="BOOL"):
   200     def NewValues(self, tick, values, raw="BOOL"):
   201         """
   201         """
   202         Function called by debug thread when a new debug value is available
   202         Function called by debug thread when a new debug value is available
   203         @param tick: PLC tick when value was captured
   203         @param tick: PLC tick when value was captured
   204         @param value: Value captured
   204         @param value: Value captured
   205         @param forced: Forced flag, True if value is forced (default: False)
   205         @param forced: Forced flag, True if value is forced (default: False)
   206         @param raw: Data type of values not translated (default: 'BOOL')
   206         @param raw: Data type of values not translated (default: 'BOOL')
   207         """
   207         """
       
   208         value, forced = values
       
   209         
   208         # Translate value to IEC literal
   210         # Translate value to IEC literal
   209         if self.DataType != raw:
   211         if self.DataType != raw:
   210             value = TYPE_TRANSLATOR.get(self.DataType, str)(value)
   212             value = TYPE_TRANSLATOR.get(self.DataType, str)(value)
   211         
   213         
   212         # Store value and forced flag when value update is inhibited
   214         # Store value and forced flag when value update is inhibited