Formula

LabVIEW SignalExpress

Formula

Performs math operations on up to four input variables. By default, Formula processes only one variable, but you can place checkmarks in the Enable checkboxes to enable more variables. Enter a formula in the Formula field using the variable names you specify in the Alias fields to represent the Input variable values.

You can use time waveform or scalar values for the Input variable values. If you apply the Formula to multiple time waveforms, the waveforms must be the same size or Formula returns an error.

If all the Input variable values are time waveforms, Formula returns a time waveform. If all the Input variable values are scalar values, Formula returns a scalar value. If the Input variable values are a mix of time waveforms and scalar values, Formula returns a time waveform.

Details  

ParameterDescription
Input and Output WaveformsDisplays the waveforms you specify in the Input variable fields and the processed data that Formula returns after you apply the Formula to the waveforms. This graph appears only when you select a waveform as an Input variable.
Input and Output ScalarsDisplays the scalar values you specify in the Input variable fields and the processed data that Formula returns when you apply the Formula to the values. This chart appears only when you select a scalar value as an Input variable.
Input variable 0Specifies the first variable to use.
Alias 0Specifies an alias name for the first variable.
Enable 1Enables a second variable.
Input variable 1Selects the second variable to use.
Alias 1Specifies an alias name for the second variable.
Enable 2Enables a third variable.
Input variable 2Selects the third variable to use.
Alias 2Specifies an alias name for the third variable.
Enable 3Enables a fourth variable.
Input variable 3Selects the fourth variable to use.
Alias 3Specifies an alias name for the fourth variable.
Operation SetupContains the following options:
  • Formula—Specifies the formula for the computation.
  • Valid—Reports if the formula is valid or invalid.
  • Ignore timestamps—Specifies to ignore timestamps on input variables that are time waveforms. Place a checkmark in this checkbox to use time waveforms in the Formula that have different timestamps.

Formula Details

If you specify multiple waveforms for the Input variable values, LabVIEW SignalExpress applies the Formula to each sample of the waveforms, which is why multiple waveforms must be the same size. If you specify a mix of waveforms and scalar values for the Input variable values, LabVIEW SignalExpress applies the Formula to the scalar value and each sample of the waveform. For example, if you specify a Formula that multiplies a waveform and a scalar value, LabVIEW SignalExpress multiplies each sample of the waveform by the scalar value.

The following table displays the math functions Formula supports.

FunctionDescription
abs(x)Returns the absolute value of x.
acos(x)Computes the inverse cosine of x in radians.
acosh(x)Computes the inverse hyperbolic cosine of x.
asin(x)Computes the inverse sine of x in radians.
asinh(x)Computes the inverse hyperbolic sine of x.
atan(x)Computes the inverse tangent of x in radians.
atanh(x)Computes the inverse hyperbolic tangent of x.
ceil(x)Rounds x to the next higher integer (smallest integer ≤ x).
ci(x)Evaluates the cosine integral for any real nonnegative number x.
cos(x)Computes the cosine of x, where x is in radians.
cosh(x)Computes the hyperbolic cosine of x.
cot(x)Computes the cotangent of x (1/tan(x)), where x is in radians.
csc(x)Computes the cosecant of x (1/sin(x)), where x is in radians.
exp(x)Computes the value of e raised to the x power.
expm1(x)Computes one less than the value of e raised to the x power ((e^x)–1).
floor(x)Truncates x to the next lower integer (largest integer ≤ x).
getexp(x)Returns the exponent of x.
gamma(x)Evaluates the gamma function or incomplete gamma function for x.
getman(x)Returns the mantissa of x.
int(x)Rounds x to the nearest integer.
intrz(x)Rounds x to the nearest integer between x and zero.
ln(x)Computes the natural logarithm of x (to the base of e).
lnp1(x)Computes the natural logarithm of (x + 1).
log(x)Computes the logarithm of x (to the base of 10).
log2(x)Computes the logarithm of x (to the base of 2).
rand( )Produces a floating-point number between 0 and 1 exclusively.
si(x)Evaluates the sine integral for an real number x.
sec(x)Computes the secant of x, where x is in radians (1/cos(x)).
sign(x)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)Computes the sine of x, where x is in radians.
sinc(x)Computes the sine of x divided by x (sin(x)/x), where x is in radians.
sinh(x)Computes the hyperbolic since of x.
spike(x)Generates the spike function for any real number x.
sqrt(x)Computes the square root of x.
step(x)Generates the step function for any real number x.
tan(x)Computes the tangent of x, where x is in radians.
tanh(x)Computes the hyperbolic tangent of x.