14 Integrated Standard
14.1 System Functions
14.1.1 SFC 0 - SET_CLK - Set system clock
The SFC 0 SET_CLK (set system clock) sets the time of day and the date of the clock in
the CPU. The clock continues running from the new time and date.
If the clock is a master clock then the call to SFC 0 will start a clock synchronization cycle
as well. The clock synchronization intervals are defined by hardware settings.
Parameter Declaration Data type Memory block Description
PDT INPUT DT D, L Enter the new date and time at PDT.
RET_VAL OUTPUT INT I, Q, M, D, L When an error occurs while the function
is being processed then the returned
value contains the respective error code.
Date and time are entered as data type DT.
Example:
date: 04.27.2006, time: 14:15:55 → DT#2006-04-27-14:15:55.
The time can only be entered with one-second accuracy. The day of the week is calcu-
lated automatically by SFC 0.
Remember that you must first create the data type DT by means of FC 3 D_TOD_DT
before you can supply it to the input parameter
(see time functions; FC 3, FC 6, FC 7, FC 8, FC 33, FC 40, FC 1, FC 35, FC 34).
Value Description
0000h no error
8080h error in the date
8081h error in the time
14.1.2 SFC 1 - READ_CLK - Read system clock
The SFC 1 READ_CLK (read system clock) reads the contents of the CPU clock. This
returns the current time and date.
Parameters
Parameter Declaration Data type Memory block Description
RET_VAL OUTPUT INT I, Q, M, D, L If an error occurs when this function is being
processed the return value contains the error
code.
CDT OUTPUT DT D, L The current date and time are available at
output CDT.
Description
Parameters
PDT
RET_VAL (Return value)
Description
VIPA SPEED7
Integrated Standard
System Functions > SFC 1 - READ_CLK - Read system clock
HB00 | OPL_SP7 | Operation list | en | 18-30 645