| Back to FAQ | ||||
| The formula should be typed into the text box provided on the button and must be written as a mathematical
formula following some simple rules. Certain letters and words are allowed to represent the input values. Standard
mathematical operators are used with the usual computing convention of using an asterisk (*) for multiplication and
a slash (/) for division. (The conventional symbols do work but are a nuisance to get from a standard keyboard.)*
There are several functions you can include these usually take the form of Function(argument) where argument is one
of the input value letters / words.
Symbols for values in: |
||||
| Letter(s) | What it means | |||
| a | the current data value from a channel of data as set in the calculation window | |||
| b | the current data value from a channel of data as set in the calculation window | |||
| e | the constant e (2.71828…) | |||
| k | the constant value set in the calculation window | |||
| n | the data point number (0 to maximum number of points) (as in the first column of the table) | |||
| pi | the constant p (3.14159…) | |||
| rnd | a random number in the range 0 <= n < 1 | |||
| t | the current data value from the time channel in seconds | |||
| ###.## | any number in simple decimal format | |||
Operators: | ||||
| Operator | What it means | Priority | ||
| () | parentheses - control order of evaluation | - | ||
| ^ | raising to power | 1 | ||
| - | negation (when another operator / nothing in front) | 2 | ||
| * | multiplication | 3 | ||
| / | division | 3 | ||
| + | addition | 4 | ||
| - | subtraction | 4 | ||
|
Functions: Syntax: Function(argument) | ||||
| Keyword | Alternate keyword | What it means | ||
| ABS | Absolute value ( |x| ) | |||
| ACS | ARCCOSINE | ArcSine (returns radians) | ||
| ASN | ARCSINE | ArcCosine (returns radians) | ||
| ATAN | ARCTANGENT | ArcTangent (returns radians) | ||
| CHx | x is the channel number - eg CH2. This reads a data value from a channel and means that any data point of any channel can actually be accessed. So CH2(n+1) reads the next value in channel 2. If the channel has no data or the point referenced is not defined then a Null value will be returned. | |||
| COS | COSINE | Cosine (argument in radians) | ||
| DEG | DEGREES | Convert radians to degrees | ||
| EXP | e raised to the power [argument] | |||
| INT | INTEGER | The nearest integer value | ||
| LOG10 | LOG | Logarithm to base 10 | ||
| LOGe | LN | Logarithm to base e | ||
| RAD | RADIANS | Convert degrees to radians | ||
| SGN | SIGN | The sign of the value ( -1, 0 or +1) | ||
| SIN | SINE | Sine (argument in radians) | ||
| SQRT | SQR | Square root | ||
| TAN | TANGENT | Tangent (argument in radians) | ||
| Examples of syntax Spaces may be used freely to aid clarity and in some cases will resolve ambiguities. Upper and lower case are always equally valid (but will be corrected to our normal settings if you use Check and tidy formula). |
| (a + b) * t | |
| 10 ^ (a - 14) | |
| COS(RAD(a)) | Note that COSRAD(a) would be ambiguous and would not work but COS RAD a would be accepted (although it is not elegant) |
| a + b * a | NB this will calculate a + (b * a) as is conventional (see priority of operators above). |
| a b | Will calculate as a * b but ab will not be understood. Omitting the "*" is not recommended. |
| ABS(CH2(n+1)-CH2(n-1)) | The difference between the value before and that after the current value for channel 2. |
* × is obtained with ALT 0215; ÷ with ALT 0247 on the numeric keypad.
| Back to FAQ |