Architecture

Calculation of values in D2000 is handled by the calculation process D2000 Calc. It has eval tags as descendants.

Most applications have a single calculation process (SELF.CLC) which calculates all eval tags.

Konfigurácia

When configuring an eval tag, it is necessary to configure:

Structured eval tags

An eval tag is structured if a Destination column is defined (e.g. SV.Something[0]^SomeColumn). In such a case, the eval tag represents a "template" that is instantiated for each row of the destination structured variable, Wherever indices [0] of structured variables are used in the expression, they are replaced by indices 1, 2, etc. according to the number of rows of the destination structured variable).

An example of an expression for the sum of the columns of two different structures (the target column can be, for example, SV.StructC[0]^PowerSum:

SV.StructA[0]^PowerA + SV.StructB[0]^PowerB


A more complicated example of an expression using a nested conditional expression:

{ SV.Channel[0]^Input\VLD } ?           ; if the value is valid
[
  {SV.Channel[0]^Input =-32768} ?       ; -32768 is defined as invalid
  [%SetInvalid(0)]                      ; invalid
  :
  [SV.Channel[0]^Input * %Power(10, SV.Channel[0]^Exponent)]  ; normal value
]
:
[%SetInvalid(0)]                        ; invalid value (communication is not ok)


Debugging the eval tags:

A listing of detailed tuning information for a specific eval tag(s) can be shown with the SHOW_DYN_INFO <mask> command.

For structured eval tags, it is possible to compare the values of destination columns (structured variables) configured in eval tags with calculated values using the CHECK_DESTID_VALUES tell command.