
17
ifm
Programming Manual (supplement) CAN module RTC CR3020
2017-10-26
ifm function elements
ifm functional elements, POUs (Basic)
>
3.2.3
RTC_SET
21898
Unit type = function block (FB)
Unit is contained in the library
ifm_RTC_Basic_V01yyzz.LIB
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
21902
Parameter
Data type
Description
SET
BOOL
TRUE:
execute this function element
Set parameters
FALSE:
unit is not executed
CHANNEL
BYTE
CAN interface (1...n) depending on the device
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)