Modular field instruments · Engineered and produced in Germanyinfo@smartsamplersolutions.com

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; x is expressed in radians.
  • sqrt(x) — square root.
  • log(x) — natural logarithm.
  • exp(x) — exponential function, equivalent to e^x.
  • abs(x) — absolute value.
  • floor(x) — rounds down.
  • ceil(x) — rounds up.

Use a function in SmartConfig2

  1. Open the F14 Formula action in the user-defined program.
  2. Enter the function and its argument, for example sqrt(A*B) or sin(A).
  3. Assign the one-based sensor-data positions for a, b, c, and d. Enter 0 for an unused position.
  4. Provide test data and select Test formula.
  5. 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.

Ask an engineering questionSoftware & downloads