EXPT block returns a wrong value under certain target system in case of an invalid connection

Symptom:

In case of an invalid connection of the EXPT block with ANY_REAL values (see example), the block should return "Not-a-Number" (NaN). Moreover, the example checks the validity of the ANY_REAL value with the IS_VALID block because the IS_VALID block will return the value FALSE in case of "NaN".
However, this is not the case for the platform "vxWorks x86".

Example for ST-code
FUNCTION_BLOCK ExampleExptInvalid2
VAR
resultRealInvalid : REAL;
END_VAR
resultRealInvalid:= EXPT(IN1 := REAL#-25.0, IN2 := REAL#0.5);
(* For the built-in PLC, 'resultRealInvalid' evaluates to 'NaN' in the 'Values of Variables* view. *)
(* But this is not the case for vxWorks x86. *)
ASSERT(NOT IS_VALID(resultRealInvalid));
END_FUNCTION_BLOCK

Workaround: none existing

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg logi.cals recommends to install and use the most current versions of logi.CAD 3 and the runtime system so that the latest features and problem fixes according to the release notes are provided in the used version.


Did this article help you? Did you find the requested information in this user documentation?
If not, contact the support team of logi.cals. State your questions or suggestions to improve/enhance the user documentation as detailed as possible.