CLOCK (FB)

FUNCTION_BLOCK CLOCK

This function block allows to set and display the current time and date. For compatibility reason the block will look and behave like the V2 function block

InOut:

Scope

Name

Type

Initial

Comment

Input

EN

BOOL

FALSE

Enable block processing

SET

BOOL

FALSE

FALSE/TRUE edge sets the time and date

HOUR_SET

BYTE

0

Set input for hours

MIN_SET

BYTE

0

Set input for minutes

SEC_SET

BYTE

0

Set input for seconds

YEAR_SET

WORD

0

Set input for years

MON_SET

BYTE

0

Set input for months

DAY_SET

BYTE

0

Set input for days

Output

ERR

BOOL

FALSE

Error identifier

HOUR_ACT

BYTE

0

Output hours

MIN_ACT

BYTE

0

Output minutes

SEC_ACT

BYTE

0

Output seconds

YEAR_ACT

WORD

1970

Output years

MON_ACT

BYTE

1

Output months

DAY_ACT

BYTE

1

Output days

W_DAY_ACT

BYTE

4

Output weekday no.