PmRealtimeClock (FB)

FUNCTION_BLOCK PmRealtimeClock EXTENDS AbbLConCA

This function block allows to set and display the current time and date.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConCA

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConCA

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLConCA

Input

Set

BOOL

FALSE

FALSE/TRUE edge sets the time and date

HourSet

BYTE

0

Set input for hours

MinSet

BYTE

0

Set input for minutes

SecSet

BYTE

0

Set input for seconds

YearSet

WORD

0

Set input for years

MonSet

BYTE

0

Set input for months

DaySet

BYTE

0

Set input for days

Output

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code describing error condition

HourAct

BYTE

0

Output hours

MinAct

BYTE

0

Output minutes

SecAct

BYTE

0

Output seconds

YearAct

WORD

1970

Output years

MonAct

BYTE

1

Output months

DayAct

BYTE

1

Output days

WDayAct

BYTE

4

Output weekday no.