7 Calculations | 116
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.
l
Condition for speed range: (Speed > 40) AND (Speed <= 80)
l
True case: keep current Speed value as it is
l
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 instru-
ment, 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 limited 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
As a frequent use case is to ignore samples for a calculation, there is a sep-
arate function to assign the No Value state to samples.
In contrast to the former definitions, you must define the condition in a way
that it is clear which samples shall be excluded.
l
Condition for speed range to be excluded: (Speed <= 40) Or
(Speed > 80)
(In contrast to the True condition above)
l
Function to assign the No Value state for specific samples (outside 40
- 80 km/h):
SetNoValueStatus ( Speed, ( (Speed <= 40) Or (Speed >
80) )
This is equivalent to
Selected_Samples = (Speed > 40) AND (Speed <= 80) ?
Speed : NoValue (Speed)
In this case, the NoValue (signal) causes that the original signal value of
Speed is kept, but gets the No Value flag assigned.
This selection of samples for the speed signal can be used as input for e.g.
an Average calculation (since start of the recording).
Average_Speed = Accumulate_Prefix_Average ( Selected_
Samples )
2. The No Value function can also be used to suppress drawing samples in
an oscilloscope, for example for the distance calculation mentioned above.
Interrupted_Distance_Curve = (Speed > 40) AND (Speed <=
80) ? Distance : NoValue (0)
MDA V8 | User Guide