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?
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
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?
It needs to be within the Scan.
Dana
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) ?