EasyManua.ls Logo

ETAS MDA V8.5 - Formula Syntax

Default Icon
146 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ETAS 4 Calculated Signals
4.4.2 Formula Syntax
Formulas are entered in textual form. A formula consists of the following types
of elements:
l Literals: a constant value directly part of the formula, e.g. 1
l Signals: a reference to an existing signal, represented by a box
l Operators: a non-alphanumeric sequence of characters representing a cal-
culation operation e.g. +
l Functions: e.g. sin()
4.4.2.1 Literals
A literal is the textual representation of a constant in a formula. The following
types of literals can be used:
Type Example
Decimal integer number 123
Decimal floating point number 1.23
Hexadecimal number 0x1FA, 0x1fa
Binary number (e.g. bitmask) 0b1001010
Integer Numbers
Integers are usually specified as decimal numbers (base 10) using the digits
from '0' through '9'. Alternative number systems (bases / radices) can be used by
using one of the following prefixes:
Prefix Base Name
0b 2 Binary
0x 16 Hexadecimal
Binary only uses the digits '0' and '1'. Hexadecimal uses digits and letters 'A'
through 'F'. The letters in the number are not case sensitive.
Examples:
17 = 0x11 = 0b10001
12 = 0xC = 0xc = 0b1100
Note: Integer literals are currently implicitly treated as floating point numbers.
Floating Point Numbers
Floating point numbers use a '.' as decimal separator and optionally allow sci-
entific notation. The general format is:
+/- integer '.' fraction 'e' +/- exponent
Notes:
MDA V8.5 - User Guide 65

Table of Contents