LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rounds x to the nearest integer between x and zero function fails to compile in LV 2010

Hello to all,

 

 

The following attached function fails to compile when running in LV 2010 but not in 2009...is there a specific reason?

 

((intrz(x*100))/100)???

 

 

THX-N-ADVANCE

FredTest

0 Kudos
Message 1 of 9
(4,503 Views)

I think the expression node does not like arrays.  Put it inside a for loop.

 

Lynn

Message 2 of 9
(4,484 Views)

The expression node should not have a problem with arrays, however with this particular function it seems to.  The For Loop is a possible workaround.

Message 3 of 9
(4,479 Views)

I simply created a new expression node and the error went away. Some bug in the up-conversion.

Message 4 of 9
(4,451 Views)
That is odd. I never upconverted, but still get the error. Does it actually run, or does the broken arrow go away? Sometimes it survives type propagation, but only fails on compilation, for example when run.
Message 5 of 9
(4,433 Views)

I agree, it is NOT an upconversion problem, ...:

 

Exercises:

 

Build VI from scratch using a new expression node containing the formula and using arrays as inputs and outputs

  • VI will not be broken
  • Run VI, VI will be broken.

Disconnect the arrays and wire scalars to the inputs and output

  • VI is still broken
  • Run the VI, VI will heal itself

Disconnect the scalars and reconnect the arrays

  • VI will not be broken until we run it again

This is clearly a bug!

 

If the expression node function cannot handle arrays, it needs to break the wires and not allow wiring them. (reported here)

 

Message 6 of 9
(4,425 Views)

You're right. I did not run the VI before.

Message 7 of 9
(4,419 Views)

Hello all,

 

We appreciate you bringing this to our attention; I'll reproduce the bug and file a CAR. Constant vigilance makes future versions of LabVIEW better!

 

Thank you,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 8 of 9
(4,372 Views)

Hello,

 

This issue was filed under CAR ID 307846. On every new version of LabVIEW, bug fixes are listed in the readme file and remaining known issues are listed on our website.

 

Regards,

Deborah Y.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 9 of 9
(4,308 Views)