<< Click to Display Table of Contents >>
EnableScaling |
This property enables or disables a scale of values for the value sent to or received from a device. If this property is set to True, all values from the device receive scale adjustments according to the DeviceHigh, DeviceLow, EUHigh, and EULow properties before setting them to the Value property. Otherwise, no scale adjustment is performed on both directions, writing and reading. Default value of this property is False. The next script contains an example of using this property.
Sub Tag_OnStartRunning()
' Adjusts the scale of temperature
' ranging from 0 to 255 at PLC, but it actually means
' 0 to 100 Celsius degrees
EU = "Celsius degrees"
EnableScaling = True
DeviceHigh = 255
DeviceLow = 0
EUHigh = 100
EULow = 0
End Sub