LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 2021 expression node bug

Hello everyone, I just updated my development environment to LabVIEW 2021, and I immediately noticed my application does not work as expected. I found out that U64 implementation of Expression node function does not work properly (see the snippet below).

 

Expression_node_bug.png

 

0 Kudos
Message 1 of 10
(2,472 Views)

Hi,

 


@stpmazic wrote:

I found out that U64 implementation of Expression node function does not work properly (see the snippet below).


Can you provide examples of input values and expected/unexpected outputs?

 

Is it a problem of the U64 datatype or of all those coercion dots in your snippet?

Don't forget the different amount of mantissa bits in the U64 and DBL datatypes in your code!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(2,466 Views)

I'm guessing it has something to do with the Economists rounding LV uses (or whatever it's called).

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 10
(2,436 Views)

@stpmazic wrote:

Hello everyone, I just updated my development environment to LabVIEW 2021, and I immediately noticed my application does not work as expected. I found out that U64 implementation of Expression node function does not work properly (see the snippet below).

 

Expression_node_bug.png

 


You mean it used to work and now it doesn't?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 10
(2,418 Views)

Thank you all for your prompt replies. I wanted to attach the entire VI containing proper default values, but for some reason I went for a snippet. Please see the attached VI, everything will be clear.

0 Kudos
Message 5 of 10
(2,391 Views)

Still not clear on my phone.

 

  • What are the I/O values?
  • What is the representation of "2"

The expression node will use "Bankers Rounding" so expect only even values in the U64 out.  And the 2 in that is likely signed forcing an insidious coersion.

 

 


"Should be" isn't "Is" -Jay
Message 6 of 10
(2,385 Views)

looks like 37497077760 is truncated to 2147483647

 

how-you-remaind-me.png

Message 7 of 10
(2,377 Views)

Looks like the expression node Coerces to 32bit not entirely unexpected. 

 


"Should be" isn't "Is" -Jay
Message 8 of 10
(2,368 Views)

@JÞB wrote:

Looks like the expression node Coerces to 32bit not entirely unexpected. 

 


Too late to edit.

 

The expression node predates the introduction of the 64 bit integer datatype.  Since it never had an overflow output I can't imagine breaking the backward compatibility by supporting 64 bit inputs.  

 

Coercion dots or a compiler warning would be nice though. 


"Should be" isn't "Is" -Jay
Message 9 of 10
(2,348 Views)

We just ran into this.  It worked with LV 2018.  I just checked LV2022 and it seems broken there too.  Is this going to be fixed?

0 Kudos
Message 10 of 10
(2,119 Views)