04-10-2008 11:52 AM
04-10-2008 12:04 PM
04-10-2008 12:12 PM
Anthony de Vries wrote:
I think what you're seeing here, is simply the limited resolution of the millisecond timer ~ 15 ms.
04-10-2008 12:23 PM
04-10-2008 12:44 PM
You basically need a while loop with a shift register. The shift register holds the previous timestamp. Compare the new timestamp with the last to see fi the hour has changed. (There are functions on the timing palette to break out the hour). If the hour has changed, execute the loop that is running within a case structure. Feed the new timestampe into the shift register.
Electramotive wrote:
As for my second question, is there any sample code to trigger the start to a loop when there is an hour change on the computers clock?
04-10-2008 02:30 PM
Another option would be to read the time, and then calculate how many second you have to wait till the next whole hour. Then put that value in a time delay vi.
This has the advantage that you don't need to keep polling with a while loop. Disadvantage is that you can't properly abort the operation.
There's a solution for the latter... In the program I'm editing currently, I use the same approach, but I use a 'wait for notification' in stead of the 'time delay'. Make the timeout value the same as the time delay, and you have the same functionality. But now you can abort the time delay, by sending a notification.