cmp and calc blocks
338 408 503
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.
The help pages for these function blocks can be found as a PDF file from Valmet DNA Manuals:
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
o = a < b;the output o is set to one when the value of input a is less than the value of input b; otherwise, the output o is set to zero.
o = a < b AND a > c;the output o is set to one when a is less than b and greater than c, i.e., the value of input a is between the input values b and c.
o = (a + b) * 3.14 + 4 * (c + d);
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):
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.
<< Previous Page (5) Binary Output BOU8 | Sivu 6/15 | Next Page >> (7) cng Function Block (conditional jump) |