![background image](http://html1.mh-extra.com/html/ifm/cr3020/cr3020_supplement-manual_3902019021.webp)
21
ifm
Programming Manual (supplement) CAN module RTC CR3020
2017-10-26
ifm function elements
ifm functional elements, POUs (Basic)
>
3.2.5
RTC_SET_ALARM
21913
Unit type = function block (FB)
Unit is contained in the library
ifm_RTC_Basic_V01yyzz.LIB
Symbol in CODESYS:
>
Description
21915
RTC_SET_ALARM configures the delay time after whose expiry the real-time clock (RTC) sets the
alarm output.
The maximum time before expiry can be 7 days, 23 hours and 59 minutes.
With this POU, a new node ID can additionally be assigned to the real-time clock.
Assign a new node ID to the real-time clock?
► Enter the previous node ID of the real-time clock in NODE_ID.
Enter the new node ID in NEW_NODE_ID (max. 0x3F).
► After execution of the POU, interrupt the power supply of the real-time clock once.
>
The real-time clock adopts the new node ID when it is switched on again.
The function block creates a matrix from the input parameters consisting of the following data:
• delay time in days, hours and minutes
• optionally one new node ID
The controller sends this matrix with the identifier (0x500 + node ID) to the real-time clock.
The real-time clock responds to this with the identifier (0x480 + node ID).
The output parameter RESULT informs about the current operating status of the POU.
When the alarm date is reached:
>
The real-time clock sets the alarm output.
>
10 seconds after the start of the alarm output, the real-time clock automatically resets the alarm
output.
► If the alarm is to be reset earlier:
set the delay time for the setting of the alarm output to zero with this function block.