PLC-API eCTRL_SAWTOOTH := 2 ); END_TYPE 5.2 Auxiliary 5.2.1 FB_CTRL_GET_SYSTEM_TIME (only on a PC system) This function block reads the current Windows system time, making it available in SystemTimeStruct. Description: This function block makes the current system time available in its output structure. The resolution is specified through the tCtrlCycleTime parameter; the maximum resolution is 10 ms, and it is necessary to observe the condition tCtrlCycleTime > 2 • tTaskCycleTime. If this is not done, the resolution will be reduced to 2 • tCtrlCycleTime. VAR_OUTPUT VAR_OUTPUT stSystemTime : TIMESTRUCT; eErrorId : E_CTRL_ERRORCODES; bError : BOOL; END_VAR TYPE TIMESTRUCT STRUCT wYear :
WORD; wMonth : WORD; wDayOfWeek : WORD; wDay : WORD; wHour : WORD; wMinute : WORD; wSecond : WORD; wMilliseconds : WORD; END_STRUCT END_TYPE stSystemTime : Structure in which the system time is output. wYear : The year: 1970 ~ 2106; wMonth : The month: 1 ~ 12 (January = 1, February = 2 etc.); wDayOfWeek : The day of the week: 0 ~ 6 (Sunday = 0, Monday = 1 etc.); wDay : The day of the month: 1 ~ 31; wHour : Hour: 0 ~ 23; wMinute : Minute: 0 ~ 59; wSecond : Second: 0 ~ 59; wMilliseconds : Millisecond: 0 ~ 999; eErrorId : Supplies the error number [ } 16] when the bError output is set. bError : Becomes TRUE as soon as an error situation occurs. TS4100 19 Version: 1.1