EnableScaling

<< Click to Display Table of Contents >>

 

EnableScaling

Boolean This property enables or disables the scale of values for a value sent or received from a device. If this property is set to True, all values from the device receive a scale adjustment according to DeviceHigh, DeviceLow, EUHigh, and EULow properties before setting it to the Value property. The same occurs when a writing is needed, when the value in the Value property receives a scale adjustment (but without changing the Value property) and later it is sent to the device. If the EnableScaling property is set to False, no scale adjustment is performed in neither way (writing and reading). Default value of this property is False. Example:

Sub Element_OnStartRunning()
  ' Performs a scale adjustment of an
  ' Element's temperature
  ' ranging from 0 to 255 on OPC server,
  ' but it actually means
  ' 0 to 100 Celsius degrees
  EU = "Celsius degrees"
  EnableScaling = True
  DeviceHigh = 255
  DeviceLow = 0
  EUHigh = 100
  EULow = 0
End Sub

Was this page useful?