LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling the data flow

Solved!
Go to solution

Because many fractional values cannot be fully represented in binary! For example if you keep adding 0.1 to a value and try to stop when the result is 1, it will never stop.

 

Since the origianl example here uses orange datatypes, I assume that the values don't necessarily are integers (else they would have selected an interger (blue) representation!)

For DBLs, equal comparisons (or not equal) are full of pitfalls. We could do a >3 instead of an =3 in this case.

 

There are plenty of discussions touching this, for example:

 

Read the entire threads!

 

0 Kudos
Message 11 of 13
(696 Views)
Solution
Accepted by topic author Getwonder

 


@Intelligent wrote:

Thanks gak

The thing is that, i have to search it only for the first time. And when that value is occurred now i have to do processing regardless 3 occurs again or not. 


 

Here's a better example for that:

 

 

Initially the case is FALSE. Once the condition is met once, the TRUE case will always execute after that. (Modify as needed, e.g. add a way to reset ot back to off.)

 

 

Download All
Message 12 of 13
(691 Views)

 


@altenbach wrote:

Because many fractional values cannot be fully represented in binary! For example if you keep adding 0.1 to a value and try to stop when the result is 1, it will never stop.

 

Since the origianl example here uses orange datatypes, I assume that the values don't necessarily are integers (else they would have selected an interger (blue) representation!)

For DBLs, equal comparisons (or not equal) are full of pitfalls. We could do a >3 instead of an =3 in this case.

 

There are plenty of discussions touching this, for example:

 

Read the entire threads!

 


 

Sheesh. I have been around computers for longer than I care to admit. Ok it was even before IBM released their first PC. I have built computers and I am not talking about buying a power supply, motherboard, CPU and hard drive and putting them into a chassis. I mean that I built 6502 based systems using a wirewrapping tool and programmed the firmware using an EPROM programmer that I also built from scratch. I built a four function calculator from discrete TTL gates * and seven segment displays.

 

Yet this NEVER occured to me. I guess it must be the nature of the types of programs that I write. This is so blatantly obvious that I am embarased that I asked the question. But I always love these little embarasing moments for the simple reason that I actually learn something that I can guarantee that I will never forget.

 

* ok my calculater obviously didn't support floating point Smiley Happy

=====================
LabVIEW 2012


Message 13 of 13
(669 Views)