IS_MULTICAST_GROUP (FUN) ¶ FUNCTION IS_MULTICAST_GROUP : BOOL Checks if this address is a multicast address InOut: Scope Name Type Return IS_MULTICAST_GROUP BOOL Input udiIPAddress UDINT
UDINT_TO_HEX (FUN) ¶ FUNCTION UDINT_TO_HEX : STRING(8) InOut: Scope Name Type Return UDINT_TO_HEX STRING(8) Input value UDINT
IDateTimeProvider (ITF) ¶ INTERFACE PUBLIC IDateTimeProvider EXTENDS __SYSTEM.IQueryInterface Provides access to the underlying system to get the current date and (UTC) time using the GetDateTime method. See: DateTimeProvider as a default implementation Methods: GetDateTime Structure: GetDateTime (Method)
IDateTimeProvider.GetDateTime (METH) ¶ METHOD GetDateTime : ULINT InOut: Scope Name Type Comment Return GetDateTime ULINT date and (UTC) time in milliseconds since 1.1.1970 00:00:00.000 Output eErrorID ERROR
Structs ¶ DateTime (Struct) Schedule (Struct) Segment (Struct) TimeZone (Struct)
DateTime (STRUCT) ¶ TYPE DateTime : STRUCT Two formats are supported: Absolute format: defines an exact time. “uiYear”, “uiMonth”, “uiDay”, “uiHour”, “uiMinute” and “uiSecond” define the exact time. “uiWeekday” is of no importance. Day of the month format: is selected by setting ”uiYear” to 0. „uiWeekday“ defines a weekday and “uiDay” specifies the day of the month in a value range of 1..5. This notation makes it possible to define the first Sunday in April as well as the last Thursday in October (“uiDay” = 1 corresponds to the first weekday in a month, “uiDay” = 5 corresponds to the last weekday in a month) Note The following applies for the summer time in Europe: The switch to summer time is done on the last Sunday in March. At 2:00 a.m. the clock is set ahead by one hour. The following applies for the winter time (standard time) in Europe: The switch to winter time is done on the last Sunday in October. At 3:00 a.m. the clock is set back by one hour. InOut: Name Type Comment uiYear YEAR uiMonth MONTH uiDay DAY If Year = 0, then 1..5 1 => first day in this month, 5 => last day in this month uiHour HOUR uiMinute MINUTE uiSecond SECOND uiMilliseconds MILLISECOND eWeekday WEEKDAY
Schedule (STRUCT) ¶ TYPE Schedule : STRUCT InOut: Name Type Comment usiSwitch USINT Number of the output; Several time periods for each output are possible. [1..32] todFirstOn TOD First time from which the switch is to be switched on todLastOn TOD Last time until which the switch is to be switched on byDayFlags DAYS The day(s) in a week this switch is active
Segment (STRUCT) ¶ TYPE Segment : STRUCT InOut: Name Type sName TZ_NAME dtDate DateTime iBias INT
TimeZone (STRUCT) ¶ TYPE TimeZone : STRUCT To handle the local TIME, it is neccecary to always specify the time and date and the time zone that is currently valid. This makes it possible to convert the local time to C oordinated U niversal T ime and vice versa. UTC is Coordinated Universal Time. It is a successor to, but distinct from, Greenwich Mean Time (GMT) and the various definitions of Universal Time. UTC is now the worldwide standard for regulating clocks and time measurement. All other timezones are defined relative to UTC, and include offsets like UTC+0800 - hours to add or subtract from UTC to derive the local time. No daylight saving time occurs in UTC, making it a useful timezone to perform date arithmetic without worrying about the confusion and ambiguities caused by daylight saving time transitions, your country changing its timezone, or mobile computers that roam through multiple timezones. The following snippet exposes the definition of UTC and C entral E urope T ime/ C entral E urope S ommer T ime. VAR_GLOBAL CONSTANT /// Coordinated Universal Time gc_tzTimeZoneUTC : TimeZone := ( asgPeriod := [(sName:='UTC')] ); /// Central Europe Time gc_tzTimeZoneCET : TimeZone := ( iBias := 60 (* T#1M => minutes *) , asgPeriod := [ ( (* (CEST -> CET) - Last Sunday in Oktober at 03:00:00.000 (CEST) *) sName:='CET', dtDate := (uiMonth := 10, eWeekday := WEEKDAY.SUNDAY, uiDay := 5, uiHour := 3) ),( (* (CET -> CEST) - Last Sunday in March at 02:00:00.000 (CET) *) sName := 'CEST', dtDate := (uiMonth := 3, eWeekday := WEEKDAY.SUNDAY, uiDay := 5, uiHour := 2), iBias := 60 (* T#1M => minutes *) )] ); END_VAR Note The Bias element represents the offset from the Coordinated Universal Time (UTC). This value is in minutes. The offset growing positive in eastern direction starting from the prime meridian. The offset is growing negative in western direction starting from the prime meridian. With the data structure TimeZone it is possible to specify every timezone of the world and so the functions can handle the local time conversion and the switching from standard to day light saving period’s if necessary. Example With the following expressions the difference between the UTC time zone and an other timezone instance can be calculated. iBiasUTC_Standard := gc_tzTimeZoneCET.iBias ; iBiasUTC_Daylight := gc_tzTimeZoneCET.iBias + gc_tzTimeZoneCET.asgPeriod [PERIOD.DAYLIGHT] . iBias ; Note The time zone which the current computer is configured for, is not always the time zone suitable for displaying the current time. Therefore in the respective application, the possibility should be provided, to be able to select the “correct” time zone that is suitable for the related output option (WebVisu, LogFiles, Email, …). InOut: Name Type Comment iBias INT Offset in minutes (local time = UTC + iBias) asgPeriod ARRAY [1..2] OF Segment 1 = PERIOD.STANDARD , 2 = PERIOD.DAYLIGHT
File and Project Information ¶ Scope Name Type Content FileHeader creationDateTime date 13.12.2023, 11:06:15 companyName string 3S-Smart Software Solutions GmbH libraryFile VisuCommandInterface.library primaryProject True productName CODESYS productProfile CODESYS V3.5 SP16 Patch 3 contentFile VisuCommandInterface.clean.json version version 2.0.0.0 ProjectInformation Released bool True LastModificationDateTime date 13.12.2023, 11:06:14 LibraryCategories library-category-list Intern|Visu Author string CODESYS Development GmbH Company System CompiledLibraryCompatibilityVersion CODESYS V3.5 SP15 Description See: Description Placeholder VisuCommandInterface Project VisuCommandInterface Title VisuCommandInterface Version version 4.5.0.0