Calculation editor, Function, Post-function calculation – Contemporary Control Systems BASview User Manual
Page 24: Refresh button, Units, Precision
TD110500-0MC
24
Calculation Editor
A calculation is edited by left-clinking its node. Points must be dragged from the device tree and dropped
in the points list. Drop every point that will be part of the calculation. The order of the points is generally
not important unless a custom function is used.
Function
Select the function to perform on the points in the point list. For example, to average three temperatures,
drag the three temperature points to the point list and select "Average".
Custom functions are also supported by selecting "Custom" and entering a calculation in the "Post-
function Calculation" below.
Post-function Calculation
The post-function calculation is used to perform an additional calculation on the result of the function, or
to specify a custom function.
Example:
To have this Calculation point equal the average of three temperatures, but converted from Fahrenheit to
Celsius, add the three points to the list, select "Average" and enter the following in the post-function calculation:
(@R-32)/1.8
The result of the calculation function selected above (the average temperature in this example) will be
inserted in to the post-function calculation where the @R code is located.
To use a completely custom function, select "Custom" as the function and then enter a post-function
calculation with
@Vx
codes where the point values from the list should appear. @V1 is the value of the
first point in the list, @V2 the second point, etc.
Example:
To get the sum total of three points and subtract 100 from it, enter the following in the post-function calculation:
(@V1+@V2+@V3)-100
Several built-in sub-functions are available to call from within the post-function calculation:
min
— Returns the minimum of a list of values: min(@V1,@V2,@V3).
max
— Returns the maximum of a list of values: max(@V1,@V2,@V3).
CtoF
— Convert a value from Celsius to Fahrenheit: CtoF(@V1)
FtoC
— Convert a value from Fahrenheit to Celsius:
FtoC(@V1
)
Example:
To get the lowest of three temperatures and then convert it from Celsius to Fahrenheit, add the three points to
the list, select "Custom" and enter the following in the post-function calculation:
CtoF(min(@V1,@V2,@V3))
Refresh Button
The refresh button will update the value and status shown on the screen. If changes have been made,
they must first be saved by clicking the "Apply" button.
Units
This is the engineering units to display for this Calculation when used on graphics.
Precision
This is the number of digits to the right of the decimal point to display for this Calculation when used
on graphics.