Using Enumeration Signals - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
Calculate the RMS since the last zero crossing:
l
RMSTemp = sqrt(Rolling_Accumulate_Integral(voltage
** 2, windowStart))
Hold the RMS value from the end of the last window:
l
RMS = Latch(RMSTemp, windowDetect)
Overall the calculated RMS will be one period delayed.
4.3.3

Using Enumeration Signals

As the physical value of an enumeration signal is a string, usual mathematical
operations can not be performed directly using the pure enumeration signal as
input signal in formulas. To use the respective decimal value defined by the
conversion formula instead of the string value, the Raw() function is provided.
To compare the physical string values of two different enumeration signals,
the function ToString() can be used.
Obtaining the decimal value of the enumeration signal:
l
Raw(Enumeration)
For checking whether the value of an enumeration signal equals or
l
exceeds a specific limit, the corresponding decimal value as given in the
conversion formula of the enumeration signal is used for comparison:
Raw(Enumeration) >= [numeric decimal value]
Comparing the strings of two enumerations signals for being equal:
l
ToString(Enumeration_1) = ToString(Enumeration_2)
Counting the number of changes of an enumeration signal. First the pos-
l
itive and the negative edges are detected, then these are counted:
Edges = Gradient(Raw(Enumeration)) != 0
Accumulate_Prefix_Sum(Edges)
Detecting the duration how long (in seconds) a Boolean enumeration
l
signal stayed in state True:
Accumulate_Prefix_Integral(Raw(Boolean_Enumeration))
Provided that the enumeration definition is 0 = False, and 1 = True.
MDA V8.6 – User Guide
4 Calculated Signals
63

Advertisement

Table of Contents
loading

Table of Contents