CAA Real Time Clock Extern Library Documentation ¶ Company CAA Technical Workgroup Title CAA Real Time Clock Extern Version 3.5.10.0 Categories Intern|CAA|System Namespace RTCLK Author 3S - Smart Software Solutions GmbH Placeholder CAA RTCLK Description 1 ¶ Vendor specific library for real time clock access. Contents: ¶ CAA Real Time Clock Enums Function Blocks Functions GlobalConstants Structs GetSupplierVersion (Function) VersionConstants (GVL) Indices and tables ¶ 1 Based on CAA_RealTimeClock_Extern.library, last modified 01.01.1601, 00:53:00. LibDoc 4.4.0.0-b.27 The content file CAA_RealTimeClock_Extern.clean.json was generated with CODESYS V3.5 SP10 Patch 2 on 17.05.2017, 14:27:42.
CAA Real Time Clock ¶ Enums ERROR (Enum) PERIODE (Enum) WEEKDAY (Enum) Function Blocks Time Zone Information GetTimeZoneInformation (FunctionBlock) SetTimeZoneInformation (FunctionBlock) Time and Date GetDateAndTime (FunctionBlock) SetDateAndTime (FunctionBlock) Functions GetProperty (Function) GlobalConstants PropertyConstants (GVL) Structs PERIODE_INFO (Alias) RTCLK_GETDATEANDTIME_PARAMS (Struct) RTCLK_GETTIMEZONEINFORMATION_PARAMS (Struct) RTCLK_PERIODE_INFO (Struct) RTCLK_SETDATEANDTIME_PARAMS (Struct) RTCLK_SETTIMEZONEINFORMATION_PARAMS (Struct) RTCLK_SYSTEMTIME (Struct) RTCLK_TIME_ZONE_INFO (Struct) SYSTEMTIME (Alias) TIME_ZONE_INFO (Alias)
Enums ¶ ERROR (Enum) PERIODE (Enum) WEEKDAY (Enum)
ERROR (ENUM) ¶ TYPE ERROR : This data structure describes errors which might occur when using the functions of the CAA_RealTimeClock library. Attributes: qualified_only InOut: Name Initial Comment NO_ERROR 0 No Error; function successfully executed FIRST_ERROR 5700 First library-specific error TIME_OUT 5701 Time limit exceeded NOT_AVAILABLE 5702 Not available TIME_NOT_VALID 5703 Invalid time values WRONG_PARAMETER 5704 Wrong parameter ERROR_UNKNOWN 5705 Unknown error NOT_IMPLEMENTED 5706 FIRST_MF 5725 First manufacturer-specific error LAST_ERROR 5749 Last library-specific error
PERIODE (ENUM) ¶ TYPE PERIODE : Attributes: qualified_only InOut: Name Initial UNKNOWN 0 STANDARD 1 DAYLIGHT 2
WEEKDAY (ENUM) ¶ TYPE WEEKDAY : Attributes: qualified_only InOut: Name Initial SUNDAY 0 MONDAY 1 TUESDAY 2 WEDNESDAY 3 THURSDAY 4 FRIDAY 5 SATURDAY 6
Function Blocks ¶ Time Zone Information GetTimeZoneInformation (FunctionBlock) SetTimeZoneInformation (FunctionBlock) Time and Date GetDateAndTime (FunctionBlock) SetDateAndTime (FunctionBlock)
Time Zone Information ¶ The World is divided in time zones which are based on the degrees of longitude. The English town Greenwich is situated in their centre on the so-called prime meridian that defines the starting point for the count of the world’s degrees of longitude. By taking a closer look at a globe, one can distinguish the degrees of longitude and latitude which clasp the world like a grid. The degrees of longitude go from north to south and connect the two poles. The time being measured in the observatory in Greenwich is called GMT which is the abbreviation for Greenwich Mean Time . The GMT serves as a basis for calculating the respecting times in all countries of the world. However nowadays the term GMT is not used any more as it has been replaced by the expression Universal Time Coordinated (UTC). [CC BY-SA 4.0 ( Wikimedia Commons )] GetTimeZoneInformation (FunctionBlock) SetTimeZoneInformation (FunctionBlock)
GetTimeZoneInformation (FB) ¶ FUNCTION_BLOCK GetTimeZoneInformation This function block reads the specific information on the time zone. InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Action start Falling edge: Resets outputs. If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle. Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL TRUE : error occurred, function block aborts action FALSE : no error eError ERROR Error description for diagnosis tziInfo RTCLK_TIME_ZONE_INFO Information on the time zone
SetTimeZoneInformation (FB) ¶ FUNCTION_BLOCK SetTimeZoneInformation With this function block the specific information of the time zone can be modified. The time zone setting will be kept even after a Reset-Origin of the controller and can only be modified by being overwritten again. If no automatic switch is desired, all elements of tziInfo.stStandardDate and tziInfo.stDaylightDate must be set to 0. InOut: Scope Name Type Comment Input xExecute BOOL Rising edge: Action start Falling edge: Resets outputs. If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle. tziInfo RTCLK_TIME_ZONE_INFO Information on the time zone Output xDone BOOL Action successfully completed xBusy BOOL Function block active xError BOOL TRUE : error occurred, function block aborts action FALSE : no error eError ERROR Error description for diagnosis