IFM Electronic CR711S Original Programming Manual

Page 1
1
Original Programming Manual
ecomatController/60-1
CR711S
Operating System V2.5.0.n
CODESYS® V3.5 SP11
English
739
112
3_02_UK
2017
-12-19
Page 2
2
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Contents
Contents
1 About this manual 6
1.1 Legal and copyright information ........................................................................................... 6
1.2 Purpose of the document ..................................................................................................... 7
1.3 Symbols and formats used .................................................................................................. 7
1.4 Overview: documentation modules for CR711S .................................................................. 8
1.5 Overview: documentation for CODESYS 3.n ...................................................................... 8
1.6 How is this documentation structured? ................................................................................ 9
1.7 History of the document CR0711 ......................................................................................... 9
2 Functions and features 10
3 Safety instructions 11
3.1 Please note! .......................................................................................................................11
3.2 What previous knowledge is required? ..............................................................................12
3.3 Important standards ...........................................................................................................13
3.4 Organise the creation of safe machinery with the V model ...............................................14
3.5 Start-up behaviour of the controller....................................................................................16
3.6 Warnings used ...................................................................................................................16
3.7 Notes: serial number ..........................................................................................................17
4 Installation 18
4.1 System requirements .........................................................................................................18
4.1.1 Hardware .................................................................................................................................... 18
4.1.2 Software ................................................................................................ ..................................... 18
4.1.3 Licensing .................................................................................................................................... 18
4.2 Carry out installation ..........................................................................................................19
4.2.1 CODESYS programming software ............................................................................................. 19
4.2.2 Complete package for ecomatController CR711S ...................................................................... 20
4.2.3 Check the operating system version of the device ..................................................................... 22
4.2.4 Update the operating system of the device ................................................................................ 24
5 System description 26
5.1 Hardware description .........................................................................................................26
5.1.1 Hardware structure ..................................................................................................................... 26
5.1.2 Device supply (technology) ........................................................................................................ 33
5.1.3 Monitoring concept ..................................................................................................................... 36
5.1.4 Inputs (technology) ..................................................................................................................... 38
5.1.5 Outputs (technology) .................................................................................................................. 43
5.1.6 Feedback in case of externally supplied outputs ........................................................................ 50
5.2 Interfaces ...........................................................................................................................51
5.2.1 Serial interface ........................................................................................................................... 51
5.2.2 Ethernet interface ....................................................................................................................... 51
5.2.3 CAN: Interfaces and protocols .................................................................................................... 52
5.3 Software description ..........................................................................................................53
5.3.1 Overview: Software .................................................................................................................... 53
5.3.2 Software module for the device .................................................................................................. 55
6 Getting started 57
6.1 Start CODESYS .................................................................................................................57
6.2 Create CODESYS project ..................................................................................................57
6.2.1 Create new project with CR711S ............................................................................................... 58
Page 3
3
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Contents
6.2.2 Overview: Project structure with CR711S................................................................................... 59
6.3 Use CODESYS user manual .............................................................................................60
6.4 Configure programming interface ......................................................................................61
6.4.1 Set communication path of PLC ................................................................................................. 61
6.5 Add ifm function libraries to the application .......................................................................62
6.6 Activate the access protection for a project .......................................................................63
7 System configuration 64
7.1 Configure PLC....................................................................................................................64
7.1.1 Allocate memory partition ........................................................................................................... 64
7.1.2 Allocate inputs/outputs ............................................................................................................... 65
7.1.3 Manage files ............................................................................................................................... 66
7.1.4 Manage users and groups .......................................................................................................... 66
7.2 Configure inputs and outputs .............................................................................................67
7.2.1 via system configuration ............................................................................................................. 67
7.2.2 via function block ........................................................................................................................ 67
7.3 Configure interfaces ...........................................................................................................68
7.3.1 Configure serial interface............................................................................................................ 68
7.3.2 Configure Ethernet interface ....................................................................................................... 68
7.3.3 Configure CAN interfaces ........................................................................................................... 70
7.3.4 Interface configuration file comconf.cfg ...................................................................................... 76
8 Programming 77
8.1 Objects of a PLC application ..............................................................................................77
8.2 Create PLC application ......................................................................................................78
8.2.1 Supported programming languages ........................................................................................... 78
8.2.2 Supported variable types ................................ ............................................................................ 79
8.2.3 Options to access input and output data .................................................................................... 80
8.2.4 Configure task processing .......................................................................................................... 80
8.3 Use ifm function libraries ....................................................................................................81
8.3.1 Access to inputs ......................................................................................................................... 81
8.3.2 Access to outputs ....................................................................................................................... 82
8.3.3 Control device ............................................................................................................................ 82
8.3.4 Read device information ............................................................................................................. 82
8.4 Use IO mapping .................................................................................................................83
8.4.1 Access inputs ............................................................................................................................. 84
8.4.2 Access outputs ........................................................................................................................... 85
8.4.3 Read diagnostic data of the device ............................................................................................ 86
8.5 Use RawCAN (CAN Layer 2) .............................................................................................87
8.5.1 RawCAN: Control CAN network nodes ...................................................................................... 87
8.5.2 RawCAN: Send and receive CAN messages ............................................................................. 87
8.5.3 RawCAN: Request and send remote CAN messages ................................................................ 88
8.6 Use CANopen ....................................................................................................................89
8.6.1 CANopen: Send and receive SDO ............................................................................................. 89
8.6.2 CANopen: Network Management (NMT) .................................................................................... 89
8.7 Use SAE J1939 ..................................................................................................................90
9 Operation 91
9.1 Transfer CODESYS project to device ................................................................................91
9.1.1 Load the application to the device .............................................................................................. 91
9.1.2 Delete application from CR711S ................................................................................................ 92
9.2 Operating states .................................................................................................................93
9.3 Status LEDs .......................................................................................................................94
9.3.1 Status LED: system ifm operating system (SYS0+SYS1) .......................................................... 94
9.3.2 Status LED: system PLC (SYS0, SYS1) .................................................................................... 95
9.3.3 Status LED: System bootloader (SYS0) ..................................................................................... 95
9.3.4 Status LED: Ethernet interfaces (ETH0, ETH1) .......................................................................... 96
9.3.5 Controlling LEDs in the applications ........................................................................................... 96
Page 4
4
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Contents
9.4 Reset ..................................................................................................................................97
9.4.1 Supported reset variants ............................................................................................................ 97
9.4.2 Reset application (warm) ............................................................................................................ 97
9.4.3 Reset application (cold) .............................................................................................................. 98
9.4.4 Reset application (origin) ............................................................................................................ 98
9.5 Data transmission for series production ............................................................................99
9.5.1 Transmission of the files with CODESYS ................................................................................... 99
9.5.2 Data transmission with TFTP ................................................................................................... 100
9.5.3 Files for series production ........................................................................................................ 100
9.6 Display system information ..............................................................................................101
10 ifm function libraries 102
10.1 General ............................................................................................................................102
10.2 Library ifmCANopenManager.library................................................................................102
10.2.1 COP_GetNodeState ................................................................................................................. 103
10.2.2 COP_SDOread ......................................................................................................................... 105
10.2.3 COP_SDOwrite ........................................................................................................................ 107
10.2.4 COP_SendNMT ....................................................................................................................... 109
10.2.5 NMT_SERVICE (ENUM) .......................................................................................................... 111
10.2.6 NMT_STATES (ENUM) ............................................................................................................ 111
10.3 Library ifmDeviceCR0721.library .....................................................................................112
10.3.1 CAN_BAUDRATE (ENUM) ...................................................................................................... 113
10.3.2 CAN_CHANNEL (ENUM) ......................................................................................................... 113
10.3.3 CANconstants (GVL) ................................................................................................................ 113
10.3.4 SysInfo (GVL) ........................................................................................................................... 113
10.3.5 SysInfoStruct (STRUCT) ................................................................................................ .......... 114
10.3.6 LED_COLOUR (ENUM) ........................................................................................................... 114
10.3.7 LED_FLASH_FREQ (ENUM) ................................................................................................... 114
10.4 ifmFastInput.library ..........................................................................................................115
10.4.1 FastCount ................................................................................................................................. 116
10.4.2 IncEncoder ............................................................................................................................... 118
10.4.3 Period ....................................................................................................................................... 120
10.4.4 COUNT_DIRECTION (ENUM) ................................................................................................. 122
10.4.5 ENCODER_RESOLUTION (ENUM) ........................................................................................ 122
10.4.6 FREQ_SENSE_PERIODS (ENUM) ......................................................................................... 122
10.4.7 MODE_FAST_COUNT (ENUM) ............................................................................................... 122
10.4.8 MODE_INC_ENCODER (ENUM) ............................................................................................. 123
10.4.9 MODE_PERIOD (ENUM) ......................................................................................................... 123
10.5 Library ifmIOcommon.library ............................................................................................124
10.5.1 Input ......................................................................................................................................... 125
10.5.2 Output....................................................................................................................................... 128
10.5.3 SetLED ..................................................................................................................................... 131
10.5.4 SupplySwitch ............................................................................................................................ 133
10.5.5 SystemSupply .......................................................................................................................... 135
10.5.6 Temperature ............................................................................................................................. 137
10.5.7 FILTER_INPUT (ENUM) .......................................................................................................... 139
10.5.8 FILTER_OUTPUT (ENUM) ...................................................................................................... 139
10.5.9 MODE_INPUT (ENUM) ............................................................................................................ 140
10.5.10 MODE_OUTPUT (ENUM) ........................................................................................................ 141
10.5.11 SYS_VOLTAGE_CHANNEL (ENUM) ...................................................................................... 141
10.6 Library ifmOutGroup ........................................................................................................142
10.6.1 OutputGroup ............................................................................................................................. 143
10.6.2 FILTER_OUTPUT_GROUP (ENUM) ....................................................................................... 146
10.6.3 MODE_OUTPUT_GROUP (ENUM) ......................................................................................... 146
10.7 Library ifmOutHBridge .....................................................................................................147
10.7.1 HBridge .................................................................................................................................... 148
10.7.2 MODE_BRAKE (ENUM)........................................................................................................... 151
10.8 Library ifmOutPWM ..........................................................................................................152
10.8.1 CurrentControl .......................................................................................................................... 153
10.8.2 PWM1000 ................................................................................................................................. 156
10.8.3 MODE_CURRENT_CONTROL (ENUM) .................................................................................. 160
10.8.4 MODE_PWM (ENUM) .............................................................................................................. 160
Page 5
5
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Contents
10.9 Library ifmRawCAN.library ...............................................................................................161
10.9.1 CAN_Enable ............................................................................................................................. 162
10.9.2 CAN_Recover .......................................................................................................................... 164
10.9.3 CAN_RemoteRequest .............................................................................................................. 166
10.9.4 CAN_RemoteResponse ........................................................................................................... 168
10.9.5 CAN_Rx ................................................................................................................................... 170
10.9.6 CAN_RxMask ........................................................................................................................... 172
10.9.7 CAN_RxRange ......................................................................................................................... 174
10.9.8 CAN_Tx .................................................................................................................................... 176
10.9.9 CAN_Info (GVL) ....................................................................................................................... 178
10.9.10 CAN_BUS_STATE (STRUCT) ................................................................................................. 178
11 Troubleshooting 179
11.1 Error classes ....................................................................................................................179
11.2 Error messages ................................................................................................................180
11.3 Messages / diagnostic codes of the function blocks ........................................................180
12 Appendix 181
12.1 Directory structure and file overview ................................................................................181
12.2 ifm behaviour models for function blocks .........................................................................182
12.2.1 General..................................................................................................................................... 182
12.2.2 Behaviour model ENABLE ....................................................................................................... 182
12.2.3 Behaviour model EXECUTE ..................................................................................................... 183
13 Glossary of Terms 184
14 Index 198
15 Notizen • Notes • Notes 202
16 ifm weltweit • ifm worldwide • ifm à l’échelle internationale 205
Page 6
6
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
About this manual Legal and copyright information

1 About this manual

Legal and copyright information ............................................................................................................ 6
Purpose of the document ...................................................................................................................... 7
Symbols and formats used .................................................................................................................... 7
Overview: documentation modules for CR711S ................................................................................... 8
Overview: documentation for CODESYS 3.n ........................................................................................ 8
How is this documentation structured? ................................................................................................. 9
History of the document CR0711 .......................................................................................................... 9
202
>

1.1 Legal and copyright information

6088
© All rights reserved by ifm electronic gmbh. No part of this manual may be reproduced and used without the consent of ifm electronic gmbh.
All product names, pictures, companies or other brands used on our pages are the property of the respective rights owners:
• AS-i is the property of the AS-International Association, ( www.as-interface.net)
• CAN is the property of the CiA (CAN in Automation e.V.), Germany (→ www.can-cia.org)
• CODESYS™ is the property of the 3S – Smart Software Solutions GmbH, Germany ( www.codesys.com)
• DeviceNet™ is the property of the ODVA™ (Open DeviceNet Vendor Association), USA ( www.odva.org)
• EtherNet/IP® is the property of the →ODVA™
• EtherCAT® is a registered trade mark and patented technology, licensed by Beckhoff Automation GmbH, Germany
• IO-Link® ( www.io-link.com) is the property of the PROFIBUS Nutzerorganisation e.V., Germany
• ISOBUS is the property of the AEF – Agricultural Industry Electronics Foundation e.V., Deutschland ( www.aef-online.org)
• Microsoft® is the property of the Microsoft Corporation, USA ( www.microsoft.com)
• PROFIBUS® is the property of the PROFIBUS Nutzerorganisation e.V., Germany ( www.profibus.com)
• PROFINET® is the property of the PROFIBUS Nutzerorganisation e.V., Germany
• Windows® is the property of the Microsoft Corporation, USA
Page 7
7
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
About this manual Purpose of the document
>

1.2 Purpose of the document

22852
This manual describes of the ecomatmobile family for mobile machines of ifm electronic gmbh: ecomatController <eco100-Bez> (Art.-Nr.: CR711S) firmware version V2.5.0.n and higher
The CODESYS programming system is required to program this device: version 3.5 SP11 or higher
These instructions describe the following topics:
Configuration of the device in the setup mode  Firmware update of the device in the recovery mode  Configuration of the device using CODESYS  Programming of the device-internal PLC of the CR711S using the CODESYS programming
system.
Description of the device-specific CODESYS function libraries
>

1.3 Symbols and formats used

15989
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
Important note Non-compliance can result in malfunction or interference
Information Supplementary note
...
Request for action
> ...
Reaction, result
...
"see"
abc
Cross-reference
123 0x123 0b010
Decimal number Hexadecimal number Binary number
[...]
Designation of pushbuttons, buttons or indications
Page 8
8
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
About this manual Overview: documentation modules for CR711S
>

1.4 Overview: documentation modules for CR711S

22853
The documentation for this devices consists of the following modules: (Downloads from ifm's website ifm weltweit • ifm worldwide • ifm à l’échelle internationale ( p. 205) )
Document
Contents / Description
Data sheet
Technical data in a table
Installation instructions (are supplied with the device)
Instructions for installation, electrical installation, and commissioning  Technical data
Programming manual
Functions of the setup menu of the device  Creation of a CODESYS project with this device  Target settings with CODESYS  Programming of the device-internal PLC with CODESYS  Description of the device-specific CODESYS function libraries
System manual "Know-How ecomatmobile"
Know-how about the following topics (examples):
Overview Templates and demo programs  CAN, CANopen  Control outputs  Visualisations  Overview of the files and libraries
>

1.5 Overview: documentation for CODESYS 3.n

22856
The following user documentation is provided by 3S GmbH for programming the CR711S with CODESYS:
Document
Content / Description
Online help
Context-sensitive help  Description of the CODESYS programming system
After the installation of the programming system store and accessible on the hard disk of the PC/laptop: ...\Programme (x86)\3S CODESYS\CODESYS\Online Help
CODESYS installation and first steps
Remarks about the installing of the programming system CODESYS  First steps for handling the programming system CODESYS
After the installation of the programming system store and accessible on the hard disk of the PC/laptop: ...\Programme (x86)\3S CODESYS\CODESYS\Documentation
CODESYS user manual Safety SIL2
[H2] CODESYS Safety SIL2 - IEC Programming Guidelines.pdf
This document is for programmers who program safety-related controllers.
Download at: www.codesys.com
Page 9
9
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
About this manual How is this documentation structured?
>

1.6 How is this documentation structured?

204
1508
This documentation is a combination of different types of manuals. It is for beginners and also a reference for advanced users. This document is addressed to the programmers of the applications.
How to use this manual:
Refer to the table of contents to select a specific subject.  Using the index you can also quickly find a term you are looking for.  At the beginning of a chapter we will give you a brief overview of its contents.  Abbreviations and technical terms Appendix.
In case of malfunctions or uncertainties please contact the manufacturer at: Contact ifm weltweit • ifm worldwide • ifm à l’échelle internationale ( p. 205)
We want to become even better! Each separate section has an identification number in the top right corner. If you want to inform us about any inconsistencies, indicate this number with the title and the language of this documentation. Thank you very much for your support!
We reserve the right to make alterations which can result in a change of contents of the documentation. You can find the current version on ifm's website: → ifm weltweit • ifm worldwide • ifm à l’échelle internationale (→ p. 205)
>

1.7 History of the document CR0711

22862
What has been changed in this manual? An overview:
Date
State
Change
2017-06-13
01
new document
2017-12-19
02
Article number, operating system version, CODESYS version
Page 10
10
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Functions and features History of the document CR0711

2 Functions and features

23289
This device is used to control processes in applications. For this, device 2 contains 2 PLCs that can be programmed independently of each other. In the CODESYS software platform, these PLCs are called:
• standard PLC
• safety PLC
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
Page 11
11
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Please note!

3 Safety instructions

Please note! ......................................................................................................................................... 11
What previous knowledge is required? ............................................................................................... 12
Important standards............................................................................................................................. 13
Organise the creation of safe machinery with the V model ................................................................. 14
Start-up behaviour of the controller ..................................................................................................... 16
Warnings used ..................................................................................................................................... 16
Notes: serial number ........................................................................................................................... 17
213
>

3.1 Please note!

22910 11212
No characteristics are warranted on the basis of the information, notes and examples provided in this manual. The drawings, representations and examples imply no responsibility for the system and no application-specific particularities.
The manufacturer of the machine/equipment is responsible for ensuring the safety of the
machine/equipment.
Follow the national and international regulations of the country in which the machine/installation is
to be placed on the market!
WARNING
Non-observance of these instructions can lead to property damage or bodily 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.
The acting person must be authorised to work on the machine/equipment. The acting person must have the qualifications and training required to perform this work. Adhere to the technical data of the devices!
You can find the current data sheet on ifm's homepage.
Observe the installation and wiring information as well as the functions and features of the
devices!
supplied installation instructions or on ifm's homepage
Please note the corrections and notes in the release notes for the existing hardware, software
and documentation, available on the ifm website
Website ifm weltweit • ifm worldwide • ifm à l’échelle internationale ( p. 205)
8340
WARNING
The user is responsible for the reliable function of the application programs he designed. If necessary, he must additionally carry out an approval test by corresponding supervisory and test organisations according to the national regulations.
>
Page 12
12
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions What previous knowledge is required?
>
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
>

3.2 What previous knowledge is required?

215
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. These specialists are people who are qualified by their
training and their experience to see risks and to avoid possible hazards that may be caused during operation or maintenance of a product. The document contains information about the correct handling of the product.
Read this document before use to familiarise yourself with operating conditions, installation and operation. Keep the document during the entire duration of use of the device.
Adhere to the safety instructions.
Page 13
13
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Important standards
>

3.3 Important standards

22977 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
Among other things, the programmer of safety-related controllers should also know and observe the content of the following standards:
Standard
Title, content
IEC 61508
Standard: Functional safety of electrical/electronic/programmable electronic safety­related systems
ISO 13849
Standard: Safety of machinery, safety-related parts of control systems
• Part 1: General design principles Part 2: Validation
here: The device can be used up to PL d
IEC 62061
Standard: Machine safety – functional safety of electric, electronic and programmable machine controllers
• Specification of the functional requirements
• Specification of the safety requirements here: The device can be used up to SIL CL 2
Standard: Safety of machinery – Functional safety of electrical, electronic and programmable electronic control systems
• Functional requirements specification
• Safety integrity requirements specification here: device is suited up to SIL CL 2
Page 14
14
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Organise the creation of safe machinery with the V model
>

3.4 Organise the creation of safe machinery with the V model

13264
Summary
Define, observe, check and document the workflow steps in the V model Define responsibilities for tasks Define a person responsible for safety technology (Functional Safety Manager)
Every machine manufacturer should define the responsibilities for the respective tasks within his company through organisational measures. This is independent of the work steps ...
for machine design
• for the creation of the application program for the SafetyController A staff member responsible for the safety technology (FSM = Functional Safety Manager) should also
be appointed. In larger companies this role is assigned to staff members who have the primary responsibility.
Tasks:
• prepare specifications
• prepare safety concept and machine specifications
• prepare functional specifications
• determine or calculate the reliability of the safety function
• document all work steps
• archive the documentation and keep it during the life cycle of the machine
The execution and verification of a task must not be performed by the same staff member!
• create and verify specifications
• create and verify machine specifications
• create and verify the different safety-related function units
• verify the interaction of the function units The 4-eye principle is typically applied here.
To illustrate this structure in graphic form the V model can be applied. The machine manufacturer adds the corresponding details and responsibilities to each work step of a particular application. The machine manufacturer could also – depending on the work packages – create several organisational units based on the V model.
It is important that this organisational structure is documented and archived.
Page 15
15
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Organise the creation of safe machinery with the V model
Figure: V model showing the individual work steps
In accordance with the applicable directives and standards:
adhere to the mechanical and electrical layout of the safety functions when designing the
mobile machine
document the respective steps of the specification and implementation process in a clearly
structured way
make a statement regarding their reliability and the likelihood of a dangerous error
Archive these documents during the entire life cycle of the mobile machine or machine series!
Page 16
16
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Start-up behaviour of the controller
>

3.5 Start-up behaviour of the controller

15233 11575
WARNING
Danger due to unintentional and dangerous start of machine or plant sections! When creating the program, the programmer must ensure that no unintentional and dangerous
start of machines or plant sections after a fault (e.g. e-stop) and the following fault elimination can occur! Realise restart inhibit.
In case of an error, set the outputs concerned to FALSE in the program!
A restart can, for example, be caused by:
• Voltage restoration after power failure
• Reset after the watchdog responded because the cycle time was too long
• Error elimination after an E-stop To ensure safe controller behaviour:
monitor the voltage supply in the application program. In case of an error switch off all relevant outputs in the application program. Additionally monitor actuators which can cause hazardous movements in the application program
(feedback).
>

3.6 Warnings used

13685
WARNING
Death or serious irreversible injuries may result.
CAUTION
Slight reversible injuries may result.
NOTICE
Property damage is to be expected or may result.
Important note Non-compliance may result in malfunction or interference.
Information Supplementary note.
Page 17
17
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Safety instructions Notes: serial number
>

3.7 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.
Before downloading a software component, read out this serial number and check the network
diagram to make sure that you are accessing the right controller.
Page 18
18
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation System requirements

4 Installation

System requirements........................................................................................................................... 18
Carry out installation ............................................................................................................................ 19
23075
This chapter describes the installation of the software components that are necessary to program the CR711S.

4.1 System requirements

Hardware ............................................................................................................................................. 18
Software .............................................................................................................................................. 18
Licensing ............................................................................................................................................. 18
22911
Under which conditions can and may this device be programmed and operated?
>

4.1.1 Hardware

22912
Device from the ifm product family ecomatController CR711S  PC/laptop for CODESYS programming system
( Chapter Software > System requirements CODESYS Development System V3.5)
Ethernet connection between CODESYS PC/laptop and Ethernet interface of the CR711S
( installation instructions)
>

4.1.2 Software

22913
To program the device-internal PLC of the CR711S, the following software components are required:
Component
of
Description
version
CODESYS Development System
3S
Programming software CODESYS for PLC programming complying with the standard IEC 61131-3
3.5 SP11
[CR711S]_V2.5.0.n.zip
ifm
Complete package for ecomatController CR711S, consisting of: Components of the complete package ( p. 20)
V2.5.0.n
The features and functions warranted in this manual can only be obtained by using the software components in the versions that are mentioned here.
On their website, ifm electronic provide the software components for download: → ifm weltweit • ifm worldwide • ifm à l’échelle internationale (→ p. 205)
>

4.1.3 Licensing

22914
By buying a controller CR711S, the buyer also purchases a licence that is valid for the use of the CODESYS 3.5 programming system.
Page 19
19
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>

4.2 Carry out installation

CODESYS programming software ...................................................................................................... 19
Complete package for ecomatController CR711S .............................................................................. 20
Check the operating system version of the device .............................................................................. 22
Update the operating system of the device ......................................................................................... 24
23077
>

4.2.1 CODESYS programming software

7282
The CODESYS Development System (short: CODESYS) serves as platform for the creation of PLC applications according to the standard IEC 61131-3.
>
Install CODESYS Development System
23508
To install the software "CODESYS Development System":
For installation on the PC/laptop, administrator rights are required.
Install the programming system CODESYS 3.5 SP11.
CODESYS installation and first steps
> CODESYS 3.5 SP11 is installed on the PC/laptop.
Page 20
20
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>

4.2.2 Complete package for ecomatController CR711S

23372
>
Components of the complete package
23393
To program the device-internal PLC, ifm provides a complete package "CODESYS for ifm R360III Products". The overall package is structured as follows and includes the following components:
Data name / path
Description
"CODESYS for ifm R360III Products".zip
Complete package
+
CODESYS_Package
Folder
+
PlugIn
Folder
+ CODESYS Safety SIL2 xyz.package
Package "CODESYS Safety SIL2 Plugin"
+ ifm Safety SIL2 Extensions Vn.n.n.n.package
Package "ifm Safety SIL2 Plugin"
+
ifm_ecomatController_Vn.n.n.n.package
Package "ecomatController (device description, libraries, etc.)"
+
Device
Folder
+
boot
Folder
+ boot.ifm
Bootloader
+
os
Folder
+ ifmOS.ifm
Runtime system
The following components must be installed:
CODESYS Safety SIL2 Plugin  ifm Safety SIL2 Plugin  ecomatController package (device description, libraries, etc.)
Page 21
21
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>
Install package (PC/laptop)
23369
To install a package
Requirements
> CODESYS 3.5 SP11 is installed on the PC/laptop. > ifm package "CODESYS for ifm R360III Products" is stored on the PC/laptop.
1 Start CODESYS
Start CODESYS as administrator.
> CODESYS user interface appears.
2 Start Package Manager
Select [Tools] > [Package Manager] to start the Package Manager.
> Package manager appears. > Window shows installed packages.
3 Install package
Click on [Install...].
> The file explorer appears.
select the required file*.package and carry out a full installation.
> The [Package Manager] window shows the installed package.
Click on [Close] to quit the Package Manager. Save the project. Close CoDeSys Start CODESYS
> The installed package is now available.
To install another package, proceed again as described.
>
Update package (PC/laptop)
23370
To update a package:
1 Uninstall the old version of the package
Uninstall package (PC/laptop) (→ p. 22)
2 Install the new version of the package
Install package (PC/laptop) (→ p. 21)
3 Update device
In the device tree: Mark node [Device (CR711S)]. Select [Project] > [Update Device...].
> Dialogue window appears.
Click on [Update Device] to start the update process.
> CODESYS loads new device libraries. > Device tree view is updated.
Click on [Close] to quit the Package Manager. Save the project.
Page 22
22
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>
Uninstall package (PC/laptop)
23371
To uninstall a package:
1 Start package manager
Select [Tools] > [Package Manager] to start the Package Manager.
> Window [Package Manager] shows installed packages.
2 Uninstall package
Activate checkbox [Display versions].
> The window shows the version numbers of the installed packages.
Select the package version to be uninstalled and uninstall it with [Uninstall...].
> Selected package version is uninstalled.
Click on [Close] to quit the Package Manager.
>

4.2.3 Check the operating system version of the device

23560
>
Check the operating system version of the device
23590
To check the operating system version of the device:
► Connect to PLC (→ Set communication path of PLC (→ p. 61)) ► Copy the file \info\swinfo.txt by clicking on [<<] to a local PC drive (→ Manage files
(→ p. 66)).
Open swinfo.txt in an editor, e.g. Notepad
> Content of the opened file (example):
[ifmOS] Version=V1.4.0.3 BuildDate=21.10.2016 15:11:14
[Bootloader] Version=1.2.3.4 BuildDate=01.01.2017 23:10:15
Check the information in the [ifmOS] area behind [Version=]
> If the version deviates from the required version, the operating system must be updated.
Page 23
23
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>
Check the hardware version of the device
23587
To check the hardware version of the device:
► Connect to PLC (→ Set communication path of PLC (→ p. 61)) ► Copy the fifle \info\devinfo.txt by clicking on [<<] to a local PC drive (→ Manage files
(→ p. 66)).
Open and check devinfo.txt in an editor, e.g. notepad
> devinfo.txt contains the following information:
Section
Key
Description
Hardware
Number
Hardware article number
HARDWARE
Name
Hardware article designation
MANUFACTURE
LPKnum
Production order number
MANUFACTURE
LPKerp
ERP material number
MANUFACTURE
Fabrnum
Production order number of the final unit
Page 24
24
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
>

4.2.4 Update the operating system of the device

Update the operating system of the device with the batch file ............................................................ 24
23501
ATTENTION
Important: During the update process, the electric voltage supply of the device must be assured. The device may only be disconnected from the voltage supply after the data transfer/update process
is finished. An incomplete operating system update may destroy the device!
23374
Important: Field test units cannot be updated!
Before the update process, please ensure:
Device is connected to the voltage supply and switched on The Ethernet interface is connected to the same network as the PC
>
Update the operating system of the device with the batch file
23825
ATTENTION
Strictly follow the instructions on the screen during the entire update process!
> Otherwise the controller may be destroyed!
To update the operating system of the device with the batch file update.bat:
Unpack the ZIP file with the batch file update.bat and the corresponding files in a local
memory location.
Important: The data path in which the batch file is unpacked may not contain any blanks!
Execute the batch file update.bat Follow the instructions on the screen.
> The [ecomatController Update Start Menu] appears.
If the device is not set to the standard IP address 192.168.82.247:
Use the [i] key to select the menu item [Set device ip-address]. Enter the IP address set in the device and confirm with [RETURN].
> The IP address setting in the batch program has been changed.
Use the [P] key to call up the menu item [Ping device]
> The ping command is executed. The device must answer to the ping request to enable an
update process.
If ping is successful:
Page 25
25
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Installation Carry out installation
Use the [0] key to call up the menu item [Continue update process].
> Order number, software and hardware version are read from the device.
If an update is possible using the read data:
> The [ecomatController Update Menu] appears. > Otherwise: Error message and return to the [ecomatController Update Start Menu].
Follow the instructions on the screen.
> The updated process is executed.
ATTENTION
After loading the first file cmd.ifm and after the instruction on the screen, execute a power-on
reset of the controller.
> Otherwise the controller may be destroyed!
After the power-on reset, continue the update process following the instructions on the screen. > The user is informed about the success of the update process.
If the update process is finished successfully:
Disconnect the voltage supply. Re-connect the voltage supply after the waiting time.
> The PLC boots with a new operating system.
Page 26
26
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description

5 System description

Hardware description........................................................................................................................... 26
Interfaces ............................................................................................................................................. 51
Software description ............................................................................................................................ 53
975

5.1 Hardware description

Hardware structure .............................................................................................................................. 26
Device supply (technology) ................................................................................................................. 33
Monitoring concept .............................................................................................................................. 36
Inputs (technology) .............................................................................................................................. 38
Outputs (technology) ........................................................................................................................... 43
Feedback in case of externally supplied outputs ................................................................................ 50
14081

5.1.1 Hardware structure

Overview: Hardware ............................................................................................................................ 27
Note on wiring ...................................................................................................................................... 29
Standard PLC and safety PLC ............................................................................................................ 30
Available memory ................................................................................................................................ 31
15332
Page 27
27
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Overview: Hardware
22921
>
System context of the controller
22922 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
All devices of this controller family can execute both security levels simultaneously:
• PLC for safety-related application (in the figure: yellow areas)
• PLC for standard applications (in the figure: blue areas) Elements that can belong to both security levels are grey.
Figure: System context of the controller
Page 28
28
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
System overview
23405
Overview of the system modules
Details:
Module
see
Power supply
Device supply (technology) ( p. 33)
Inputs
Inputs (technology) ( p. 38)
Interfaces
Interfaces
Memory, ports
Available memory ( p. 31)
Processing
Standard PLC and safety PLC
HMI
Status LEDs
Outputs
Outputs (technology) ( p. 43)
Page 29
29
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Block diagram of the supply and of the output deactivation
22934
Figure: Block diagram of the supply
>
Note on wiring
23102
>
Group designations
23103
Inputs and outputs are assigned in groups. Input groups are required for 2-channel safety-related inputs.
The identifier of an input or output results from the following principle:
1. Type (IN, OUT)
2. Group number (00...18)
3. Channel number (00...08) Examples:
IN0002 = input | group 00 | channel 02 in this group  OUT0507 = output | group 05 | channel 07 in this group
In case of ready-to-use multipoint connectors, both the corresponding identifier and the corresponding pin number is indicated on each individual wire.
Page 30
30
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Standard PLC and safety PLC
22916 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
The device features separate controllers:
• for standard functions
• for safety-related functions (safety) Before the programming of the application may even begin:
► distribute the resources to both PLCs ( Chapter Configure PLC (→ p. 64)).
(system, inputs, outputs, user LEDs)
Page 31
31
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Available memory
13736
>
Memory allocation
22928
IEC61131-1 divides the memory for the storage of the user data into: memory of the applications (parts are configurable)
• IEC code non-safe
• IEC code safe
Application data memory (IEC data):
for volatile data (IEC RAM)  for non-volatile data (memory-remanent in case of voltage failure)
The device has the following additions:
USER files (storage of application-specific data in one data format)  IEC memory bytes (permanent storage of application-specific data at application-specific
addresses)
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
FLASH memory
RAM
remanent memory
physical: 9.0 Mbytes
available: 6.0 Mbytes
physical: 2.7 Mbytes
available: 1.5 Mbytes
physical: 10 Kbytes
available: 10 Kbytes
IEC code (safe)
(configurable)
IEC code (non-safe)
(configurable)
user files
(1.0 Mbytes)
IEC RAM (safe)
(configurable)
IEC RAM (non-safe)
(configurable)
IEC retain (safe)
(2.5 Kbytes)
IEC memory bytes (safe)
(2.5 Kbytes)
IEC retain (non-safe)
(2.5 Kbytes)
IEC memory bytes (non-safe)
(2.5 Kbytes)
Table: memory areas
Page 32
32
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Memory allocation variants
22932 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
The user can select from the pre-defined configurations of the memory partitioning. The configuration enables optimum separation between safety-relevant application and standard application.
Memory
Configuration
IEC code safe
IEC RAM safe
IEC code non-safe
IEC RAM non-safe
Configuration 1
1.0 Mbytes
306 Kbytes
4.0 Mbytes
1228 Kbytes
Configuration 2 (preset)
2.0 Mbytes
614 Kbytes
3.0 Mbytes
920 Kbytes
Configuration 3
3.0 Mbytes
920 Kbytes
2.0 Mbytes
614 Kbytes
Configuration 4
4.0 Mbytes
1228 Kbytes
1.0 Mbytes
306 Kbytes
Table: configurable memory partitioning
Description of the allocation of the memory partitions in CODESYS: Allocate memory partition ( p. 64)
Page 33
33
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>

5.1.2 Device supply (technology)

Voltage ranges of the on-board system .............................................................................................. 33
Start conditions .................................................................................................................................... 33
Switch on/off via main switch .............................................................................................................. 34
Switch on/off via ignition lock (Terminal 15) ........................................................................................ 35
23404
>
Voltage ranges of the on-board system
22926
The system monitors the voltage ranges of the on-board system. The voltages mentioned here apply to the specified range ± 1 % (at 36 V).
Voltage [V]
Description
from
to
< +5.5
Undervoltage VBB15, VBB30:
If the controller was in the OPERATING mode, the controller shuts down.
+5.5
< 8.0
Limited operating range If the controller was in the OPERATING mode, then it continues to operate in this range without any
restrictions in case of voltage dips.
+8.0
+32.0
Regular operating voltage Nominal operating voltage
all functions available VBB15 > 5 V AND VBB30 > 8 V:
The controller is booting
> +32.0
+36.0
Overvoltage (protected) The device is not damaged by the voltage deviation.
If this condition on VBB15 / VBB30 in the OPERATING mode lasts longer than 10 s, the controller changes to the FATAL ERROR state. If this condition on VBB0...n in the OPERATING mode lasts longer than 10 s, the corresponding output group changes to the COMPONENT ERROR state.
> +36.0
Overvoltage (unprotected) In this area, the device is no longer protected and the behaviour is not predictable.
The device can be destroyed by this voltage. If such voltages are likely to occur in an application, provide for external protection!
>
Start conditions
22925
The device only boots when sufficient voltage is applied to the power supply connection VBB30 and to VBB15 (= terminal 15). In vehicles clamp 15 is the plus cable switched by the ignition lock.
This voltage must be provided by the on-board system of the mobile machine. → chapter Monitoring concept (→ p. 36)
Page 34
34
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Switch on/off via main switch
22917
To do so: VBB15 is connected with VBB30 Procedure when switching on the main switch > The system recognises the applied voltage (VBB15 > 5 V AND VBB30 > 8 V) and activates the
connection of the controller to the VBB30 potential via solid-state switch.
> The controller boots and starts. Procedure when switching off the main switch:
> Running tasks will continue till the end.
IMPORTANT: The maximum length of tasks is 50 ms! Tasks that run for longer will be aborted before the end of the task.
> the system automatically stores the retain data
the input signals are no longer read the outputs are switched off.
> the system switches off completely
If this behaviour is not wanted, use the circuit via ignition lock:
Page 35
35
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Switch on/off via ignition lock (Terminal 15)
22918
To do so:
Connect the VBB15 via the ignition lock (= vehicle terminal 15 *) with the vehicle plus pole. Connect VBB30 directly with the vehicle plus pole (= vehicle terminal 30).
*) In vehicles clamp 15 is the plus cable switched by the ignition lock.
Figure: Delayed switch-off via ignition lock (terminal 15)
Procedure as with switch-on via ignition lock:
> The ignition lock applies voltage to VBB15 (= vehicle terminal 15 *). > The system recognises the applied voltage (VBB15 > 5 V AND VBB30 > 8 V) and activates the
connection of the controller to the VBB30 potential via solid-state switch.
> The ignition lock is bypassed. Latching of the control voltage is established. > The controller boots and starts.
Procedure for switching off via ignition lock:
► Evaluate VBB15 in the application via FB SystemSupply (→ p. 135)
If VBB15 < 5 V: execute necessary actions (e.g.:)
• stop machine gently
• transmit required data
• save required data and close
set the the input xSwitchOff of the FB SupplySwitch ( p. 133) to TRUE  running tasks continue till the end.  stop the application  the system automatically stores the retain data
the input signals are no longer read the outputs are switched off.
the system lifts the latching via VBB30:  the system switches off completely
Page 36
36
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>

5.1.3 Monitoring concept

22919
The controller monitors the supply voltage for overvoltage and undervoltage. In case of undervoltage, the controller switches off.
>
Monitoring and securing mechanisms
22941
>
Switch off outputs via solid-state switch
23273
WARNING
Danger due to unintentional deactivation of all outputs! If monitoring routines detect a system error: > The device switches off the energy for all outputs of the affected output groups.
chapter Output groups chapter List of outputs ( p. 49)
During the program process, the output switches are under the user's full software control. For further safety, the corresponding applicable national regulations must be complied with.
If an error occurs during the program sequence, it is possible to disconnect the output switches from voltage via the FB OutputGroup in order to separate critical plant sections.
11575
WARNING
Danger due to unintentional and dangerous start of machine or plant sections! When creating the program, the programmer must ensure that no unintentional and dangerous
start of machines or plant sections after a fault (e.g. e-stop) and the following fault elimination can occur! Realise restart inhibit.
In case of an error, set the outputs concerned to FALSE in the program!
Page 37
37
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Watchdog
23274
The watchdog has multiple levels: IEC task-related watchdog
This watchdog works in the ifm operating system and is executed in each CPU core. Each task is monitored individually. If an error occurs, the system only deactivates the affected PLC and the corresponding outputs. Error class = B
External watchdog
If an error occurs, this watchdog puts the entire system into the "safe state" (emergency stop). The output groups change to logic "0".
Error class = A chapter Error classes To eliminate the fault: Rebooting the PLC is necessary via voltage on/off.
>
Configure IEC watchdog
23564
Familiarise yourself with the following CODESYS functions!
Watchdog:
Online help > CODESYS Development System > Programming Applications > Task Configuration > Creating a Task Configuration > Tab 'Configuration'
Task configuration:
Online help > CODESYS Development System > Programming Applications > Task Configuration
To configure the IEC watchdog of a task:
Open task configuration (Configure task processing ( p. 80)) Activate watchdog with option field [Enable] Enter watchdog [Time] Set [Sensitivity]
> Watchdog is configured
The watchdog time must be shorter than the interval time. The watchdog time must be longer than the runtime of the task.
>
Page 38
38
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>

5.1.4 Inputs (technology)

Types of inputs .................................................................................................................................... 38
List of inputs ........................................................................................................................................ 42
14090
Types of inputs
Binary input block diagram plus/minus-switching ................................................................................ 38
Input type IN MULTIFUNCTION-A ...................................................................................................... 39
Input type IN FREQUENCY-A/B ......................................................................................................... 39
Input type IN RESISTOR-A ................................................................................................................. 40
Input type IN DIGITAL-A ..................................................................................................................... 40
Input type IN DIGITAL-B ..................................................................................................................... 41
23078
We differentiate between the following input types:
>
Binary input block diagram plus/minus-switching
23080
CSI = Current Sinking In = connection of binary input n (S) = sensor
CSO = current sourcing In = connection of binary input n (S) = sensor
Binary input block diagram, plus-switching (BL)
for positive sensor signal
Input = open Signal = Low (GND)
Binary input block diagram, minus-switching (BH)
for negative sensor signal:
Input = open Signal = High (Supply)
Page 39
39
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Input type IN MULTIFUNCTION-A
23081
Binary and analogue inputs
Block diagram IN MULTIFUNCTION-A
IN#### = Connection of multi-function input no. ####
(CR) = device (1) = input filter (2) = analogue current measurement
RE = 300 (3) = binary input, plus-switching
RE = 10 k (4) = analogue voltage measurement
0...10 V / 0...32 V (5) = measured value (6) = reference voltage for ratio
Configure input Chapter System configuration
Possible operating modes:
Binary input CSI (BL) (RE = 10 k) or Namur  Analogue current measurement 0...20 mA  Analogue voltage measurement 0...10 V  Analogue voltage measurement 0...32 V  Analogue voltage measurement, ratiometric to the reference voltage
>
Input type IN FREQUENCY-A/B
23083
Binary and fast inputs
Block diagram IN FREQUENCY-A/B
IN#### = Connection of frequency / counting input no. ####
(CR) = device (1) = input filter (2) = CSI binary input
plus-switching (3) = CSO binary input
minus-switching (4) = measured value (analogue) (5) = measured value (binary)
Configure input Chapter System configuration
Possible operating modes:
Binary input CSI (BL) (RE = 10 k) or Namur  Binary input CSO (BH)  Analogue voltage measurement 0...10 V (only for input type IN FREQUENCY-B)  Pulse measurement CSI (BL) (frequency measurement, ratio measurement, pulse counter)  Pulse measurement CSO (BH) (frequency measurement, ratio measurement, pulse counter)
Page 40
40
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Input type IN RESISTOR-A
23083
Binary inputs and resistance measurement
Block diagram IN RESISTOR-A
IN#### = Connection of frequency / counting input no. ####
(CR) = device (1) = input filter (2) = CSI binary input
plus-switching (3) = measured value (analogue)
Configure input Chapter System configuration
Possible operating modes:
Binary input CSI (BL) (RE = 10 k) or Namur  Resistance measurement 0...30 k
>
Input type IN DIGITAL-A
23087
Binary inputs
Block diagram IN DIGITAL-A
IN#### = Connection of binary input no. ####
(CR) = device (1) = input filter (2) = measured value (analogue)
Input not configurable
Possible operating modes: Binary input CSI (BL) (RE = 10 k) or Namur
Page 41
41
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Input type IN DIGITAL-B
23089
Binary inputs
Block diagram IN DIGITAL-B
IN#### = Connection of binary input no. ####
(CR) = device (1) = input filter (2) = measured value (analogue)
Input not configurable
Possible operating modes: Binary input CSI (BL) (RE = 3.3 k) or Namur
Page 42
42
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
List of inputs
23117
IEC identifier
Input type
IN0000
IN Frequency-A
IN0001
IN Frequency-A
IN0002
IN Frequency-A
IN0003
IN Frequency-A
IN0100
IN Multifunction-A
IN0101
IN Multifunction-A
IN0102
IN Multifunction-A
IN0103
IN Multifunction-A
IN0200
IN Multifunction-A
IN0201
IN Multifunction-A
IN0202
IN Multifunction-A
IN0203
IN Multifunction-A
IN0300
IN Digital-B
IN0301
IN Digital-B
IN0400
IN Resistor-A
IN0401
IN Resistor-A
IN0500
IN Frequency-A
IN0501
IN Frequency-A
IN0502
IN Frequency-A
IN0503
IN Frequency-A
IN0600
IN Multifunction-A
IN0601
IN Multifunction-A
IN0602
IN Multifunction-A
IN0603
IN Multifunction-A
IN0700
IN Multifunction-A
IN0701
IN Multifunction-A
IN0702
IN Multifunction-A
IN0703
IN Multifunction-A
IN0800
IN Digital-B
IN0801
IN Digital-B
IN0900
IN Resistor-A
IN0901
IN Resistor-A
>
Page 43
43
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>

5.1.5 Outputs (technology)

Output types ........................................................................................................................................ 43
List of outputs ...................................................................................................................................... 49
14093
Output types
Binary output block diagram plus/minus-switching ............................................................................. 43
Output type OUT PWM-n-A ................................................................................................................. 44
Output type OUT PWM-n-B ................................................................................................................. 45
Output type OUT PWM-n-BRIDGE-A .................................................................................................. 46
Output type OUT Supply-A .................................................................................................................. 47
Output type OUT Voltage-A ................................................................................................................ 48
23079
We differentiate between the following output types:
>
Binary output block diagram plus/minus-switching
23090
CSO = current sourcing Qn = connection of output n (L) = load
CSI = current sinking Qn = connection of output n (L) = load
Output block diagram plus-switching (BH)
for positive output signal
Output block diagram, minus-switching (BL)
for negative output signal
Page 44
44
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Output type OUT PWM-n-A
23091
n = current rating Example: n = 25 I
max
= 2.5 A
Binary output or analogue output with pulse width modulation (PWM), optionally current-controlled (PWMI)
Block diagram OUT PWM-n-A
OUT#### = connection of PWM output no. #### (CR) = device (1) = measured value (analogue) (2) = measured value (binary)
Configure input Chapter System configuration
Possible operating modes:
Binary output CSO (BH)  analogue output CSO with pulse width modulation (PWMH)  analogue output CSO with pulse width modulation, current-controlled (PWMI)
Setting and measurement via:
FB Output ( p. 128)for binary output  FB PWM1000 ( p. 156) for PWM  FB CurrentControl ( p. 153) for current control (PWMI)
Page 45
45
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Output type OUT PWM-n-B
23093
n = current rating Example: n = 25 I
max
= 2.5 A
Binary output or analogue output with pulse width modulation (PWM)
Block diagram OUT PWM-n-B
OUT#### = connection of PWM output no. #### (CR) = device (1) = measured value (binary) U
ADC
= current mirror
Configure input Chapter System configuration
Possible operating modes:
Binary output CSO (BH) with restricted current measurement  analogue output CSO witch pulse width modulation (PWMH), without current measurement
Setting and measurement via:
Function block Output ( p. 128) for binary output  Function block PWM1000 ( p. 156) for PWM
Page 46
46
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Output type OUT PWM-n-BRIDGE-A
23094
n = current rating Example: n = 25 I
max
= 2.5 A
Binary output or analogue output with pulse width modulation (PWM), optionally current-controlled (PWMI) or bridge output (via PWM)
Block diagram OUT PWM-n-A
OUT#### = connection of PWM output no. #### (CR) = device (1) = measured value (analogue) (2) = measured value (binary)
Configure input Chapter System configuration
Possible operating modes:
Binary output CSO (BH)  Binary output CSI (BL)  analogue output CSO with pulse width modulation (PWMH), current controlled (PWMI)  analogue output CSI with pulse width modulation (PWML)  analogue output CSO with pulse width modulation, current-controlled (PWMI)  Pair of outputs as bridge with pulse width modulation (PWM)
Setting and measurement via:
FB Output ( p. 128) for binary output  FB PWM1000 ( p. 156) for PWM  FB CurrentControl ( p. 153) for current control (PWMI)  FB HBridge ( p. 148) for bridge output
Page 47
47
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Output type OUT Supply-A
23125
The output OUT3000 is used to supply sensors with a stable voltage (5 V or 10 V) that is not affected by fluctuations of the supply voltage.
13402
NOTICE
Reference voltage output can get damaged! Do NOT apply any external voltage!
Setting and measurement via FB Output ( p. 128) or via system configuration:
>
Setting / measurement via system configuration
22942
Setting the reference voltage:
In the device tree, select [Local_IO] > [Outputs] > tab [Parameter] > [OUT3000] Activate the required list element in the column [Value]:
for 5 V: [OUT_SENSOR_05] or
for 10 V: [OUT_SENSOR_10] Monitoring of the values at the reference voltage output:
In the device tree, select [Local_IO] > [Outputs] > tab [IO-Mapping] > [OUT3000_I] > [OutVoltageDiag] indicates the measured voltage in [mV]
[OutCurrentDiag] indicates the measured voltage in [mA]
>
Setting /measurement via FB Output
23422
Setting the reference voltage: Use the inputs in the FB output as follows:
[uiChannel] = 3000
[eMode] = [OUT_SENSOR_05] (for 5 V) or
[eMode] = [OUT_SENSOR_10] (for 10 V) Monitoring of the values at the reference voltage output:
Read the outputs in the FB output as follows: > [uiOutVoltage] indicates the measured voltage in [mV]
[uiOutCurrent] indicates the measured current in [mA] Details FB Output ( p. 128).
Page 48
48
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
Output type OUT Voltage-A
23126
The output provides 0...10 V e.g. for further controllers or actuators. M3071n / CR071n: only OUT3001 M3072n / CR072n: OUT3001 and OUT3002
The output is protected against overload and automatically switches off if overloaded.
13402
NOTICE
Reference voltage output can get damaged! Do NOT apply any external voltage!
Setting and measurement via FB Output or via system configuration:
>
Setting / measurement via system configuration
23424
Setting the reference voltage:
Select [Local_IO] > [Outputs] > tab [Parameter] > [OUT3001 / OUT3002] in the device tree Enter the required value [V] in the column [Value]
permissible = 0...10
Monitoring of the values at the reference voltage output: Select [Local_IO] > [Outputs] > tab [IO-Mapping] > [OUT3001_I / OUT3002_I] in the device tree > [OutVoltageDiag] indicates the measured voltage in [mV]
>
Setting /measurement via FB Output
23425
Setting the reference voltage: Use the inputs in the FB output as follows:
[uiChannel] = 3001 / 3002
[uiValue] = required voltage in [mV]
permissible = 0...10000
Monitoring of the values at the reference voltage output: Read the outputs in the FB output as follows: > [uiOutVoltage] indicates the measured voltage in [mV]
[uiOutCurrent] indicates the measured current in [mA] Details FB Output ( p. 128).
Page 49
49
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>
List of outputs
23116
IEC identifier
Output type
OUT0000
OUT PWM-25-A
OUT0001
OUT PWM-25-B
OUT0002
OUT PWM-25-A
OUT0003
OUT PWM-25-B
OUT0004
OUT PWM-25-A
OUT0005
OUT PWM-25-B
OUT0006
OUT PWM-40-Bridge-A
OUT0007
OUT PWM-40-Bridge-A
OUT0008
OUT PWM-40-A
OUT0100
OUT PWM-25-A
OUT0101
OUT PWM-25-B
OUT0102
OUT PWM-25-A
OUT0103
OUT PWM-25-B
OUT0104
OUT PWM-25-A
OUT0105
OUT PWM-25-B
OUT0106
OUT PWM-40-Bridge-A
OUT0107
OUT PWM-40-Bridge-A
OUT0108
OUT PWM-40-A
OUT0200
OUT PWM-25-A
OUT0201
OUT PWM-25-B
OUT0202
OUT PWM-25-A
OUT0203
OUT PWM-25-B
OUT0204
OUT PWM-25-A
OUT0205
OUT PWM-25-B
OUT0206
OUT PWM-40-Bridge-A
OUT0207
OUT PWM-40-Bridge-A
OUT0208
OUT PWM-40-A
OUT3000
OUT Supply-A
OUT3001
OUT Voltage-A
Page 50
50
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Hardware description
>

5.1.6 Feedback in case of externally supplied outputs

23874
Do not apply any external voltage to the outputs!
> As soon as output group switch VBBn_SW_Q = FALSE:
The internal device monitoring checks the voltage on the contact bar after the output group switch.
If then a voltage of > 0.4 VBBn is measured:
• the controller reports error class C,
• the controller switches the group to the safe state.
Safe state of the group = all outputs are switched off
• all outputs will be switched off
• the controller reports the error to the IEC application To reboot the device:
remove the error cause do a power-on reset.
OR error handling in the IEC application:
remove the error cause Remove error of the group via xResetError
Figure: Example of wiring with blocking diodes due to the risk of feedback
Remedy: Insert the blocking diodes V1 and V2 ( green arrows)!
Successful: If VBBn_SW_Q = FALSE, the controller does not go to error class C when the S1 contact is closed.
NOTE
Help for externally connected outputs
Decouple the externally connected outputs by means of diodes so that no external voltage can
be connected to the output terminal of the controller!
Page 51
51
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Interfaces
>

5.2 Interfaces

23132
The device includes the interfaces described in the following.
Position of the connections on the device and technical data: Installation instructions, data sheet
>

5.2.1 Serial interface

23133
This device features a serial interface. The serial interface can generally be used in combination with the following functions:
• program download
• debugging Connections and data data sheet
>

5.2.2 Ethernet interface

23134 23450
NOTICE
Only use the Ethernet interface in a secure network environment (e.g. separate network or VPN)! Otherwise, unauthorised persons can read or manipulate data or tamper with the functions of the
device.
This device features an Ethernet interface with 2 ports via an internal switch. This enables line wiring between several devices.
The Ethernet interface supports the following standards:
• transmission rate 10/100 Mbits/s The Ethernet interface supports the following protocols:
• TCP/IP
• UDP/IP
• Modbus TCP slave
• Modbus/TCP master
• network variables UDP Connections and data data sheet
Page 52
52
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Interfaces
>

5.2.3 CAN: Interfaces and protocols

23147
Familiarise yourself with the following CODESYS functions!
CAN-based fieldbuses
Online help > Fieldbus support > CAN-based fieldbuses
The device has 4 CAN interfaces. Each CAN interface supports the following protocols:
RawCAN (CAN Layer 2)  CANopen Manager  CANopen Device  CANopen Safety Manager  CANopen Safety Device  J1939 Manager
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
Page 53
53
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Software description
>

5.3 Software description

Overview: Software ............................................................................................................................. 53
Software module for the device ........................................................................................................... 55
23148
>

5.3.1 Overview: Software

23511
We differentiate between the following software components:
>
Software on the PC/notebook.
23518
The programming environment CODESYS Development System is installed in the PC/notebook to create and debug both applications. The controller supports service and maintenance via CODESYS or via other tools.
The CODESYS functions are extended with Config plugins. Thereby, additional setting options for memory and inputs/outputs become available. ifm electronic provides adequate device descriptions for the CODESYS Development System for each derivative. IEC libraries for the safe and non-safe applications provide CODESYS and the programmer with access options to the functions of the controller.
Page 54
54
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Software description
>
Software in the controller
23519
The controller processes the applications by means of several software components. The ifm operating system with the CODESYS CTRL-SIL2 and the CODESYS CTRL constitutes,
among other things, the runtime environment that executes both applications. The real-time operating system enables separate execution of the safe and the non-safe software components in the controller.
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
Using the configuration file comconf.cfg, the programmer can control the interface. The programmer can store files and directories on the controller and use them in the application. Or
the applications themselves create files and store them in the controller. The bootloader is a fallback level for cases in which the ifm operating system is no (longer) available
or corrupt.
Page 55
55
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Software description
>

5.3.2 Software module for the device

23500
The software in this device communicates with the hardware as follows:
Software module
Can the user change the module?
Using what?
Application with libraries a) for standard PLC b) for safety PLC
yes
CODESYS,
Tools for service and maintenance
ifm operating system
Upgrade yes
Downgrade no
CODESYS,
Tools for service and maintenance
Bootloader
no
---
(Hardware)
no
---
We describe this software module in the following:
>
Bootloader
23503
The bootloader is a start program with which the operating system and the application can be reloaded on the device.
23561
Only execute the bootloader update when explicitly requested by ifm!
>
Operating system
23504
Basic program in the device, establishes the connection between the hardware of the device and the application. Chapter Software module for the device
The device is supplied with the installed operating system. Verifying and changing the operating system version Chapter Check the operating system version of the
device ( p. 22)
The operating system only needs to be downloaded once - if at all. The application can then be loaded (also several times) in a PLC without affecting the operating system.
The operating system can be downloaded from ifm electronic gmbh's website: → ifm weltweit • ifm worldwide • ifm à l’échelle internationale (→ p. 205)
Page 56
56
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System description Software description
>
Application
23505
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 decisions.
8340
WARNING
The user is responsible for the reliable function of the application programs he designed. If necessary, he must additionally carry out an approval test by corresponding supervisory and test organisations according to the national regulations.
>
Libraries
23505 23458
ifm electronic provides the following function libraries for the programming of the device under
CODESYS 3.5:
Name
Description
ifmCANopenManager
Functions for use of the CAN interfaces as CANopen Manager
ifmDeviceCR711S
Data structures, enumeration types and global variables
ifmFastInput
Functions to access the fast inputs of the device
ifmIOcommon
Functions for access to the inputs and outputs of the device
ifmIOconfigDiagProt
Functions to configure the I/O-related diagnostic and protective functions
ifmOutGroup
Functions to control output group switches
ifmOutHBridge
Functions to access H-bridge outputs
ifmOutPWM
Functions to access PWM outputs
ifmRawCAN
Functions for use of the CAN interfaces as CAN Layer 2
ifmSysInfo
Functions to set / read system information
ifmTypes
Global types and interfaces for other ifm libraries
Detailed information about the ifm function libraries: ifm function libraries ( p. 102)
Page 57
57
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Start CODESYS

6 Getting started

Start CODESYS .................................................................................................................................. 57
Create CODESYS project ................................................................................................................... 57
Use CODESYS user manual ............................................................................................................... 60
Configure programming interface ........................................................................................................ 61
Add ifm function libraries to the application ......................................................................................... 62
Activate the access protection for a project ........................................................................................ 63
15858
This chapter contains information about the first steps to program the device with CODESYS.
>

6.1 Start CODESYS

23383
Requirements
> Software components are correctly installed ( Installation).
Start CODESYS
Double-click on [3.5 SP11] symbol > CODESYS starts. > CODESYS user interface appears.
>

6.2 Create CODESYS project

23384
Familiarise yourself with the following CODESYS functions!
Create a project
Online help > CODESYS Development System > Creating and Configuring a Project
Manage a project
Online help > CODESYS Development System > Protecting and Saving the Project
ifm electronic provides a special template for each model of the device family. The user can select the corresponding template when the project is created.
Page 58
58
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Create CODESYS project
>

6.2.1 Create new project with CR711S

23452
Requirements
> ifm package "CODESYS for ifm R360III Products" has been correctly installed ( Installation).
1 Create new CR711S project
Select [File] > [New Project...].
> The window [New Project] appears.
Set the following values:
1. [Templates]: Select the device project template, e.g. [CR0721 Project]
2. [Name]: Enter the project name
3. [Location]: Select storage location for the project file
Click on [OK] to adopt the selected values.
> CODESYS creates a new CR711S project. > The window [Devices] shows the device tree of the project ( Overview: Project structure with
CR711S).
2 Save the project
Select [File] > [Save Project].
> CODESYS saves the project.
Page 59
59
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Create CODESYS project
>

6.2.2 Overview: Project structure with CR711S

23387
A CODESYS project contains all components for configuration, management and programming of the CR711S. All components of a project are shown in the window [Devices] in a hierarchic tree view. CODESYS projects with a CR711S have the following structure:
Legend:
ifm_CR711S_Root (ifm CR711S Root)
provides access to the settings of the CR711S Configure PLC
SafetyPLC (ifm CR711S SIL2)
Content of the PLC called "SafetyPLC"
StandardPLC (ifm CR711S Standard)
Content of the PLC called "StandardPLC"
PLC logic
contains the applications of the CR711S → Objects of a PLC application (→ p. 77)
System info
provides access to the device information → Display system information (→ p. 101)
Local_IO
provides access to the configuration options of the inputs and outputs → Configure inputs and outputs (→ p. 67)
HMI
provides access to the configuration options of the operating and display elements
Communication
provides access to the configuration options of the communication interfaces → Configure CAN interfaces (→ p. 70)
The programmer can adjust the terms in the structure before the expression in brackets: Right mouse click on the term > [Properties...] > The window [Properties] appears > tab [Common]
enter a term confirm with [OK]
Page 60
60
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Use CODESYS user manual
>

6.3 Use CODESYS user manual

15221
This manual only describes the integration, configuration and the programming of the CR711S using the CODESYS development system.
For the description of user actions and user interface elements the CODESYS terminology will be used.
Standard functions and methods of CODESYS will not be described. At the beginning of each section there will be a reference to the corresponding chapters of the CODESYS online help.
To access the online help of the CODESYS development system:
Start CODESYS. > The CODESYS user interface appears. Press [F1]. > Online help of the CODESYS development system appears.
Familiarise yourself with the CODESYS development system! In particular with the
following topics:
Names and functions of the user interface elements  Basic menu functions  Programming techniques and methods for data retention
Page 61
61
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Configure programming interface
>

6.4 Configure programming interface

23495
Programming of the device-internal PLC is made via the Ethernet interface of the device (position of the connections: Installation instructions).
Device and PC/laptop can be coupled directly or indirectly via an Ethernet network. Only use the recommended accessories for connection of the Ethernet interfaces!
( Installation instructions).
For connection in the network, an experienced user or system administrator should set
up the network addresses and do the configuration.
23450
NOTICE
Only use the Ethernet interface in a secure network environment (e.g. separate network or VPN)! Otherwise, unauthorised persons can read or manipulate data or tamper with the functions of the
device.
>

6.4.1 Set communication path of PLC

13901
To configure the communication path between the programming system CODESYS and the device­internal PLC:
Preparations
> CODESYS PC/laptop and Ethernet interface of the device are connected. > Optional: Adjust IP settings of the Ethernet interface.
1 Select communication settings
In the device tree: Double-click on symbol [Device (CR711S)]
> In the editor window: Select tab [Communication]. > Editor window shows communication settings.
2 Select gateway
Select the requested gateway in the list [Gateway].
> List shows selected gateway.
3 Set communication path
► Activate [Scan Network …].
> Window [Select Device] appears.
Select gateway node and start scan process with [Scan network].
> CODESYS scans network for devices. > Window shows network path and detected devices.
Select node of the device and activate [OK] to set the communication path to the device-
internal PLC.
> CODESYS can transfer data to the device-internal PLC.
Page 62
62
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Add ifm function libraries to the application
>

6.5 Add ifm function libraries to the application

23390
Familiarise yourself with the following CODESYS functions!
Library manager
Online help > CODESYS Development System > Managing Libraries > Adding a library to the application
The ifm package includes function libraries for the programming of the device under CODESYS. The libraries are installed in CODESYS together with the ifm package.
The user can add the libraries individually to an application he/she needs for the programming.
By means of the container library ifmR360-3.library, the user can add all functions available for the device to the project.
To integrate a library into a project:
Requirements:
> ifm package is correctly installed ( Install package (PC/laptop) ( p. 21)).
Load container library
In the device tree: Double-click on [PLC Logic] > [Application] > [Library Manager]
> Editor window shows table of added libraries.
Click on [Add library].
> Dialogue window [Add library] appears.
Select requested library and click on [OK] to add the selected library to the application.
> CODESYS adds the selected library to the project. > Editor window shows the library.
Page 63
63
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Getting started Activate the access protection for a project
>

6.6 Activate the access protection for a project

21783
Familiarise yourself with the following CODESYS functions!
Protect and save project
Online help > CODESYS Development System > Protect and save project
The user can use a password to protect the device from unauthorised access. Select [Project] > [Project Settings...]. > Window [Project Settings] appears.
Select [Security]. Activate checkbox [Enable project file encryption]. Enter the requested password in the field [New password]. Enter the entered password again in the field [Confirm new password]. Select [OK] to activate the access protection for the project.
> Access protection is activated. Project is encrypted.
Page 64
64
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure PLC

7 System configuration

Configure PLC ..................................................................................................................................... 64
Configure inputs and outputs .............................................................................................................. 67
Configure interfaces ............................................................................................................................ 68
23096
>

7.1 Configure PLC

23097 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
>

7.1.1 Allocate memory partition

23483 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
Further information: Memory allocation variants ( p. 32) To allocate the memory partitions to the PLCs:
1 Select memory partition
In the device tree: Double-click on symbol [Device (CR711S)] In the editor window: Select [Memory Layout] tab.
> The editor window shows the partitioning of the memory:
Memory layout
Partitioning Safety PLC / PLC
MemoryLayout_4s_1
4 MB / 1 MB
MemoryLayout_3s_2
3 MB / 2 MB
MemoryLayout_2s_3
2 MB / 3 MB
MemoryLayout_1s_4
1 MB / 4 MB
2 Set memory partitioning
Highlight the required memory partition Click on the [Update Devices] button
> Memory partitioning is adopted in CODESYS
3 Load memory partition into the device
Click on the [Download Configuration] button
> Memory partition is downloaded to the device
Page 65
65
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure PLC
>

7.1.2 Allocate inputs/outputs

23482 23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
To allocate the I/Os to the PLCs:
Before the programming of the application may even begin:
1 Select I/O allocation
In the CODESYS device tree: Double-click on symbol [Device (CR711S)] In the editor window: Select [I/O Assignment] tab.
> Editor window shows the PLC allocation of the inputs/outputs (excerpt):
Section
Element
Parameter
Standard
PLC
Safety
PLC
System info
IP Settings
--
Local_IO
Inputs
IN0000
IN0001
IN0002
… … …
Outputs
OUT0000
OUT0001
OUT0002
… … …
System_Outputs
VBB0_SW
VBB1_SW
… … …
Supply_Switch
HMI
User_LEDs
User LED 0
User LED 1
User LED 2
User LED 3
2 Set I/O allocation
Highlight all I/Os in the column [StandardPLC] to allocate it to the standard PLC Highlight all I/Os in the column [SafetyPLC] to allocate it to the safety PLC
> The I/Os are allocated
Page 66
66
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure PLC
>

7.1.3 Manage files

23520
To transfer files between PC and device:
1 Select file view
In the device tree: Double-click on symbol [Device (CR711S)] In the editor window: Select the [Files] tab.
> The editor window shows the file structure on the PC on the left and on the device on the right
2 Transfer file from PC to device
Highlight the file on the left Select device target directory on the right Star transfer using the [>>] button
> The file is transferred to the device
3 Transfer the file from the device to the PC
Highlight the file on the right Select PC target directory on the left Start the transfer using the [<<] button
> The fle is transferred to the PC
>

7.1.4 Manage users and groups

23521
This function has not yet been implemented.
Page 67
67
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure inputs and outputs
>

7.2 Configure inputs and outputs

23099
The inputs and outputs can be configured applying two methods:
>

7.2.1 via system configuration

23149
This method is useful if the configuration is not supposed to be changed again during the runtime of the application.
Note: Only the I/Os allocated to the PLC can be configured!
Procedure using the example of the operating mode of an input / output:
In the CODESYS device tree: Extend required PLC > Element [Local_IO] Double-click on [Inputs] / [Outputs] Click on [Parameters] tab
> The parameter setting view of the inputs / outputs appears
Select input / output from the list Double-click in the column [Value] of the parameter [Mode] Click on arrow symbol
> List of possible modes appears
Click on the required mode
> The mode for the input / output is set
If needed, set further parameters as described, e.g. filters, periods, frequency, etc.
>

7.2.2 via function block

23150
This method is useful if the configuration is supposed to be changed during the runtime of the application.
The operating type of the inputs and outputs is set via the block input eMode of the following FBs. Examples:
FB Input ( p. 125) > Input eMode  FB Output ( p. 128) > Input eMode  FB OutputGroup > Input eMode
Page 68
68
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>

7.3 Configure interfaces

23100
>

7.3.1 Configure serial interface

23151
The CODESYS service communication via RS232 only works with the preset baud rate. For other purposes, the device supports the following baud rates:
9 600 baud 19 200 baud 28 800 baud 38 400 baud 57 600 baud 115 200 baud (preset)
Setting the interface: Interface configuration file comconf.cfg ( p. 76)
>

7.3.2 Configure Ethernet interface

23152
Setting the interface: Interface configuration file comconf.cfg ( p. 76) Factory setting:
IP address = 192.168.82.247 Subnet mask = 255.255.255.0 Gateway address = 192.168.82.21 UDP port = 12345
23450
NOTICE
Only use the Ethernet interface in a secure network environment (e.g. separate network or VPN)! Otherwise, unauthorised persons can read or manipulate data or tamper with the functions of the
device.
>
The the IP parameter of the Ethernet interface
23455
In order to update the runtime system of the CR711S via a network, the device must be connected to the corresponding network. For the configuration of the Ethernet interface, the following options are available:
Manual
The user defines the parameters of the Ethernet interface manually: IP address, Subnet mask, gateway address
Observe the Address assignment in Ethernet networks ( p. 69) in
Ethernet networks!
Automatic
The interface parameters are set via the Dynamic Host Configuration Protocol (DHCP). (the development of this function is still in progress)
Setting the interface: Interface configuration file comconf.cfg ( p. 76)
Page 69
69
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
Address assignment in Ethernet networks
14436
In the Ethernet network every IP address MUST be unique. The following IP addresses are reserved for network-internal purposes and are therefore not
allowed as an address for participants: nnn.nnn.nnn.0 | nnn.nnn.nnn.255. Only network participants whose subnet mask is identical and whose IP addresses are
identical with respect to the subnet mask can communicate with each other. Rule:
If part of the subnet mask = 255, the corresponding IP address parts must be identical. If part of the subnet mask = 0, the corresponding IP address parts must be different.
If the subnet mask = 255.255.255.0, 254 participants communicating with each other are possible in the network. If the subnet mask = 255.255.0.0, 256x254 = 65 024 participants communicating with each other are possible in the network.
In the same physical network different subnet masks of the participants are allowed. They form different groups of participants which cannot communicate with groups of participants having other subnet masks.
In case of doubt or problems please contact your system administrator.
Examples:
Participant A IP address
Participant A Subnet mask
Participant B IP address
Participant B Subnet mask
Communication of participants possible?
192.168.82.247
255.255.255.0
192.168.82.10
255.255.255.0
Yes, 254 participants possible
192.168.82.247
255.255.255.0
192.168.82.247
255.255.255.0
No (same IP address)
192.168.82.247
255.255.255.0
192.168.82.10
255.255.0.0
No (different subnet mask)
192.168.82.247
255.255.255.0
192.168.116.10
255.255.255.0
No (different IP address range: 82 vs. 116)
192.168.222.213
255.255.0.0
192.168.222.123
255.255.0.0
Yes, 65 024 participants possible
192.168.111.213
255.255.0.0
192.168.222.123
255.255.0.0
Yes, 65 024 participants possible
192.168.82.247
255.255.255.0
192.168.82.0
255.255.255.0
No; the whole network is disturbed because the IP address xxx.xxx.xxx.0 is not allowed
Page 70
70
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>

7.3.3 Configure CAN interfaces

23156
The CAN interfaces are configurable as follows: via system configuration:
• CANopen
• SAE J1939
via function block:
RAW-CAN
Under Vendor = 3S, you will find, among others, the following entries:
CIA CANopen +- CIA CANopenManager +- CANopen_Manager +- CANopen_Manager_SIL2 +- CIA Local Device +- CANopen Device +- CANopen Device SIL2 SAE J1939 +- SAE J1939 Manager +- J1939_Manager
23368
WARNING
The safety functionality is in preparation. At present the device has NO safety functionality!
Do NOT use the device for safety-related functions!
The functions of the following protocols are available, but NOT yet suitable for safety applications:
• CANopen_Manager_SIL2
• CANopen_Device_SIL2
Page 71
71
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
via system configuration: CANopen Manager
23159
In the CODESYS device tree, you will find the following entry under each PLC: [Communication] > [CAN]
Configure each interface only at ONE position!
Attach CAN bus
In the CODESYS device tree: Right mouse click on [Communication] > [CAN]. Select [Add Device...].
> Window [Add Device] appears.
Select [Vendor:] [ifm electronic]. In the list below: Select [ifmCANbus]. Confirm the selection with [Add Device].
> Close the window [Add Device] with the [Close] button.
Assign CAN interface
In the CODESYS device tree: Double-click on [Communication] > [CAN] > [ifmCANBus]. Tab [General] > [General] > [Network]:
assign this setting with / to a CAN interface.
permissible = 0...3 Select the required value for baud rate [Baudrate (bit/s)] from the list field.
Attach CANopen manager
In the CODESYS device tree: Right mouse click on [Communication] > [CAN] > [ifmCANBus]. Select [Add Device...].
> Window [Add Device] appears.
Select [Vendor:] [<All vendors>]. In the list below: Select [Fieldbusses] > [CiA CANopen] > [CiA CANopenManager] >
[CANopenManager].
Confirm the selection with [Add Device]. Close the window [Add Device] with the [Close] button.
Page 72
72
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
Set CANopen manager parameters In the CODESYS device tree: Double-click on [Communication] > [CAN] > [CiA
CANopenManager] > [CANopenManager]. Tab [General] > [General] > [Node ID]:
assign a node ID to this interface using /.
permissible = 1...127 Select the further parameters according to the requirements, e.g.:
Configure the heartbeat protocol in the section [Nodeguarding]:
Click on the field of options in order to activate [Heartbeat Producing] Set the parameters [Node ID] and [Producer Time (ms)]
Configure the sync protocol in the section [Sync]:
Click on the field of options to activate [Enable Sync Producing], if necessary. Set the parameters [COB-ID (Hex)], [Cycle Period (μs)] and [Window Length (μs)]
In the section [Time]: The time protocol is not supported.
> With the menu [File] > [Save Project], the values become valid.
The sync protocol triggers the receiving/sending of data of the CANopen devices (input: SDO 16#1800/ output: SDO 16#1400).
Page 73
73
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
via system configuration: CANopen device
23523
In the CODESYS device tree, you will find the following entry under each PLC: [Communication] > [CAN] These entries are equivalent.
Attach CAN bus
In the CODESYS device tree: Right mouse click on [Communication] > [CAN]. Select [Add Device...].
> Window [Add Device] appears.
Select [Vendor:] [ifm electronic]. In the list below: Select [ifmCANbus]. Confirm the selection with [Add device]. Close the window [Add device] with the [Close] button.
Assign CAN interface
In the CODESYS device tree: Double-click on [Communication] > [CAN] > [ifmCANBus]. Tab [General] > [General] > [Network]:
assign this setting with / to a CAN interface.
permissible = 0...3 Select the required value for baud rate [Baudrate (bit/s)] from the list field.
Attach CANopen device
In the CODESYS device tree: Right mouse click on [Communication] > [CAN] > [ifmCANBus]. [Add Device...] Select .
> Window [Add Device] appears.
Select [Vendor:] <All vendors>. In the list below: Select [Fieldbusses] > [CiA CANopen] > [Local Device] > [CANopenDevice]. Confirm the selection with [Add Device]. Close the window [Add Device] with the [Close] button.
Set CANopen device parameters
In the CODESYS device tree: Double-click on [Communication] > [CAN] > [CANopenDevice]. Tab [General] > [General] > [Node ID]:
assign a node ID to this interface using /.
permissible = 1...127 Select the further parameters according to the requirements. > With the menu [File] > [Save Project], the values become valid.
When activating the option field [Werkseinstellungen]: Each time the controller is switched on or the program is downloaded, the settings are reset to factory settings. Thereby, user settings can be overwritten. The type and the scope of reset settings depend on the CANopen device.
In the CANopen Device, the correct baud rate and the node ID must be set, so that the CANopen master will recognise the device.
Page 74
74
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
via system configuration: J1939 manager
23522
In the CODESYS device tree, you will find the following entry under each PLC: [Communication] > [CAN] These entries are equivalent.
Attach CAN bus
In the CODESYS device tree: Right mouse click on [Communication] > [CAN]. Select [Add Device...].
> Window [Add Device] appears.
Select [Vendor:] [ifm electronic]. In the list below: Select [ifmCANbus]. Confirm the selection with [Add Device].
> Close the window [Add Device] with the [Close] button.
Assign CAN interface
In the CODESYS device tree: Double-click on [Communication] > [CAN] > [ifmCANBus]. Tab [General] > [General] > [Network]:
assign this setting with / to a CAN interface.
permissible = 0...3 Select the required value for baud rate [Baudrate (bit/s)] from the list field.
Attach J1939 manager
In the CODESYS device tree: Right mouse click on [Communication] > [CAN] > [ifmCANBus]. Select [Add Device...].
> Window [Add Device] appears.
Select [Vendor:] <All Vendors>. In the list below: Select [Fieldbusses] > [SAE J1939] > [J1939 Manager] > [J1939_Manager]. Confirm the selection with [Add Device]. Close the window [Add Device] with the [Close] button.
Set J1939 manager parameters
In the CODESYS device tree: Double-click [Communication] > [CAN] > [J1939_Manager]. Tab [General] > [Database] > [Database]:
select the list from the required database.
default = J1939Default
Users can use their own databases. They must be at the following storage location:
C:\ProgramData\CODESYS\J1939 Databases The directory ProgramData is hidden by default.
> With the menu [File] > [Save Project], the values become valid.
Page 75
75
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>
Attach J1939-ECU In the CODESYS device tree: Right mouse click on [Communication] > [CAN] > [ifmCANBus] >
[J1939_Manager]. Select [Add Device...]. > Window [Add Device] appears.
In the area [Device]: [Vendor:] select <All vendors>. In the list below: Select [Fieldbusses] > [J1939] > [J1939_ECU] > [J1939_ECU]. Confirm the selection with [Add Device]. Close the window [Add Device] with the [Close] button.
Set J1939-ECU parameters
In the CODESYS device tree: Double-click on [Communication] > [CAN] > [J1939_Manager] >
[J1939_ECU]. Make the following settings in the tab [General] in the section [General] according to the specific
application:
user case
[Local Device]
Significance [Preffered Address]
Receiving broadcast data of the ECU No transmission
deactivated
Address of the ECU from which the data is to be received
Sending data (broadcast and P2P) Receiving P2P data
activated
Address of the ifm controller
Add parameter groups in the tab [TX-Signals] by clicking on [Add PG]. > The settings become valid with menu [File] > [Save Project].
>
via function block: RAW-CAN
23160
The Library ifmRawCAN.library ( p. 161) features several function blocks for this application.
Page 76
76
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
System configuration Configure interfaces
>

7.3.4 Interface configuration file comconf.cfg

22929
The file directory /com of the device contains the file comconf.cfg. To change the configuration data of the following interfaces, this file must be written into the device with the corresponding changes:
• Serial interface
• Ethernet interface
• CAN interfaces Factory setting of the content:
[ETHERNET] Number=1
[ETHERNET0] IpV4Address=192.168.82.247 IpV4SubnetMask=255.255.255.0 IpV4Gateway=192.168.82.21 UDPPort=12345
[CAN] Number=4
[CAN0] Baud rate=250000 NodeId=127
[CAN1] Baud rate=250000 NodeId=126
[CAN2] Baud rate=250000 NodeId=125
[CAN3] Baud rate=250000 NodeId=124
[COM] Number=1
[COM0] Baud rate=115200 Bits=8 Parity=0 Stop=1
To start the (deactivated) device with these default settings:
(the file comconf.cfg is not taken into consideration)
TRUE on connection RESET-COM (Pin 72) simultaneous wtih POWER-ON
After the start-up: FALSE on RESET-COM
To start the (deactivated) device with the content of the (new) file comconf.cfg:
FALSE on connection RESET-COM (Pin 72) simultaneously with POWER-ON
Page 77
77
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Objects of a PLC application

8 Programming

Objects of a PLC application ............................................................................................................... 77
Create PLC application ....................................................................................................................... 78
Use ifm function libraries ..................................................................................................................... 81
Use IO mapping ................................................................................................................................... 83
Use RawCAN (CAN Layer 2) .............................................................................................................. 87
Use CANopen ...................................................................................................................................... 89
Use SAE J1939 ................................................................................................................................... 90
14603
>

8.1 Objects of a PLC application

22915
All objects of a PLC application are listed as sub-elements of the node [Application] in the device tree. In the basic configuration, a PLC application contains the following objects:
[Application]
Container for objects of a PLC applications
[Library manager]
Provides access to the standard and device-specific function libraries: Use ifm function libraries
[PLC_PRG(PRG)]
Provides access to the editor of the PLC application → Create PLC application (→ p. 78)
[Task configuration]
Provides access to the settings of the task processing: → Configure task processing (→ p. 80)
If necessary, the user can add further objects to the PLC application.
Page 78
78
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Create PLC application
>

8.2 Create PLC application

23457
Familiarise yourself with the following CODESYS functions!
Online help > CODESYS Development System > Programming Applications
CODESYS automatically generates the function block PLC_PRG (PRG) during project creation. The function block is processed cyclically. Other programs are called in this function block.
To create a PLC application: In the device tree: Double-click on [Application] > [PLC_PRG (PRG)] > Editor window shows input mask of the selected programming language. Enter program code.
>

8.2.1 Supported programming languages

23454
The following table shows which ifm function libraries support which programming languages according to IEC 61131:
Library
function block diagram (FBD) sequential function chart (SFC) instruction list (IL) continuous function chart (C
FC)
ladder diagram (LD) structured text (ST)
ifmDeviceCR711S.library
X
X X X X X
ifmCANopenManager.library
X
X X X X X
ifmRawCAN.library
X
X X X X X
ifmFastInput.library
X
X X X X X
ifmIOcommon.library
X
X X X X X
ifmOutHBridge.library
X
X X X
X
X
ifmOutGroup.library
X
X X X
X
X
ifmOutPWM.library
X
X X X
X
X
Legend: X = is supported – = is not supported
>
Page 79
79
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Create PLC application
>

8.2.2 Supported variable types

Retain variables ................................................................................................................................... 79
23456
Familiarise yourself with the following CODESYS functions!
Local variables
Online help > CODESYS Development System > Reference Programming > Variable Types and special Variables > Local Variables - VAR
Global variable list
Online help > CODESYS Development System > Reference Programming > Variable Types and special Variables > Global Variables - VAR_GLOBAL
Network variables (currently not supported)
Online help > CODESYS Development System > Exchanging Data on the Network > Network Variables
The device supports the following variable types:
Variable type
Declaration
Scope of validity
Memory behaviour
local
In the declaration part of the POU
Applies only to the POU in which it has been declared
volatile
local retain
non volatile
global
in the global variable list (GVL)
applies to all POUs of the project volatile
global retain
non volatile
network
In network variable lists
Values are available to all projects in the whole network if the variable is contained in their network variables lists.
Volatile
Network retain
non volatile
For performance reasons, do not overuse 64 bit variables! CAN network variables are not supported!
>
Retain variables
23613
Variables declared as RETAIN generate remanent data. Retain variables keep the values saved in them when the device is switched on/off or when an online reset is made.
Typical applications for retain variables are for example:
• operating hours which are counted up and retained while the machine is in operation,
• position values of incremental encoders,
• preset values entered in the screen device,
• machine parameters, i.e. all variables whose values must not get lost when the device is switched off.
Page 80
80
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Create PLC application
>

8.2.3 Options to access input and output data

17621
In a CODESYS project, each input and output has a physical address according to the IEC standard (e.g. %IW5). CODESYS offers the following options to access this address from a PLC application and thereby to access the input and outputs data of the device:
Access to IEC address via AT declaration  Definition of an ALIAS for an IEC address  Link a program variable to an IEC address (mapping)

8.2.4 Configure task processing

23487
Familiarise yourself with the following CODESYS functions!
Task configuration:
Online help > CODESYS Development System > Programming Applications > Task Configuration
The processing of the tasks is controlled by parameters. The user can set the parameters for each task.
CODESYS automatically creates the following task when the project is created:
Name
Description
Task
Task for the processing of the main program [PLC_PRG (PRG)]
For subprograms with POUs that are to be executed several times per PLC cycle:
Create new task. Configure task properties:
1. [Priority]: permissible = 0 (high) ... 3 (low) (select a priority for each task)
2. [Type]: Cyclic
3. [Interval]: Interval of the task call-ups in [ms] The interval time must be longer than the runtime of the task.
► Recommended: Activate watchdog: → Configure IEC watchdog (→ p. 37)
The watchdog time must be shorter than the interval time. The watchdog time must be longer than the runtime of the task.
Assign subprogram with POUs to the newly created task.
If the CAN buses are heavily utilised:
Configure task properties:
1. [Priority]: high
2. [Type]: Cyclic
3. [Interval]: requested cycle time (=transmission interval)
Assign subprograms with the POUs for CAN communication to the CAN tasks.
Page 81
81
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use ifm function libraries
>

8.3 Use ifm function libraries

23458
ifm electronic provides the following function libraries for the programming of the device under
CODESYS 3.5:
Name
Description
ifmCANopenManager
Functions for use of the CAN interfaces as CANopen Manager
ifmDeviceCR711S
Data structures, enumeration types and global variables
ifmFastInput
Functions to access the fast inputs of the device
ifmIOcommon
Functions for access to the inputs and outputs of the device
ifmIOconfigDiagProt
Functions to configure the I/O-related diagnostic and protective functions
ifmOutGroup
Functions to control output group switches
ifmOutHBridge
Functions to access H-bridge outputs
ifmOutPWM
Functions to access PWM outputs
ifmRawCAN
Functions for use of the CAN interfaces as CAN Layer 2
ifmSysInfo
Functions to set / read system information
ifmTypes
Global types and interfaces for other ifm libraries
Detailed information about the ifm function libraries: ifm function libraries ( p. 102)
>

8.3.1 Access to inputs

23600
To access the inputs of the device, the following functional elements are available:
Function element
Short description
Input ( p. 125)
Assigns an operating mode to an input channel Provides the current state of the selected channel
FastCount ( p. 116)
Counter block for fast input pulses
IncEncoder ( p. 118)
Up/down counter function to evaluate encoders
Period ( p. 120)
measures at the indicated channel: the frequency and the period length (cycle time) in [µs],
measures at the indicated channel pair: the phase shift in [°] between channel A and channel B
Page 82
82
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use ifm function libraries
>

8.3.2 Access to outputs

23608
To access the outputs of the device, the following functional elements are available:
Function element
Short description
Output ( p. 128)
Assigns an operating mode to an output channel Provides the current state of the selected channel
OutputGroup
controls the activation status of an output group and provides diagnostic information about the group and the connected outputs. Using the FB, an output group including the corresponding outputs can be switched on or off.
HBridge ( p. 148)
H bridge on a PWM channel pair
PWM1000 ( p. 156)
Initialises and configures a PWM-capable output channel the mark-to-space ratio can be indicated in steps of 1
CurrentControl ( p. 153)
Current controller for a PWMi output channel
>

8.3.3 Control device

23278
The following function elements are available to control the device:
Function element
Short description
SupplySwitch ( p. 133)
Switch off the unit
SetLED ( p. 131)
Change the frequency and the colour of the status LED in the application program
>

8.3.4 Read device information

23610
To read information from the device the following functional elements are available:
Function element
Short description
SystemSupply ( p. 135)
indicates the value of the system voltage
Temperature ( p. 137)
indicates the value of the system temperature
>
Page 83
83
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use IO mapping
>

8.4 Use IO mapping

Access inputs ...................................................................................................................................... 84
Access outputs .................................................................................................................................... 85
Read diagnostic data of the device ..................................................................................................... 86
23498
During the IO mapping (I/O image), global variables are coupled to the IEC addresses (%Ixx, %Qxx). Via symbol names, the user has access to the following elements from the application:
inputs and outputs  Functions of the operating elements  Functions of the display elements  States of system components and characteristic values
The addresses of the system flags can change if the PLC configuration is extended. While programming only use the symbol names of the system flags!
Page 84
84
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use IO mapping
>

8.4.1 Access inputs

23499
The user can use the following global variables to access the operating modes and the values of the inputs of the device.
Variable
Data type
Access
Description
Possible values
INnnnn_I.
ValueAnalogue
UINT
r
Value of the analogue input
0 ... 65535
ValueDigital
BIT r Value of the digital input
FALSE
Input deactivated
TRUE
Input activated
ValueCount
UDINT
r
Value of the counting input
0 ... 4294967295
ValueCountIncEnc
DINT
r
Value of the encoder input
-2147483648 ... 2147483647
ValueLastCountWasUp
BIT r Counting direction upwards FALSE
not active TRUE
active
ValueLastCountWasDown
BIT r Counting direction downwards FALSE
not active
TRUE
active
ValueCycle
UDINT
r
cCcle time
0 ... 4294967295
ValueFreq
REAL
r
Frequency
1.401e-45 ...
3.403e+38
ValueTime
UDINT
r
Elapsed time since the last edge evaluation
0 ... 4294967295
ValueRatio
UINT
r
Pulse/pause ratio
0 ... 65535
Error
BIT r Error FALSE
no error
TRUE
Error
INnnnn_Q.
CountDirection
ENUM of INT
r/w
Read/set counting direction
COUNT_OFF
Counting off
COUNT_UP
Counting upward
COUNT_DOWN
Zählen abwärts
Counting downward
BIT w Set preset value FALSE
no action
TRUE
Set preset value
Legend: r = read only r/w = read and write
The valid value ranges and the type and number of the variables of the input depend on the active operating mode of the input.
► Observe configuration of the inputs! → Configure inputs and outputs (→ p. 67)
Page 85
85
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use IO mapping
>

8.4.2 Access outputs

23515
The user can use the following global variables to access the operating modes and the values of the outputs of the device.
Variable
Data type
Access
Description
Possible values
OUTnnnn_I
OutCurrent
UINT
r/w
Current value of the analogue output
0 ... 65535
Ratio
UINT
r/w
PWM Ratio
0 ... 65535
OutVoltageDiag
UINT
r
Measured voltage value of the analogue output in mV
0 ... 65535
OutCurrentDiag
UINT
r
Measured current value of the analogue output in mA
0 ... 65535
OutState
BIT
r/w
Output status
0 ... 4294967295
Error
BIT
r/w
Error
FALSE
no error
TRUE
Error OUTnnnn_Q
ValueAnalogue
UINT
r/w
Analogue output value
0 ... 65535
ValueDigital
UINT
r/w
Digital output value
0 ... 65535
OutVoltage
UINT
r/w
Output voltage
0 ... 65535
Error
BIT
r/w
Error FALSE
no error
TRUE
Error
Legend: r = read only r/w = read and write
The valid value ranges and the type and number of the variables of the output depend on the active operating mode of the output.
► Observe configuration of the outputs! → Configure inputs and outputs (→ p. 67)
Page 86
86
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use IO mapping
>

8.4.3 Read diagnostic data of the device

23528
The user can use the following global variables to access the current diagnostic data of the device:
Name
Data type
Access
Description
Possible values
iTemperature0
INT r Temperature on the system board (value in °C)
-32768 ... 32767
iTemperature1
INT r Temperature on the system board (value in °C)
-32768 ... 32767
uiVoltageVBB15
UINT
r
Voltage at power input VBB15 (value in mV)
0 ... 65535
0 mV ... 65535 mV
uiVoltageVBB30
UINT
r
Voltage at power input VBB30 (value in mV)
0 ... 65535
0 mV ... 65535 mV
Legend: r = read only
Page 87
87
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use RawCAN (CAN Layer 2)
>

8.5 Use RawCAN (CAN Layer 2)

RawCAN: Control CAN network nodes ............................................................................................... 87
RawCAN: Send and receive CAN messages ..................................................................................... 87
RawCAN: Request and send remote CAN messages ........................................................................ 88
23545
► Observe the notes on task configuration! (→ Configure task processing (→ p. 80))
In order to access one of the CAN interfaces configured for CANopen operation, the following POUs are available.
Requirements:
The CAN interface is configured for operation as RawCAN (CAN Layer 2)
( Configure CAN interfaces ( p. 70)).
>

8.5.1 RawCAN: Control CAN network nodes

23546
The following POUs are available to control a node in a CAN network:
Function element
Short description
CAN_Enable ( p. 162)
initialises the specified CAN interface configures the CAN baud rate
CAN_Recover ( p. 164)
controls the processing of a failure of the specified CAN channel If the CAN channel fails, reset the CAN interface and reboot
>

8.5.2 RawCAN: Send and receive CAN messages

23547
The following POUs are available to send or receive messages in a CAN network:
Function element
Short description
CAN_Rx ( p. 170)
configures a data receive object and reads the receive buffer of the data object
CAN_RxMask ( p. 172)
receives CAN messages of a non-coherent area The area is defined via a bit pattern and a bit mask
CAN_RxRange ( p. 174)
receives CAN messages of a coherent area The area is defined via an upper and lower limit
CAN_Tx ( p. 176)
asynchronous transmission of CAN messages
Page 88
88
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use RawCAN (CAN Layer 2)
>

8.5.3 RawCAN: Request and send remote CAN messages

23548
The following POUs are available to request remote messages in a CAN network or to send replies to a remote request:
Function element
Short description
CAN_RemoteRequest ( p. 166)
Send a request for a remote message
CAN_RemoteResponse ( p. 168)
reply to the request of a remote message
>
Page 89
89
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use CANopen
>

8.6 Use CANopen

CANopen: Send and receive SDO ...................................................................................................... 89
CANopen: Network Management (NMT) ............................................................................................ 89
23544
Observe the notes on task configuration! (Configure task processing (→ p. 80)) Observe the notes about CANopen! ( System manual)
In order to access one of the CAN interfaces configured for CANopen operation, the following POUs are available in ifm libraries.
Further POUs are available in CODESYS libraries from 3S.
Requirements
The device is configured as CANopen manager (master)
( via system configuration: CANopen Manager ( p. 71)).
>

8.6.1 CANopen: Send and receive SDO

23537
The following POUs are available to send or receive Service Data Objects (SDO):
Function element
Short description
COP_SDOread ( p. 105)
Read Service Data Object (SDO)
COP_SDOwrite ( p. 107)
Write Service Data Object (SDO
>

8.6.2 CANopen: Network Management (NMT)

23539
The following POUs are available for the management of the CANopen network:
Function element
Short description
COP_GetNodeState ( p. 103)
Request state of one or several CANopen devices
COP_SendNMT ( p. 109)
Send an NMT control command to a CANopen device
>
Page 90
90
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Programming Use SAE J1939
>

8.7 Use SAE J1939

23802
To use the SAE J1939 network protocol, 3S provides the library IoDrvJ1939.
Page 91
91
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Transfer CODESYS project to device

9 Operation

Transfer CODESYS project to device ................................................................................................. 91
Operating states .................................................................................................................................. 93
Status LEDs ......................................................................................................................................... 94
Reset ................................................................................................................................................... 97
Data transmission for series production .............................................................................................. 99
Display system information ............................................................................................................... 101
23280
Familiarise yourself with the following CODESYS functions! Translate project/application and transfer to the device
Online help > CODESYS Development System > Transferring Applications to the PLC

9.1 Transfer CODESYS project to device

Load the application to the device ....................................................................................................... 91
Delete application from CR711S ......................................................................................................... 92
23493
To save the CODESYS project on the device, transfer the following component:
Application (→ Load the application to the device (→ p. 91))
Observe notes on the operating modes of the PLC of the device!
Operating states of CR711S
>

9.1.1 Load the application to the device

23494
To transfer the created application as boot project to the device:
Requirements:
> Communication path is set ( Set communication path of PLC ( p. 61)). > Project tested.
1 Translate application
In the device tree: highlight application as active application. Use [Build] > [Rebuild] to translate the active application.
> CODESYS generates program code.
2 Load application to the device
Only for safety PLC: Change to debug mode with [SIL2] > [Enter debug mode…]. Use [Online] > [Login] connect with the device.
> Active application is loaded to the device (download). > Application on the device is in the STOP state.
3 Start application
Use [Debug] > [Start] to start the application. > Application goes to the RUN state.
Page 92
92
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Transfer CODESYS project to device
>

9.1.2 Delete application from CR711S

18030
To delete an application stored on the device:
1 Connect with the device
In the device tree: highlight application as active application. Use [Online] > [Login] to establish connection to the device.
> CODESYS is in the online mode.
2 Delete application
In the editor window: Select [Device] > [Applications] tab. Press [Refresh List] to refresh the view.
> List shows the applications that are stored on the device. Delete all applications in the device with [Remove All].
OR: Highlight requested application and press [Remove] to delete it from the device.
> Selected application will be deleted.
Page 93
93
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Operating states
>

9.2 Operating states

23421
The following figure shows the possible operating modes of the device:
It contains:
• status of the application
• status of the process communication (inputs/outputs, CAN bus)
status of the service communication (connection with the programming device)
• display of the LEDs SYS0 / SYS1
>
Page 94
94
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Status LEDs

9.3 Status LEDs

22920
The device has the following LEDs:
LED
Description
SYS0
Status of the standard PLC Status of the ifm operating system Status of the bootloader
SYS1
Status of the safety PLC Status of the ifm operating system
ETH0
Status of the Ethernet interface 0
ETH1
Status of the Ethernet interface 1
APPL0 APPL1 APPL2 APPL3
LEDs for free use in the application
>

9.3.1 Status LED: system ifm operating system (SYS0+SYS1)

23429
For the status of the ifm operating system, both LEDs SYS0 and SYS1 are lit simultaneously:
LED colour
Display
Description
off permanently off
ifm operating system on the unit: POWER_OFF
Green permanently on
ifm operating system on the unit: INIT
Red permanently on
ifm operating system on the unit: SYSTEM_STOP Error class = A
no change no change
ifm operating system on the unit: SHUTDOWN
no change
green-yellow Flashing with 2 Hz
ifm operating system on the unit: UPDATE
(time frame = 200 ms)
Page 95
95
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Status LEDs
>

9.3.2 Status LED: system PLC (SYS0, SYS1)

23436
The SYS0 LED is for the "standard PLC". The SYS1 LED is for the "safety PLC".
The status of one of the PLCs has no influence on the display of the other PLC.
LED colour
Display
Description
Green permanently on
RUNTIME_OPERATING no application loaded
Green Flashing with 2 Hz
RUNTIME_OPERATING Application = RUN
(time frame = 200 ms)
Yellow Flashing with 2 Hz
RUNTIME_DEBUG_RUN Application = RUN
(time frame = 200 ms)
Yellow permanently on
RUNTIME_DEBUG_STOP Application = STOP
Red flashes with 10 Hz
RUNTIME_STOP Error class = B
(time frame = 200 ms)
>

9.3.3 Status LED: System bootloader (SYS0)

23426
The SYS0 LED is for the bootloader status only. The SYS1 LED is switched off in these cases.
23561
Only execute the bootloader update when explicitly requested by ifm!
LED colour
Display
Description
Green Flashing with 5 Hz
no runtime system loaded
(time frame = 200 ms)
green-yellow flashes with 5 Hz
Bootloader update process active
(time frame = 200 ms)
Page 96
96
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Status LEDs
>

9.3.4 Status LED: Ethernet interfaces (ETH0, ETH1)

23445
The two Ethernet interfaces indicate their status as follows:
LED colour
Display
Description
Green permanently on
Ethernet connection is established non data traffic
Green blinks
Ethernet connection is established with data traffic
>

9.3.5 Controlling LEDs in the applications

23449
The LEDs APPL0 to APPL3 are for free use in the applications. This is the function of the FB SetLED ( p. 131).
Possible colours: LED_COLOUR (ENUM) ( p. 114) Possible frequencies: LED_FLASH_FREQ (ENUM) ( p. 114)
Page 97
97
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Reset
>

9.4 Reset

Supported reset variants ..................................................................................................................... 97
Reset application (warm) ..................................................................................................................... 97
Reset application (cold) ....................................................................................................................... 98
Reset application (origin) ..................................................................................................................... 98
18025
>

9.4.1 Supported reset variants

18613
The following table shows the reset variants supported by the device-internal CODESYS PLC and the resulting system behaviour:
Type of reset
System behaviour
Triggering actions
Reset (warm)
application goes to STOP state. Standard variables (VAR) of the application are
initialised.
Remanent variables (VAR RETAIN) of the
application keep their current values.
Reset application (warm) (→ p. 97) Reset (cold)
application changes to the STOP state. All variables (VAR, VAR RETAIN) of the
application are initialised.
Reset application (cold) (→ p. 98)
Reset (default)
application goes to STOP state. The application on the PLC is deleted. All variables (VAR, VAR RETAIN) of the
application are initialised.
PLC is reset to the default state.
Reset application (origin) (→ p. 98)
A variable that has been declared without an initialisation value is initialised with the variable­specific standard value (e.g. INT = 0).
>

9.4.2 Reset application (warm)

7233
To reset the application:
In the device tree: Select [Application] and select [Online] > [Login] as active application.
> CODESYS changes to the online mode.
Select [Online] > [Reset warm] to reset the application.
> Application changes to the STOP state. > Standard variables are newly initialised. > Retain variables keep their values.
Page 98
98
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Reset
>

9.4.3 Reset application (cold)

7230
To reset the application:
In the device tree: Select [Application]. Select [Online] > [Login].
> CODESYS changes to the online mode.
Select [Online] > [Reset cold] to reset the application.
> Application changes to the STOP state. > All variables are newly initialised
>

9.4.4 Reset application (origin)

22672
To reset the application:
In the device tree: Select [Application]. Select [Online] > [Login].
> CODESYS changes to the online mode.
Select [Online] > [Reset origin] to reset the application.
> Application changes to the STOP state and is deleted. > All variables are newly initialised > PLC is reset to the original state.
Page 99
99
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Data transmission for series production
>

9.5 Data transmission for series production

23577
For the series production, application data and stored data can be transferred to the PC and then transferred from the PC to further devices.
The data transmission takes place in two steps:
1 Data backup from the device to the PC 2 Distribution of the backed up data to the target devices
>

9.5.1 Transmission of the files with CODESYS

23579 23520
To transfer files between PC and device:
1 Select file view
In the device tree: Double-click on symbol [Device (CR711S)] In the editor window: Select the [Files] tab.
> The editor window shows the file structure on the PC on the left and on the device on the right
2 Transfer file from PC to device
Highlight the file on the left Select device target directory on the right Star transfer using the [>>] button
> The file is transferred to the device
3 Transfer the file from the device to the PC
Highlight the file on the right Select PC target directory on the left Start the transfer using the [<<] button
> The fle is transferred to the PC
Page 100
100
ifm Programming Manual ecomatController/60-1 (CR711S) Operating System V2.5.0.n 2017-12-19
Operation Data transmission for series production
>

9.5.2 Data transmission with TFTP

23580
With the aid of the program TFTP, files can be transferred. Transfer file from device to PC:
tftp -i IP-Adresse GET source tar get
IP address = address of the source device, e.g. 192.168.82.247 Source = source file on the device Target = target file on the PC
Transfer file from PC to device:
tftp -i IP-Adresse PUT source target
IP address = address of the source device, e.g. 192.168.82.247 Source = source file on the PC Target = target file on the device Example: tftp -i 192.168.82.247 PUT [Windows-Pfad]\ifmOS.ifm \os\ifmOS.ifm
>

9.5.3 Files for series production

23578
The following files must be transferred:
Data name / path
Description apps
Folder
standard.app
Application non-safe safe.app
Application safe
os
Folder ifmOS.ifm
ifmOS
cfg
Folder
comconf.cfg
Communication configuration
memconf.ifm
Memory configuration
The following file must be transferred according to the kind of application (retain data and free user data):
Data name / path
Description
retain
Folder standard.ret
Application retain non-safe
standard.mb
Application memory bytes non-safe
safe.ret
Application retain safe
safe.mb
Application memory bytes safe
data
Folder *.*
Memory space for user-defined data
Loading...