LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI that checks for expired calibration, (expires every Sunday).

I am creating a test stand that can't go more than a week without checking/ running the calibration. I plan to handle this by having the calibration expire every Sunday. If a user opens the program and the calibration program has not been run since Sunday it will open the calibration program. I don't want to make it good for X hours because I don't want the program to have to be ran in the middle of testing. Has anyone done anything like this?

0 Kudos
Message 1 of 5
(3,026 Views)

Hi jr,

 

save the calibration time to a file after the calibration is finished.

On start of your program you check the timestamps to call the calibration routine when needed…

Best regards,
GerdW


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

Hello GerdW,

That is the easy part. The expires every Sunday hard is the hard part. 

0 Kudos
Message 3 of 5
(3,001 Views)

Hi jr,

 

so you have problems to determine the weekday for a certain timestamp?

 

Did you ever used Seconds to Date/Time before?

Once you know the current day of the week it's just simple mathematics to calculate the "last Sunday"…

Best regards,
GerdW


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

%A is the format code for weekday name (or %a is abbreviated form).

Use with format date/time string ...

 

Enjoy.

 

 

Deceased

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