Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Scaling Double Shared Variables (DSC Module)

You can scale the value of a shared variable with a Data Type of Double.

Note  You can use scaling only for network-published shared variables. The shared variable you want to scale also must have a data source. Configure a shared variable to have a data source by placing a checkmark in the Bind to Source checkbox on the Variable page of the Shared Variable Properties dialog box.

Complete the following steps to scale shared variables with a Data Type of Double.

  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 the Scaling option in the listbox of the dialog box to display the Scaling page of the Shared Variable Properties dialog box.
  3. Place a checkmark in the Enable Scaling checkbox.
  4. Select one of the following scaling options from the Scale Type pull-down list:
    • 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 ScaleEngineering Zero Scale)/sqrt(Raw Full ScaleRaw Zero Scale), and o = Raw Zero Scale.
  5. Click the OK button to close the Shared Variable Properties dialog box.

Use the SharedVariableIO properties to scale double shared variables programmatically.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit