IFM CR3020 Supplement Manual

IFM CR3020 Supplement Manual

Can module real time clock

Advertisement

Quick Links

dh
Original Programming Manual (Supplement)
CAN Module Real Time Clock (RTC)
CR3020
V02
®
CODESYS
> V2.3.9.33
English
1

Advertisement

Table of Contents
loading

Summary of Contents for IFM CR3020

  • Page 1 Original Programming Manual (Supplement) CAN Module Real Time Clock (RTC) CR3020 ® CODESYS > V2.3.9.33 English...
  • Page 2: Table Of Contents

    CONCAT_DATE_TIME ......................26 3.3.2 RTC_INITIALIZE ........................27 3.3.3 RTC_SET ........................... 29 3.3.4 RTC_REQUEST ......................... 31 3.3.5 RTC_SET_ALARM ........................33 3.3.6 RTC_REQUEST_ALARM ......................35 Glossary of Terms Index Notizen • Notes • Notes ifm weltweit • ifm worldwide • ifm à l’échelle internationale...
  • Page 3: About This Manual

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 About this manual Copyright About this manual Copyright ............................... 3 What do the symbols and formats mean? ..................... 4 How is this documentation structured? ....................5 > Copyright 6088 © All rights reserved by ifm electronic gmbh.
  • Page 4: What Do The Symbols And Formats Mean

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 About this manual What do the symbols and formats mean? > What do the symbols and formats mean? The following symbols or pictograms illustrate the notes in our instructions: WARNING Death or serious irreversible injuries may result.
  • Page 5: How Is This Documentation Structured

     Abbreviations and technical terms → Appendix. In case of malfunctions or uncertainties please contact the manufacturer at: ifm weltweit • ifm worldwide • ifm à l’échelle internationale Contact → (→ p. 55) We want to become even better! Each separate section has an identification number in the top right corner.
  • Page 6: System Description

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Information about the device System description Information about the device ......................... 6 Overview of functions ..........................6 Hardware description..........................7 Interface description ..........................8 Software description ..........................9 > Information about the device...
  • Page 7: Hardware Description

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Hardware description > Hardware description 21800 The CR3020 module is a real-time clock (RTC) for CAN systems. Housing  Automotive relay housing Connections  CAN Layer 2  Voltage supply ...
  • Page 8: Interface Description

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Interface description > Interface description CAN interfaces ............................8 14098 > 2.4.1 CAN interfaces CAN: Interfaces and protocols ......................8 14101 Connections and data → data sheet > CAN: Interfaces and protocols...
  • Page 9: Software Description

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Software description > Software description CAN messages via COB-ID and node ID....................9 21807 ► The CODESYS libraries of version 2 are absolutely required. > 2.5.1 CAN messages via COB-ID and node ID Initialise real-time clock (RTC) ......................
  • Page 10 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Software description > Define time and date 21812 RTC_SET Set the real-time clock to the current time and the current date: Message to the real-time clock: COB ID Message Notes...
  • Page 11 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 System description Software description > Define alarm date 21813 RTC_SET_ALARM Define the date on which the alarm output of the real-time clock (RTC) is to be set: (max. target time till the alarm: 7 days, 23 hours, 59 minutes)
  • Page 12: Ifm Function Elements

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm libraries for the device CRnnnn ifm function elements ifm libraries for the device CRnnnn ..................... 12 ifm functional elements, POUs (Basic) ....................14 ifm functional elements, POUs (Classic) ..................... 25 13586 All CODESYS function elements (FBs, PRGs, FUNs) are stored in libraries.
  • Page 13: Library Ifm_Rtc_Classicx_V02Yyzz.lib

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm libraries for the device CRnnnn > 3.1.2 Library ifm_RTC_Classicx_V02yyzz.LIB 21828 x = 1...4 = number of the CAN interface (depending on the device, → data sheet) Only ONE real-time clock may be installed in each project!
  • Page 14: Ifm Functional Elements, Pous (Basic)

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > ifm functional elements, POUs (Basic) CONCAT_DATE_TIME ........................14 RTC_INITIALIZE ..........................16 RTC_SET ............................17 RTC_REQUEST ..........................19 RTC_SET_ALARM ..........................21 RTC_REQUEST_ALARM ........................23...
  • Page 15: Concat_Date_Time

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) 3.2.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: >...
  • Page 16: Rtc_Initialize

    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.
  • Page 17: Rtc_Set

    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.
  • Page 18 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > Parameters of the outputs 21904 Description Data type Parameter RESULT BYTE feedback of the function block (possible messages → following table) Possible results for RESULT:...
  • Page 19: Rtc_Request

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > 3.2.4 RTC_REQUEST 21861 Unit type = function block (FB) Unit is contained in the library ifm_RTC_Basic_V01yyzz.LIB Symbol in CODESYS: > Description 21864 RTC_REQUEST enables to request the current time, date and day of the week of the real-time clock (RTC).
  • Page 20 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > Parameters of the outputs 21868 Description Data type Parameter BYTE Calendar day of the date (1...31) MONTH BYTE Month of the date (1...12)
  • Page 21: Rtc_Set_Alarm

    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.
  • Page 22 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > Parameters of the inputs 21917 Description Data type Parameter BOOL TRUE: execute this function element Set parameters FALSE: unit is not executed CHANNEL BYTE CAN interface (1...n) depending on the device...
  • Page 23: Rtc_Request_Alarm

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > 3.2.6 RTC_REQUEST_ALARM 21883 Unit type = function block (FB) Unit is contained in the library ifm_RTC_Basic_V01yyzz.LIB Symbol in CODESYS: > Description 21886 RTC_REQUEST_ALARM requests the real-time clock (RTC) for the following current values: •...
  • Page 24 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Basic) > Parameters of the outputs 21887 Description Data type Parameter REMAINING_DAYS BYTE remaining days till the real-time clock sets the alarm output REMAINING_HOURS BYTE...
  • Page 25: Ifm Functional Elements, Pous (Classic)

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > ifm functional elements, POUs (Classic) CONCAT_DATE_TIME ........................26 RTC_INITIALIZE ..........................27 RTC_SET ............................29 RTC_REQUEST ..........................31 RTC_SET_ALARM ..........................33 RTC_REQUEST_ALARM ........................35...
  • Page 26: Concat_Date_Time

    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: >...
  • Page 27: Rtc_Initialize

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > 3.3.2 RTC_INITIALIZE 21855 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: >...
  • Page 28 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > Parameters of the outputs 21851 Description Data type Parameter INIT2 BOOL TRUE:Initialise sequential POUs FALSE: during further processing of the program CURRENT_ID BYTE...
  • Page 29: Rtc_Set

    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: >...
  • Page 30 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > Parameters of the outputs 21904 Description Data type Parameter RESULT BYTE feedback of the function block (possible messages → following table) Possible results for RESULT:...
  • Page 31: Rtc_Request

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > 3.3.4 RTC_REQUEST 21878 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: >...
  • Page 32 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > Parameters of the outputs 21868 Description Data type Parameter BYTE Calendar day of the date (1...31) MONTH BYTE Month of the date (1...12)
  • Page 33: Rtc_Set_Alarm

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > 3.3.5 RTC_SET_ALARM 21923 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: >...
  • Page 34 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > Parameters of the inputs 21927 Description Data type Parameter INIT BOOL TRUE (only for 1 cycle): Function block is initialised FALSE: during further processing of the program...
  • Page 35: Rtc_Request_Alarm

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > 3.3.6 RTC_REQUEST_ALARM 21893 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: >...
  • Page 36 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 ifm function elements ifm functional elements, POUs (Classic) > Parameters of the outputs 21887 Description Data type Parameter REMAINING_DAYS BYTE remaining days till the real-time clock sets the alarm output REMAINING_HOURS BYTE...
  • Page 37: Glossary Of Terms

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms Glossary of Terms Address This is the "name" of the bus participant. All participants need a unique address so that the signals can be exchanged without problem. > Application software...
  • Page 38 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > CiA = CAN in Automation e.V. User and manufacturer organisation in Germany / Erlangen. Definition and control body for CAN and CAN-based network protocols. Homepage → www.can-cia.orgf >...
  • Page 39 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > CODESYS is a registered trademark of 3S – Smart Software Solutions GmbH, Germany. ® CODESYS 'CODESYS for Automation Alliance' associates companies of the automation industry whose hardware ®...
  • Page 40 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > Diagnosis During the diagnosis, the "state of health" of the device is checked. It is to be found out if and what →faults are given in the device.
  • Page 41 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > Embedded software System software, basic program in the device, virtually the →runtime system. The firmware establishes the connection between the hardware of the device and the application program. The firmware is provided by the manufacturer of the controller as a part of the system and cannot be changed by the user.
  • Page 42 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms Disadvantages of flash memories  A storage cell can tolerate a limited number of write and delete processes: • Multi-level cells: typ. 10 000 cycles • Single level cells: typ. 100 000 cycles ...
  • Page 43 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > Intended use Use of a product in accordance with the information provided in the instructions for use. > IP address IP = Internet Protocol. The IP address is a number which is necessary to clearly identify an internet participant. For the sake of clarity the number is written in 4 decimal values, e.g.
  • Page 44 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > MAC-ID MAC = Manufacturer‘s Address Code = manufacturer's serial number. →ID = Identifier Every network card has a MAC address, a clearly defined worldwide unique numerical code, more or less a kind of serial number.
  • Page 45 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > Obj / object Term for data / messages which can be exchanged in the CANopen network. > Object directory Contains all CANopen communication parameters of a device as well as device-specific parameters and data.
  • Page 46 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > PDU = Protocol Data Unit = protocol data unit. The PDU is a term from the →CAN protocol →SAE J1939. It refers to a component of the target address (PDU format 1, connection-oriented) or the group extension (PDU format 2, message- oriented).
  • Page 47 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > PWM = pulse width modulation The PWM output signal is a pulsed signal between GND and supply voltage. Within a defined period (PWM frequency) the mark-to-space ratio is varied. Depending on the mark-to- space ratio, the connected load determines the corresponding RMS current.
  • Page 48 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > SAE J1939 The network protocol SAE J1939 describes the communication on a →CAN bus in commercial vehicles for transmission of diagnosis data (e.g.engine speed, temperature) and control information.
  • Page 49 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Glossary of Terms > System variable Variable to which access can be made via IEC address or symbol name from the PLC. > Target The target contains the hardware description of the target device for CODESYS, e.g.: inputs and outputs, memory, file locations.
  • Page 50: Index

    CAN ....................... 37 ifm libraries for the device CRnnnn ............12 Interfaces and protocols .................. 8 ifm weltweit • ifm worldwide • ifm à l’échelle internationale ....55 CAN interfaces ..................8 Information about the device ..............6 CAN messages via COB-ID and node ID ..........9 Initialise real-time clock (RTC)..............
  • Page 51 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Index Parameters of the inputs ..15, 16, 17, 19, 22, 23, 26, 27, 29, 31, 34, 35 SAE J1939 ..................... 48 Parameters of the outputs .. 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36 SD card ....................
  • Page 52: Notizen • Notes • Notes

    Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Notizen • Notes • Notes ifm functional elements, POUs (Classic) Notizen • Notes • Notes...
  • Page 53 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Notizen • Notes • Notes ifm functional elements, POUs (Classic)
  • Page 54 Programming Manual (supplement) CAN module RTC CR3020 2017-10-26 Notizen • Notes • Notes ifm functional elements, POUs (Classic)
  • Page 55: Ifm Weltweit • Ifm Worldwide • Ifm À L'échelle Internationale

    Pte. Ltd • 47100 Puchong Selangor • Tel. +603 8063 9522 ifm efector S. de R. L. de C. V. • Monterrey, N. L. 64630 • Tel. +52 81 8040-3535 Sivilingeniør J. F. Knudtzen A/S • 1396 Billingstad • Tel. +47 66 / 98 33 50 ifm elctronic (pty) Ltd •...

Table of Contents