Note You can use scaling only for network-published shared variables, I/O variables, or I/O aliases. When the shared variable you want to scale is a network-published shared variable, it must have a data source. Configure a network-published shared variable to have a data source by placing a checkmark in the Enable Aliasing checkbox on the Variable page of the Shared Variable Properties dialog box.

Complete the following steps to scale shared variables:

  1. Right-click a shared variable in the Project Explorer window and select Properties from the shortcut menu to display the Shared Variable Properties dialog box.
  2. Select Scaling to display the Scaling page.
  3. Place a checkmark in the Enable Scaling checkbox.
  4. Select one of the following scaling options from the Scale Type pull-down menu.
    • Linear—Enables a linear (mx + b) conversion between raw and engineering ranges.
    • Square Root—Enables a square root conversion between the raw (Raw Zero Scale and Raw Full Scale) and engineering (Engineering Zero Scale and Engineering Full Scale) ranges, which is b + m * sqrt(rawo) where b = Engineering Zero Scale, m = (Engineering Full Scale – Engineering Zero Scale)/sqrt(Raw Full Scale – Raw Zero Scale), and o = Raw Zero Scale.
  5. Optional: In the Engineering Unit test box, specify the unit of data measurement, such as degrees Celsius, pounds, grams, and so on.
  6. Specify the raw and engineering ranges in the Raw Full Scale, Raw Zero Scale, Engineering Full Scale, and Engineering Zero Scale numeric controls.
  7. Optional: Place a checkmark in the Coerce to Range checkbox to coerce the data to the specified range.
  8. Click the OK button to close the Shared Variable Properties dialog box.

Use the SharedVariableIO properties to scale shared variables programmatically.