TimerSwitch (FB)¶
FUNCTION_BLOCK PUBLIC FINAL TimerSwitch EXTENDS _LConC IMPLEMENTS ITimeSwitch, IDateTimeProvider
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xEnableBOOLTRUE: Activates the defined operationFALSE: Aborts/resets the defined operation_LConC
Output
xBusyBOOLTRUE: Operation is running_LConC
xErrorBOOLTRUE: Error condition reached_LConC
Input Const
itfDateTimeProviderGlobals.g_dtpDateTimeProvider
Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000
tCompensationSpeedTIMECompensation speed [ms/h] for the transition from one time zone period to another.e.g. t#5000ms => 30d <= 1/(30 × 24) × 60 × 60 × 1000e.g. t#150000ms => 24h <= 1/24 × 60 × 60 × 1000Input
aslSchedulePOINTER TO Schedule
Switching Schedule
tzTimeZoneREFERENCE TO TimeZone
Current time zone (Optional - Default: |gc_tzTimeZoneCET|)
Output
eErrorIDliClockDiffLINTAfter switching the time zone, a continuously decreasing difference between the current local time and the current time within the TimeSwitch is displayed.
eWeekDayCurrent day of the week
datTodayDATECurrent date
todNowTODCurrent time of the day
sTimeZoneName of the current time zone
ePeriodCurrent period of the time zone
dwSwitchesDWORDStatus of the 32 switches. Bit 0 => switch 1, …
Methods:
Structure: