Import Calculated Signals from XDA Files: Differences between MDA V7 and MDA V8

Since MDA V8.3.3 it is possible to import calculated signals from XDA files. Because of several reasons, the results of the calculated signals in MDA V8 may be different to the ones in MDA V7. This document lists the differences in detail.

  • MDA V7 and MDA V8 use different calculation engines for evaluating formulas: MDA V7 uses a Perl interpreter, while MDA V8 uses a C-like calculation engine. This may lead to different results (e.g. due to resolution). Internally MDA V8 uses different data types (e.g. int8, uint8, int16, boolean, double…) automatically, based on the calculation result (type deduction).
  • For calculated signals, MDA V8 supports the types Boolean, Double and Automatic. MDA V7 in addition supports different integer types (uint16, sint32 …). During the import, the mode Automatic is applied for all Integer types. If you have selected an integer type in MDA V7 to ensure an integer result, MDA 8 may deliver float values.
  • MDA V7 uses the decimal() function automatically for binary operations (e.g. in the function Binary_AND). MDA V8 will emulate this behavior by calling the Raw() function. If you use a calculated signal, MDA V8 does not do this and will use the physical value instead.
  • When using the modulo (%) operator, MDA V7 uses the decimal value. MDA V8 uses the physical value.
  • User-defined Perl scripts, which define new functions for calculated signals, are not supported. Calculated signals, which use such functions, are imported, but their formula shows an error.
  • If you reference a signal in the raster settings, which is not part of the current formula, MDA V8 uses “Combined Rasters (Merge Rasters)”.
  • Verbal conversion settings are not supported by MDA V8 and are ignored.
  • Signals of type "Limit monitoring" are imported. However, the verbal conversion settings (and the associated messages) are ignored. The resulting signal type is set to Boolean (not string) in MDA V8. The signals are deleted from the oscilloscopes during the import. Please assign the calculated signal manually to a Boolean strip in an oscilloscope. You can also assign it to an Event List instrument. This will give a similar view than the Event strip in MDA V7.
  • The functions TableMap1 and TableMap2 are not supported and show errors in MDA V8.

Constants

MDA V7

Migrated formula in MDA V8

BIRTHDAY

Not supported in MDA V8

DATE

Not supported in MDA V8

E

2.71828182845905

EPOCH

Not supported in MDA V8

G

9.80665

LOG2_E

1.44269504088896

LOG10_E

0.434294481903252

LOG_2

0.693147180559945

LOG_10

2.30258509299405

PI

3.14159265358979

PI_DIV_2

1.5707963267949

PI_DIV_4

0.785398163397448

ONE_DIV_PI

0.318309886183791

ONE_DIV_SQRT_2

0.707106781186548

SEC_PER_DAY

86400.0

SEC_PER_HOUR

3600.0

SEC_PER_MIN

60.0

SQRT_2

1.4142135623731

TWO_DIV_PI

0.636619772367581

TWO_DIV_SQRT_PI

1.12837916709551

TWO_PI

6.28318530717959

Standard Operations

Calculation results of imported calculated signals with standard operations have the following known issues:

  • MDA V7 and MDA V8 have different values for the rint/RoundInt function. The rint function in MDA V7 has a specific "Asymmetric round half up" rounding convention, while MDA V8 has a "Symmetric round half up".
  • In MDA V7 the Shift (>>, <<) and binary operations (&, |, ^) use the raw value of a signal. MDA V8 will emulate this by calling the Raw() function. However, this emulation does not work properly for nested calculated signals, i.e. when the argument is a calculated signal which has a measure signal inside.
  • Calculated signals of integer type in MDA V7 will be converted into double type in MDA V8. This leads to differences in handling of arithmetical overflow. E.g. the value ‘-1’ in MDA V7 is represented as '4294967295.00’ which is ((uint32)’-1’), and in MDA V8 is real ‘-1.00’.

Operations of type "Single Bit"

 

What

MDA V7

Migrated formula in MDA V8

Comment

Single Bit

double((long(rint(signal)) >> shift_value) & and_value)

If a measure signal is used:

Raw(signal) >> shift_value & and_value

If a value is used:

value >> shift_value & and_value

All measure signal arguments are wrapped by the Raw function.

Operations of type "Bitmask"

 

What

MDA V7

Migrated formula in MDA V8

Comment

Bitmask

double((long(rint(signal)) >> shift_value) & and_value)

If a measure signal is used:

Raw(signal) >> shift_value & and_value

If a value is used:

value >> shift_value & and_value

All measure signal arguments are wrapped by the Raw function.

Operations of type "Limit Monitoring"

MDA V7 allows to define calculated signals which monitor if one or more signals exceed a predefined value. For each limit to monitor, a condition is defined, together with a message to be shown if the limit is not met.

For MDA V8 such an operation is migrated into a calculated signal of type Boolean. The associated message will not be migrated.

Example:

The XDA file for a signal contains three calculation rules:

1

MyLimitMonitor1?1 = ${'C:_Data\INCA-NG_Sample Files\Coldstart2.dat:DG0:CG0:N10'}>1000

2

MyLimitMonitor1?2 = ${'C:_Data\INCA-NG_Sample Files\Coldstart2.dat:DG0:CG0:N10'}<100

3

MyLimitMonitor = ${'MyLimitMonitor1?1'} + ${'MyLimitMonitor1?2'}

These formulas are converted into one calculated signal in MDA V8:

Name

MyLimitMonitor

Formula

(N10 > 1000) || (N10 < 100)

Type

Booelan