TimeRead
TimeRead (FB)
TimeRead (FB)FUNCTION_BLOCK TimeRead
Short description
Read the current date and current time. Variant 1: Read as since start | Warning - place only one TimeRead block per project. Also only one variant!
Representation

Interfaces
Inputs
Name
Data type
Value range
Initial value
Function
xEN
BOOL
Enable / disable time reading
Outputs
Name
Data type
Value range
Initial value
Function
datDateAndTime
DATE_AND_TIME
Current date and current time
todTime
DATE
Current time
dtDate
DATE
Current date
Setpoints / Parameters
Name
Data type
Value range
Initial value
Function
stTimeZoneInformation
DTU.RTCLK.TIME_ZONE_INfO
DTU.gc_tziTimeZoneCET;
Time zone (Default: CET)
Function description
General
This function block is used to read the current date and current time. The time zone setting is done via the data type TIME_ZONE_INFO.
CODESYS
InOut:
Scope
Name
Type
Output
datDateAndTime
DT
Output
todTime
TOD
Output
dtDate
DATE
Output
xIsLeapYear
BOOL
Last updated

