
26
ifm
Programming Manual (supplement) CAN module RTC CR3020
2017-10-26
ifm function elements
ifm functional elements, POUs (Classic)
>
3.3.1
CONCAT_DATE_TIME
21834
Unit type = function block (FB)
Unit is contained in the library
ifm_RTC_Basic_V01yyzz.LIB
,
ifm_RTC_Classicx_V01yyzz.LIB
(x = 1...n = number of the CAN interface (depending on the device,
→ data sheet))
Symbol in CODESYS:
>
Description
21837
The CONCAT_DATE_TIME function block converts the received data that describes the time and the
date from bytes into coherent strings.
► Transfer the current bytes as input parameters to the POU.
>
The POU provides the values as follows:
• The date as a distinct character string (e.g.: '13.06.2016)
• The time as a distinct character string (e.g.: 14:48:20)
• Date and time in DT format (e.g.: 'DT#2016-06-13-14:48:20).
>
Parameters of the inputs
21838
Parameter
Data type
Description
CurrentDay
BYTE
current calendar entry (as part of the date)
Example for 13 June 2016: CurrentDay = 13
CurrentMonth
BYTE
current month (as part of the date)
Example for 13 June 2016: CurrentMonth = 6
CurrentYear
BYTE
current year (as part of the date)
Example for 13 June 2016: CurrentYear = 16
CurrentHour
BYTE
current hour (as part of the time)
Example for 14:48:20: CurrentHour = 14
CurrentMinute
BYTE
current minute (as part of the time)
Example for 14:48:20: CurrentMinute = 48
>
Parameters of the outputs
21842
Parameter
Data type
Description
CurrentDate
STRING(10)
current date
Example for 13 June 2016: CurrentDate = '13.06.2016'
CurrentTime
STRING(8)
current time
Example for 14:48:20: CurrentTime = '14:48:20'
CurrentDT
STRING(22)
current date + time in DT format
Example for 13 June 2016 14:48:20:
CurrentDT = 'DT#2016-06-13-14:48:20'