
29
ifm
Programming Manual (supplement) CAN module RTC CR3020
2017-10-26
ifm function elements
ifm functional elements, POUs (Classic)
>
3.3.3
RTC_SET
21907
Unit type = function block (FB)
Unit is contained in the library
ifm_RTC_Classicx_V01yyzz.LIB
(x = 1...n = number of the CAN interface (depending on the device,
→ data sheet))
Symbol in CODESYS:
>
Description
21901
With RTC_SET, a new time, date and day of the week of the real-time clock (RTC) can be set.
The function block creates a matrix from the input parameters consisting of the following data:
calendar day, month, year, hour, minute and day of the week
The controller sends this matrix along with the identifier (0x300 + Node-ID) to the real-time clock.
The real-time clock responds to this with the identifier (0x280 + node ID).
At the same time, the real-time clock sets the seconds counter internally to zero.
The output parameter RESULT informs about the current operating status of the POU.
>
Parameters of the inputs
21911
Parameter
Data type
Description
INIT
BOOL
TRUE (only for 1 cycle):
Function block is initialised
FALSE:
during further processing of the program
SET
BOOL
TRUE:
execute this function element
Set parameters
FALSE:
unit is not executed
NODE_ID
BYTE
Node number of the addressed CAN participant
DAY
BYTE
Calendar day of the date (1...31)
MONTH
BYTE
Month of the date (1...12)
YEAR
BYTE
Year of the date (0...99)
HOUR
BYTE
Hour of the clock time (0...23)
MINUTE
BYTE
Minute of the clock time (0..59)
DOW
BYTE
Weekday of the date (0...6)
0 = first day of the week (e.g. Monday)
6 = last day of the week (e.g. Sunday)