Functions ¶ Utility Functions DTConcat (Function) DTSplit (Function) DateConcat (Function) DateSplit (Function) GetDayOfWeek (Function) TODConcat (Function) TODSplit (Function)
Utility Functions ¶ DTConcat (Function) DTSplit (Function) DateConcat (Function) DateSplit (Function) GetDayOfWeek (Function) TODConcat (Function) TODSplit (Function)
DTConcat (FUN) ¶ FUNCTION DTConcat : DATE_AND_TIME The function converts year, month, hour, minute and second to the IEC 6-1131-3 format DATE_AND_TIME . In case of invalid inputs DT#1970-01-01-00:00 will be returned. InOut: Scope Name Type Comment Return DTConcat DT Input uiYear UINT 1970 .. 2099 uiMonth UINT 1 .. 12 uiDay UINT 1 .. 31 uiHour UINT 0 .. 23 uiMinute UINT 0 .. 59 uiSecond UINT 0 .. 59 peError POINTER TO ERROR
DTSplit (FUN) ¶ FUNCTION DTSplit : ERROR The function provides year, month, hour, minute and second from the IEC 6-1131-3 format DATE_AND_TIME . InOut: Scope Name Type Comment Return DTSplit ERROR Input dtDateAndTime DT puiYear POINTER TO UINT 1970 .. 2099 puiMonth POINTER TO UINT 1 .. 12 puiDay POINTER TO UINT 1 .. 31 puiHour POINTER TO UINT 0 .. 23 puiMinute POINTER TO UINT 0 .. 59 puiSecond POINTER TO UINT 0 .. 59
DateConcat (FUN) ¶ FUNCTION DateConcat : DATE This function converts year, month and day to the IEC 6-1131-3 format DATE . In case of invalid entries D#1970-01-01 will be returned. InOut: Scope Name Type Comment Return DateConcat DATE Input uiYear UINT 1970 .. 2099 uiMonth UINT 1 .. 12 uiDay UINT 1 .. 31 peError POINTER TO ERROR
DateSplit (FUN) ¶ FUNCTION DateSplit : ERROR This function provides year, month and day from the IEC 6-1131-3 format DATE . InOut: Scope Name Type Comment Return DateSplit ERROR Input datDate DATE puiYear POINTER TO UINT 1970 .. 2099 puiMonth POINTER TO UINT 1 .. 12 puiDay POINTER TO UINT 1 .. 31
GetDayOfWeek (FUN) ¶ FUNCTION GetDayOfWeek : RTCLK.WEEKDAY This function determines the day of the week of a specified date. InOut: Scope Name Type Return GetDayOfWeek RTCLK.WEEKDAY Input dtDate DATE peError POINTER TO ERROR
TODConcat (FUN) ¶ FUNCTION TODConcat : TIME_OF_DAY This function converts hour, minute and second to the IEC 6-1131-3 format TIME_OF_DAY . In case of invalid inputs TOD#00:00 will be returned. InOut: Scope Name Type Comment Return TODConcat TOD Input uiHour UINT 0..23 uiMinute UINT 0..59 uiSecond UINT 0..59 uiMillisecond UINT 0..999 peError POINTER TO ERROR
TODSplit (FUN) ¶ FUNCTION TODSplit : ERROR The function block provides hour, minute and second from the IEC 6-1131-3 format TIME_OF_DAY . InOut: Scope Name Type Comment Return TODSplit ERROR Input todTime TOD puiHour POINTER TO UINT 0..23 puiMinute POINTER TO UINT 0..59 puiSecond POINTER TO UINT 0..59 puiMillisecond POINTER TO UINT 0..999
Global Constants ¶ The global constant DTU_gc_tziTimeZoneCET defines the time zone as well as the switch between summer and standard time of the Central European EU countries. The switch is done according to the following rules: The switch to summer time (CEST) takes place on the last Sunday of March. The clock is set ahead by one hour at 2:00 a.m.. The switch to standard time (CET) takes place on the last Sunday of October. The clock is set back by one hour at 3:00 a.m.. GlobalConstants (GVL)