A custom equation is a piece of script that user can create to implement the physical measurement conversion. SiteView uses .Net C# language as the script. The script or the source code is in the format of function call.
A function specifies the name of the function, the types and number of parameters it expects to receive, and its return type. The body of the function implements the conversion from one unit measurement to another. A simple custom equation looks like this:
public double CO2Equation(double Input)
output = (5000 / 10 ) * Input ;
The above equation has the name “CO2Equation”. The name must be unique and with maximum of 16 characters.
The function has one parameter named Input. This value is read-only and it is the result of the caller function or the conversion from digital value to the unit measurement for that channel type if there is no caller function. In the latter case, Input refers to a value within the range of 0 – 10 volt for a 0 – 10 VDC channel type.
The function must return a value, which is the result of the conversion.
Microedge Instruments Inc. © 2022