LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Constant iterative computation error

Solved!
Go to solution
Solution
Accepted by topic author Nodrael

@Nodrael wrote:

As I mentioned above the program itself works fine. 


Then the code should look as follows (I remove the additional changes I made). Still much simpler!

 

altenbach_0-1575482492347.png

 

 


@Nodrael wrote:

The problem occurs only when it's needed to compare the value contained in "wavelength to" indicator with the preset one. If you try to create a double numeric control and write there, for instance, 359, it will not be equal to 359 in the indicator. That was the original problem.


It will be very, very close, but as has been mentioned several times, equal comparisons with floating point numbers are often invalid due to their nature. For example 0.1 cannot be represented in binary with a finite number of bits.

 

Here's how it looks when you show more decimal digits:

 

altenbach_0-1575484041708.png

 

 

You really need to learn how to present a problem. For example nobody can really guess what the notation "270 =/= 270" actually means. Your posts contain way too much irrelevant detail.

0 Kudos
Message 11 of 11
(245 Views)