Beckhoff EL3702, EL3702-0015, EL3742 Users guide

Documentation | EN
EL37x2
2 channel Analog Input Terminals with oversampling
2021-03-11 | Version: 3.8

Product overview analog input terminals with oversampling

1 Product overview analog input terminals with
oversampling
Two-channel analog input terminal, -10V … +10V with oversampling
EL3702-0015 [}16]
Two-channel analog input terminal, -150mV … +150mV with oversampling
Two-channel analog input terminal, 0 … 20mA with oversampling
EL37x2 3Version: 3.8

Table of contents

Table of contents
1 Product overview analog input terminals with oversampling...............................................................3
2 Foreword ....................................................................................................................................................7
2.1 Documentation issue status ..............................................................................................................7
2.2 Notes on the documentation..............................................................................................................8
2.3 Safety instructions .............................................................................................................................9
2.4 Version identification of EtherCAT devices .....................................................................................10
2.4.1 Beckhoff Identification Code (BIC)................................................................................... 14
3 Product overview.....................................................................................................................................16
3.1 EL3702 - Introduction ......................................................................................................................16
3.2 EL3702 - Technical data..................................................................................................................18
3.3 EL3742 - Introduction ......................................................................................................................19
3.4 EL3742 - Technical data..................................................................................................................20
3.5 Basic function principles ..................................................................................................................21
3.6 Sample programs ............................................................................................................................25
4 Basics communication ...........................................................................................................................30
4.1 EtherCAT basics..............................................................................................................................30
4.2 EtherCAT cabling – wire-bound.......................................................................................................30
4.3 General notes for setting the watchdog...........................................................................................31
4.4 EtherCAT State Machine.................................................................................................................33
4.5 CoE - Interface: notes......................................................................................................................34
4.6 Distributed Clock .............................................................................................................................35
5 Mounting and wiring................................................................................................................................36
5.1 Instructions for ESD protection........................................................................................................36
5.2 Installation on mounting rails ...........................................................................................................36
5.3 Installation instructions for enhanced mechanical load capacity .....................................................39
5.4 Connection system ..........................................................................................................................40
5.5 Installation positions ........................................................................................................................43
5.6 Positioning of passive Terminals .....................................................................................................45
5.7 ATEX - Special conditions (extended temperature range) ..............................................................46
5.8 IECEx - Special conditions ..............................................................................................................47
5.9 Continuative documentation for ATEX and IECEx ..........................................................................48
5.10 cFMus - Special conditions..............................................................................................................49
5.11 Continuative documentation for cFMus ...........................................................................................50
5.12 UL notice .........................................................................................................................................51
5.13 Configuration of 0/4..20 mA differential inputs.................................................................................52
5.14 EL37x2 - LEDs and pin assignment ................................................................................................56
5.14.1 EL37x2 - LEDs................................................................................................................. 56
5.14.2 EL37x2 - Pin assignment................................................................................................. 57
6 Commissioning........................................................................................................................................60
6.1 TwinCAT Quick Start .......................................................................................................................60
6.1.1 TwinCAT 2 ....................................................................................................................... 63
6.1.2 TwinCAT 3 ....................................................................................................................... 73
6.2 TwinCAT Development Environment ..............................................................................................86
EL37x24 Version: 3.8
Table of contents
6.2.1 Installation of the TwinCAT real-time driver..................................................................... 87
6.2.2 Notes regarding ESI device description........................................................................... 92
6.2.3 TwinCAT ESI Updater ..................................................................................................... 96
6.2.4 Distinction between Online and Offline............................................................................ 96
6.2.5 OFFLINE configuration creation ...................................................................................... 97
6.2.6 ONLINE configuration creation ...................................................................................... 102
6.2.7 EtherCAT subscriber configuration................................................................................ 110
6.2.8 Import/Export of EtherCAT devices with SCI and XTI ................................................... 119
6.3 General Notes - EtherCAT Slave Application................................................................................125
6.4 Oversampling terminals/boxes and TwinCAT Scope ....................................................................133
6.4.1 TwinCAT 3 procedure.................................................................................................... 134
6.4.2 TwinCAT 2 procedure.................................................................................................... 143
6.5 Process data and configuration .....................................................................................................151
6.5.1 TwinCAT tree................................................................................................................. 151
6.5.2 Extent of process data in delivery state ......................................................................... 153
6.5.3 Oversampling settings, distributed clocks (DC) ............................................................. 157
6.6 Basics about signal isolators, barriers ...........................................................................................163
6.7 Notices on analog specifications ...................................................................................................166
6.7.1 Full scale value (FSV).................................................................................................... 166
6.7.2 Measuring error/ measurement deviation ...................................................................... 166
6.7.3 Temperature coefficient tK [ppm/K] ............................................................................... 167
6.7.4 Long-term use................................................................................................................ 168
6.7.5 Single-ended/differential typification .............................................................................. 168
6.7.6 Common-mode voltage and reference ground (based on differential inputs)................ 173
6.7.7 Dielectric strength .......................................................................................................... 173
6.7.8 Temporal aspects of analog/digital conversion.............................................................. 174
7 Appendix ................................................................................................................................................177
7.1 EtherCAT AL Status Codes...........................................................................................................177
7.2 Firmware information for EL37xx/EL47xx......................................................................................177
7.3 Firmware compatibility...................................................................................................................178
7.4 Firmware Update EL/ES/EM/ELM/EPxxxx ....................................................................................178
7.4.1 Device description ESI file/XML..................................................................................... 180
7.4.2 Firmware explanation .................................................................................................... 183
7.4.3 Updating controller firmware *.efw................................................................................. 184
7.4.4 FPGA firmware *.rbf....................................................................................................... 185
7.4.5 Simultaneous updating of several EtherCAT devices.................................................... 189
7.5 Support and Service ......................................................................................................................190
EL37x2 5Version: 3.8
Table of contents
EL37x26 Version: 3.8

2 Foreword

2.1 Documentation issue status

Version Comment
3.8 • Update chapter “Technical data”
• Chapter "Commissioning": addenda subchapter "Basics about signal isolators, barriers"
• Update chapter "Configuration of 0/4..20 mA differential inputs
• Update structure
• Update revision status
3.7 • Update chapter "Technical data"
• Update structure
• Update revision status
3.6 • EL3702-0015 added
• Update structure
• Update revision status
3.5 • Update chapter "Sample programs"
• Update structure
3.4 • Update chapter "Technical data"
• Chapter "ATEX - Special conditions" replaced with chapter "ATEX - Special conditions (extended temperature range)"
• Addenda chapter "Instructions for ESD protection"
• Update chapter "Notices on Analog specification"
• Update revision status
3.3 • Update chapter "Product overview"
• Addenda chapter “Notices on analog specifications”
3.2 • Update chapter "Notes on the documentation"
• Update of Technical data
• Addenda chapter "TwinCAT Quick Start"
• Update revision status
3.1 • Section “Oversampling terminals and TwinCAT Scope” added
3.0 • Migration
2.0 • Update chapter "Technical data"
• Addenda chapter "Installation instructions for enhanced mechanical load capacity"
• Update structure
• Update revision status
1.9 • Update structure
• “Technical data” section updated
1.8 • Structural update
• Technical data updated
• Section "Configuration of 0/4..20 mA differential inputs" amended
1.7 • Technical notes added
1.6 • Technical notes example program amended
1.5 • Example program amended
1.4 • EL3742 amended
1.3 • Examples amended
1.2 • Technical data and safety instructions amended
1.1 • Technical data amended
1.0 • Technical data amended
0.1 • Provisional documentation for EL37x2
Foreword
EL37x2 7Version: 3.8
Foreword

2.2 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.
EL37x28 Version: 3.8
Foreword

2.3 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.
EL37x2 9Version: 3.8
Foreword

2.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
EL37x210 Version: 3.8
Foreword
Example with Ser. no.: 12063A02: 12 - production week 12 06 - production year 2006 3A - firmware version 3A 02 ­hardware version 02
Exceptions can occur in the IP67 area, where the following syntax can be used (see respective device documentation):
Syntax: D ww yy x y z u
D - prefix designation ww - calendar week yy - year x - firmware version of the bus PCB y - hardware version of the bus PCB z - firmware version of the I/O PCB u - hardware version of the I/O PCB
Example: D.22081501 calendar week 22 of the year 2008 firmware version of bus PCB: 1 hardware version of bus PCB: 5 firmware version of I/O PCB: 0 (no firmware necessary for this PCB) hardware version of I/O PCB: 1
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)
EL37x2 11Version: 3.8
Foreword
Fig.2: EK1100 EtherCAT coupler, standard IP20 IO device with serial/ batch number
Fig.3: CU2016 switch with serial/ batch number
Fig.4: EL3202-0020 with serial/ batch number 26131006 and unique ID-number 204418
EL37x212 Version: 3.8
Foreword
Fig.5: EP1258-00001 IP67 EtherCAT Box with batch number/ date code 22090101 and unique serial number 158102
Fig.6: EP1908-0002 IP67 EtherCAT Safety Box with batch number/ date code 071201FF and unique serial number 00346070
Fig.7: EL2904 IP20 safety terminal with batch number/ date code 50110302 and unique serial number 00331701
Fig.8: ELM3604-0002 terminal with unique ID number (QR code) 100001051 and serial/ batch number 44160201
EL37x2 13Version: 3.8
Foreword

2.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.9: 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:
EL37x214 Version: 3.8
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.
EL37x2 15Version: 3.8
Product overview

3 Product overview

3.1 EL3702 - Introduction

Fig.10: EL3702
Two-channel analog input terminal, differential inputs, -10V … +10V with oversampling
The EL3702 analog input terminal handles signals in the range from -10 V to +10 V. The voltage is digitized to a resolution of 16 bits, and is transmitted, electrically isolated, to the controller. The input channels of the EtherCAT Terminals have differential inputs and possess a common, internal ground potential.
The signals are sampled with a configurable, integer multiple (oversampling factor: n) of the bus cycle time (n microcycles per EtherCAT bus cycle). The EtherCAT Terminal generates a set of n process data per channel for each EtherCAT bus cycle, which is accumulated and transferred in the next bus cycle. The timebase of the terminal can be synchronized precisely with other EtherCAT devices via distributed clocks. This procedure enables the temporal resolution of the analog input signals to be increased to n times the bus cycle time.
Responses at equidistant intervals are made possible in conjunction with the EL4702/EL4732 (analog output terminal with oversampling) or any other distributed clocks-capable EtherCAT device.
The maximum sampling rate of the EL3702 is 100ksps (10µs sampling) at a recommended input signal bandwidth of 0..30kHz. Information on the distributed clocks can be found in the separate System description.
The EL3702-0015 analog input terminal is also available for signals in the range from -150 mV to + 150 mV.
EL37x216 Version: 3.8
Quick links
EtherCAT basics
Basic function principles [}21]
Process data and configuration [}151]
Product overview
EL37x2 17Version: 3.8
Product overview

3.2 EL3702 - Technical data

Technical data EL3702 EL3702-0015
Number of inputs 2
Signal voltage -10V ... +10V -150mV ... +150mV
Max. sampling rate max. 10 µs/100 kSps (per channel, simultaneous)
Oversampling factor n = integer multiple of the EtherCAT cycle time, 1..100
Input signal bandwidth 0...30kHz (recommended)
Distributed Clocks precision < 100ns
Internal resistance >200kΩ
Common-mode voltage U
Dielectric strength differential max. 35V
Resolution 16bit
Conversion time ~ 10µs
Measuring error < ± 0.3%
Electrical isolation 500V (E-bus/field voltage)
Supply voltage for electronics via the E-bus
Current consumption via E-bus typ. 200mA
Bit width in process image Input: n x 2 x 16bit data, 2 x 16bit CycleCounter if applicable, 4bytes StartNext-
Configuration via TwinCAT System Manager
Weight approx. 60g
Permissible ambient temperature range dur­ing operation
Permissible ambient temperature range dur­ing storage
Permissible relative humidity 95%, no condensation
Dimensions (W x H x D) approx. 15mm x 100mm x 70mm (width aligned: 12mm)
Mounting on 35mm mounting rail conforms to EN 60715
Vibration/shock resistance conforms to EN 60068-2-6 / EN
EMC immunity/emission conforms to EN 61000-6-2 / EN 61000-6-4
Protection class IP20
Installation position variable
Approval CE, EAC
CM
max. 35V
(at 25°C ... +55°C, based on the full-scale value, at < 10Hz in­put signal)
< ± 0.5% (when the extended temperature range is used)
LatchTime if applicable
-25°C ... +60°C (extended temperature range)
-40°C ... +85°C -25°C ... +85°C
60068-2-27, see also installation instructions for en­hanced mechanical load capacity
ATEX [}46] IECEx [}47] cULus [}51] cFMus [}49]
< ± 0.3% (based on the full-scale value, at < 10Hz input signal)
0°C ... +55°C
conforms to EN 60068-2-6 / EN 60068-2-27
CE
Ex markings
Standard Marking
ATEX II 3 G Ex nA IIC T4 Gc
II 3 D Ex tc IIIC T135 °C Dc
IECEx Ex nA IIC T4 Gc
Ex tc IIIC T135 °C Dc
cFMus Class I, Division 2, Groups A, B, C, D
Class I, Zone 2, AEx ec IIC T4 Gc
EL37x218 Version: 3.8

3.3 EL3742 - Introduction

Product overview
Fig.11: EL3742
Two-channel analog input terminal, differential inputs, 0...20mA with oversampling
The EL3742 analog input terminal handles signals in the range from 0 to 20 mA. The voltage is digitized to a resolution of 16 bits, and is transmitted, electrically isolated, to the controller. The input channels of the EtherCAT Terminals have differential inputs and possess a common, internal ground potential.
The signals are sampled with a configurable, integer multiple (oversampling factor: n) of the bus cycle time (n microcycles per EtherCAT bus cycle). The EtherCAT Terminal generates a set of n process data per channel for each EtherCAT bus cycle, which is accumulated and transferred in the next bus cycle. The timebase of the terminal can be synchronized precisely with other EtherCAT devices via distributed clocks. This procedure enables the temporal resolution of the analog input signals to be increased to n times the bus cycle time.
Responses at equidistant intervals are made possible in conjunction with the EL4702/EL4732 (analog output terminal with oversampling) or any other distributed clocks-capable EtherCAT device.
The maximum sampling rate of the EL3742 is 100ksps (10µs sampling) at a recommended input signal bandwidth of 0..30kHz. Information on the distributed clocks can be found in the separate System description.
Quick links
EtherCAT basics
Basic function principles [}21]
Process data and configuration [}151]
EL37x2 19Version: 3.8
Product overview

3.4 EL3742 - Technical data

Technical data EL3742
Number of inputs 2
Signal voltage 0mA…20mA
Max. sampling rate max. 10 µs/100 kSps (per channel, simultaneous)
Oversampling factor n = integer multiple of the EtherCAT cycle time, 1..100
Input signal bandwidth 0...30kHz (recommended)
Distributed Clocks precision < 100ns
Internal resistance 85Ω typ. + diode voltage
Resolution 16bit
Conversion time ~ 10µs
Measuring error < ± 0.3% (at 25°C ... +55°C,
based on the full-scale value, at < 10Hz input signal) < ± 0.5% (when the extended temperature range is used)
Electrical isolation 500V (E-bus/field voltage)
Supply voltage for electronics via the E-bus
Current consumption via E­bus
Bit width in process image Input: n x 2 x 16bit data, 2 x 16bit CycleCounter if applicable, 4bytes
Configuration via TwinCAT System Manager
Weight approx. 60g
Permissible ambient temperature range during operation
Permissible ambient temperature range during storage
Permissible relative humidity 95%, no condensation
Dimensions (W x H x D) approx. 15mm x 100mm x 70mm (width aligned: 12mm)
Mounting [}36]
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
typ. 200mA
StartNextLatchTime if applicable
-25°C ... +60°C (extended temperature range)
-40°C ... +85°C
on 35mm mounting rail conforms to EN 60715
see also installation instructions [}39] for enhanced mechanical load capacity
ATEX [}46] cULus [}51]
Ex markings
Standard Marking
ATEX II 3 G Ex nA IIC T4 Gc
EL37x220 Version: 3.8
Product overview

3.5 Basic function principles

The analog EL3702/ EL3742 input terminal enables measurement of two voltages/currents, which can be displayed with a resolution of 16bit (65535steps). The oversampling feature enables the terminal to sample analog input values several times during each bus cycle on each channel.
Oversampling
A conventional analog input terminal samples one analog input value ("sample") during each bus cycle and transfers it to the higher-level control system during the next fieldbus cycle. The EL37x2 samples the voltage several times between two fieldbus communication cycles configurable and at equidistant intervals. A 16-bit packet of x analog measured values is transferred to the higher-level control system during the next fieldbus communication cycle. This procedure is referred to as oversampling.
Distributed Clock
Oversampling requires a clock generator in the terminal that triggers the individual data sampling events. The local clock in the terminal, referred to as distributed clock, is used for this purpose. The distributed clock represents a local clock in the EtherCAT slave controller (ESC) with the following characteristics:
• Unit 1 ns.
• Zero point 1.1.2000 00:00.
• Size 64 bit (sufficient for the next 584 years); however, some EtherCAT slaves only offer 32-bit support, i.e. the variable overflows after approx. 4.2 seconds.
• The EtherCAT master automatically synchronizes the local clock with the master clock in the EtherCAT bus with a precision of < 100 ns.
The EL37x2 only offers 32-bit support.
Sample:
The fieldbus/EtherCAT master is operated with a cycle time of 1 ms to match the higher-level PLC cycle time of 1 ms, for example. This means that every 1 ms an EtherCAT frame is sent to collect the process data from the EL37x2. The local terminal clock therefore triggers an interrupt in the ESC every 1 ms (1 kHz), in order to make the process data available in time for collection by the EtherCAT frame. This first interrupt is called SYNC1.
The EL37x2 may be set to oversampling n = 10 in the TwinCAT System Manager. This causes the ESC to generate a second interrupt in the terminal with an n-times higher frequency, in this case 10 kHz or 100 µs period. This interrupt is called SYNC0. At each SYNC0 signal the analog-to-digital converter (ADC) starts a data sampling event, and the sampled analog values are sequentially stored in a buffer.
Determining the input voltages/input currents
Both input voltages / input currents (channels 1 and 2) are always sampled simultaneously. This is ensured by the ADC type that is triggered by the SYNC0 pulse. No other operation mode is possi­ble.
Generation of the SYNC0 pulse from the local synchronized clock within the distributed clock network ensures that the analog values are sampled at highly equidistant intervals with the period of the SYNC1 pulse. The maximum oversampling factor depends on the memory size of the used ESC and in the KKYY0000 version of the EL37x2, it is n = 100.
EL37x2 21Version: 3.8
Product overview
Maximum sampling frequency
A smaller period than 10 µs is not permitted for the EL37x2. The maximum sampling frequency for the EL37x2 is therefore 100 kSps (samples per second). Regarding the calculation of SYNC0 from the SYNC1 pulse based on manual specification of an oversampling factor, please note that for SYNC0 only integer values are calculated at nanosecond intervals.
Sample: 187,500 µs is permitted, 333.3 is not.
Sample:
For SYNC1 = 1 ms oversampling factors such as 1,2,5 or 100 are permitted, but not 3! If implausible values are use the terminal will reach the OP state but will not supply any process data. This may result in a working counter error. The 16-bit measured values accumulated in the buffer are sent as a packet to the higher-level control system. For two channels and n = 100, 2 x 2 x 100 = 400 bytes of process data are transferred during each EtherCAT cycle.
Time-related cooperation with other terminals
ADC data sampling in the EL37x2 is triggered by an interrupt that is generated by the local clock in the terminal. All local clocks in the supporting EtherCAT slaves are synchronized. This enables EtherCAT slaves (here: terminals) to sample measured values simultaneously (simultaneous interrupt generation), independent of the distance between them. This simultaneity is within the distributed clock precision range of < 100 ns.
Sample:
Matching between two EL37x2:
The EtherCAT master, e.g. Beckhoff TwinCAT, configures both EL37x2 such that their SYNC1 signals occur at the same time. Assumption: The EtherCAT bus cycle time is 500 µs. SYNC1 is therefore triggered every 500 µs in all EL37x2. If both terminals operate with a corresponding oversampling factor (e.g. 20), the SYNC0 pulse correlating to SYNC1 will occur simultaneously in all EL37x2, in this example every 25 µs. One application option would be "distributed" oscilloscope with a sampling frequency of 40 kSps, for example.
If the EL37x2 use different oversampling factors, their SYNC0 pulses no longer occur simultaneously. The higher-level SYNC1 pulse is retained.
If a value is entered under "Shift time (µs)" in the TwinCAT System Manager (DC tab, Advanced Settings) for the SYNC0 pulse in an EL37x2, the EL37x2 manipulated in this way will start output sooner or later, according to the set value. This can be useful in cases where a wanted signal has to be sampled at a higher frequency than the 100 kSps permitted for the EL37x2, and several interconnected EL37x2 are therefore used.
Sample:
For sampling a wanted signal at 200 kSps two EL37x2 are used side-by-side and subjected to the same wanted signal (e.g. channel 1 in both terminals). Assume a bus cycle of 1 ms, an oversampling factor in both EL37x2 of n = 100, and therefore maximum speed at 10 µs interval or 100 kSps. In the second EL37x2 an additional Shift Time of 5 µs is entered manually for this terminal in the System Manager (DC tab, Advanced Settings, SYNC0, User Defined). This means all SYNC0 pulses for this EL37x2 will occur 5 µs later than for the first EL37x2.
Synchronization and provision of process data
Since the SYNC1 pulse is derived from the SYNC0 pulse, each SYNC1 pulse of the second EL37x2 will occur 5 µs after the SYNC1 pulse of the first EL37x2. Please note that this may influence the timing of the process data allocation for the EtherCAT frame, since this is controlled by the SYNC1 pulse.
EL37x222 Version: 3.8
Product overview
Each terminal now transfers a 400 byte process data packet to the higher-level control system. If these two data sets (which are offset by 5 µs) with a length of 1 ms each are sorted in the right chronological order in the control system, the wanted signal is transparently sampled at 200 kSps.
The application of these functions using the Beckhoff TwinCAT System Manager is described in section Process data and configuration [}151].
SYNC0 and SYNC1 pulse with several EtherCAT slaves
This approach of matching the SYNC0 and SYNC1 pulses of several EtherCAT slaves is not limited to EL37x2. All EtherCAT slaves supporting the distributed clock function can be correlated relatively freely in this way.
NOTE
Attention! Risk of device damage!
The above notes and information should be used advisedly. The EtherCAT master automatically allocates SYNC0 and SYNC1 settings that support reliable and timely process data acquisition. User intervention at this point may lead to undesired behavior. If these settings are changed in the System Manager, no plausibility checks are carried out on the software side. Correct function of the terminal with all conceivable setting options cannot be guaranteed.
Timestamp of the process data
The EL37xx can provide a "timestamp" for each process data block, if required. This process record can be activated as StartTimeNextLatch, a as 32-bit value, by activating 0x1B10 in the Process Data tab, see also
Process Data [}151] page.
Fig.12: Optional process record StartTimeNextLatch
EL37x2 23Version: 3.8
Product overview
As the name suggests, the data block consisting of sample value+timestamp, which is transferred in each cycle, is not related. The relationship is shown in Fig. Temporal relationship between SYNC signals and SyncManager interrupt. To explain in more detail:
• the example is based on an oversampling factor of 5
• The SYNC0 signal in the terminal triggers the AD conversion and fills the internal buffer with 5 measured values (A).
• SYNC1, which triggers the filled buffer to be made available as process record and at the same time fetches the StartTimeNextLatch from the local distributed clock (B), runs synchronous with the cycle time.
• The data block is linked with the next but one LatchTime.
• The next EtherCAT cycle fetches this data (C).
Fig.13: Temporal relationship between SYNC signals and SyncManager interrupt
Process data
Analog values are represented as follows:
Input signal Value
EL3702 Decimal Hexadecimal
-10 V -32767 0x8001
+10 V +32767 0x7FFF
Input signal Value
EL3742 Decimal Hexadecimal
0 mA 0 0x0000
20 mA +32767 0x7FFF
The terminal is adjusted during production. No further user intervention is required.
Input characteristics
The input circuit of this terminal is optimized for higher-frequency signals up to around 30kHz, i.e. the recommended bandwidth of the wanted signal is 0Hz to 30kHz in the range -10V to +10V or 0mA to 20mA. In this frequency range the typical measuring accuracy is as follows:
EL37x224 Version: 3.8
Product overview
< 10Hz < 0.3% of full-scale value
< 10 kHz < 1% of full-scale value
< 30 kHz < 4% of full-scale value
For wanted signals with higher frequencies the signal transducer must have adequately low impedance, in order to prevent amplitude variations (e.g. attenuation in association with simple signal generators) leading to incorrect measurements.
Interference from equipment
This fast analog EtherCAT Terminal may pick up high-frequency superimposed interference signals from other equipment (e.g. proportional valves, stepper motor or DC motor output stages). In order to ensure trouble-free operation, we recommend using separate power supply units for the terminals and the equipment causing interference. The cables should be screened.

3.6 Sample programs

Using the example programs
This document contains sample applications of our products for certain areas of application. The application notices provided here are based on typical features of our products and only serve as samples. The notices contained in this document explicitly do not refer to specific applications. The customer is therefore responsible for assessing and deciding whether the product is suitable for a particular application. We accept no responsibility for the completeness and correctness of the source code contained in this document. We reserve the right to modify the content of this docu­ment at any time and accept no responsibility for errors and missing information.
Diagnostics and time-stamping of analog input data
Download (https://infosys.beckhoff.com/content/1033/el37x2/Resources/zip/2445351051.zip)
In this example the input data of an EL3702 will be checked for validity and processed:
• 1 ms cycle time, 10-fold oversampling, 2 channels
• WC, State, EtherCAT Master DevState and CycleCounter are checked cyclically; the input data is only passed on if it is valid
• Starting from the time stamp delivered with sample 0, all other samples will be given 64-bit DC time stamps
• Default values will be passed on if the input data is invalid; time stamping continues
• The data from each cycle is placed in a FIFO buffer so that a superordinated process, e.g. an evaluation, can take place.
Connection diagram:
EL37x2 25Version: 3.8
Product overview
Fig.14: Connection for sample program
Starting the example program
The application samples have been tested with a test configuration and are described accordingly. Certain deviations when setting up actual applications are possible.
The following hardware and software were used for the test configuration:
• TwinCAT master PC with Windows XP Professional SP 3, TwinCAT version 2.10 (Build 1330) and INTEL PRO/100 VE Ethernet adapter
• Beckhoff EK1100 EtherCAT coupler, EL3702 and EL9011 terminals
• 2 x optical proximity limit switch 0 - 10V with two-wire technology
Procedure for starting the program
• After clicking the Download button, save the zip file locally on your hard disk, and unzip the *.TSM (configuration) and the *.PRO (PLC program) files into a temporary working folder.
• The *.pro file can be opened by double click or by the TwinCAT PLC Control application with menu selection “File/ Open”. The *.tsm file is provided for the TwinCAT System Manager (to review or overtake configurations).
• Connect the hardware in accordance with fig. Connection for sample program [}25] and connect the Ethernet adapter of your PC to the EtherCAT coupler (further information on this can be found in the corresponding coupler manuals)
• Select the local Ethernet adapter (with real-time driver, if applicable) under System configuration, I/O configuration, I/O devices, Device (EtherCAT); then on the “Adapter” tab choose “Search...”, select the appropriate adapter and confirm (see Fig. Searching the Ethernet adapter + Selection and confirmation of the Ethernet adapter).
EL37x226 Version: 3.8
Fig.15: Searching the Ethernet adapter
Product overview
Fig.16: Selection and confirmation of the Ethernet adapter
• Activate and confirm the configuration (Fig. Activation of the configuration + Confirming the activation of the configuration)
Fig.17: Activation of the configuration
Fig.18: Confirming the activation of the configuration
EL37x2 27Version: 3.8
Product overview
• Confirm new variable mapping, restart in RUN mode (Fig. Generate variable mapping + Restarting TwinCAT in RUN mode)
Fig.19: Generating variable mapping
Fig.20: Restarting TwinCAT in RUN mode
• In TwinCAT PLC, under the “Project” menu, select “Rebuild all” to compile the project (Fig.Compile project)
Fig.21: Compile project
• In TwinCAT PLC: log in with the “F11” button, confirm loading the program (Fig. Confirming program start), run the program with the “F5” button
Fig.22: Confirming program start
Working with DC times in the controller
From the perspective of the controller the distributed clock time has the following characteristics:
• Unit 1 ns
EL37x228 Version: 3.8
Product overview
• Universalzero point 1.1.2000 00:00, i.e. for variable evaluations an offset of 2000 years has to be added
• Scope up to 64 bit (sufficient for 584 years). However, some EtherCAT slaves only support a 32 bit scope, i.e. the register overflows locally after approx. 4.2 seconds and starts again at 0.
The following 3 data types are recommended for handling DC times
T_DCTIME from TcEtherCAT.lib This is based on T_ULARGE_INTEGER and is therefore unsigned. It can be used for linking with suitable hardware variables
T_ULARGE_INTEGER from TcUtilities.lib Unsigned 64-bit data type
T_LARGE_INTEGER from TcUtilities.lib Signed 64-bit data type, negative numbers are represented in two's complement notation (underflow below 0 --> 0xFFFF FFFF FFFF FFFF etc.) TcUtilities.lib (section INT64) provides numerous relevant functions. Of particular significance are the cast functions LARGE_TO_ULARGE and vice versa. This type should be used when working with time differences that may be negative. If TwinCAT is used for external synchronization, negative times will inevitably occur in the offset values.
64- vs. 32-bit representation
Some EtherCAT slaves can only handle 32 bit values for representing the DC time or handle it as a process data. In order to prevent problems caused by overflow (every 4.2 seconds), we strongly recommend using 64-bit times in the controller.
• 32-bit times supplied to the PLC must be complemented with the current High part
• In this case only the Low part (lower 32 bit) should be transferred to the hardware
This sample project
(https://infosys.beckhoff.com/content/1033/el37x2/Resources/zip/2469155979.zip) contains a function
block that cyclically adds the high part to a 32-bit DC time to make 64 bits.
EL37x2 29Version: 3.8
Basics communication

4 Basics communication

4.1 EtherCAT basics

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

4.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.
EL37x230 Version: 3.8
Loading...
+ 162 hidden pages