User manual

IEC61131 User and Reference Manual
April 22, 2008
335
setclock
Set current date and time
Description
The setclock function sets the controller real time clock.
set
hour
minute
second
year
setclock
Q
month
day
weekday
Arguments
Inputs
Type
Description
set
Boolean
Sets the controller real time clock (RTC) when TRUE. Set
this input to FALSE once the date and time have been set.
hour
Integer
Real time clock hour. Valid values are 0 to 23.
minute
Integer
Real time clock minute. Valid values are 0 to 59.
second
Integer
Real time clock second. Valid values are 0 to 59.
Year
Integer
Real time clock year. Valid values are 00 to 99.
month
Integer
Real time clock month. Valid values are 1 to 12.
Day
Integer
Real time clock day. Valid values are 1 to 31.
weekday
Integer
Real time clock day of week. Valid values are 1 to 7.
1 = Sunday, 2 = Monday…7 = Saturday.
Outputs
Type
Description
Q
Boolean
TRUE if set input is TRUE.
FALSE in all other cases.
Notes
SCADAPack Controllers have a hardware based real-time clock that independently
maintains the time and date for the operating system. The time and date remain accurate
during power-off. The calendar automatically handles leap years.
See Also
getclock