The Scale function is used to automatically convert an input value to an output value. It is commonly used for scaling a raw analog reading to its equivalent value. Scale has the capability to do piecewise linear scaling between up to 16 points. With piecewise linear scaling between such a high number of points, Scale can be used to convert values from non-linear transducers as well as an assortment of other applications.

You’ll need:

  • select an Input Tag
  • select an Output Tag
  • at least 2 Input and Ouput Values. These values can be numbers or Tags. You exclusively use numbers for the values, a grid will be produced on the right of the screen to illustrate your Scale.

2 examples to show how Scale works:

The example bellow shows the simple scaling of a 12 bit A/D conversion of a pressure transducer that outputs -14.7 to 3000 psi as 0 to 5V. As shown in the graph, it results in a linear conversion curve.

The example bellow is for a traffic control application. In this application, the average rate of cars per hour that go through a particular intersection is known for 16 different times of the day. The table is set up, as shown. Between any two known points, piecewise interpolation is a good estimate of the expected number of cars per hour at any particular time. This type of Scaling could be used in a traffic light control application. If separated Scaling tables were utilized for traffic in different directions, the on and off times for red, and green lights could be dynamically adjusted during the day to minimize traffic delays and maximizing throughput.