Beckhoff EL5122 User guide

Documentation | EN
EL5122
2 Channel Incremental Encoder Interface, 5 V single-ended (TTL, Open Col­lector)
2021-02-04 | Version: 1.0

Table of contents

Table of contents
1.1 Notes on the documentation..............................................................................................................7
1.2 Safety instructions .............................................................................................................................8
1.3 Documentation issue status ..............................................................................................................9
1.4 Version identification of EtherCAT devices .....................................................................................10
1.4.1 Beckhoff Identification Code (BIC)................................................................................... 12
2 Product overview.....................................................................................................................................14
2.1 EL5122 - Introduction ......................................................................................................................14
2.2 EL5122 - Technical data..................................................................................................................15
2.3 Start .................................................................................................................................................15
2.4 EL51xx series overview...................................................................................................................16
2.5 Technology ......................................................................................................................................17
2.6 Technical properties ........................................................................................................................19
2.6.1 Signal types ..................................................................................................................... 19
2.6.2 Gate/Latch inputs............................................................................................................. 21
2.6.3 Encoder operating voltage (supply voltage) .................................................................... 22
3 Basics communication ...........................................................................................................................23
3.1 EtherCAT basics..............................................................................................................................23
3.2 EtherCAT cabling – wire-bound.......................................................................................................23
3.3 General notes for setting the watchdog...........................................................................................24
3.4 EtherCAT State Machine.................................................................................................................26
3.5 CoE Interface...................................................................................................................................28
3.6 Distributed Clock .............................................................................................................................33
4 Mounting and wiring................................................................................................................................34
4.1 Instructions for ESD protection........................................................................................................34
4.2 Installation on mounting rails ...........................................................................................................34
4.3 Connection ......................................................................................................................................37
4.3.1 Connection system .......................................................................................................... 37
4.3.2 Wiring............................................................................................................................... 40
4.3.3 Shielding .......................................................................................................................... 41
4.4 Installation positions ........................................................................................................................42
4.5 Positioning of passive Terminals .....................................................................................................44
4.6 EL5122 - Connection.......................................................................................................................45
4.6.1 TTL mode ........................................................................................................................ 46
4.6.2 Open Collector mode....................................................................................................... 47
4.7 EL5122 - LEDs ................................................................................................................................48
5 Commissioning........................................................................................................................................49
5.1 TwinCAT Quick Start .......................................................................................................................49
5.1.1 TwinCAT 2 ....................................................................................................................... 52
5.1.2 TwinCAT 3 ....................................................................................................................... 62
5.2 TwinCAT Development Environment ..............................................................................................75
5.2.1 Installation of the TwinCAT real-time driver..................................................................... 76
5.2.2 Notes regarding ESI device description........................................................................... 81
EL5122 3Version: 1.0
Table of contents
5.2.3 TwinCAT ESI Updater ..................................................................................................... 85
5.2.4 Distinction between Online and Offline............................................................................ 85
5.2.5 OFFLINE configuration creation ...................................................................................... 86
5.2.6 ONLINE configuration creation ........................................................................................ 91
5.2.7 EtherCAT subscriber configuration.................................................................................. 99
5.2.8 NC configuration (motion).............................................................................................. 108
5.3 General Notes - EtherCAT Slave Application................................................................................112
6 EL5122 - Commissioning......................................................................................................................120
6.1 Overview of EL5122 functions.......................................................................................................120
6.2 Process data..................................................................................................................................121
6.2.1 Sync Manager (SM)....................................................................................................... 121
6.2.2 PDO assignment............................................................................................................ 122
6.2.3 Predefined PDO Assignment......................................................................................... 127
6.2.4 Synchronicity mode ....................................................................................................... 130
6.2.5 EtherCAT cycle time ...................................................................................................... 130
6.3 Basic functions ..............................................................................................................................131
6.3.1 Counter value ................................................................................................................ 131
6.3.2 Reset counter value via gate/latch combination input ................................................... 136
6.3.3 Set counter value via gate/latch combination input ....................................................... 137
6.3.4 Save counter value ........................................................................................................ 139
6.3.5 Lock counter value......................................................................................................... 141
6.4 Extended functionalities.................................................................................................................142
6.4.1 Frequency measurement............................................................................................... 142
6.4.2 Period value measurement............................................................................................ 144
6.4.3 Velocity, speed calculation ............................................................................................ 145
6.4.4 Adjustable interference pulse filters............................................................................... 147
6.4.5 Plausibility check ........................................................................................................... 148
6.5 Inputs.............................................................................................................................................149
6.5.1 Gate/Latch combination input ........................................................................................ 150
6.6 Diagnostics ....................................................................................................................................151
6.6.1 Diagnostics – basic principles of diag messages .......................................................... 151
6.6.2 EL5122 diagnostics ....................................................................................................... 162
6.7 Object description and parameterization .......................................................................................163
6.7.1 Restore object................................................................................................................ 163
6.7.2 Configuration data ......................................................................................................... 164
6.7.3 Command object............................................................................................................ 165
6.7.4 Input data....................................................................................................................... 166
6.7.5 Output data .................................................................................................................... 167
6.7.6 Information / diagnostic data (channel specific)............................................................. 167
6.7.7 Information / diagnostic data (device specific)............................................................... 167
6.7.8 Standard objects............................................................................................................ 168
7 Appendix ................................................................................................................................................185
7.1 EtherCAT AL Status Codes...........................................................................................................185
7.2 Firmware compatibility...................................................................................................................185
7.3 Firmware Update EL/ES/EM/ELM/EPxxxx ....................................................................................185
EL51224 Version: 1.0
Table of contents
7.3.1 Device description ESI file/XML..................................................................................... 186
7.3.2 Firmware explanation .................................................................................................... 189
7.3.3 Updating controller firmware *.efw................................................................................. 190
7.3.4 FPGA firmware *.rbf....................................................................................................... 192
7.3.5 Simultaneous updating of several EtherCAT devices.................................................... 196
7.4 Restoring the delivery state ...........................................................................................................197
7.5 Support and Service ......................................................................................................................198
EL5122 5Version: 1.0
Table of contents
EL51226 Version: 1.0
Foreword

1 Foreword

1.1 Notes on the documentation

Intended audience
This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards. It is essential that the documentation and the following notes and explanations are followed when installing and commissioning these components. It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCATG®, EtherCATG10®, EtherCATP®, SafetyoverEtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding applications or registrations in various other countries.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany. The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited. Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.
EL5122 7Version: 1.0
Foreword

1.2 Safety instructions

Safety regulations
Please note the following safety instructions and explanations! Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards.
Description of instructions
In this documentation the following instructions are used. These instructions must be read carefully and followed without fail!
DANGER
Serious risk of injury!
Failure to follow this safety instruction directly endangers the life and health of persons.
WARNING
Risk of injury!
Failure to follow this safety instruction endangers the life and health of persons.
CAUTION
Personal injuries!
Failure to follow this safety instruction can lead to injuries to persons.
NOTE
Damage to environment/equipment or data loss
Failure to follow this instruction can lead to environmental damage, equipment damage or data loss.
Tip or pointer
This symbol indicates information that contributes to better understanding.
EL51228 Version: 1.0

1.3 Documentation issue status

Version Comment
1.0 • First release
0.1 • First preliminary documentation for EL5122
Foreword
EL5122 9Version: 1.0
Foreword

1.4 Version identification of EtherCAT devices

Designation
A Beckhoff EtherCAT device has a 14-digit designation, made up of
• family key
• type
• version
• revision
Example Family Type Version Revision
EL3314-0000-0016 EL terminal
(12 mm, non­pluggable connection level)
ES3602-0010-0017 ES terminal
(12 mm, pluggable connection level)
CU2008-0000-0000 CU device 2008 (8-port fast ethernet switch) 0000 (basic type) 0000
3314 (4-channel thermocouple terminal)
3602 (2-channel voltage measurement)
0000 (basic type) 0016
0010 (high­precision version)
0017
Notes
• The elements mentioned above result in the technical designation. EL3314-0000-0016 is used in the example below.
• EL3314-0000 is the order identifier, in the case of “-0000” usually abbreviated to EL3314. “-0016” is the EtherCAT revision.
• The order identifier is made up of
- family key (EL, EP, CU, ES, KL, CX, etc.)
- type (3314)
- version (-0000)
• The revision -0016 shows the technical progress, such as the extension of features with regard to the EtherCAT communication, and is managed by Beckhoff. In principle, a device with a higher revision can replace a device with a lower revision, unless specified otherwise, e.g. in the documentation. Associated and synonymous with each revision there is usually a description (ESI, EtherCAT Slave Information) in the form of an XML file, which is available for download from the Beckhoff web site. From 2014/01 the revision is shown on the outside of the IP20 terminals, see Fig. “EL5021 EL terminal, standard IP20 IO device with batch number and revision ID (since 2014/01)”.
• The type, version and revision are read as decimal numbers, even if they are technically saved in hexadecimal.
Identification number
Beckhoff EtherCAT devices from the different lines have different kinds of identification numbers:
Production lot/batch number/serial number/date code/D number
The serial number for Beckhoff IO devices is usually the 8-digit number printed on the device or on a sticker. The serial number indicates the configuration in delivery state and therefore refers to a whole production batch, without distinguishing the individual modules of a batch.
Structure of the serial number: KKYYFFHH
KK - week of production (CW, calendar week) YY - year of production FF - firmware version HH - hardware version
EL512210 Version: 1.0
Foreword
Example with Ser. no.: 12063A02: 12 - production week 12 06 - production year 2006 3A - firmware version 3A 02 ­hardware version 02
Unique serial number/ID, ID number
In addition, in some series each individual module has its own unique serial number.
See also the further documentation in the area
• IP67: EtherCAT Box
• Safety: TwinSafe
• Terminals with factory calibration certificate and other measuring terminals
Examples of markings
Fig.1: EL5021 EL terminal, standard IP20 IO device with serial/ batch number and revision ID (since 2014/01)
Fig.2: EK1100 EtherCAT coupler, standard IP20 IO device with serial/ batch number
Fig.3: EL3202-0020 with serial/ batch number 26131006 and unique ID-number 204418
EL5122 11Version: 1.0
Foreword

1.4.1 Beckhoff Identification Code (BIC)

The Beckhoff Identification Code (BIC) is increasingly being applied to Beckhoff products to uniquely identify the product. The BIC is represented as a Data Matrix Code (DMC, code scheme ECC200), the content is based on the ANSI standard MH10.8.2-2016.
Fig.4: BIC as data matrix code (DMC, code scheme ECC200)
The BIC will be introduced step by step across all product groups.
Depending on the product, it can be found in the following places:
• on the packaging unit
• directly on the product (if space suffices)
• on the packaging unit and the product
The BIC is machine-readable and contains information that can also be used by the customer for handling and product management.
Each piece of information can be uniquely identified using the so-called data identifier (ANSIMH10.8.2-2016). The data identifier is followed by a character string. Both together have a maximum length according to the table below. If the information is shorter, spaces are added to it. The data under positions 1 to 4 are always available.
The following information is contained:
EL512212 Version: 1.0
Item
Type of
no.
information
1 Beckhoff order
number
2 Beckhoff Traceability
Number (BTN)
3 Article description Beckhoff article
4 Quantity Quantity in packaging
5 Batch number Optional: Year and week
6 ID/serial number Optional: Present-day
7 Variant number Optional: Product variant
...
Explanation Data
Beckhoff order number 1P 8 1P072222
Unique serial number, see note below
description, e.g. EL1008
unit, e.g. 1, 10, etc.
of production
serial number system, e.g. with safety products or calibrated terminals
number on the basis of standard products
Foreword
Number of digits
identifier
S 12 SBTNk4p562d7
1K 32 1KEL1809
Q 6 Q1
2P 14 2P401503180016
51S 12 51S678294104
30P 32 30PF971, 2*K183
incl. data identifier
Example
Further types of information and data identifiers are used by Beckhoff and serve internal processes.
Structure of the BIC
Example of composite information from item 1 to 4 and 6. The data identifiers are marked in red for better display:
BTN
An important component of the BIC is the Beckhoff Traceability Number (BTN, item no.2). The BTN is a unique serial number consisting of eight characters that will replace all other serial number systems at Beckhoff in the long term (e.g. batch designations on IO components, previous serial number range for safety products, etc.). The BTN will also be introduced step by step, so it may happen that the BTN is not yet coded in the BIC.
NOTE
This information has been carefully prepared. However, the procedure described is constantly being further developed. We reserve the right to revise and change procedures and documentation at any time and with­out prior notice. No claims for changes can be made from the information, illustrations and descriptions in this information.
EL5122 13Version: 1.0
Product overview

2 Product overview

2.1 EL5122 - Introduction

2-channel incremental encoder interface, 5V single-ended (TTL, Open Collector)
Fig.5: EL5122
The EL5122 EtherCAT Terminal is an interface for the direct connection of two incremental encoders with A and B track. Encoders with single-ended-signals (TTL and Open Collector) can be connected. Thanks to internal pull-up resistors, no external wiring is required for open collector analysis.
One 24V digital input is available per channel for saving, locking and setting the counter value. Furthermore, there is an option to set the counter value to a specified value or to lock the counter directly via the process data.
The encoders can be supplied with 5V, 12V or 24V directly via the connection points of the terminal.
Special features:
• Save, lock and set the counter
• Integrated frequency and period measurement
• Optionally usable as a 5V up/down counter
• Synchronous reading of the position value via Distributed Clocks
In addition, the EL5122 enables the measurement of a period, frequency or velocity with a resolution of 10ns and supports the synchronous reading of the encoder value together with other input data in the EtherCAT system via the high-precision EtherCAT Distributed Clocks (DC). The use of encoder profiles allows the simple and fast linking of the process data to the Motion Control application.
Quick links
Basics communication [}23]
Creation of the TwinCAT configuration [}91]
Process data [}121]
Configuration data [}164]
Object description [}163]
LEDs [}48] and connection [}45]
EL512214 Version: 1.0
Product overview

2.2 EL5122 - Technical data

Technical data EL5122
Encoder type Incremental, single-ended (TTL, Open Collector), counter, pulse generator Encoder connection Single-ended connection (TTL, Open Collector): A, B
Counters, pulse generators: A, B Number of channels 2 x A, B Additional inputs Gate/Latch (24VDC, t Encoder operating voltage 5V
Counter 32bit (default) or 16bit switchable Cut-off frequency TTL mode: 4million increments with 4-fold evaluation, corresponds to 1MHz
Quadrature decoder 4-fold evaluation (preset), 2-fold, 1-fold evaluation switchable Micro-increments resolution no Broken wire detection to sensor no Distributed Clocks yes Timestamp no Special functions Period duration, frequency and speed measurement Cycle time min. 100µs Current consumption via E-bus typ. 190mA Current consumption from power contacts 10mA + load Electrical isolation 500V (E-bus/field voltage) Configuration
Weight approx.50g Permissible ambient temperature range
during operation Permissible ambient temperature range
during storage Permissible relative air humidity 95%, no condensation Dimensions (W x H x D) approx. 15mm x100mm x 70mm (width aligned: 12mm)
Mounting [}34]
Vibration/shock resistance conforms to EN60068-2-6 / EN60068-2-27 EMC immunity/emission conforms to EN61000-6-2/ EN61000-6-4 Protection class IP20 Installation position variable Approval CE
(preset), 12VDC, 24V
DC
0.3A sum current (generated from the 24VDCpower contacts)
Open Collector: 400.000 increments with 4-fold evaluation, corresponds to 100kHz
via TwinCAT System Manager [}99]
0°C ... + 55°C
-25°C ... + 85°C
on 35mm support rail according to EN60715
>1µs) per channel
ON
switchable,
DC

2.3 Start

For commissioning:
• Mount the EL5122 as described in the chapter Mounting and wiring [}34]
• Configure the EL5122 in TwinCAT as described in the chapter Commissioning [}49].
• Parameterize the EL5122 as described in chapter EL5122 - Commissioning [}120].
EL5122 15Version: 1.0
Product overview

2.4 EL51xx series overview

Technical data EL5102
2 x A, B, C
Number of channels 2 1 2 2 1 Encoder
type, incremental
Number of digital inputs per channel
Number of digital outputs per channel
Encoder operating voltage switchable between 5VDC, 12VDC, 24V
Encoder output current per channel
Cut-off frequency 20 million in-
Differential RS422 X X X / X Single-ended TTL X X X X X OpenCollector X X X X X Counter / pulse
generator
DC
X X X X X
2 2 1 1 2
/ / / / 2
X X X X X
0.3 A 0.3 A Sum current
crements,
correspond-
ing to 5 MHz
1 x A, B, C 2 x A, B
20 million in-
crements,
correspond-
ing to 5 MHz
EL5112 EL5122
2 x A, B
Sum current
0.3 A
20 million in-
crements,
correspond-
ing to 5 MHz
0.3 A
4 million in-
crements,
correspond-
ing to 1 MHz
EL5131
1 x A, B, C
0.3 A
20 million in-
crements,
correspond-
ing to 5 MHz
Functions EL5102
2 x A, B, C
Reset counter value via
Set counter value via
Save counter value via
Lock counter value via
Switching at comparison values (Counter / Frequency / Period
value) Detect counting direction X X / / X Detect reversion of rotation X X / / X Frequency measurement X X X X X Period value measurement X X X X X Velocity, speed calculation X X X X X Duty cycle evaluation X X / / X Micro-increments X X / / X Timestamp function X X / / X Adjustable interference pulse
filters Plausibility check X X X X X
zero pulse C X X / / X Latch input X X X X X
PLC variable X X X X X zero pulse C X X / / X Latch input X X X / X Gate/Latch input / / X X / zero pulse C X X / / X Latch input X X X / X Gate/Latch input X X / X X PLC variable X X X X X Gate/Latch input X X X X X
/ / / / X
X X X X X
1 x A, B, C 2 x A, B
EL5112 EL5122
2 x A, B
EL5131
1 x A, B, C
EL512216 Version: 1.0
Product overview

2.5 Technology

The incremental encoder interface terminals of the EL51xx series enable the connection of incremental encoders to Bus Couplers or the PLC.
Incremental encoder basics
Incremental encoders divide a 360° rotation of the encoder axis into individual steps (increments) and mark a full revolution by means of a special mark (zero pulse). An RS422 encoder transmits the signal symmetrically as a differential line pair. TTL and Open Collector encoders use single signal lines (single-ended).
The terminal evaluates the 90° phase-shifted square wave signals of an incremental encoder on tracks A and B. The zero pulse is captured on track C. With a differential connection, the inverted signals (A, B, C) are also recorded.
These signals are converted by means of the quadrature decoder and the 32-bit counter into a position value with optional quadruple, double or single evaluation. The digital inputs enable latch, reset and set functionalities and thus exact and speed-independent referencing and storage of the counter value.
Encoder type Incremental signals
RS422 encoder with zero pulse A, A, B, B, C, C RS422 encoder without zero pulse A, A, B, B RS422 counter or pulse generator with zero pulse A, A, C, C;
Counting direction specification via track B (B, B)
RS422 counter or pulse generator without zero pulse A, A;
Counting direction specification via track B (B, B) TTL, Open Collector encoder with zero pulse A, B, C TTL, Open Collector encoder without zero pulse A, B TTL, Open Collector counter or pulse generator with zero pulse A, C;
Counting direction specification via B TTL, Open Collector counter or pulse generator without zero pulse A,
Counting direction specification via B
The phase position between the signals on track A and track B determines the counting direction. Forward (cw): Signal on track A leads track B by 90° Reverse (ccw): Signal on track A lags track B by 90°.
With single evaluation the rising edges on track A are counted. With double evaluation the rising and falling edges on track A are counted. With quadruple evaluation the rising and falling edges on track A and track B are counted.
Fig.6: Incremental signals
Absolute value encoders provide an absolute position value directly after switch-on, which is unambiguous over the entire travel path. With incremental encoders, homing must be performed after switch-on in order to be able to determine an unambiguous position. Referencing can be carried out, for example, with the aid of referencing cams or using the zero pulse of the encoder.
EL5122 17Version: 1.0
Product overview
NOTE
Differential and single-ended connection
• The RS422 signal transmits a differential voltage, which makes the signal less sensitive to interference compared to a single-ended signal.
ð If the encoder signal is to be transmitted over longer distances or at higher frequencies, an encoder
with RS422 signals is recommended.
ð Shielded and twisted pair cables should be used.
EL512218 Version: 1.0
Product overview

2.6 Technical properties

The EL51xx series incremental encoder interface terminals enable connection of incremental encoders. In addition to the encoder inputs A, B and optional zero pulse C, up to two additional 24VDC inputs are available (latch and gate/latch), which can be used for resetting, setting, blocking and storing the counter value. If the incremental encoder has a fault signal output, this can be connected to the Status Input input (5VDC).
The terminal EL5122 provides the following inputs with the respective technical characteristics:
• Single-ended signals from TTL encoders and Open Collector encoders are supported.
• Gate/Latch input
The terminal also provides a parameterizable encoder supply.
• Encoder operating voltage
NOTE
Fast digital inputs – interference from interfering devices
Please note that the input wiring has very little filtering. It has been optimized for fast signal transmission from the input to the evaluation unit. In other words, rapid level changes/pulses in the µs range and/or high­frequency interference signals from devices (e.g. proportional valves, stepper motor or DC motor output stages) arrive at the evaluation unit almost unfiltered/unattenuated. These interferences can be incorrectly detected as a signal.
To suppress interference, an additional input filter can be parameterized. Furthermore, EMC-compliant ca­bling and the use of separate power supply units for the terminal and the devices causing interference are recommended.

2.6.1 Signal types

Supported encoders / signal types
Possible encoder connections are single-ended signals from TTL encoders and signals from Open Collector encoders through internal pull-up resistors.
The following signal types are supported:
Encoder Signal type Setting in
Encoder without zero pulse track C
Counter/pulse generator without zero pulse track C
Encoder without zero pulse track C
Counter/pulse generator without zero pulse track C
TTL (single ended)
open collector 4 400,000 increments/s
index 0x80n1:1D "Counter mode"
2 4 million increments/s
3
5
The correct wiring for the respective encoder can be found in chapter Connection [}45].
Cut-off frequency Comments
with 4-fold evaluation, corresponds to 1MHz per track
with 4-fold evaluation, corresponds to 100kHz per track
A voltage level of nominally 2.0V to 6.0V with a current of 2.1mA or higher is expected.
No broken wire detection No broken wire detection
EL5122 19Version: 1.0
Product overview
Signal type TTL (single-ended) and Open Collector
With the following settings in "Counter mode" (0x80n1:1D), a voltage level of nominally 2.0V to 6.0V with a current of 2.1mA or higher is expected:
• 2: Encoder TTL (single-ended)
• 3: Counter TTL (single-ended)
• 4: Encoder open collector
• 5: Counter open collector
For TTL encoders a cut-off frequency of up to 4 million increments per second is permissible with 4-fold evaluation. This corresponds to 1MHz.
For Open Collector encoders, a cut-off frequency of up to 400.000 increments per second is permissible with 4-fold evaluation. This corresponds to 100kHz.
Fig.7: TTL, Open Collector signal level (single-ended signal)
Key:
V
IN
A, B Encoder signals A, B
Single-ended input voltage
NOTE
Open circuit detection
Open circuit detection inherently does not work with single-ended lines: TTL and Open Collector encoders and counters/pulse generators.
NOTE
Open Collector wiring
When selecting an Open Collector encoder under "Counter mode" (0x80n1:1D), the inputs A, B are con­nected to 5V via pull-up resistors (1kΩ).
EL512220 Version: 1.0
Product overview

2.6.2 Gate/Latch inputs

• The terminal provides one digital 24VDC input per channel. The function of these inputs is explained in
the chapter Gate/Latch (external latch) [}150].
Both inputs are type 3 inputs according to EN61131-2, with a minimum pulse duration of tON>1µs.
Digital input type 3, according to EN61131-2
Signal voltage "0 - LOW" -3V ... +5V typ. 0mA ... 2.6mA typ. Signal voltage "1 - HIGH" 11V ... 30V typ. typ. 2.5mA
Fig.8: Characteristic curve - input 24 V
Voltage [V] Input current [mA]
type 3
DC
NOTE
Be aware of bouncing when using electromechanical switches and push buttons
When using electromechanical switches and push buttons, repeated closing and opening of the switch or push button can occur when the switch or push button is actuated, which is referred to as bouncing.
• If the function 0x80n0:22 "Enable continuous latch extern" is active, the stored value will be overwritten several times due to bouncing. As a result, you obtain not the first-saved, but the last-saved value in the parameter 0x60n0:12 "Latch value".
• If the function is deactivated, only the first opening or closing of the switch or push button is detected and saved as a value in the corresponding parameter. No other transactions are taken into account.
EL5122 21Version: 1.0
Product overview

2.6.3 Encoder operating voltage (supply voltage)

The encoder supply is generated internally from the 24V of the power contacts. The encoder supply can be set in index 0x8001 [}165]:17 "Supply voltage". An operating voltage of 5VDC is preset. Voltage values of
5VDC, 12VDC and 24VDC can be selected. The setting applies to both channels. Before switching to higher voltages, ensure that both encoders support the voltage range.
The following tolerances apply
Voltage range Tolerance
5V
DC
12V
DC
24V
DC
Setting the encoder supply via index 0x8001:17 [}165]
The encoder supply is set centrally for both terminal channels via the index 0x8001:17 [}165] (chan­nel 1). The corresponding index 0x8011:17 of the second channel has no parameterization function.
Setting the encoder supply voltage
• Before switching to a higher voltage, make sure that the connected encoders support the selected volt­age range!
• To write to 0x80n1:17 "Supply voltage" you have to set the value 0x72657375 (ASCII: "user") in index 0xF008 [}184] "Code word".
+/- 5% (4.75V … 5.25V) +/- 10% (10.8V … 13.2V)
-15% to +20% (20.4V … 28.8V)
NOTE
EL512222 Version: 1.0
Basics communication

3 Basics communication

3.1 EtherCAT basics

Please refer to the EtherCAT System Documentation for the EtherCAT fieldbus basics.

3.2 EtherCAT cabling – wire-bound

The cable length between two EtherCAT devices must not exceed 100 m. This results from the FastEthernet technology, which, above all for reasons of signal attenuation over the length of the cable, allows a maximum
link length of 5 + 90 + 5 m if cables with appropriate properties are used. See also the Design recommendations for the infrastructure for EtherCAT/Ethernet.
Cables and connectors
For connecting EtherCAT devices only Ethernet connections (cables + plugs) that meet the requirements of at least category 5 (CAt5) according to EN 50173 or ISO/IEC 11801 should be used. EtherCAT uses 4 wires for signal transfer.
EtherCAT uses RJ45 plug connectors, for example. The pin assignment is compatible with the Ethernet standard (ISO/IEC 8802-3).
Pin Color of conductor Signal Description
1 yellow TD + Transmission Data + 2 orange TD - Transmission Data ­3 white RD + Receiver Data + 6 blue RD - Receiver Data -
Due to automatic cable detection (auto-crossing) symmetric (1:1) or cross-over cables can be used between EtherCAT devices from Beckhoff.
Recommended cables
It is recommended to use the appropriate Beckhoff components e.g.
- cable sets ZK1090-9191-xxxx respectively
- RJ45 connector, field assembly ZS1090-0005
- EtherCAT cable, field assembly ZB9010, ZB9020
Suitable cables for the connection of EtherCAT devices can be found on the Beckhoff website!
E-Bus supply
A bus coupler can supply the EL terminals added to it with the E-bus system voltage of 5V; a coupler is thereby loadable up to 2A as a rule (see details in respective device documentation). Information on how much current each EL terminal requires from the E-bus supply is available online and in the catalogue. If the added terminals require more current than the coupler can supply, then power feed
terminals (e.g. EL9410) must be inserted at appropriate places in the terminal strand.
The pre-calculated theoretical maximum E-Bus current is displayed in the TwinCAT System Manager. A shortfall is marked by a negative total amount and an exclamation mark; a power feed terminal is to be placed before such a position.
EL5122 23Version: 1.0
Basics communication
Fig.9: System manager current calculation
NOTE
Malfunction possible!
The same ground potential must be used for the E-Bus supply of all EtherCAT terminals in a terminal block!

3.3 General notes for setting the watchdog

ELxxxx terminals are equipped with a safety feature (watchdog) that switches off the outputs after a specifiable time e.g. in the event of an interruption of the process data traffic, depending on the device and settings, e.g. in OFF state.
The EtherCAT slave controller (ESC) in the EL2xxx terminals features two watchdogs:
• SM watchdog (default: 100 ms)
• PDI watchdog (default: 100 ms)
SM watchdog (SyncManager Watchdog)
The SyncManager watchdog is reset after each successful EtherCAT process data communication with the terminal. If no EtherCAT process data communication takes place with the terminal for longer than the set and activated SM watchdog time, e.g. in the event of a line interruption, the watchdog is triggered and the outputs are set to FALSE. The OP state of the terminal is unaffected. The watchdog is only reset after a successful EtherCAT process data access. Set the monitoring time as described below.
The SyncManager watchdog monitors correct and timely process data communication with the ESC from the EtherCAT side.
PDI watchdog (Process Data Watchdog)
If no PDI communication with the EtherCAT slave controller (ESC) takes place for longer than the set and activated PDI watchdog time, this watchdog is triggered. PDI (Process Data Interface) is the internal interface between the ESC and local processors in the EtherCAT slave, for example. The PDI watchdog can be used to monitor this communication for failure.
The PDI watchdog monitors correct and timely process data communication with the ESC from the application side.
The settings of the SM- and PDI-watchdog must be done for each slave separately in the TwinCAT System Manager.
EL512224 Version: 1.0
Basics communication
Fig.10: EtherCAT tab -> Advanced Settings -> Behavior -> Watchdog
Notes:
• the multiplier is valid for both watchdogs.
• each watchdog has its own timer setting, the outcome of this in summary with the multiplier is a
resulting time.
• Important: the multiplier/timer setting is only loaded into the slave at the start up, if the checkbox is
activated. If the checkbox is not activated, nothing is downloaded and the ESC settings remain unchanged.
Multiplier
Multiplier
Both watchdogs receive their pulses from the local terminal cycle, divided by the watchdog multiplier:
1/25 MHz * (watchdog multiplier + 2) = 100µs (for default setting of 2498 for the multiplier)
The standard setting of 1000 for the SM watchdog corresponds to a release time of 100ms.
The value in multiplier + 2 corresponds to the number of basic 40 ns ticks representing a watchdog tick. The multiplier can be modified in order to adjust the watchdog time over a larger range.
EL5122 25Version: 1.0
Basics communication
Example “Set SM watchdog”
This checkbox enables manual setting of the watchdog times. If the outputs are set and the EtherCAT communication is interrupted, the SM watchdog is triggered after the set time and the outputs are erased. This setting can be used for adapting a terminal to a slower EtherCAT master or long cycle times. The default SM watchdog setting is 100ms. The setting range is 0...65535. Together with a multiplier with a range of 1...65535 this covers a watchdog period between 0...~170 seconds.
Calculation
Multiplier = 2498 → watchdog base time = 1 / 25MHz * (2498 + 2) = 0.0001seconds = 100µs SM watchdog = 10000 → 10000 * 100µs = 1second watchdog monitoring time
CAUTION
Undefined state possible!
The function for switching off of the SM watchdog via SM watchdog = 0 is only implemented in terminals from version -0016. In previous versions this operating mode should not be used.
CAUTION
Damage of devices and undefined state possible!
If the SM watchdog is activated and a value of 0 is entered the watchdog switches off completely. This is the deactivation of the watchdog! Set outputs are NOT set in a safe state, if the communication is inter­rupted.

3.4 EtherCAT State Machine

The state of the EtherCAT slave is controlled via the EtherCAT State Machine (ESM). Depending upon the state, different functions are accessible or executable in the EtherCAT slave. Specific commands must be sent by the EtherCAT master to the device in each state, particularly during the bootup of the slave.
A distinction is made between the following states:
• Init
• Pre-Operational
• Safe-Operational and
• Operational
• Boot
The regular state of each EtherCAT slave after bootup is the OP state.
EL512226 Version: 1.0
Fig.11: States of the EtherCAT State Machine
Basics communication
Init
After switch-on the EtherCAT slave in the Init state. No mailbox or process data communication is possible. The EtherCAT master initializes sync manager channels 0 and 1 for mailbox communication.
Pre-Operational (Pre-Op)
During the transition between Init and Pre-Op the EtherCAT slave checks whether the mailbox was initialized correctly.
In Pre-Op state mailbox communication is possible, but not process data communication. The EtherCAT master initializes the sync manager channels for process data (from sync manager channel 2), the FMMU channels and, if the slave supports configurable mapping, PDO mapping or the sync manager PDO assignment. In this state the settings for the process data transfer and perhaps terminal-specific parameters that may differ from the default settings are also transferred.
Safe-Operational (Safe-Op)
During transition between Pre-Op and Safe-Op the EtherCAT slave checks whether the sync manager channels for process data communication and, if required, the distributed clocks settings are correct. Before it acknowledges the change of state, the EtherCAT slave copies current input data into the associated DP­RAM areas of the EtherCAT slave controller (ECSC).
In Safe-Op state mailbox and process data communication is possible, although the slave keeps its outputs in a safe state, while the input data are updated cyclically.
Outputs in SAFEOP state
The default set watchdog [}24] monitoring sets the outputs of the module in a safe state - depend­ing on the settings in SAFEOP and OP - e.g. in OFF state. If this is prevented by deactivation of the watchdog monitoring in the module, the outputs can be switched or set also in the SAFEOP state.
Operational (Op)
Before the EtherCAT master switches the EtherCAT slave from Safe-Op to Op it must transfer valid output data.
In the Op state the slave copies the output data of the masters to its outputs. Process data and mailbox communication is possible.
EL5122 27Version: 1.0
Basics communication
Boot
In the Boot state the slave firmware can be updated. The Boot state can only be reached via the Init state.
In the Boot state mailbox communication via the file access over EtherCAT (FoE) protocol is possible, but no other mailbox communication and no process data communication.

3.5 CoE Interface

General description
The CoE interface (CAN application protocol over EtherCAT)) is used for parameter management of EtherCAT devices. EtherCAT slaves or the EtherCAT master manage fixed (read only) or variable parameters which they require for operation, diagnostics or commissioning.
CoE parameters are arranged in a table hierarchy. In principle, the user has read access via the fieldbus. The EtherCAT master (TwinCAT System Manager) can access the local CoE lists of the slaves via EtherCAT in read or write mode, depending on the attributes.
Different CoE parameter types are possible, including string (text), integer numbers, Boolean values or larger byte fields. They can be used to describe a wide range of features. Examples of such parameters include manufacturer ID, serial number, process data settings, device name, calibration values for analog measurement or passwords.
The order is specified in two levels via hexadecimal numbering: (main)index, followed by subindex. The value ranges are
• Index: 0x0000 …0xFFFF (0...65535
• SubIndex: 0x00…0xFF (0...255
dez
)
dez
)
A parameter localized in this way is normally written as 0x8010:07, with preceding “0x” to identify the hexadecimal numerical range and a colon between index and subindex.
The relevant ranges for EtherCAT fieldbus users are:
• 0x1000: This is where fixed identity information for the device is stored, including name, manufacturer,
serial number etc., plus information about the current and available process data configurations.
• 0x8000: This is where the operational and functional parameters for all channels are stored, such as
filter settings or output frequency.
Other important ranges are:
• 0x4000: here are the channel parameters for some EtherCAT devices. Historically, this was the first
parameter area before the 0x8000 area was introduced. EtherCAT devices that were previously equipped with parameters in 0x4000 and changed to 0x8000 support both ranges for compatibility reasons and mirror internally.
• 0x6000: Input PDOs (“input” from the perspective of the EtherCAT master)
• 0x7000: Output PDOs (“output” from the perspective of the EtherCAT master)
Availability
Not every EtherCAT device must have a CoE list. Simple I/O modules without dedicated processor usually have no variable parameters and therefore no CoE list.
If a device has a CoE list, it is shown in the TwinCAT System Manager as a separate tab with a listing of the elements:
EL512228 Version: 1.0
Basics communication
Fig.12: “CoE Online” tab
The figure above shows the CoE objects available in device “EL2502”, ranging from 0x1000 to 0x1600. The subindices for 0x1018 are expanded.
Data management and function “NoCoeStorage”
Some parameters, particularly the setting parameters of the slave, are configurable and writeable. This can be done in write or read mode
• via the System Manager (Fig. “CoE Online” tab) by clicking
This is useful for commissioning of the system/slaves. Click on the row of the index to be parameterized and enter a value in the “SetValue” dialog.
• from the control system/PLC via ADS, e.g. through blocks from the TcEtherCAT.lib library
This is recommended for modifications while the system is running or if no System Manager or operating staff are available.
Data management
If slave CoE parameters are modified online, Beckhoff devices store any changes in a fail-safe manner in the EEPROM, i.e. the modified CoE parameters are still available after a restart. The situation may be different with other manufacturers.
An EEPROM is subject to a limited lifetime with respect to write operations. From typically 100,000 write operations onwards it can no longer be guaranteed that new (changed) data are reliably saved or are still readable. This is irrelevant for normal commissioning. However, if CoE parameters are continuously changed via ADS at machine runtime, it is quite possible for the lifetime limit to be reached. Support for the NoCoeStorage function, which suppresses the saving of changed CoE val­ues, depends on the firmware version. Please refer to the technical data in this documentation as to whether this applies to the respective device.
• If the function is supported: the function is activated by entering the code word 0x12345678 once in CoE 0xF008 and remains active as long as the code word is not changed. After switching the device on it is then inactive. Changed CoE values are not saved in the EEPROM and can thus be changed any number of times.
• Function is not supported: continuous changing of CoE values is not permissible in view of the lifetime limit.
EL5122 29Version: 1.0
Basics communication
Startup list
Changes in the local CoE list of the terminal are lost if the terminal is replaced. If a terminal is re­placed with a new Beckhoff terminal, it will have the default settings. It is therefore advisable to link all changes in the CoE list of an EtherCAT slave with the Startup list of the slave, which is pro­cessed whenever the EtherCAT fieldbus is started. In this way a replacement EtherCAT slave can automatically be parameterized with the specifications of the user.
If EtherCAT slaves are used which are unable to store local CoE values permanently, the Startup list must be used.
Recommended approach for manual modification of CoE parameters
• Make the required change in the System Manager The values are stored locally in the EtherCAT slave
• If the value is to be stored permanently, enter it in the Startup list. The order of the Startup entries is usually irrelevant.
Fig.13: Startup list in the TwinCAT System Manager
The Startup list may already contain values that were configured by the System Manager based on the ESI specifications. Additional application-specific entries can be created.
Online/offline list
While working with the TwinCAT System Manager, a distinction has to be made whether the EtherCAT device is “available”, i.e. switched on and linked via EtherCAT and therefore online, or whether a configuration is created offline without connected slaves.
In both cases a CoE list as shown in Fig. “CoE online tab” is displayed. The connectivity is shown as offline/ online.
• If the slave is offline
◦ The offline list from the ESI file is displayed. In this case modifications are not meaningful or
possible. ◦ The configured status is shown under Identity. ◦ No firmware or hardware version is displayed, since these are features of the physical device. ◦ Offline is shown in red.
EL512230 Version: 1.0
Loading...
+ 170 hidden pages