LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check time

Hi all!

 

Whydoesnt my attached VI stop at 10:57:00 even when the time is equal?

0 Kudos
Message 1 of 5
(2,789 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,760 Views)

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".

 

 

0 Kudos
Message 3 of 5
(2,750 Views)

Hi 

 

Can you send a snapshot? My version is LV2011.

0 Kudos
Message 4 of 5
(2,716 Views)

of course...

0 Kudos
Message 5 of 5
(2,710 Views)