Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

DaylightSaving and DaylightSavingUS


Monte Jul 12, 2010 07:41 AM

Can I use the DaylightSaving/DaylightSavingUS instruction like a declaration? Will say at the very beginning of a program, or between BeginProg and Scan? And then the logger adjust the clock automatically in spring and autumn according the parameters used?
Or must DaylightSaving/DaylightSavingUS be inside the Scan and the clock will only be adjusted at the time when the DaylightSaving instruction is executed?


Dana Jul 12, 2010 06:42 PM

DaylightSaving is a function which must appear between the BeginProg/EndProg instructions. You will get a compiler error if you attempt to compile with DaylightSaving before BeginProg.

Regards,
Dana


Monte Jul 13, 2010 07:56 AM

Yes, I see it must be between BeginProg/EndProg.
Does it makes a difference if it is between BeginProg and Scan or between Scan/NextScan?
In other words: Does a one-time appearance of the DaylightSaving instruction tell the CR1000 system to check for DaylightSaving from now on permanently. Or does the DaylightSaving instruction perform a check/switch for daylight saving only at the time it appears in the code?


Dana Jul 13, 2010 03:57 PM

It needs to be within the Scan.

Dana


tjwilli_58 Nov 24, 2021 06:27 PM

Can this be used along with the GPS() instruction? I  currently have a program that uses the GPS to set the time. I'm currently keeping on Standard time, but I'm thinking about changing back to allowing the time change, and also adding a column for UTC time. Every 30 minutes, I "reset" the time with the GPS to account for any drift. (The server is also notorious for having the time being off.)

Const GPS_Offset = -5

If TimeIntoInterval(0,30,Min) Then
GPS(GPSData(1),Com2,GPS_Offset*3600,1000,NMEASent(1))
EndIf

Could I just add the result of DaylightSavingUS to GPS_Offset*3600 ?

P.S.

What if my GPS has bad data (NAN/None) ?

Log in or register to post/reply in the forum.