Unexpected Result from Expression Node on LabVIEW 2021 and After

Updated Dec 4, 2023

Reported In

Software

  • LabVIEW

Programming Language

  • LabVIEW G

Issue Details

I am migrating my LabVIEW 2020 project to LabVIEW 2021. I realize the result of expression node changes on LabVIEW version 2021 and after. The difference can be found when the result of unsigned integer input is negative. Image below illustrated this behavior. How can this issue be resolved?

3e2de950-a686-4deb-8f75-987a184f9835.png

Solution

To resolve this issue in LabVIEW version 2021 and after, kindly use To Double Precision Float and To Unsigned Integer on the inputs/outputs of the node to get the previous behavior.

solution
 

Additional Information

NI apologize that this behavior change was not noted in the documentation, but it was a bug fix. We intend for the Expression Node to produce the same output as the equivalent syntax in G. Previously, the node internally treated values as floating point.