IO configuration in TwinCAT
Home


Foreword

Foreword
Foreword
Additional information
•
Notes on the documentation
•
Safety instructions
•
Documentation issue status


Notes on the documentation

Foreword [image] Notes on the documentation
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.


Safety instructions

Foreword [image] Safety instructions
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!
SmallWarningYellow DANGER
Serious risk of injury!
Failure to follow this safety instruction directly endangers the life and health of persons.
SmallWarningYellow WARNING
Risk of injury!
Failure to follow this safety instruction endangers the life and health of persons.
SmallWarningYellow 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.


Documentation issue status

Foreword [image] Documentation issue status
Documentation issue status
Version
Comment
1.1
▪
Screenshots updated
1.0
▪
First release


Introduction

Introduction
Introduction
The IO configuration is the prerequisite for the use of the functions of IO modules in a PLC program. It covers the appending and parameterization of IO modules in TwinCAT.
This quick start guide describes the basic IO configuration in TwinCAT 3 for IO modules of the type:
▪
EtherCAT Box (EPxxxx)
▪
EtherCAT P Box (EPPxxxx)
Link
The complete documentation for TwinCAT 3.


Distinction between Online and Offline

Distinction between Online and Offline
Distinction between Online and Offline
The distinction between online and offline refers to the existence of the actual I/O environment (drives, terminals, box modules).
If the configuration is to be prepared in advance of the system configuration as a programming system, e.g. on a laptop, this is only possible in "Offline configuration" mode. In this case all components have to be entered manually in the configuration, e.g. based on the electrical design (as described under TwinCAT configuration setup, manual).
If the designed control system is already connected to the EtherCAT system and all components are energized and the infrastructure is ready for operation, the TwinCAT configuration can simply be generated through "scanning" from the runtime system. This is referred to as online configuration.
In any case, during each startup the EtherCAT master checks whether the devices it finds match the configuration.
To ensure that the latest features/settings of the master can be used, always download the latest ESI file. Please note the following information.
Installation of the latest ESI-XML device description
The TwinCAT System Manager needs the device description files for the devices to be used in order to generate the configuration in online or offline mode. The device descriptions are contained in the so-called ESI files (EtherCAT Slave Information) in XML format. These files can be requested from the respective vendor and are made available for download. The ESI files for Beckhoff EtherCAT/EtherCAT P devices are available on the Beckhoff website (https://www.beckhoff.de/english/download/elconfg.htm?id=1983920606140). The ESI files should be stored in the TwinCAT installation directory (default: C:\TwinCAT\IO\EtherCAT). The files are read (once) when a new System Manager window is opened. A TwinCAT installation includes the Beckhoff ESI files that were current at the time when the TwinCAT build was created. From TwinCAT 2.11 and in TwinCAT 3 the ESI directory can be updated from the System Manager, if the programming PC is connected to the internet (TwinCAT → EtherCAT Devices → Update Device Description…)
Update EtherCAT Device Description 1439726603


Offline IO configuration

Offline IO configuration
Offline IO configuration
The manual configuration of an EtherCAT Box/EtherCAT P Box in TwinCAT is described in this part of the documentation.
1.
Open the section "I/O" in the "Solution Explorer".
2.
Right click on „Devices“ and click on „Add new Item“.
Add new Item skaliert
⇨
A dialog window opens.
3.
Select the entry "EtherCAT Master" in the dialog window and click on "OK".
Diaglogfenster: EtherCAT-Gerät auswählen
⇨
An entry "Device 1 (EtherCAT)" appears.
4.
Right click on "Device 1 (EtherCAT)" and click on „Add new Item“.
EtherCAT Device - Add New Item
⇨
A dialog window opens.
5.
Choose the desired box in the dialog window, e.g. EPP1322-0001. Click on "OK".
Dialogfenster: Insert EtherCAT Device
⇨
Result: The desired box was appended.


Online IO configuration

Online IO configuration
Online IO configuration
The configuration of a physically existing EtherCAT Box/EtherCAT P Box in TwinCAT is described in this part of the documentation.
For the creation of the configuration
▪
the real EtherCAT/EtherCAT P and IO-Link hardware (devices, couplers, drives) must be present and installed.
▪
the devices/modules must be connected via EtherCAT/EtherCAT P or IO-Link cables in the same way as they are to be used later.
▪
the devices/modules must be connected to the power supply and ready for communication.
▪
TwinCAT must be in CONFIG mode on the target system.
The online scan process consists of:
▪
Detection of the EtherCAT/EtherCAT P device (Ethernet port on the IPC)
▪
Detection of the connected EtherCAT/EtherCAT P devices. This step can be carried out independently of the preceding step.
▪
Troubleshooting
The scan with existing configuration can also be carried out for comparison.
Detecting/scanning the EtherCAT/EtherCAT P device
The online device search can be used if the TwinCAT system is in Config mode (blue TwinCAT icon or blue indication in the System Manager).
TwinCAT Config mode display
Online scanning in Config mode
The online search is not available in RUN mode (production operation).
Note the differentiation between TwinCAT programming system and TwinCAT target system. The TwinCAT icon next to the Windows clock always shows the TwinCAT mode of the local IPC. The System Manager window shows the TwinCAT state of the target system.
TwinCAT target und local System
Right-clicking on "I/O Devices" in the configuration tree opens the search dialog.
Scan Devices
This scan mode not only tries to find EtherCAT/EtherCAT P devices (or Ethernet ports that can be used as such), but also NOVRAM, fieldbus cards, SMB etc. However, not all devices can be found automatically.
Hinweis automatischer Gerätescan
Note for automatic device scan
Ethernet ports with installed TwinCAT real-time driver are shown as "RT Ethernet" devices. An EtherCAT frame is sent to these ports for testing purposes. If the scan agent detects from the response that an EtherCAT/EtherCAT P device is connected, however, then the port is immediately shown as an "EtherCAT Device".
detected Ethernet devices
After confirmation with "OK" a device scan is suggested for all selected devices (see the illustration below).
Detecting/Scanning the EtherCAT devices
Online scan functionality
When scanning, the master queries the identity information of the EtherCAT/EtherCAT P device from the device's EEPROM. The name and revision are used for determining the type. The respective devices are located in the stored ESI data and integrated in the configuration tree in the default state defined there.
If an EtherCAT device was created in the configuration (manually or through a scan), the I/O field can be scanned for devices/slaves.
Scan for Boxes
Scan query after automatic creation of an EtherCAT/EtherCAT P device
The configuration was established and switched directly to the online state (operational). The EtherCAT system should be in a cyclic operational state, as shown in the following illustration.
online display example
Please note:
▪
All Boxes should be in OP state
▪
"frames/sec" should match the cycle time taking into account the sent number of frames
▪
no excessive "LostFrames" or CRC errors should occur
The configuration is now complete. It can be modified as described under manual procedure.
As can be seen in the illustration below, the connected EtherCAT/EtherCAT P Box (in this case: EPP1322-0001 and EPP1008-0002) is shown in the TwinCAT tree.
Master-Anzeige nach Scan for Boxes
Box display after "Scan for boxes"
Troubleshooting
Various effects may occur during scanning.
▪
An unknown device is detected, i.e. an EtherCAT/EtherCAT P device for which no ESI XML description is available.
In this case the System Manager offers to read any ESI that may be stored in the device.
▪
Device are not detected properly
Possible reasons include
- faulty data links, resulting in data loss during the scan
- the device has an invalid device description
The connections and devices should be checked in a targeted manner, e.g. via the emergency scan.
Then re-run the scan.
Scan over existing Configuration
If a scan is initiated for an existing configuration, the actual I/O environment may match the configuration exactly or it may differ. This enables the configuration to be compared.
Configuration is identical
Identical configuration
If differences are detected, they are shown in the correction dialog, so that the user can modify the configuration as required.
Example correction dialog
It is recommended to check the "Extended Information" box, in order to show differences in the revision.
Color | Explanation
green | this EtherCAT/EtherCAT P device has a counterpart on the other side. Both type and revision match.
blue | this EtherCAT/EtherCAT P device is present on the other side, but in a different revision. If the found revision is higher than the configured revision, the use is possible provided compatibility issues are taken into account. If the found revision is lower than the configured revision, it is likely that the use is not possible. The found devices may not support all functions that the master expects based on the higher revision number.
light blue | this EtherCAT/EtherCAT P device is ignored ("Ignore" button)
red | this EtherCAT/EtherCAT P device is not present on the other side.
Example correction dialog with modifications
Once all modifications have been saved or accepted, click "OK" to transfer them to the real *.tsm configuration.


Configuration of EtherCAT P via TwinCAT

Configuration of EtherCAT P via TwinCAT
Configuration of EtherCAT P via TwinCAT
EtherCAT P tab
From TwinCAT 3 Build 4020 TwinCAT has the tab “EtherCAT P”. This tab contains a planning tool to calculate voltages, currents and cable lengths of EtherCAT P system. The figure below shows the tab EtherCAT P when no device is connected to the junction device (A).
No box at EP1322 + Markierungen
Tab EtherCAT P: No device connected to junction device
If a device is connected to the junction device (A), you can set the cross-section and the length of the EtherCAT P cable in the Tab „EtherCAT P“ of the device. See figure below, B).
One box at EP1322 + Markierungen
Tab EtherCAT P: One device connected to junction device
Are three devices connected to the three ports of the junction device (A), they are displayed as shown in the figure below.
Three boxes at EP1322 + Markierungen
Tab EtherCAT P: Three devices connected to junction device
You can display the topology of your EtherCAT P system.
Wire Gauge | Selection of the wire cross-sectional area of the cable which is to be used AWG 22 = 0.34 mm² AWG 24 = 0.22 mm²
Length (m) | Indication of the cable length which is to be used
Check EtherCAT P System | At least one device is connected to the controller, the connected EtherCAT P system can be checked
Type | Listing of two voltages: Box supply US, Auxiliary voltage UP
Actual Voltage (V) | The respective voltage at which the system is powered, can be entered manually. The default setting is 24.00 V.
Min Voltage (V) | The minimum voltage is preset by the device and described in the ESI file. The EtherCAT P system is to be interpreted after this voltage. It is valid not to fall short this voltage.
Load (A) | The total consumption of the connected sensors / actuators at the device can be specified here,e.g. 100 mA.
Load Type | The characteristic of the load which is connected to the devices can be selected here. Which of the three options is right for the connected load (Sw regulator, LDO, Resistor), must be taken from the datasheet. In case of doubt please select the default value "Sw Regulator". Sw Regulator: Switching regulators, consume more energy and therefore require an efficient power supply. LDO: Low drop voltage regulator, the energy demand is often small and the heat dissipation is not a problem, e.g. proximity sensor. Resistor: electronic, passive components e.g. relay, coil
If you click on the button “Check EtherCAT P System”, all devices that are attached to your TwinCAT tree are listed as shown in the following figure.
Check EtherCAT P System 1
Check EtherCAT P System
No.
The automatically assigned number of the device according to its position in the EtherCAT P strand.
Name
Designation of the device in TwinCAT.
Previous
Number of the previous device in the EtherCAT P strand and the output port used (A/B/C/D).
Us (V), Up (V)
Supply voltage which is present at the input of the device. For device No. 1 You can enter the voltages manually.
Sum Is(A), Sum Ip(A)
Sum currents of the supply voltages at the input of the device.
Us Load, Up Load
Enter here the total load at the IO ports of the device here.
The unit of this value is set by the choice of "Us Load Type" and "Up Load Type".
Us Load Type, Up Load Type
Choose here the characteristic of the load, which is connected to the IO ports of the device.
Cable Length (m)
Enter here the length of the EtherCAT P cable, which is connected to the input of the device.
Wire Gauge
Choose here the wire cross-section of the EtherCAT P cable, which is connected to the input of the device.
▪
AWG 22 = 0,34 mm²
▪
AWG 24 = 0,22 mm²
Example with problem case and troubleshooting
The following figure shows the planning of the EtherCAT P system without a problem. All voltages in the column “Supply Voltage (V)” are highlighted in green.
Check EtherCAT P System ohne Fehler
Check EtherCAT P system without problem
The following figure shows the planning of the EtherCAT P system with a problem. The “Supply Voltage (V)” of Box 5 drops below the “Min. voltage (V)”. The corresponding field is highlighted in red. The error occurs because longer cables (adjustable in Cable Length (m)) and also AWG 24 instead of AWG 22 cables (adjustable in Wire Gauge) be used.
Check EtherCAT P System mit Unterspannungs-Fehler
Check EtherCAT P System with problem
This area offers the following three options to adjust the system so that there is no error:
▪
Provide a higher voltage: There are max. 28.8 V possible.
▪
Use an EtherCAT P cable with a larger wire cross sectional area (AWG 22 instead of AWG 24).
▪
New voltage feed.
Topology of the EtherCAT P system
You can view the topology of your EtherCAT P system, as described in the figure below:
1.
In the Click on "Device 1 (EtherCAT)" in the "Solution Explorer"
2.
Click on the "EtherCAT" tab
3.
Click on the "Topology" button
⇨
The topology of your EtherCAT P system is displayed.
Example: Three devices are connected to the three ports of the distributor device.
Also see about this
•
Configuration of EtherCAT P via TwinCAT


Appendix

Appendix
Appendix
Additional information
•
Support and Service


Support and Service

Appendix [image] Support and Service
Support and Service
Beckhoff and their partners around the world offer comprehensive support and service, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.
Beckhoff's branch offices and representatives
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet pages:
http://www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Beckhoff Headquarters
Beckhoff Automation GmbH & Co. KG
Huelshorstweg 20
33415 Verl
Germany
Phone: | +49 5246 963 0
Fax: | +49 5246 963 198
e-mail: | info@beckhoff.com
Beckhoff Support
Support offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products, but also with other, wide-ranging services:
▪
support
▪
design, programming and commissioning of complex automation systems
▪
and extensive training program for Beckhoff system components
Hotline: | +49 5246 963 157
Fax: | +49 5246 963 9157
e-mail: | support@beckhoff.com
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
▪
on-site service
▪
repair service
▪
spare parts service
▪
hotline service
Hotline: | +49 5246 963 460
Fax: | +49 5246 963 479
e-mail: | service@beckhoff.com