TimerSwitch (FB)

 

FUNCTION_BLOCK PUBLIC FINAL TimerSwitch EXTENDS CBML.LConC IMPLEMENTS ITimeSwitch, IDateTimeProvider

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

xEnable

BOOL

TRUE: Activates the defined operation FALSE: Aborts/resets the defined operation

LConC

Output

xBusy

BOOL

TRUE: Operation is running

LConC

xError

BOOL

TRUE: Error condition reached

LConC

Input

itfDateTimeProvider

IDateTimeProvider

Globals.g_dtpDateTimeProvider

Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000

tCompensationSpeed

TIME

Compensation speed [ms/h] for the transition from one time zone period to another.

aslSchedule

POINTER TO Schedule

Switching Schedule

tzTimeZone

REFERENCE TO TimeZone

Current time zone (Optional - Default: gc_tzTimeZoneCET)

Output

eErrorID

ERROR

liClockDiff

LINT

After switching the time zone, a continuously decreasing difference between the current local time and the current time within the TimeSwitch is displayed.

eWeekDay

WEEKDAY

Current day of the week

datToday

DATE

Current date

todNow

TOD

Current time of the day

sTimeZone

TZ_NAME

Name of the current time zone

ePeriod

PERIOD

Current period of the time zone

dwSwitches

DWORD

Status of the 32 switches. Bit 0 => switch 1, ...