Custom Operations

What

MDA V7

Migrated formula in MDA V8

Comment

Average

Average (signal)

Accumulate_Prefix_Average (signal)

Average since measure start.

AND

BinaryAND (signal, mask)

If a measure signal is used: Raw(signal) & mask

If a value is used: notsignal & mask

All measure signal arguments are wrapped by the Raw function.

Time range: From start

OR

BinaryOR (signal, mask)

If a measure signal is used: Raw(signal) | mask

If a value is used: notsignal | mask

All measure signal arguments are wrapped by the Raw function.

Time range: From start

XOR

BinaryXOR (signal, mask)

If a measure signal is used: Raw(signal) ^ mask

If a value is used: notsignal ^ mask

All measure signal arguments are wrapped by the Raw function.

Time range: From start

Const

Const (value)

value

The dialogue in MDA V7 restricts the raster selection to the fixed time raster.

Time range: From start

CountTimeLevel

CountTimeLevel (time, signal, value)

Accumulate_Prefix_Integral ((input = level) ? 1 : 0)

Time range: From start

Counts how many times a signal value has been reached.

CountTimeLevelToTolerance

CountTimeLevel ToTolerance (time, signal, min, max)

Accumulate_Prefix_Integral ((min <= signal) && (signal <= max) ? 1 : 0)

Time range: From start

Sums up the time as long as a signal is within a certain tolerance level (min, max).

Debounce

Debounce (time, signal, risingDelay, fallingDelay)

Debounce (signal, risingDelay, fallingDelay)

Calculates a debounced version of signal.

Time range defined by the edges of the input signals.

The calculation results might be different because Debounce in MDA V8 generates no edge if the input signal is non-zero since measurement start. MDA V8 assumes that the previous (unknown) sample has the same value as the first available sample. MDA V8 does not have an initial edge and the previous value is initialized as NoValue.

Delta

Delta (signal, count)

signal - State_Delay (signal, NoValue(0), count)

Delta over the last count samples: signal(k) - signal(k - count)

Time range defined by sample parameter count.

Signals of the type enumeration (VTAB) are not supported.

DeltaT

DeltaT (time, signal)

Delta (master()) + 0*Raw (signal)

0*signal is required for applying the raster settings based on an input signal.

Time range between the current and the previous measured value.

Calculates time(k) - time(k-1).

V8.7 assumes the first value as NoValue.

Gradient

Gradient (time, signal, count)

(signal - State_Delay (signal, NoValue(0), count)) / (Master() - State_Delay (Master(), 0, count))

First derivative of the last count samples.

Time range defined by sample parameter count.

Signals of the type enumeration (VTAB) are not supported.

Integral

Integral (time, signal)

Accumulate_Prefix_Integral (signal)

Integral of signal since measure start.

LevelReachedCount

LevelReachedCount (signal,level)

Accumulate_Prefix_Sum ((State_Register (signal != level, !0) && (signal = level)) ? 1 : 0)

Counts how many times a signal value has been reached.

Time range: From start

LowPassFilter_ASCET_lib

LowPassFilter (time, signal, filterTime, startInput)

Filter_LowPass1 (signal, 1 / (2*PI*filterTime))

Time range: From start

Maximum

Maximum (signal)

Accumulate_Prefix_Maximum (signal)

Maximum value of signal since measure start.

MaximumOf2Inputs

MaximumOf2Inputs (signal1, signal2)

Relation_Maximum (signal1, signal2)

Maximum of signal1 and signal2.

Time range: From start

MaxReset

MaxReset (input_signal, reset_signal)

Accumulate_Reset_Maximum (signal, reset > State_Register (reset, 0))

Calculates the maximum value of input_signal. The maximum value is reset at each positive edge of reset_signal.

Time range: from start or the last positive edge of the reset_signal.

Minimum

Minimum (signal)

Accumulate_Prefix_Minimum (signal)

Minimum value of signal since measure start.

MinimumOf2signals

MinimumOf2Signals (signal1,signal2)

Relation_Minimum (signal1, signal2)

Minimum of signal1 and signal2.

MinReset

MinReset(input_signal, reset_signal)

Accumulate_Reset_Minimum (signal, reset > State_Register(reset, 0))

Calculates the minimum value of input_signal. The minimum value is reset at each positive edge of reset_signal.

Time range: From start or the last positive edge of the reset_signal.

PhaseShift

PhaseShift (signal, 0, count)

Delay (signal, 0, count)

Returns a previous value: signal(k-count)

Time range defined by sample parameter count.

MDA V8 returns n/a as long as not all values are defined.

Pulse11

Pulse11 (time, signal, duration)

Debounce (time, signal, 0, duration)

Time range defined by the parameter duration.

Detects pulses given by the argument duration.

MDA V8 assumes that the previous (unknown) values are the same as the first available sample.

RollingAverage

RollingAverage (signal, count)

Accumulate_Samples_Average (signal, count)

Calculates the average of signal over the number of samples defined by count.

Time range defined by sample parameter count.

RSFlipFlop

RSFlipFlop (set_input, reset_input)

State_RSFlipFlop (set_input, reset_input)

Time range: From start

RSFlipFlop with positive logic.

Both parameters must have the same measure rate.

SampleCounter

SampleCounter (signal)

Count (signal)

Time range: From start

Returns the number of samples of the signal.

SumTotal

SumTotal (signal)

Accumulate_Prefix_Sum (signal)

SumTotal since measure start.

Threshold1

Threshold1 (l, u, s, a, b)

((l <= s) && (s <= u)) ? a : b

Threshold computation

Time range: From start

Threshold2

Threshold2 (l, u, s, x)

(s < l) ? l : (s > u) ? u : x

Threshold computation

Time range: From start

Threshold3

Threshold3 (l, u, s, a, b)

((l <= s) && (s <= u)) ? a : b

Threshold computation

Time range: From start

Threshold4

Threshold4 (l, u, s, x)

Latch (x, (l <= s) && (s <= u))

Threshold computation

Time range: From start

TriggerTrue1

TriggerTrue1 (signal)

signal && State_Register (!signal, !1)

Detects when signal is going from false to true.

Time range between the current and the previous measured value.

WeightedCounter

WeightedCounter (signal, low, high, factor)

factor * Accumulate_Prefix_Sum ((low <= signal) && (signal <= high) && (signal = signal))

Counts the number of samples for which the signal is between low and high, and weights this number with factor.

Time range: From start