ETAS MDA V8.6 User Manual page 66

Table of Contents

Advertisement

ETAS
If-Then-Else to ignore samples
In all the above listed examples, the If-Then-Else function allows to cal-
culate a result based on a specific condition. There is a calculation result for
every sample, including those which do not fulfill the condition. By the appro-
priate selection of the neutral value, there is no effect for the calculation result,
but still a value for every time stamp, i.e. every input sample. This can be seen,
for example, by the curve drawn in an oscilloscope, which is a continuous line.
In some cases it is not so simple to find a neutral value for the calculation res-
ult. Then it is helpful if you can ignore samples for the calculation. This is the
case in an average calculation where you have to ignore samples as there is
not an appropriate neutral value.
To exclude samples completely, i.e. that there is no result of the calculation,
you can use the No Value function. Actually, the No Value function does
not remove samples, but sets a flag to the value that shall be ignored.
There are two ways of creating samples with a No Value flag.
Examples:
MDA V8.6 – User Guide
As the condition itself results already in a value of 1 or 0, a pure
integral operation is sufficient, and the If-Then-Else function
must not be used.
By the mentioned formula the duration is given in seconds.
1. You want to get statistical data for the speed range of 40 to
80km/h. To eliminate the samples with a different speed these
get the No Value flag assigned.
Condition for speed range: (Speed > 40) AND (Speed
<= 80)
True case: keep current Speed value as it is
False case: set the No Value flag for the sample
Selected_Samples = (Speed > 40) AND (Speed <=
80) ? Speed : NoValue (0)
When you add the Selected_Samples signal to a Statistical
Data instrument, only samples in the defined speed range will be
used as basis for the statistics.
When you assign the signal to an oscilloscope, the curve is lim-
ited to the sections in which samples within the defined speed
range exist.
Note: The term NoValue ( 0 ) means that a sample with
value 0 and the No Value flag will be set.
or
4 Calculated Signals
66

Advertisement

Table of Contents
loading

Table of Contents