→Constant expression
A constant expression is a language construct that consists of a defined combination of operands (like →literals, enumerated values) and operators (like +, -, *, /
) and yields one value of a particular data type.
Compare: →expression
Deviation from the IEC-standard (text part) The section "6.6.1.2.4 Constant expression" of the →IEC-standard is also quoting →constant →variables as examples for operands as a part of a constant expression. However, the section "Annex A (normative) Formal specification of the languages elements" of the IEC-standard specifies "a constant expression must evaluate to a constant value at compile time". According to this annex A, Neuron Power Engineer does not support constant variables are part of a constant expression. The reason for this is that Neuron Power Engineer cannot guarantee that a constant variable is indeed evaluated as the same (constant) value at runtime time. Depending on the application logic, the value of a constant variable might change at runtime time. |
No detection of mathematical errors If you assign expressions in Neuron Power Engineer, it is possible that mathematical errors are not detected and reported See "Expressions in ST" for details. |