=====Formula Editing Rules/Requirements===== In many applications it is necessary to provide users with the ability to change the calculation formulas without compiling the software. We use the functionality of [[http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/formula_node_and_express/|National Instruments LabVIEW]]. When editing formulas, you can use the following functions:\\ ^Function ^Corresponding LabVIEW Function ^Description^ |abs(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/absolute_value/|Absolute Value]] |Returns the absolute value of x.| |acos(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/inverse_cosine/|Inverse Cosine]] |Computes the inverse cosine of x in radians.| |acosh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/inverse_hyperbolic_cosine/|Inverse Hyperbolic Cosine]] |Computes the inverse hyperbolic cosine of x.| |asin(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/inverse_sine/|Inverse Sine]] |Computes the inverse sine of x in radians.| |asinh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/inverse_hyperbolic_sine/|Inverse Hyperbolic Sine]] |Computes the inverse hyperbolic sine of x.| |atan(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/inverse_tangent/|Inverse Tangent]] |Computes the inverse tangent of x in radians.| |atan2(y,x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/inverse_tangent_2_input/|Inverse Tangent (2 Input)]] |Computes the arctangent of y/x in radians.| |atanh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/inverse_hyperbolic_tangent/|Inverse Hyperbolic Tangent]] |Computes the inverse hyperbolic tangent of x.| |ceil(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/round_to_posinfinity/|Round Toward +Infinity]] |Rounds x to the next higher integer (smallest integer x).| |cos(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/cosine/|Cosine]] |Computes the cosine of x, where x is in radians.| |cosh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/hyperbolic_cosine/|Hyperbolic Cosine]] |Computes the hyperbolic cosine of x.| |cot(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/cotangent/|Cotangent]] |Computes the cotangent of x (1/tan(x)), where x is in radians.| |csc(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/cosecant/|Cosecant]] |Computes the cosecant of x (1/sin(x)), where x is in radians.| |exp(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/exponential/|Exponential]] |Computes the value of e raised to the x power.| |expm1(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/exponential_arg_minus_1/|Exponential (Arg) – 1]] |Computes one less than the value of e raised to the x power ((e^x) – 1).| |floor(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/round_to_neginfinity/|Round To –Infinity]] |Truncates x to the next lower integer (largest integer x).| |getexp(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/mantissa_and_exponent/|Mantissa & Exponent]] |Returns the exponent of x.| |getman(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/mantissa_and_exponent/|Mantissa & Exponent]] |Returns the mantissa of x.| |int(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/round_to_nearest/|Round To Nearest]] |Rounds x to the nearest integer.| |intrz(x) |— |Rounds x to the nearest integer between x and zero.| |ln(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/natural_logarithm/|Natural Logarithm]] |Computes the natural logarithm of x (to the base of e).| |lnp1(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/natural_logarithm_arg_1/|Natural Logarithm (Arg +1)]] |Computes the natural logarithm of (x + 1).| |log(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/logarithm_base_10/|Logarithm Base 10]] |Computes the logarithm of x (to the base of 10).| |log2(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/logarithm_base_2/|Logarithm Base 2]] |Computes the logarithm of x (to the base of 2).| |max(x,y) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/max_and_min/|Max & Min]] |Compares x and y and returns the larger value.| |min(x,y) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/max_and_min/|Max & Min]] |Compares x and y and returns the smaller value.| |mod(x,y) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/quotient_and_remainder/|Quotient & Remainder]] |Computes the remainder of x/y, when the quotient is rounded toward –Infinity.| |pow(x,y) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/power_of_x/|Power of X]] |Computes x raised to the y power.| |rand( ) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/random_number_0_1/|Random Number (0 – 1)]] |Produces a floating-point number between 0 and 1 exclusively.| |rem(x,y) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/quotient_and_remainder/|Quotient & Remainder]] |Computes the remainder of x/y, when the quotient is rounded to the nearest integer.| |sec(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/secant/|Secant]] |Computes the secant of x, where x is in radians (1/cos(x)).| |sign(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/sign/|Sign]] |Returns 1 if x is greater than 0, returns 0 if x is equal to 0, and returns –1 if x is less than 0.| |sin(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/sine/|Sine]] |Computes the sine of x, where x is in radians.| |sinc(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/sinc/|Sinc]] |Computes the sine of x divided by x (sin(x)/x), where x is in radians.| |sinh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/hyperbolic_sine/|Hyperbolic Sine]] |Computes the hyperbolic sine of x.| |sizeOfDim(ary,di) |— |Returns the size of the dimension di specified for the array ary.| |sqrt(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/square_root/|Square Root]] |Computes the square root of x.| |tan(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/glang/tangent/|Tangent]] |Computes the tangent of x, where x is in radians.| |tanh(x) |[[http://zone.ni.com/reference/en-XX/help/371361K-01/gmath/hyperbolic_tangent/|Hyperbolic Tangent]] |Computes the hyperbolic tangent of x.| \\ \\ You can use multiple expressions and define internal variables (i.e., a1..a9, b1..b9, etc.). Example: a1 = abs(Mean) - abs(Min) + rand(1); a2 = abs(Peak) - abs(Mean)+ rand(1); Result =a2 - a1 \\ An example of using the formula editor:\\ {{:reporting_engine:data_analysis_with_formula_editor.png?1000|}}