Predefined Calculation Formulas in the Formula Library
You can use predefined formulas for creating calculated signals. To use a predefined formula, select it from the list of custom formulas in the Define Calculated Signals dialog box.
The following formulas are available:
Name | Function | Use case | ||
|---|---|---|---|---|
Average | Total of all measure values divided by the number of values | Calculating the average | ||
BinaryAND | The input signal will be calculated with the mathematical function AND against a user defined bitmask. Binary means in this case that for e.g. a UINT8 signal each bit 0..7 will be calculated separately. | Masking individual bits from a bit field | ||
BinaryOR | The input signal will be calculated with the mathematical function OR against a user defined bitmask. Binary means in this case that for e.g. a UINT8 signal each bit 0..7 will be calculated separately. | Setting individual bits in a bit field | ||
BinaryXOR | The input signal will be calculated with the mathematical function XOR against a user defined bitmask. Binary means in this case that for e.g. a UINT8 signal each bit 0..7 will be calculated separately. | Toggling individual bits in a bit field | ||
Const | Creates a signal with a constant value. | Creating a signal with a constant value for using it in further calculations | ||
CountTimeLevel |
Total time in which a signal had a defined value | |||
CountTimeLevel- Tolerance |
Total time in which a signal was in a defined value range | |||
Debounce | Changes of the input signal are only forwarded to the output after a configurable delay. | Suppressing spikes on a signal | ||
Delta | Difference between the current signal value and a previous value: inputk- input(k-count) | Showing the changes in a period of samples | ||
DeltaT | Calculates the time difference between two measure points | |||
Gradient | Gradient of a given period from start of measurement to end of measurement of a given signal: inputk- input(k-count) /timek- time(k-count) | Showing the gradient of a period of samples | ||
Integral | Integral of a given signal | |||
LevelReachedCount |
Frequency indicating how often a signal has a defined value | |||
Lookup<dim>D_<cal> |
Looks up the inputs in the <dim>-dimensional calibration table <cal> and calculates the interpolated result. | Calculating the output of a curve or map | ||
LowPassFilter | Filters the input signal according to the time constant. Function: y(n) = y(n-1) + ( x(n) - y(n-1)) * (t(n)-t(n-1))/T With: y = output x = input T = filter time constant t = measure time If the time constant is smaller than the acquisition rate, this can cause overshooting! Parameters: time = measure time input = signal to be filtered time constant in s | |||
Maximum | Maximum over all samples of the input signal from the start to the current position | |||
MaxOf2Inputs | Sample-wise maximum of two signals | |||
MaxReset | The maximum value can be reset via the rising edge of a bit. | Resetting the maximum value | ||
Minimum | Minimum over all samples of the input signal from the start to the current position | |||
MinOf2Inputs | Sample-wise minimum of two signals | |||
MinReset | The minimum value can be reset via the rising edge of a bit. | Resetting the minimum value | ||
Phaseshift | Returns a previous value: input(k-count), where inputk is the current value. | Example: | ||
Pulse11 | Returns an evaluation of time for a condition | Example: Bit is True for more than x seconds | ||
RollingAverage | Calculates an average of a period of samples <count> | Example: | ||
RSFlipFlop | Returns a Boolean signal, which is True when the Set signal is True, and changes to False when the Reset signal becomes True. | |||
SampleCounter | Signal counts the input signal samples and increments with each sample | Knock signals | ||
SumTotal | Adds all values of a signal: a = a + measured value(t) | |||
TableMap1D |
Predefined mapping of one 1D map to another one. The <extrapolation flag> determines how values will be extrapolated ( = 1: linear, 0: constant) . | |||
TableMap2D |
Predefined mapping of one 2D map to another one. The <extrapolation flag> determines how values will be extrapolated ( = 1: linear, 0: constant) . | |||
Threshold1 | The output value will be determined by the following sequence of conditions:
where: | Calculating a threshold | ||
Threshold2 | The output value will be determined by the following sequence of conditions:
where: | Calculating a threshold | ||
Threshold3 | The output value will be determined by the following sequence of conditions:
| Calculating a threshold | ||
Threshold4 | The output value will be determined by the following sequence of conditions:
where: | Calculating a threshold | ||
TriggerTrue1 | Generates an impulse at each rising edge of the assigned bit signal | |||
WeightedCounter | Counts all values between defined bound <const1> and <const2>, and weights this number with <factor>. | Counting Peaks or repetitions |
See also
Defining a Calculated Signal (Predefined Calculation Formula)