Signals; Operators - ETAS MDA V8.6 User Manual

Table of Contents

Advertisement

ETAS
When delaying a boolean signal by one sample, it is necessary to specify the
initial value as a boolean:
State_Register(voltage > 0, !1)
4.4.2.2

Signals

A signal is a sequence of samples each having a value. The signal's values can
be accessed in a formula by adding the signal to the formula. It will be dis-
played as a box with the name of the signal.
Implicitly each signal also has a timestamp for each sample. Some operations
like the Integral use the timestamps to react to the passing of time. To expli-
citly access the time in a formula use the Master() function.
Examples:
Delta(signal) calculates the difference of consecutive signal val-
l
ues.
Delta(Master()) calculates the difference of consecutive signal
l
timestamps, e.g. Delta(Master())+0*signal.
4.4.2.3

Operators

Operators are a compact way of specifying frequently used calculation oper-
ations like addition or multiplication. When multiple operators are used the
order in which they are evaluated needs to be defined. The order can be expli-
citly specified by using parentheses. If there are no parentheses, the order is
determined implicitly using the precedence of the operators. Higher pre-
cedence operators are evaluated first, followed by lower precedence. Within
the same precedence group, operations are evaluated from left to right or from
right to left depending on the operator.
Examples:
a + b + c = (a + b) + c
l
a + b * c = a + (b * c)
l
- - a = -(-a)
l
cond1? val1: cond2? val2: val3 = cond1? val1:
l
(cond2? val2: val3)
The following table shows the precedence of operators. The operators on the
first line have the highest precedence. Operators on the same line have the
same precedence and the evaluation direction is specified as left-to-right or
right-to-left.
MDA V8.6 – User Guide
4 Calculated Signals
72

Advertisement

Table of Contents
loading

Table of Contents