08-25-2014 12:31 AM
Hi all!
Whydoesnt my attached VI stop at 10:57:00 even when the time is equal?
08-25-2014 01:28 AM - edited 08-25-2014 01:30 AM
Hi kdm,
it doesn't stop because the timestamps are NOT equal!
Do not compare floating point numbers (and timestamps are floating points under the hood) for equality. NEVER!
Compare them using InRangeAndCoerce. Or use your own algorithm incorporating some uncertainty.
That being said:
- You only compare time, but the timestamp also contains date. Does that match too?
- You only compare milliseconds. Timestamp also contains microseconds (and even more decimal digits) so do they match?
Edit:
- Did you try any probes here? Or using some additional indicators? That way you should easily notice the problems described before. Until now you really should have learned to use those basic debugging techniques…
08-25-2014 01:32 AM
Hi,
if you don´t add a date to your constant, your default date is 1. Jan 1904. That´s the reason, why all times of today are not equal to the times of the year 1904. I´ve modified your VI.
You should compare two values not with "equal" but with "greater or equal".
08-25-2014 02:44 AM
Hi
Can you send a snapshot? My version is LV2011.
08-25-2014 02:50 AM
of course...