beautypg.com

Understanding functions used in calculations – MTS Multipurpose Elite User Manual

Page 208

background image

Signal or test input

In all cases, the argument type that is shown in the Calculation window must be replaced by a meaningful
value. The meaningful value can be an actual value, a variable that contains a value that is of the correct
type for the argument, or another function that produces a result that is of the correct type for the argument.

For example, if the function cos(number) is added to the Calculation panel, the message, “The variable,
number, was not found” is shown in the Error panel. The argument “number” must be replaced with a
value, a variable of the correct type, or a function that evaluates to the correct type. In this case the number
30, the variable CycleCount, or the function cos(sin(30)) validates the calculation. The Error panel message
reads, “Equation is OK” when one of these replacements is used.

Argument syntax

When replacing a representative number or string argument type with an actual number value or a string
value, you must use the correct syntax for the value.

A string value must be enclosed between double-quotation marks. For example: the function
ToLower(string), can be replaced by ToLower(“This is a short sentence.”), but not by ToLower(This is
a short sentence.).

A numeric value is typed without quotation marks. For example: the function cos(number) can be
replaced by cos(30), but not by cos(“30”).

Arguments can also be replaced with variables of the correct type.

Unique functions

There are unique functions available in the Calculation Editor that do not accept arguments.

The function e() represents the natural logarithmic base, e.

The function Pi() represents the mathematical constant, pi.

The function SystemRate() represents the system data rate.

Understanding Functions Used in Calculations

Each argument shown in the Calculation window must be replaced by a meaningful value. The meaningful
value can be an actual value, a variable that contains a value that is of the correct type for the argument,
or another function that produces a result that is of the correct type for the argument.

To help understand the arguments in a pre-existing variable whose function is already configured with
variables, put the cursor at the end of the expression and press Return. Then, use the Functions tab to
reinsert the function. When you do this, the same function will be added to the calculation window. However,
instead of displaying the actual values or the variable values the calculation is using, you can see the base
arguments that the function expects to receive. By doing this, you can better understand which values are
being fed into any specific function that is used in a calculation.

In the example below, the Channel Value function was reinserted at the bottom to provide descriptions of
the arguments. This makes it apparent that the function searches the StrainArray (searchChannel) for the
value of StrainPoint01 (search value) and returns the stress value (resultChannel) at a strain value =
StrainPoint01.

208 | MTS TestSuite

Working with Variables