System Manual Ecomatcontroller
System Manual Ecomatcontroller
>
System Manual
EC2121
English
11 / 2019
80282814 / 00
Starter kit for ecomatController EC2121
Contents
3 Installation 15
3.1 Prepare installation ............................................................................................................15
3.2 Carry out installation ..........................................................................................................17
3.2.1 Install the programming software CODESYS 3.5 ....................................................................... 17
3.3 Start CODESYS 3.5 ...........................................................................................................19
3.4 Install packages .................................................................................................................20
3.4.1 Start the package manager ........................................................................................................ 20
3.4.2 Install packages with the package manager ............................................................................... 20
4 Features of a PLC 22
4.1 Cyclical program processing ..............................................................................................22
4.2 Time response ...................................................................................................................23
4.2.1 Cycle time................................................................................................................................... 23
4.2.2 Watchdog ................................................................................................................................... 23
4.2.3 Response time ........................................................................................................................... 23
5 A first program 24
5.1 Device tree .........................................................................................................................26
5.2 Connect to the device ........................................................................................................27
5.3 Create the program ............................................................................................................30
5.3.1 Suppress SafetyPLC in the device tree ...................................................................................... 30
5.3.2 Cyclical program processing ...................................................................................................... 30
5.3.3 Structured programming ............................................................................................................. 31
5.3.4 Create new block........................................................................................................................ 31
5.3.5 Function block diagram (FBD) .................................................................................................... 32
5.3.6 Program linking .......................................................................................................................... 33
5.3.7 Address binary inputs and outputs ............................................................................................. 34
5.3.8 Call in PLC_PRG........................................................................................................................ 35
5.3.9 Structured text (ST) .................................................................................................................... 36
5.4 Transfer and test the program ...........................................................................................37
5.4.1 Transfer program ........................................................................................................................ 37
5.4.2 Test program .............................................................................................................................. 38
2
Starter kit for ecomatController EC2121
6 Annex 39
6.1 The I/O simulator box .........................................................................................................39
6.1.1 Inputs.......................................................................................................................................... 39
6.1.2 Outputs ....................................................................................................................................... 40
6.1.3 Communication reset ................................................................................................................. 40
7 Index 41
3
Starter kit for ecomatController EC2121
>
© 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)
• Modbus® is the property of the Schneider Electric SE, France (→ www.schneider-electric.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
4
Starter kit for ecomatController EC2121
>
WARNING
Warning of serious personal injury.
Death or serious irreversible injuries may result.
CAUTION
Warning of personaly injury.
Slight reversible injuries may result.
NOTICE
Warning of damage to property
Important note
Non-compliance can result in malfunction or interference
Information
Supplementary note
► ... Request for action
> ... Reaction, result
→ ... "see"
abc Cross-reference
123 Decimal number
0x123 Hexadecimal number
0b010 Binary number
[...] Designation of pushbuttons, buttons or indications
>
These instructions describe how to prepare and program a controller of the device family for mobile
applications, ecomatmobile from ifm electronic gmbh, using the CR711S controller as example.
These instructions are intended for the operation in conjunction with the starter kit EC2121; it can,
however, also be used independently.
This document will be continuously updated.
The current version is available for download on the ifm website: → www.ifm.com
>
This manual addresses people with basic knowledge in automation technology. Experience in PLC
technology and basic knowledge in Ethernet networks are useful.
>
5
Starter kit for ecomatController EC2121
To reproduce the descriptions in this manual, the following software components are required:
UpdateTool
Programming software CODESYS 3.5
Controller-specific packages for CODESYS 3.5
The software versions referred to in this manual are on the USB flash drive supplied with the starter
kit.
The current software versions are available for download on the ifm website: → www.ifm.com
>
If any documents are not available, they can be requested from ifm or can be downloaded from the ifm
website: → www.ifm.com
6
Starter kit for ecomatController EC2121
>
3S-Smart Software Solutions GmbH (→ www.codesys.com) offers the following user documentation to
program the device using CODESYS:
Document Content / Description
Online help Context-sensitive help
Description of the CODESYS programming system
After the programming system is installed, the following is stored and accessible on the hard disk of
the PC/laptop:
...\Programme (x86)\3S CODESYS\CODESYS\Online Help
The online help is for programming the standard PLC. The CODESYS online help only applies
to the safety PLC with restrictions.
► Please read this programming manual when programming the safety PLC.
CODESYS installation Remarks about the installation of the programming system CODESYS
and first steps First steps for handling the CODESYS programming system
After the installation of the programming system stored and accessible on the hard disk of the
PC/laptop:
...\Programme (x86)\3S CODESYS\CODESYS\Documentation
CODESYS user manual [H2] CODESYS Safety SIL2 - IEC Programming Guidelines.pdf
Safety SIL2 This document is for programmers who program safety-related controllers.
The CODESYS user manual only applies to the safety PLC with restrictions.
► Please observe this programming manual when programming the safety PLC.
If any documents are not available, they can be requested from ifm or can be downloaded from the ifm
website:
→ www.ifm.com
>
7
Starter kit for ecomatController EC2121
>
Connect the voltage supply via an external voltage source 24 V DC (not supplied):
► Connect the voltage source to both 4 mm lab sockets on the prewired connection cable:
plus pole - red
minus pole - black
> The LEDs SYS0 and SYS1 are on or flash green.
If one of the LEDs SYS0 or SYS1 is permanently on in red, there is a hardware fault or system
fault (→ Data sheet CR711S > Operating states of the system).
>
8
Starter kit for ecomatController EC2121
>
>
9
Starter kit for ecomatController EC2121
The following addresses are already used and must not be used for the PC:
192.168.82.21 (gateway), 192.168.82.247 (controller)
10
Starter kit for ecomatController EC2121
>
NOTE!
If the instructions on the screen are not complied with,
> the controller may be damaged.
► Strictly follow the instructions on the screen during the entire update process.
11
Starter kit for ecomatController EC2121
► Select menu item [Ping device] by entering [2] and confirming with [Enter].
> The ping replies are displayed. When the ping replies are displayed as shown in the figure, the
connection is OK.
>
The OS version of the device can be checked and updated with the UpdateTool.
12
Starter kit for ecomatController EC2121
Check OS version:
► In the menu of the UpdateTool, select the menu item [Continue update process] by entering [4]
and confirming with [ENTER].
> After a short time, information about the current controller and the update menu (→ figure) appear
in the window.
The figure shows that OS version 2.9.0.2 is on the controller. Now an update to version 3.0.0.3 is to be
made
NOTE!
If the instructions on the screen are not complied with,
> the controller may be damaged.
► Strictly follow the instructions on the screen during the entire update process.
Update OS version:
► To start the update process, select menu item update V3.0.0.3 by entering [13] and confirming
with [Enter].
13
Starter kit for ecomatController EC2121
> The update process starts. During the update process, various messages appear; to conclude, the
following success message is displayed:
14
Starter kit for ecomatController EC2121
3 Installation
Content
Prepare installation .................................................................................................................................15
Carry out installation ...............................................................................................................................17
Start CODESYS 3.5 ...............................................................................................................................19
Install packages ......................................................................................................................................20
>
The major part of the required software is on the supplied USB flash drive.
Since the used controller can also be used for applications with functional safety, it is
necessary for legal reasons that you download the controller-specific packages directly from
ifm's website.
In this way, you are registered as customer of this controller and will be automatically informed
in the event of changes (e.g. to the firmware or documentation).
15
Starter kit for ecomatController EC2121
► Open tab [Downloads] > click [Target and documentation package] under [Software Download]
16
Starter kit for ecomatController EC2121
If you do not have your my ifm- access data, you have to register as customer beforehand.
>
The CODESYS Development System (short: CODESYS) is a platform for the creation of PLC
applications according to the standard IEC 61131-3.
>
On the supplied USB flash drive you find the 32-bit version of CODESYS since its use is
compulsory.
For parallel installation of several different CODESYS versions on the PC, the installation
directory has to be adapted accordingly.
17
Starter kit for ecomatController EC2121
► Change the installation path in C:\Program Files (x86)\3S CODESYS V3.5 SP11 and confirm with
[OK].
18
Starter kit for ecomatController EC2121
>
After the first program start, the packages belonging to the controller have to be installed.
► Start CODESYS as admin with: desktop symbol [CODESYS V3.5 SP11] > (right click) > [Run as
administrator].
19
Starter kit for ecomatController EC2121
>
>
20
Starter kit for ecomatController EC2121
21
Starter kit for ecomatController EC2121
4 Features of a PLC
Content
Cyclical program processing ..................................................................................................................22
Time response ........................................................................................................................................23
57274
This chapter describes some basics of programmable logic controllers. Should you have some
knowledge of the operation of a PLC, you can skip this chapter.
>
Characteristic of PLC systems is the cyclical program processing, i.e. after processing of the
application program, processing is automatically started from the beginning.
This ensures that the input signals are read continuously. Changes are found and considered in the
application program.
If input signals of the switches and sensors change during processing of the application program, this
may lead to incorrect results for the output signals. Therefore the input signals are copied to a
clipboard (process image of the inputs - PII) at the beginning of the cycle.
The application program then only works with the signals from the PII when the inputs are read. The
results for the outputs are also written to the clipboard (process image of the outputs - PIO) during
processing.
When processing of the application program is completed (end of cycle), the signals are transferred
from the PIO to the outputs and the actuators switch accordingly.
22
Starter kit for ecomatController EC2121
>
The time a controller needs for one cycle is called cycle time.
Typically, this time is in the ms range.
The cycle time is also the time an input signal has to be present to be reliably detected by the
controller.
If a signal is shorter, it depends on whether it happens to come at that point of time at which the inputs
are read. Only then will it be recognised.
With the ecomatController, the cycle time is determined by the configuration of the tasks.
>
4.2.2 Watchdog
57278
A PLC monitors itself if the cycle is correctly processed. The case that a program cycle is not complete
is dangerous. Then no inputs are read. A change of the state on the input, e.g. "limit switch reached"
cannot be processed.
The status of the output cannot change, e.g. the drive keeps on running although the limit switch has
been reached.
The watchdog function exists to avoid such states. If the end of the cycle has not been reached within
a certain time which is started with each new cycle, the watchdog becomes active. The controller is
stopped and the outputs are disconnected.
What can cause such an event?
1. Hardware error
If a processor fails, for example, the controller must pass into a safe state.
2. Program error
If loops or jumps are used in programming, it is possible that processing takes too long or in the
worst case a closed loop leads to the situation that the end of the cycle cannot be reached.
>
23
Starter kit for ecomatController EC2121
5 A first program
Content
Device tree .............................................................................................................................................26
Connect to the device .............................................................................................................................27
Create the program ................................................................................................................................30
Transfer and test the program ................................................................................................................37
57280
When all packages have been installed, a first program for test purposes should be written.
To do so, a new project is created with [New project...] when CODESYS has been started.
ifm provides one template each for every controller. The basic elements and configurations in these
basic projects are already prepared.
24
Starter kit for ecomatController EC2121
When a new project is created via [Empty project], the hardware-specific settings have to be
made manually.
25
Starter kit for ecomatController EC2121
>
CR711S (CR711S) Logical father controller, provides access to the general settings of CR711S.
SafetyPLC (CR711S SIL2) Contents of the SafetyPLC, provides access to the contents of the safety controller.
StandardPLC (CR711S Standard) Contents of the StandardPLC, provides access to the contents of the standard
controller.
PLC logic Contains the application of the respective controller.
Local_IO (Local IO) Provides access to the configuration options of the inputs and outputs.
HMI (HMI) Provides access to the configuration options of the operating and display elements.
Communication (Communication) Provides access to configuration options of the communication interfaces.
26
Starter kit for ecomatController EC2121
For this first introduction, only the StandardPLC is used. The distribution of the resources (e.g.
memory) to the two controllers does not have to be taken into account here.
>
27
Starter kit for ecomatController EC2121
► Select [Gateway-1] on the left and search for the controller by clicking the [Scan network] button.
> The controller appears below the gateway.
28
Starter kit for ecomatController EC2121
► Enter user name admin and no password and confirm with [OK].
29
Starter kit for ecomatController EC2121
>
In the first small program a two-hand control is to be implemented which is used for presses, for
example. There are two pushbuttons on the press which are installed so that they cannot be operated
with one hand. That means that the operator has to press one pushbutton with each hand to release
the press. This ensures that no hand gets underneath the press.
For the simulation, the IO-simulator box is used with the following signals:
Operand Comments
IN0100 Press, pushbutton 1
IN0101 Press, pushbutton 2
OUT0000 Press release signal
>
>
30
Starter kit for ecomatController EC2121
In principle, the complete program can be contained in only one block such as the PLC_PRG. This
becomes quite confusing, however, and the fault location is difficult.
It is better to distribute different program sections to different blocks. Then the blocks are activated one
after the other in PLC_PRG.
Therefore one separate program block press is created for the press controller in this example.
>
31
Starter kit for ecomatController EC2121
>
FBD (function block diagram) is a graphic programming language in the standard IEC 61131-3. Blocks
with symbols from the boolean algebra, for example, are added to the program.
Since FBDs are particularly suited for boolean functions, it is also used in the example program.
To enter more complex formulas, a textual language from IEC 61131-3 such as structured text
(ST) is better suited and clearer than FBD.
32
Starter kit for ecomatController EC2121
>
According to the task, the output signal must only be active if both input signals are active.
This functionality can be implemented with an AND operator. The general symbol for an AND operator
is shown in the image below:
33
Starter kit for ecomatController EC2121
>
Background:
If inputs or outputs from I/O mapping are used, these values are updated at the end of the
cycle. If you have configured such an input or output simultaneously in the program via a
function block, this value will be overwritten. This is usually not what you want.
If you use both methods in parallel (binary inputs via I/O mapping, other inputs via function
blocks), it may become unclear which may cost a lot of time during set-up, fault location or
program changes.
In addition it has to be noted that it is not possible to reset diagnostic errors via I/O mapping.
The integrated function blocks, however, have an input xResetError so that reset is also
possible during the program sequence.
► Repeat the same procedure with input IN0101 for the second input of the AND operator.
> Both control inputs are connected to the AND operator.
34
Starter kit for ecomatController EC2121
To transfer the link result to the output, an assignment has to be added to the output of the AND
operator:
► Drag an [Assignment] to the output of the AND operator in the section [Toolbox] and drop it at the
appearing green square.
Then name the binary output in the same way as the inputs:
► Click the question marks [???] at the input of the AND operator.
► Enter OUT0000_Q..
► Select the property [ValueDigital].
> Then the inputs of the AND operator are connected to the input signals and the link result is
assigned to the output.
>
The block PLC_PRG is the block which is automatically called by the controller.
To ensure that the block Press is processed, it has to be called in the block PLC_PRG.
>
35
Starter kit for ecomatController EC2121
The block PLC_PRG is here programmed in Structured Text (ST). This is a textual programming
language of the standard IEC 61131-3 which follows the programming language PASCAL.
Since commands are entered here in text format, there are no tools in this programming window.
The implementation part consists of a text editor in which instructions are entered. Each instruction
has to be finished with a semicolon.
► Call the block Press with the following command: Press();
36
Starter kit for ecomatController EC2121
>
To test the program, it has to be transferred to the controller. A connection to the controller was
already established in chapter Establish a connection between the controller and the PC via
Ethernet. (→ p. 9). If required, the steps can be repeated.
>
Since the device comprises the two controllers (SafetyPLC and StandardPLC), the user has to
choose to which controller the program should be transferred.
► Set the StandardPLC as active application: [StandardPLC] > [Application] > context menu > [Set
Active Application]
The option [Set Active Application] only appears if the application is not yet active.
The active application is highlighted in bold type.
37
Starter kit for ecomatController EC2121
>
This behaviour can also be seen in CODESYS. Here, a supplied H signal is shown as TRUE and an L
signal as FALSE.
Congratulations! You have successfully created your first program in CODESYS 3.5, loaded it to the
controller and tested it.
38
Starter kit for ecomatController EC2121
6 Annex
Content
The I/O simulator box .............................................................................................................................39
57296
>
The I/O simulator box is used for the simulation of input and output signals and the reset of
communication parameters of the controller. Six inputs and outputs each are connected via the box.
>
6.1.1 Inputs
57298
The input circuit is shown in the image below using [IN0100] as example.
39
Starter kit for ecomatController EC2121
The potentiometer forms a voltage divider to also simulate analogue values. When a value is set on a
potentiometer and the corresponding switch is activated, this value is sent to the controller.
In case of binary use of the input, the potentiometer has to be positioned at the right end stop. That
means that the switch supplies the operating voltage (+24 V DC), i.e. an H signal, to the input.
Since we work under ideal conditions (short cable lengths, "clean" voltage supply, no internal and
external noise signals), ground can be connected via GNDsys in the analogue modes.
► If used in the field, the notes on laying and connecting the signal, voltage and ground
cables in the original operating instructions have to be observed.
>
6.1.2 Outputs
57299
The output circuit is shown in the image below using [OUT0000] as example.
Should a connection to the controller not be possible, the interface parameters can be reset to factory
setting using the switch [RESET COM].
40
Starter kit for ecomatController EC2121
E
Establish a connection between the controller and the PC via Ethernet.
.................................................................................................................9
Explanation of Symbols ...........................................................................4
F
Features of a PLC..................................................................................25
Function block diagram (FBD) ...............................................................39
H
Hardware installation ...............................................................................9
I
Inputs .....................................................................................................46
Install packages .....................................................................................21
Install packages with the package manager .........................................22
Install the programming software CODESYS 3.5 .................................19
Install UpdateTool on the PC...................................................................9
Installation ..............................................................................................17
L
Legal and copyright information ..............................................................4
O
Outputs ..................................................................................................47
Overview
documentation for CODESYS 3.n .................................................................. 6
User documentation for EC2121 .................................................................... 5
P
Prepare installation ................................................................................17
Prepare the controller ..............................................................................9
Program linking ......................................................................................39
41