Tietokoneiden näyttöjä, joissa näkyy kuvaa automaatiolaboratorion laitteistosta. Monitoreiden takana näkyy sama laitteisto kuin kuvissa.

timohei.net / My Courses / Automation Systems / MetsoDNA Configuration How-to /
cmp and calc blocks

Comparison of floating-point and integer numbers (conversion to "binary value") is done with the cmp block, and calculation with the calc block. Several versions of these exist depending on the data types of the inputs and the number of inputs and outputs.

Free-form blocks in the manual

The help pages for these function blocks can be found as a PDF file from Valmet DNA Manuals:

Calculation / comparison formula

The outputs of the function block are set according to the formula entered. The formula has the form

OUTPUT_IDENTIFIER = INPUT_IDENTIFIER OPERATOR [INPUT_IDENTIFIER | CONSTANT] [OPERATOR [INPUT IDENTIFIER | CONSTANT]] ... ;

where

cmp and calc examples

Changing constant values used in the formula with a debugger

If the constant value 1.105 in the previous example needs to be changed with a debugger, for example, this parameter must be given outside the free-form function block. Note the structure of the ana type [fault bits],[floating-point value part] - the fault bits are not given when the value is in the formula. However, they must be given if the value is specified as the initial value of the interface port):

Tips for error situations

If you get error messages with these function blocks, check:

The formula can be split over multiple lines. The semicolon indicates where the formula ends.

Updated 25.5.2025

<<  Previous Page
(5) Binary Output BOU8
Sivu 6/15Next Page >>
(7) cng Function Block (conditional jump)
© Timo Heikkinen | timo piste heikkinen at oamk piste fi