
16
ifm
Programming Manual (supplement) CAN module RTC CR3020
2017-10-26
ifm function elements
ifm functional elements, POUs (Basic)
>
3.2.2
RTC_INITIALIZE
21847
Unit type = function block (FB)
Unit is contained in the library
ifm_RTC_Basic_V01yyzz.LIB
Symbol in CODESYS:
>
Description
21849
22111
This must be the first communication with the real-time clock!
RTC_INITIALIZE initialises the connection between the controller and the real-time clock.
Without this POU, no connection between the controller and the real-time clock is established.
With the COB-ID 0x7FFT, the controller sends an empty message (without data) to the bus until the
real-time clock responds.
The real-time clock recognises the CAN baud rate and responds under the COB-ID 0x7FE with its
node ID.
The controller defines the received node ID as output parameter CURRENT_ID.
The output parameter RESULT informs about the current operating status of the POU.
>
Parameters of the inputs
21850
Parameter
Data type
Description
INIT
BOOL
TRUE (only for 1 cycle):
Function block is initialised
FALSE:
during further processing of the program
CHANNEL
BYTE
CAN interface (1...n) depending on the device
>
Parameters of the outputs
22114
Parameter
Data type
Description
CURRENT_ID
BYTE
Node ID in the real-time clock
RESULT
BYTE
feedback of the function block
(possible messages → following table)
Possible results for RESULT:
Value
dec | hex
Description
0
00
FB is inactive
1
01
FB execution completed without error
– data is valid
5
05
FB is active
– no data received yet
9
09
CAN is not active
241
F1
Error: Response does not correspond to the request
(Response
Request)
242
F2
Error: setting is not possible