From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Summation not equal

Solved!
Go to solution

See attached VI, can anyone explain why this weird thing happens:

 

I extracted the 1st element of waveform and changed it to a control, I tested it is equal to the 1st element in the waveform. And then I do a summation using the 1st element in the waveform and controls, they are not equal?

0 Kudos
Message 1 of 2
(1,866 Views)
Solution
Accepted by topic author Chuan

Hi Chuan,

 

they are not equal?

Do you know the difference between SGL and DBL datatypes?

If you know then I wonder about your question.

I not, then you should learn about it!

 

I extracted the 1st element of waveform and changed it to a control,

You forgot to note you also changed its representation…

 

General lesson learned (again after all those threads on the very same problem): NEVER compare floats for equality!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(1,857 Views)