Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Contents Contents About this manual Copyright ..........................4 Overview: documentation modules for ecomatmobile devices ..........5 CODESYS programming manual ..................5 What do the symbols and formats mean? ................6 How is this documentation structured? ................7 History of the instructions (CR030n) ..................
Page 3
7.2.2 Possible operating modes inputs/outputs ................. 187 Error tables ........................190 7.3.1 Error flags ..........................190 7.3.2 Errors: CAN / CANopen......................190 Glossary of Terms Index Notizen • Notes • Notes ifm weltweit • ifm worldwide • ifm à l’échelle internationale...
Source → www.ifm.com > select your country > [Data sheet search] > CR0301 > [Operating instructions] System manual "The ISOBUS in the ifm controller" Contents Description of the configuration and the functions of the ISOBUS software in the device Source →...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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. CAUTION Slight reversible injuries may result.
Abbreviations and technical terms → Appendix. In case of malfunctions or uncertainties please contact the manufacturer at: → www.ifm.com > Select your country > [Contact]. We want to become even better! Each separate section has an identification number in the top right corner.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 About this manual History of the instructions (CR030n) > History of the instructions (CR030n) 9181 What has been changed in this manual? An overview: Date Theme Change 2010-09-09 PID2 (FB) parameters of the inputs corrected 2010-11-10 Terminating resistors correction in topic 1244...
WARNING Non-observance of these instructions can lead to property damage or personal injury. ifm electronic gmbh does not assume any liability in this regard. ► The acting person must have read and understood the safety instructions and the corresponding chapters in this manual before working on and with this device.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Safety instructions What previous knowledge is required? > What previous knowledge is required? This document is intended for people with knowledge of control technology and PLC programming with IEC 61131-3. To program the PLC, the people should also be familiar with the CODESYS software. The document is intended for specialists.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Safety instructions Notes: serial number > Notes: serial number 20780 ► In the user's production facility, draw a diagram of the controller network in the machine. Enter the serial number of each controller installed into the network diagram. ►...
Interface description ..........................26 Software description ..........................28 > Information about the device 1310 This manual describes of the ecomatmobile family for mobile machines of ifm electronic gmbh: • CabinetController: CR0301, CR0302 > Hardware description Hardware structure ..........................13 Monitoring concept ..........................15 Inputs (technology) ..........................
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.1 Hardware structure Conditions ............................13 Prinziple block diagram ........................13 Available memory ..........................14 15332 > Conditions 19971 The device does not start until sufficient voltage is applied to the supply connection VBBs. A voltage >...
Page 14
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > Available memory 13736 > FLASH-Speicher 14024 FLASH memory (non-volatile, slow memory) 512 kByte overall existing in the device Thereof the following memory areas are reserved for ... maximum size of the application program 192 kByte data other than the application program...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.2 Monitoring concept 19973 The controller monitors the supply voltages and the system error flags. Depending on the status... • the controller switches off completely > the program stops >...
Page 16
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > If runtime system / application is running 3928 then the following tests are cyclically carried out: > Triggering of the watchdog (100 ms) Then continuous program check watchdog >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.3 Inputs (technology) Analogue inputs ........................... 17 Binary inputs ............................18 Input group ANALOG0...7 ........................19 Input group IN00...IN07 ........................19 Input group IN08...IN11 / FRQ00...FRQ03 ..................19 Input group IN12...IN15 ........................
Page 18
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > Binary inputs 1015 7345 The binary input can be operated in following modes: • binary input plus switching (BL) for positive sensor signal • binary input minus switching (BH) for negative sensor signal Depending on the device the binary inputs can configured differently.
Page 19
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > Input group ANALOG0...7 20856 These inputs are a group of multifunction channels. These inputs can be used as follows (each input separately configurable): • analogue input 0...20 mA •...
Page 20
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > Input group IN12...IN15 20858 These inputs are a group of multifunction channels. These inputs can be used as follows (each input separately configurable): • binary input plus switching (BL) for positive sensor signal •...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.4 Outputs (technology) Binary outputs ............................21 PWM outputs ............................22 Output group OUT00...OUT03 ......................22 Output group OUT04...OUT07 ......................23 Output group OUT08...OUT10 ......................23 Output group OUT11...OUT17 ......................
Page 22
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > PWM outputs 14095 The following operating modes are possible for the device outputs (→ data sheet): • PWM output, plus switching (BH) without diagnostic function 15451 Qn = pin output n (L) = load Basic circuit of output plus switching (BH)
Page 23
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > Output group OUT04...OUT07 20863 These outputs are a group of channels with a single specified function. These outputs have the following fixed setting: • binary output, plus switching (BH), short-circuit proof, overload protected Possible operating modes inputs/outputs →...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.5 Note on wiring 1426 The wiring diagrams (→ installation instructions of the devices, chapter "Wiring") describe the standard device configurations. The wiring diagram helps allocate the input and output channels to the IEC addresses and the device terminals.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Hardware description > 3.2.7 Status LED 1437 The operating states are indicated by the integrated status LED (default setting). LED colour Display Description Permanently off No operating voltage Briefly on Initialisation or reset checks Orange (time frame = 200 ms)
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Interface description > Interface description Serial interface ............................. 26 CAN interfaces ............................ 27 14098 > 3.3.1 Serial interface 14099 This device features a serial interface. The serial interface can generally be used in combination with the following functions: •...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Interface description > 3.3.2 CAN interfaces Available CAN interfaces and CAN protocols ..................27 14101 Connections and data → data sheet > Available CAN interfaces and CAN protocols 20872 The following CAN interfaces and CAN protocols are available in this ecomatmobile device:...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Software description Software modules for the device ......................28 Programming notes for CODESYS projects ..................31 Operating states ..........................35 Operating modes ..........................39 Performance limits of the device ......................41 14107 >...
Page 29
(also repeatedly) without affecting the runtime system. The runtime system is provided with this documentation on a separate data carrier. In addition, the current version can be downloaded from the website of ifm electronic gmbh: →...
Page 30
CAN interface of the device is to operate on 29 bits ifm_CR0301_J1939_1_Vxxyyzz.LIB (optional) if theCAN interface of the device is to communicate with a motor control ifm libraries for the device CR0301 Details: → chapter (→ page 55)
Calculations and conversions in the application program ..............32 Note the cycle time! ..........................32 Creating application program ......................33 Save boot project..........................34 Using ifm downloader .......................... 34 7426 Here you receive tips how to program the device. ► See the notes in the CODESYS programming manual →...
Page 32
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Calculations and conversions in the application program 20779 NOTE If the following elements are required in the application program: • mathematical functions (e.g. ATAN), • calculations, •...
Page 33
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Creating application program 8007 The application program is generated by the CODESYS programming system and loaded in the controller several times during the program development for testing: In CODESYS: [Online] >...
Page 34
• The application program is not (no longer) available. • The LED lights green. > Using ifm downloader 8008 downloader serves for easy transfer of the program code from the programming station to the controller. As a matter of principle each application software can be copied to the controllers using the downloader.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > 3.4.3 Operating states Operating states: runtime system is not available ................35 Operating states: application program is not available ............... 36 Operating states: application program is available ................37 Bootloader state ..........................
Page 36
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Operating states: application program is not available 19218 Figure: operating states (here: application program is not available)
Page 37
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Operating states: application program is available 19219 Figure: operating states (here: application program is available)
Page 38
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > Bootloader state 1080 No runtime system was loaded. The ecomatmobile controller is in the boot loading state. Before loading the application software the runtime system must be downloaded. >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > 3.4.4 Operating modes 1083 Independent of the operating states the ecomatmobile controller can be operated in different modes. > TEST mode 20876 NOTICE Loss of the stored software possible! In the test mode there is no protection of the stored runtime system and application software.
Page 40
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > SERIAL_MODE 1085 The serial interface is available for the exchange of data in the application. Debugging the application software is then only possible via the CAN interface. This function is switched off as standard (FALSE).
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 System description Software description > 3.4.5 Performance limits of the device 7358 Note the limits of the device! → Data sheet > Above-average stress 20878 The following FBs, for example, utilise the system resources above average: Function block Above average load FREQUENCY,...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Set up the runtime system Configurations Set up the runtime system ........................42 Set up the programming system ......................45 Function configuration of the inputs and outputs ................48 Note on wiring ............................54 Safety instructions about Reed relays ....................
(also several times) without influencing the runtime system. The runtime system is provided with this documentation on a separate data carrier. In addition, the current version can be downloaded from the website of ifm electronic gmbh → www.ifm.com >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Set up the runtime system > 4.1.2 Update the runtime system 13269 An older runtime system is already installed on the device. Now, you would like to update the runtime system on the device? 14158 NOTICE...
► If necessary, in the window [Target settings] > tab [Network functionality] > activate [Support parameter manager] and / or activate [Support network variables]. ► If necessary, remove the loaded (3S) libraries or complement them by further (ifm) libraries. ► Always complement the appropriate device library ifm_CR0301_Vxxyyzz.LIB manually!
Page 46
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Set up the programming system > Activate the PLC configuration (e.g. CR0033) 15824 During the configuration of the programming system (→ previous section) the PLC configuration was also carried out automatically. ►...
When installing the ecomatmobile DVD "Software, tools and documentation", projects with templates have been stored in the program directory of your PC: …\ifm electronic\CoDeSys V…\Projects\Template_DVD_V… ► Open the requested template in CODESYS via: [File] > [New from template…] > CODESYS creates a new project which shows the basic program structure. It is strongly...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > Function configuration of the inputs and outputs Configure inputs ..........................49 Configure outputs ..........................52 1394 For some devices of the ecomatmobile controller family, additional diagnostic functions can be activated for the inputs and outputs.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > 4.3.1 Configure inputs Safety instructions about Reed relays ....................49 Analogue inputs: configuration and diagnosis ..................50 Binary inputs: configuration and diagnosis ..................51 Fast inputs ............................
Page 50
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > Analogue inputs: configuration and diagnosis 20881 Appendix ► Configuration can be carried out via the system variables ANALOGx_y_MODE (→ INPUT_ANALOG (→ page 179)) or, preferably, via (→...
Page 51
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > Binary inputs: configuration and diagnosis 20001 ► Configuration of each input is made via the application program: • configuration byte INxx_MODE Possible operating modes inputs/outputs →...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > 4.3.2 Configure outputs Binary outputs: configuration and diagnosis ..................52 PWM outputs ............................53 3976 Possible operating modes inputs/outputs Valid operating modes → chapter (→...
Page 53
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Function configuration of the inputs and outputs > PWM outputs 14705 The following operating modes are possible for the device outputs (→ data sheet): • PWM output, plus switching (BH) without diagnostic function 15451 Qn = pin output n (L) = load...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Configurations Note on wiring > Note on wiring 1426 The wiring diagrams (→ installation instructions of the devices, chapter "Wiring") describe the standard device configurations. The wiring diagram helps allocate the input and output channels to the IEC addresses and the device terminals.
CR0301 ifm function elements ifm libraries for the device CR0301 ..................... 55 ifm function elements for the device CR0301 ..................60 13586 All CODESYS function elements (FBs, PRGs, FUNs) are stored in libraries. Below you will find a list of all the libraries you can use with this device.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm libraries for the device CR0301 > 5.1.1 Bibliothek ifm_CR0301_V05yyzz.LIB 20894 This is the device library. This library contains the following function blocks: Function element Short description CAN1_BAUDRATE (→...
Page 57
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm libraries for the device CR0301 Function element Short description PID2 (→ page 155) PID controller (→ page 157) Controlled system with first-order delay (→ page 141) Initialises and configures a PWM-capable output channel...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm libraries for the device CR0301 > 5.1.2 Library ifm_CR0301_CANopenMaster_V04yynn.LIB 18714 This library contains the function blocks for operation of the device as a CANopen master. The library is only permissible for the 1st CAN interface.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm libraries for the device CR0301 > 5.1.4 Library ifm_CAN1_EXT_Vxxyyzz.LIB 18732 This library contains the complementary POUs for engine control on the 1st CAN interface. The library is only permissible for the 1st CAN interface.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > ifm function elements for the device CR0301 Function elements: CAN layer 2 ......................60 Function elements: CANopen master ....................76 Function elements: CANopen slave ....................
Page 61
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_BAUDRATE Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description CAN1_BAUDRATE sets the transmission rate for the bus participant.
Page 62
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_DOWNLOADID = CAN1 download ID Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: >...
Page 63
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_EXT 4192 Unit type = function block (FB) Unit is contained in the library ifm_CAN1_EXT_Vxxyyzz.LIB Symbol in CODESYS: > Description 4333 CAN1_EXT initialises the first CAN interface for the extended identifier (29 bits).
Page 64
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_EXT_ERRORHANDLER 4195 Unit type = function block (FB) Unit is contained in the library ifm_CAN1_EXT_Vxxyyzz.LIB Symbol in CODESYS: > Description 4335 CAN1_EXT_ERRORHANDLER monitors the first CAN interface and evaluates the CAN errors.
Page 65
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_EXT_RECEIVE 4302 Unit type = function block (FB) Unit is contained in the library ifm_CAN1_EXT_Vxxyyzz.LIB Symbol in CODESYS: > Description...
Page 66
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 19810 Data type Description Parameter DATA ARRAY [0..7] OF BYTE received data, (1...8 bytes) BYTE Number of the bytes of the CAN telegram read from the receive buffer allowed: 0...8...
Page 67
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_EXT_RECEIVE_ALL 20913 x = 1 = number of the CAN interface Unit type = function block (FB) Unit is contained in the library ifm_CAN1_EXT_Vxxyyzz.LIB Symbol in CODESYS: >...
Page 68
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 2292 Data type Description Parameter DWORD Number of the data object identifier DATA ARRAY [0..7] OF BYTE received data, (1...8 bytes)
Page 69
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CAN1_EXT_TRANSMIT 4307 Unit type = function block (FB) Unit is contained in the library ifm_CAN1_EXT_Vxxyyzz.LIB Symbol in CODESYS: > Description...
Page 70
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_ERRORHANDLER 9344 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB...
Page 71
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_RECEIVE x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB...
Page 72
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 19810 Data type Description Parameter DATA ARRAY [0..7] OF BYTE received data, (1...8 bytes) BYTE Number of the bytes of the CAN telegram read from the receive buffer allowed: 0...8...
Page 73
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_RECEIVE_RANGE 4179 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB (xx >...
Page 74
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 4381 Data type Description Parameter CAN1: WORD ID of the transmitted data object CAN2: DWORD DATA ARRAY [0..7] OF BYTE...
Page 75
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_TRANSMIT x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.2 Function elements: CANopen master CANx_MASTER_EMCY_HANDLER ....................77 CANx_MASTER_SEND_EMERGENCY ..................... 78 CANx_MASTER_STATUS ........................80 1870 ifm electronic provides a number of FBs for the CANopen master which will be explained below.
Page 77
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_MASTER_EMCY_HANDLER 13192 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenMaster_Vxxyyzz.LIB...
Page 78
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_MASTER_SEND_EMERGENCY 13195 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenMaster_Vxxyyzz.LIB...
Page 79
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Example: CANx_MASTER_SEND_EMERGENCY 2018 In this example 3 error messages will be generated subsequently: ApplError1, Code = 0xFF00 in the error register 0x81...
Page 80
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_MASTER_STATUS 2021 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenMaster_Vxxyyzz.LIB...
Page 81
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 2025 Data type Description Parameter CANOPEN_LED_STATUS BOOL (input not available for PDM devices) TRUE: the status LED of the controller is switched to the mode "CANopen":...
Page 82
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 2029 Data type Description Parameter NODE_ID BYTE current node ID of the CANopen master BAUDRATE WORD...
Page 83
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of internal structures 2030 Below are the structures of the arrays used in this FB. Data type Description Parameter...
Page 84
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Example: CANx_MASTER_STATUS 2031 > Slave information 2033 To be able to access the information of the individual CANopen nodes, an array for the corresponding structure must be generated.
Page 85
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Access to the structures at runtime of the application 2036 At runtime you can access the corresponding array element via the global variables of the library and therefore read the status or EMCY messages or reset the node.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.3 Function elements: CANopen slave CANx_SLAVE_EMCY_HANDLER ...................... 87 CANx_SLAVE_NODEID ........................88 CANx_SLAVE_SEND_EMERGENCY ....................89 CANx_SLAVE_STATUS ........................91 1874 ifm electronic...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SLAVE_EMCY_HANDLER 13199 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenSlave_Vxxyyzz.LIB...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SLAVE_NODEID 13202 = CANx Slave Node-ID x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenSlave_Vxxyyzz.LIB...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SLAVE_SEND_EMERGENCY 13205 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenSlave_Vxxyyzz.LIB...
Page 90
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Example: CANx_SLAVE_SEND_EMERGENCY 2062 In this example 3 error messages will be generated subsequently: ApplError1, Code = 0xFF00 in the error register 0x81...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SLAVE_STATUS 2063 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_CANopenSlave_Vxxyyzz.LIB...
Page 92
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 2067 Data type Description Parameter CANOPEN_LED_STATUS BOOL (input not available for PDM devices) TRUE: the status LED of the controller is switched to the mode "CANopen":...
Page 93
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 2068 Data type Description Parameter NODE_ID BYTE current node ID of the CANopen slave BAUDRATE WORD...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.4 Function elements: CANopen SDOs CANx_SDO_READ ..........................95 CANx_SDO_WRITE ..........................97 2071 Here you will find function elements for CANopen handling of Service Data Objects (SDOs).
Page 95
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SDO_READ x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB...
Page 96
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Page 97
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CANx_SDO_WRITE x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB...
Page 98
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.5 Function elements: SAE J1939 J1939_x ............................. 100 J1939_x_GLOBAL_REQUEST ......................101 J1939_x_RECEIVE ........................... 103 J1939_x_RESPONSE ........................105 J1939_x_SPECIFIC_REQUEST ....................... 107 J1939_x_TRANSMIT.........................
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x 9375 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x_GLOBAL_REQUEST 4315 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Page 102
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x_RECEIVE 9393 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Page 104
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x_RESPONSE 9399 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Page 106
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs 13993 Data type Description Parameter RESULT BYTE feedback of the function block (possible messages → following table)
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x_SPECIFIC_REQUEST 8884 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Page 108
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > J1939_x_TRANSMIT 4322 x = 1...n = number of the CAN interface (depending on the device, → Data sheet) Unit type = function block (FB) Unit is contained in the library ifm_J1939_x_Vxxyyzz.LIB...
Page 110
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter ENABLE BOOL TRUE: execute this function element FALSE: unit is not executed >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.6 Function elements: serial interface SERIAL_PENDING ........................... 112 SERIAL_RX ............................113 SERIAL_SETUP ..........................114 SERIAL_TX ............................115 1600 NOTE In principle, the serial interface is not available for the user, because it is used for program download and debugging.
Page 112
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SERIAL_PENDING Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SERIAL_PENDING determines the number of data bytes stored in the serial receive buffer.
Page 113
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SERIAL_RX Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SERIAL_RX reads a received data byte from the serial receive buffer at each call.
Page 114
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SERIAL_SETUP Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SERIAL_SETUP initialises the serial RS232 interface.
Page 115
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SERIAL_TX Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SERIAL_TX transmits one data byte via the serial RS232 interface.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.7 Function elements: Optimising the PLC cycle via processing interrupts SET_INTERRUPT_I .......................... 117 SET_INTERRUPT_XMS ........................120 20965 8609 Here we show you functions to optimise the PLC cycle.
Page 117
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SET_INTERRUPT_I 2381 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description...
Page 118
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 19866 Interrupt priorities: • All program parts called via interrupt have the same priority of execution. Several simultaneous interrupts are processed sequentially in the order of their occurrence.
Page 119
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 20089 Data type Description Parameter ENABLE BOOL TRUE (only for 1 cycle): initialisation of the function block...
Page 120
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SET_INTERRUPT_XMS Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SET_INTERRUPT_XMS handles the execution of a program part at an interval of x ms.
Page 121
CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 NOTE The uniqueness of the inputs and outputs in the cycle is affected by the interrupt routine. Therefore only part of the inputs and outputs is serviced. If initialised in the interrupt program, the following inputs and outputs will be read or written.
The analogue raw values shown in the PLC configuration of CODESYS directly come from the ADC. They are not yet corrected! Therefore different raw values can appear in the PLC configuration for identical devices. Error correction and normalisation are only carried out by ifm function blocks. The function blocks provide the corrected value.
Page 123
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > INPUT_ANALOG Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description INPUT_ANALOG enables current and voltage measurements at the analogue channels.
Page 124
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs Data type Description Parameter WORD Output value according to MODE in case of an invalid setting: OUT = "0"...
Page 125
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > INPUT_CURRENT Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description INPUT_CURRENT returns the actual input current in [µA] at the analogue current inputs.
Page 126
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > INPUT_VOLTAGE Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description INPUT_VOLTAGE processes analogue voltages measured on the analogue channels.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.9 Function elements: adapting analogue values NORM ..............................128 1603 If the values of analogue inputs or the results of analogue functions must be adapted, the following...
Page 128
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > NORM Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description NORM normalises a value within defined limits to a value with new limits.
Page 129
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Example: NORM (1) lower limit value input upper limit value input lower limit value output upper limit value output 2000...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.10 Function elements: counter functions for frequency and period measurement FAST_COUNT ........................... 131 FREQUENCY ............................ 132 INC_ENCODER ..........................133 PERIOD ............................. 135 PERIOD_RATIO ..........................
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > FAST_COUNT 20430 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description FAST_COUNT operates as counter block for fast input pulses.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > FREQUENCY 20604 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description FREQUENCY measures the signal frequency at the indicated channel.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > INC_ENCODER 20432 = Incremental Encoder Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: >...
Page 134
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 RESOLUTION = 1 In the case of normal resolution only the falling edge of the B-signal is evaluated. RESOLUTION = 2 In the case of double resolution the falling and the rising edges of the B-signal are evaluated.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PERIOD 20606 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PERIOD measures the frequency and the cycle period (cycle time) in [µs] at the indicated channel.
Page 136
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs Data type Description Parameter DWORD Cycle time of the detected periods in [µs] allowed = 200...10 000 000 = 0xC8...0x989680 (= 10 seconds)
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PERIOD_RATIO 20441 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PERIOD_RATIO measures the frequency and the cycle period (cycle time) in [µs] during the indicated...
Page 138
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the outputs Data type Description Parameter DWORD Cycle time of the detected periods in [µs] allowed = 200...10 000 000 = 0xC8...0x989680 (= 10 seconds)
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PHASE 20443 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PHASE reads a pair of channels with fast inputs and compares the phase position of the signals.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.11 Function elements: PWM functions PWM ..............................141 PWM100 ............................145 PWM1000 ............................147 13758 Here, you will find function blocks that allow you to operate the outputs with Pulse-Width...
Page 141
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 20457 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description 20973 PWM is used for initialisation and parameter setting of the PWM outputs.
Page 142
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 20969 Data type Description Parameter INIT BOOL FALSE TRUE (edge): unit is initialised FALSE: during further processing of the program...
Page 143
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Calculation of the RELOAD value 1531 Figure: RELOAD value for the PWM channels 0...3 The RELOAD value of the internal PWM counter is calculated on the basis of the parameter DIV64 and the CPU frequency as follows: •...
Page 144
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PWM dither 1534 For certain hydraulic valve types a so-called dither frequency must additionally be superimposed on the PWM frequency. If valves were triggered over a longer period by a constant PWM value, they could block due to the high system temperatures.
Page 145
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PWM100 20461 Unit type = function block (FB) PWM1000 ecomatmobile controllers only support (→ page 147). Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: >...
Page 146
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 20971 Data type Description Parameter INIT BOOL FALSE TRUE (edge): unit is initialised FALSE: during further processing of the program...
Page 147
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PWM1000 20465 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description 20972 PWM1000 handles the initialisation and parameter setting of the PWM outputs.
Page 148
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs 17877 Data type Description Parameter INIT BOOL FALSE TRUE (edge): unit is initialised FALSE: during further processing of the program...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.12 Function elements: controllers Setting rule for a controller ........................ 149 DELAY ............................... 150 GLR ..............................151 PID1 ..............................153 PID2 ..............................
Page 150
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > DELAY Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description DELAY delays the output of the input value by the time T (dead-time element).
Page 151
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description GLR handles a synchro controller.
Page 152
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter WORD actual value channel 1 WORD actual value channel 2 WORD preset value...
Page 153
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PID1 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PID1 handles a PID controller.
Page 154
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter WORD input value WORD preset value XMAX WORD maximum preset value BYTE...
Page 155
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > PID2 9167 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PID2 handles a PID controller with self optimisation.
Page 156
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Parameters of the inputs Data type Description Parameter WORD input value WORD preset value XMAX WORD maximum preset value Byte...
Page 157
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description PT1 handles a controlled system with a first-order time delay.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.13 Function elements: software reset SOFTRESET ............................. 159 1594 Using this FB the control can be restarted via an order in the application program.
Page 159
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SOFTRESET Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SOFTRESET leads to a complete reboot of the device.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.14 Function elements: measuring / setting of time TIMER_READ ........................... 161 TIMER_READ_US ..........................162 1601 Using the following function blocks of ifm electronic you can...
Page 161
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > TIMER_READ Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description TIMER_READ reads the current system time.
Page 162
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > TIMER_READ_US Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description TIMER_READ_US reads the current system time in [µs].
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.15 Function elements: saving, reading and converting data in the memory Storage types for data backup ......................163 Manual data storage .......................... 164 13795 >...
Page 164
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Manual data storage E2READ ............................165 E2WRITE ............................166 FLASHREAD ............................. 167 FLASHWRITE ........................... 168 MEMCPY ............................169 13801 Besides the possibility to store data automatically, user data can be stored manually, via function block calls, in integrated memories from where they can also be read.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > E2READ Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description E2READ enables reading of different data from the serial EEPROM.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > E2WRITE Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description E2WRITE enables writing of different data types directly to the serial EEPROM.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > FLASHREAD Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description FLASHREAD enables reading of different types of data directly from the flash memory.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > FLASHWRITE Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description WARNING Danger due to uncontrollable process operations! The status of the inputs/outputs is "frozen"...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > MEMCPY = memory copy Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > 5.2.16 Function elements: data access and data check CHECK_DATA ..........................171 GET_IDENTITY ..........................173 SET_DEBUG ............................. 174 SET_IDENTITY ..........................175 SET_PASSWORD..........................
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > CHECK_DATA Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description CHECK_DATA generates a checksum (CRC) for a configurable memory area and checks the data of the memory area for undesired changes.
Page 172
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > Example: CHECK_DATA 4168 In the following example the program determines the checksum and stores it in the RAM via pointer pt:...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > GET_IDENTITY 2212 Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SET_DEBUG Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description TEST mode).
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SET_IDENTITY Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description SET_IDENTITY sets an application-specific program identification.
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 ifm function elements ifm function elements for the device CR0301 > SET_PASSWORD Unit type = function block (FB) Unit is contained in the library ifm_CR0301_Vxxyyzz.LIB Symbol in CODESYS: > Description 13038...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Diagnosis and error handling Diagnosis Diagnosis and error handling Diagnosis ............................177 Fault ..............................177 Reaction in case of an error ......................178 Reaction in case of a system error ....................178 CAN / CANopen: errors and error handling ..................
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Diagnosis and error handling Reaction in case of an error > Reaction in case of an error 19653 When errors are detected the system flag ERROR can also be set in the application program. Thus, in case of a fault, the controller reacts as follows: >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix System flags Appendix System flags ............................179 Address assignment and I/O operating modes ................. 183 Error tables ............................190 1664 Additionally to the indications in the data sheets you find summary tables in the appendix. >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix System flags > 7.1.1 System flags: CAN 20979 System flags (symbol name) Type Description CANx_BAUDRATE WORD CAN interface x: set baud rate in [kBaud] CANx_BUSOFF BOOL CAN interface x: Error "CAN-Bus off" Reset of the error code alse resets the flag CANx_LASTERROR BYTE...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix System flags > 7.1.3 System flags: status LED 20984 System flags (symbol name) Type Description LED_MODE WORD LED flashing frequency: 0x0000 = LED_2HZ (flashes at 2 Hz; preset) 0x0001 = LED_1HZ (flashes at 1 Hz) 0x0002 = LED_05HZ (flashes at 0.5 Hz) 0x0003 = LED_0HZ (lights permanently with value in LED) >...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix System flags > 7.1.5 System flags: inputs and outputs 20986 System flags (symbol name) Type Description ANALOGx WORD Analogue input xx: x = 0...7 filtered A/D converter raw value (12 bits) without calibration or standardisation ANALOGx WORD...
Page 188
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix Address assignment and I/O operating modes > Inputs: operating modes 21001 Possible configuration combinations (where permissible) are created by adding the configuration values. = this configuration value is default Value Inputs Possible operating mode Set with …...
Page 189
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Appendix Address assignment and I/O operating modes > Outputs: operating modes 21002 = this configuration value is default Value Outputs Possible operating mode Set with … FB input OUT00…03 binary output plus-switching analogue output with pulse- PWM100...
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 Software specific to the application, implemented by the machine manufacturer, generally containing logic sequences, limits and expressions that control the appropriate inputs, outputs, calculations and...
Page 192
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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.org >...
Page 193
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Glossary of Terms > CODESYS ® CODESYS is a registered trademark of 3S – Smart Software Solutions GmbH, Germany. 'CODESYS for Automation Alliance' associates companies of the automation industry whose hardware devices are all programmed with the widely used IEC 61131-3 development tool CODESYS ®...
Page 194
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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. Depending on the device, the inputs and outputs can also be monitored for their correct function.
Page 195
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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.
Page 196
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 197
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 198
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 199
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 200
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Glossary of Terms > PDU = Protocol Data Unit. The PDU is an item of the →CAN protocol →SAE J1939. PDU indicates a part of the destination or source address. > Programmable Electronic System ...
Page 201
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 202
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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. Standard: Recommended Practice for a Serial Control and Communications Vehicle Network •...
Page 203
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 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 204
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Index CANx_SDO_WRITE ................97 Index CANx_SLAVE_EMCY_HANDLER ............87 CANx_SLAVE_NODEID ................ 88 CANx_SLAVE_SEND_EMERGENCY ..........89 CANx_SLAVE_STATUS ............... 91 About this manual ..................4 CANx_TRANSMIT ................. 75 Above-average stress ................41 CHECK_DATA ..................171 Access to the structures at runtime of the application ......
Page 205
CR0301 ........60 EUC ..................... 195 ifm libraries for the device CR0301 ............55 Example ifm weltweit • ifm worldwide • ifm à l’échelle internationale ....213 CANx_MASTER_SEND_EMERGENCY ............79 INC_ENCODER ................... 133 CANx_MASTER_STATUS ................84 Information about the device ..............
Page 206
Programming Manual ecomatmobile CabinetController (CR0301) Runtime System V05 2016-04-21 Index Node Guarding ..................198 PT1 ...................... 157 NORM ....................128 PWM ................... 141, 201 Note on wiring ..................24, 54 PWM dither ..................144 Note the cycle time! ................32 PWM frequency ................... 142 Notes PWM outputs ...................22, 53 PWM100 ....................
Page 207
Use as binary inputs ................51 System flags ..................179 Use, intended ..................203 CAN ......................180 error flags ....................180 Using ifm downloader ................34 inputs and outputs ..................182 status LED ....................181 system ......................182 Verify the installation ................44 voltages .......................
Page 213
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 electronic b.v.
Need help?
Do you have a question about the Ecomat 100 Mobile CR0301 and is the answer not in the manual?
Questions and answers