LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How to have code execute at a specific date/time?

How to have code execute at a specific date/time?

I am looking for any advice/example code on how to have a section of code execute at a specific system date/time. I am settting up a test to run over several days and need to have one instrument change ranges with code at a specific date and time. I am thinking of a do/while loop, but before I batter my head against the bench, I thought I would ask the group.
 
Thanks,
 
Gregg
0 Kudos
Message 1 of 2
(833 Views)

Re: How to have code execute at a specific date/time?

If your program control is in a loop, then within the loop, I would use a check of the time and date.

If your structure is otherwise, I would create a timer callback to check the time and date.

The pieces of code I would use are calls to GetSystemTime() and GetSystemDate().

Use the returned values to check for your specific date and time.

0 Kudos
Message 2 of 2
(827 Views)