5.1.16.3 Supported functions
SmartConfig2 supports the following single-argument mathematical functions in user-defined formulas. The argument may be a value, variable, or complete expression.
sin(x),cos(x),tan(x)— trigonometric functions;xis expressed in radians.sqrt(x)— square root.log(x)— natural logarithm.exp(x)— exponential function, equivalent toe^x.abs(x)— absolute value.floor(x)— rounds down.ceil(x)— rounds up.
Use a function in SmartConfig2
- Open the F14 Formula action in the user-defined program.
- Enter the function and its argument, for example
sqrt(A*B)orsin(A). - Assign the one-based sensor-data positions for
a,b,c, andd. Enter0for an unused position. - Provide test data and select Test formula.
- Review the calculated result and resolved input values before applying the program.
Functions can be combined with arithmetic operators and parentheses. For example, sqrt(A*B)+log(C) combines multiplication, a square root, and a natural logarithm.
SmartConfig2 validates the expression and reports an error position and message when it cannot interpret it. SmartSampler2 does not produce a usable numeric result for an invalid calculation. Correct the expression and test it again.
For expression syntax, constants, variables, and input-position rules, see 5.2.2 Allowed Operators. For complete formulas, see 5.2.4 Examples.
Related hardware: SmartSampler2 hardware reference.
