5.3General note on the introduction of the Beckhoff Identification Code (BIC) ..................................130
5.4Support and Service ......................................................................................................................132
EP70414Version: 2.3
Foreword
1Foreword
1.1Notes 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®, EtherCATG®, EtherCATG10®, EtherCATP®, SafetyoverEtherCAT®,
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.
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.
EP70416Version: 2.3
1.3Documentation issue status
VersionModifications
2.3• Technical data updated
2.2.0• Update safety instructions
• Update chapter Mounting
2.1.0• EP7041-3102 added
2.0.0• Migration
1.7.0• Preface updated
• Chapter on Nut torques for connectors updated
• Chapter on EtherCAT connection updated
• Chapter Signal cable updated
• Chapter Accessories updated
• Chapter Line losses updated
1.6.0• Power connection updated
1.5.0• Technical data updated
1.4.0• Technical data updated
1.3.0• Technical data updated
• Object descriptions updated
• Basics about Position Interface added
• Chapter Accessories updated
• Chapter on Nut torque for connectors updated
• Chapter Power connection updated
1.2.0• Chapter Configuration of the main parameters updated
• Chapter Accessories added
1.1.0• Technical data updated
• EP7041-2002 and EP7041-3002 added
• Overview of EtherCAT cables extended
• Overview of the signal cables updated
• Description of the power connection updated
• ATEX notes added
• Extended temperature range for activated modules documented
1.0.0• Chapter on commissioning and configuration revised
0.6• EP7041-1002 added
• Object description updated
• Nut torque for connectors added
• Overview of the signal cables added
0.5• First preliminary version for EP7041-0002
Foreword
EP70417Version: 2.3
Foreword
Firmware and hardware versions
This documentation refers to the firmware and hardware version that was applicable at the time the
documentation was written.
The module features are continuously improved and developed further. Modules having earlier production
statuses cannot have the same properties as modules with the latest status. However, existing properties
are retained and are not changed, so that older modules can always be replaced with new ones.
The firmware and hardware version (delivery state) can be found in the batch number (D-number) printed on
the side of the EtherCAT Box.
The Beckhoff Identification Code contains additional information about the delivery state of the module:
General note on the introduction of the Beckhoff Identification Code (BIC) [}130].
Syntax of the batch number (D number)
D: WW YY FF HH
WW - week of production (calendar week)
YY - year of production
FF - firmware version
HH - hardware version
Example with D No. 29 10 02 01:
29 - week of production 29
10 - year of production 2010
02 - firmware version 02
01 - hardware version 01
EP70418Version: 2.3
Product overview
2Product overview
2.1EtherCAT Box - Introduction
The EtherCAT system has been extended with EtherCAT Box modules with protection class IP67. Through
the integrated EtherCAT interface the modules can be connected directly to an EtherCAT network without an
additional Coupler Box. The high-performance of EtherCAT is thus maintained into each module.
The extremely low dimensions of only 126x30x26.5 mm (hxw xd) are identical to those of the Fieldbus
Box extension modules. They are thus particularly suitable for use where space is at a premium. The small
mass of the EtherCAT modules facilitates applications with mobile I/O interface (e.g. on a robot arm). The
EtherCAT connection is established via screened M8connectors.
Fig.1: EtherCAT Box Modules within an EtherCAT network
The robust design of the EtherCAT Box modules enables them to be used directly at the machine. Control
cabinets and terminal boxes are now no longer required. The modules are fully sealed and therefore ideally
prepared for wet, dirty or dusty conditions.
Pre-assembled cables significantly simplify EtherCAT and signal wiring. Very few wiring errors are made, so
that commissioning is optimized. In addition to pre-assembled EtherCAT, power and sensor cables, fieldconfigurable connectors and cables are available for maximum flexibility. Depending on the application, the
sensors and actuators are connected through M8 or M12connectors.
The EtherCAT modules cover the typical range of requirements for I/O signals with protection class IP67:
• digital inputs with different filters (3.0ms or 10μs)
• digital outputs with 0.5 or 2A output current
• analog inputs and outputs with 16bit resolution
• Thermocouple and RTD inputs
• Stepper motor modules
XFC (eXtreme Fast Control Technology) modules, including inputs with time stamp, are also available.
EP70419Version: 2.3
Product overview
Fig.2: EtherCAT Box with M8 connections for sensors/actuators
Fig.3: EtherCAT Box with M12 connections for sensors/actuators
Basic EtherCAT documentation
You will find a detailed description of the EtherCAT system in the Basic System Documentation for
EtherCAT, which is available for download from our website (www.beckhoff.com) under Downloads.
EtherCAT XML Device Description
You will find XML files (XML Device Description Files) for Beckhoff EtherCAT modules on our website (www.beckhoff.com) under Downloads, in the Configuration Files area.
EP704110Version: 2.3
2.2Module overview
Product overview
Fig.4: EP7041 with stepper motor
ModuleOutput current for
EP7041-0002 [}12]
EP7041-1002 [}12]
EP7041-2002 [}13]
EP7041-3002 [}14]
EP7041-3102 [}14]
stepper motor
2 x 3.5A rated current,
2 x 5.0Apeakcurrent
2 x 1.0A rated current,
2 x 1.5Apeakcurrent
2 x 3.5A rated current,
2 x 5.0Apeakcurrent
2 x 3.5A rated current,
2 x 5.0Apeakcurrent
2 x 3.5A rated current,
2 x 5.0Apeakcurrent
Integrated connection for motor supply
M12, female• Designed for particularly quiet and precise motor operation.
M12, female• Designed for particularly quiet and precise motor operation.
M12, male• Designed for particularly quiet and precise motor operation.
M12, male• Designed for higher velocities.
M12, male• Designed for higher velocities.
Comment
• Smaller output current for stepper motors with lower power
consumption.
• Integrated connector for feeding the motor supply build with
pins (male).
• Integrated connector for feeding the motor supply build with
pins (male).
• Integrated connector for feeding the motor supply build with
pins (male).
• 5VDC encoder supply
EP704111Version: 2.3
Product overview
2.3Introduction
2.3.1EP7041-0002, EP7041
Fig.5: EP7041-0002
Stepper Motor modules with interface for incremental encoder
The EP7041-0002 and EP7041-1002 EtherCAT Box Modules are intended for the direct connection of
different stepper motors.
Two versions are available:
• EP7041-0002: 2 x 3.5A rated current, (2 x 5.0Apeakcurrent)
• EP7041-1002: 2 x 1.0A rated current, (2 x 1.5Apeakcurrent)
The PWM output stages for two motor coils with compact design are located in the module together with two
inputs for limit switches and cover a wide voltage and current range.
A servo axis can easily be realized by connecting an incremental encoder.
Two digital inputs and a digital output (0.5A) enable connection of limit switches and a motor brake.
The modules can be adjusted to the motor and the application by changing various parameters.
64-fold micro-stepping ensures particularly quiet and precise motor operation.
Quick links
• Installation [}20]
• Configuration [}36]
EP704112Version: 2.3
2.3.2EP7041-2002
Product overview
Fig.6: EP7041-2002
Stepper Motor modules with interface for incremental encoder
The EP7041-2002 EtherCAT Box is designed for direct connection of different stepper motors.
The PWM output stages for two motor coils with compact design are located in the module together with two
inputs for limit switches and cover a wide voltage and current range.
A servo axis can easily be realized by connecting an incremental encoder.
Two digital inputs and a digital output (0.5A) enable connection of limit switches and a motor brake.
The external motor is fed via an integrated plug.
The EP7041-2002 can be adjusted to the motor and the application by changing various parameters.
64-fold micro-stepping ensures particularly quiet and precise motor operation.
Quick-Links
• Installation [}20]
• Configuration [}36]
EP704113Version: 2.3
Product overview
2.3.3EP7041-3002, EP7041-3102
Fig.7: EP7041-3002 and EP7041-3102
Stepper Motor modules with interface for incremental encoder
The EP7041-3002 and EP7041-3102 EtherCAT Box Modules are designed for direct connection of different
stepper motors. The PWM output stages for two motor coils with compact design are located in the module
together with two inputs for limit switches and cover a wide voltage and current range.
A servo axis can easily be realized by connecting an incremental encoder. The modules supply the
incremental encoder with:
EP7041-3002: 24V
EP7041-3102: 5V
DC
DC
Two digital inputs and a digital output (0.5A) enable connection of limit switches and a motor brake.
The external motor is fed via an integrated plug.
EP7041-3002 and EP7041-3102 are designed for higher velocities and can be adjusted to the motor and the
application by changing various parameters.
Quick-Links
• Installation [}20]
• Configuration [}36]
EP704114Version: 2.3
Product overview
2.4Technical data
All values are typical values at 25°C, unless otherwise stated.
Installation positionup to 40°C ambient temperature: variable
Approvals and conformity
Approvals
-25 .. +60°C
0 .. +55°C according to ATEX, see special conditions [}30]
-40 .. +85°C
conforms to EN60068-2-6/ EN60068-2-27
conforms to EN61000-6-2/ EN61000-6-4
over 40°C ambient temperature: distance between 2 stepper motor modules at least 20mm
CE, ATEX [}30]
P
2.5Scope of supply
Make sure that the following components are included in the scope of delivery:
• 1x EtherCAT Box EP7041
• 1x protective cap for supply voltage input, M8, transparent (pre-assembled)
• 1x protective cap for supply voltage output, M8, black (pre-assembled)
• 2x protective cap for EtherCAT socket, M8, green (pre-assembled)
• 10x labels, blank (1 strip of 10)
Pre-assembled protective caps do not ensure IP67 protection
Protective caps are pre-assembled at the factory to protect connectors during transport. They may
not be tight enough to ensure IP67 protection.
Ensure that the protective caps are correctly seated to ensure IP67 protection.
EP704116Version: 2.3
2.6EP7041 - Process image
The TwinCAT System Manager displays the EP7041 data in a tree structure.
The tree shows
• ENC Status compact: encoder status
• STM Status: Stepper Motor Status
• ENC Control compact: Encoder Control
• STM Control: Stepper Motor Control
• STM Velocity: Stepper Motor Velocity
ENC Status compact
The status information for the encoder can be
found under ENC Status compact.
Product overview
EP704117Version: 2.3
Product overview
STM Status
The status information for the stepper motor can
be found under STM Status.
ENC Control compact
STM Control
The control parameters for the encoder can be
found under ENC Control compact.
The control parameters for the stepper motor can
be found under STM Control.
EP704118Version: 2.3
STM Velocity
Product overview
The velocity settings for the stepper motor can be
found under STM Velocity.
EP704119Version: 2.3
Installation
119
126
23
30
26.5
13.5
Ø 3.5
3Installation
3.1Mounting
3.1.1Dimensions
Fig.8: Dimensions
All dimensions are given in millimeters.
Housing features
Housing materialPA6 (polyamide)
Sealing compoundpolyurethane
Mountingtwo fastening holes Ø3.5mm for M3
Metal partsbrass, nickel-plated
ContactsCuZn, gold-plated
Power feed throughmax. 4A
Mounting positionvariable
Protection classIP65, IP66, IP67 (conforms to EN60529) when screwed together
Dimensions (HxWxD)approx. 126 x 30 x 26.5mm (without connectors)
EP704120Version: 2.3
Installation
3.1.2Fixing
NOTE
Dirt during assembly
Dirty plug connectors can lead to malfunctions. Protection class IP67 can only be guaranteed if all cables
and connectors are connected.
• Protect the plug connectors against dirt during the assembly.
Mount the module with two M3 screws on the fastening holes in the corners of the module. The fastening
holes have no thread.
3.1.3Tightening torques for plug connectors
Screw connectors tight with a torque wrench. (e.g. ZB8801 from Beckhoff)
Connector diameterTightening torque
M80.4Nm
M120.6Nm
EP704121Version: 2.3
Installation
Plug
Feed-in
Socket
Forwarding
31
24
31
24
3.2Connection
3.2.1Supply voltages
The EtherCAT Box is supplied with two supply voltages. The ground potentials of the supply voltages are
galvanically connected together.
• Control voltage U
• Peripheral voltage U
S
P
Redirection of the supply voltages
The IN and OUT power connections are bridged in the module (not IP204x-Bxxx and IE204x). The supply
voltages US and UP can thus easily be transferred from EtherCATBox to EtherCATBox.
NOTE
Pay attention to the maximum permissible current!
Pay attention also for the redirection of the supply voltages US and UP, the maximum permissible current for
M8 connectors of 4A must not be exceeded!
3.2.1.1Connector
NOTE
Risk of confusion: supply voltages and EtherCAT
Defect possible through incorrect insertion.
• Observe the color coding of the connectors:
black: Supply voltages
green: EtherCAT
Fig.9: Connectors for supply voltages
Fig.10: M8 connector
ContactFunctionDescriptionCore color
1U
2U
3GND
4GND
1)
The core colors apply to cables of the type: Beckhoff ZK2020-xxxx-xxxx
S
P
S
P
Control voltageBrown
Peripheral voltageWhite
GND to U
GND to U
S
P
Blue
Black
1)
EP704122Version: 2.3
Installation
Vert. Faktor: 0,45 cm / V
5101520
2
4
6
8
10
250
0
12
30
Vert. Faktor: 0,45 cm / V
Voltage drop (V)
Cable length (m)
35
0,25 mm²
0,34 mm²
0,5 mm²
0,75 mm²
I = 2 A
Vert. Faktor: 0,45 cm / V
5101520
2
4
6
8
10
250
0
12
30
Vert. Faktor: 0,45 cm / V
Voltage drop (V)
Cable length (m)
35
0,25 mm²
0,34 mm²
0,5 mm²
0,75 mm²
I = 4 A
3.2.1.2Status LEDs
Fig.11: Status LEDs for the power supply
LEDDisplayMeaning
US (control voltage)offSupply voltage, US, is not present
green illuminatedSupply voltage, US, is present
UP (peripheral voltage)offSupply voltage, UP, is not present
green illuminatedSupply voltage, UP, is present
3.2.1.3Conductor losses
Take into account the voltage drop on the supply line when planning a system. Avoid the voltage drop being
so high that the supply voltage at the box lies below the minimum nominal voltage.
Variations in the voltage of the power supply unit must also be taken into account.
Voltage drop on the supply line
EP704123Version: 2.3
Installation
31
24
3.2.2EtherCAT
3.2.2.1Connector
EtherCAT Box Modules have two green M8 sockets for the incoming and downstream EtherCAT
connections.
Fig.12: EtherCAT connector
Connection
Fig.13: M8 socket
EtherCATM8
SignalContactZB9010, ZB9020, ZB9030, ZB9032,
Tx +1yellow
Tx -4orange
Rx +2white
Rx -3blue
ShieldHousingShieldShieldShield
1)
Core colors according to EN61918
connector
Core colors
ZK1090-6292,
ZK1090-3xxx-xxxx
1)
1)
1)
1)
ZB9031 and old versions of
ZB9030, ZB9032, ZK1090-3xxxxxxx
orange/whitewhite/orange
orangeorange
blue/whitewhite/green
bluegreen
TIA-568B
Adaptation of core colors for cables ZB9030, ZB9032 and ZK1090-3xxxx-xxxx
For standardization, the core colors of the ZB9030, ZB9032 and ZK1090-3xxx-xxxx cables have
been changed to the EN61918 core colors: yellow, orange, white, blue. So there are different color
codes in circulation. The electrical properties of the cables have been retained when the core colors
were changed.
EP704124Version: 2.3
Installation
3.2.2.2Status LEDs
Fig.14: EtherCAT status LEDs
L/A (Link/Act)
A green LED labelled "L/A" is located next to each EtherCAT socket. The LED indicates the communication
state of the respective socket:
LEDMeaning
offno connection to the connected EtherCAT device
litLINK: connection to the connected EtherCAT device
flashesACT: communication with the connected EtherCAT device
Run
Each EtherCAT slave has a green LED labelled "Run". The LED signals the status of the slave in the
EtherCAT network:
LEDMeaning
offSlave is in "Init" state
flashes uniformlySlave is in "Pre-Operational“ state
flashes sporadicallySlave is in "Safe-Operational" state
litSlave is in "Operational" state
Description of the EtherCAT slave states
3.2.2.3Cables
For connecting EtherCAT devices only shielded Ethernet cables that meet the requirements of at least
category5 (CAT5) according to EN50173 or ISO/IEC11801 should be used.
EtherCAT uses four wires for signal transmission.
Thanks to automatic line detection ("Auto MDI-X"), both symmetrical (1:1) or cross-over cables can be used
between Beckhoff EtherCAT.
Detailed recommendations for the cabling of EtherCAT devices
EP704125Version: 2.3
Installation
3.2.3Stepper motor, brake, encoder
3.2.3.1Signal connection
Fig.15: Signal connection EP7041-3002
NOTE
Note the numbering of the M12 sockets
Mixing up the M12 connectors can damage the module.
M12 socket no.1: Stepper motor connection
Fig.16: Stepper motor connection
EP704126Version: 2.3
M12-Socket no.2: Connection for motor supply
NOTE
The motor supply connection is not protected against polarity reversal
Defect possible through polarity reversal.
• Ensure that the polarity is correct.
Fig.17: Connection for motor supply with EP7041-0002 [}12] and EP7041-1002 [}12]
Installation
Fig.18: Connection for motor supply with EP7041-2002 [}13] and EP7041-3002 [}14]
M12 socket no.3: Connection for digital inputs and outputs
The signal connection of the digital inputs and outputs is done via M12 connectors.
Fig.19: Connection for digital inputs and outputs
The sensors are supplied with a common maximum current of 0.5Afrom the control voltage Us.
The output is short-circuit-proof and is protected against polarity reversal.
LEDs indicate the signal state of the inputs and outputs.
EP704127Version: 2.3
Installation
M12 socket no. 4: Encoder connection
NOTE
The encoder supply voltage is not short-circuit proof.
Risk of damage due to short circuit.
• Avoid short-circuiting the encoder supply voltage "V Enc“.
Encoder
Fig.20: Encoder connection
EP704128Version: 2.3
3.2.3.2Status LEDs
Installation
Fig.21: LEDs EP7041-3002
Status LEDs at the M12 connections
ConnectionLEDDisplayMeaning
M12 socket no.1:
Stepper motor
M12 socket no.2:
Motor supply
M12 socket no.3:
binary inputs
binary output
M12 socket no.4:
Encoder
S
left
R
right
V
left
O
right
DI 1
left
DI 2
right
C
left
A
right
green
yellowIf motor is disabled: motor control in standby
red
greenMotor is turning
redinternal error
offMotor supply voltage is not present
greenMotor supply voltage is present
offBinary output (M12 socket no.3, pin5) switched off (0V)
greenBinary output (M12 socket no.3, pin5) switched on (24V)
offthere is no signal (0V) on binary input1 (M12 socket no. 3, pin4)
greenthere is no signal (24V) on binary input1 (M12 socket no. 3, pin4)
offthere is no signal (0V) on binary input 2 (M12 socket no. 3, pin2)
greenthere is no signal (24V) on binary input2 (M12 socket no. 3, pin2)
flashesEncoder track C
flashesEncoder trackA
Motor control is enabled (Index 0x6010:02 [}95] is set) and EP7041 is ready to operate
If motor is enabled: warning, configuration error. Check the motor status.
Error: Check DiagData (Index 0xA010 [}101])
EP704129Version: 2.3
Installation
3.3ATEX notes
3.3.1ATEX - Special conditions
WARNING
Observe the special conditions for the intended use of EtherCAT Box modules in potentially explosive areas – directive 94/9/EU.
• The certified components are to be installed with a BG2000-0000 or BG2000-0010 protection enclosure
[}31] that guarantees a protection against mechanical hazards!
• If the temperatures during rated operation are higher than 70°C at the feed-in points of cables, lines or
pipes, or higher than 80°C at the wire branching points, then cables must be selected whose temperature data correspond to the actual measured temperature values!
• Observe the permissible ambient temperature range of 0 to 55°C for the use of EtherCAT Box modules
in potentially explosive areas!
• Measures must be taken to protect against the rated operating voltage being exceeded by more than
40% due to short-term interference voltages!
• The connections of the certified components may only be connected or disconnected if the supply voltage has been switched off or if a non-explosive atmosphere is ensured!
Standards
The fundamental health and safety requirements are fulfilled by compliance with the following standards:
• EN 60079-0: 2006
• EN 60079-15: 2005
Marking
The EtherCAT Box modules certified for potentially explosive areas bear the following marking:
II 3 GEx nA II T4DEKRA 11ATEX0080 XTa: 0 - 55°C
or
II 3 GEx nA nC IIC T4DEKRA 11ATEX0080 XTa: 0 - 55°C
Batch number (D number)
The EtherCAT Box modules bear a batch number (D number) that is structured as follows:
D: WW YY FF HH
WW - week of production (calendar week)
YY - year of production
FF - firmware version
HH - hardware version
Example with batch number 29 10 02 01:
29 - week of production 29
10 - year of production 2010
02 - firmware version 02
01 - hardware version 01
EP704130Version: 2.3
Installation
3.3.2BG2000 - EtherCAT Box protection enclosures
WARNING
Risk of electric shock and damage of device!
Bring the EtherCAT system into a safe, powered down state before starting installation, disassembly or
wiring of the modules!
ATEX
WARNING
Mount a protection enclosure!
To fulfill the special conditions according to ATEX [}30], a BG2000-0000 or BG2000-0010 protection enclosure has to be mounted over the EtherCAT Box.
Installation
Put the cables for EtherCAT, power supply and sensors/actuators through the hole of the protection
enclosure.
Fig.22: BG2000 - putting the cables
Fix the wires for EtherCAT, power supply and sensors/actuators to the EtherCAT Box.
EP704131Version: 2.3
Installation
Fig.23: BG2000 - fixing the cables
Mount the protection enclosure over the EtherCAT Box.
Fig.24: BG2000 - mounting the protection enclosure
3.3.3ATEX Documentation
Notes about operation of EtherCAT Box Modules (EPxxxx-xxxx) in potentially explosive areas (ATEX)
Pay also attention to the continuative documentationNotes about operation of EtherCAT Box Modules (EPxxxx-xxxx) in potentially explosive areas (ATEX) that is available in the download area of
the Beckhoff homepage http:\\www.beckhoff.com!
EP704132Version: 2.3
Commissioning/Configuration
4Commissioning/Configuration
4.1Integration in TwinCAT
4.1.1Inserting into the EtherCAT network
Installation of the latest XML device description
Please ensure that you have installed the latest XML device description in TwinCAT. This can be
downloaded from the Beckhoff website (http://www.beckhoff.de/english/download/elconfg.htm?id=1983920606140) and installed according to the installation instructions.
At the Beckhoff TwinCAT System Manager the configuration tree can be build in two different ways:
• by scanning [}33] for existing hardware (called "online") and
• by manual inserting/appending [}33] of fieldbus devices, couplers and slaves.
Automatic scanning in of the box
• The EtherCAT system must be in a safe, de-energized state before the EtherCAT modules are
connected to the EtherCAT network!
• Switch on the operating voltage, open the TwinCAT System Manager [}36] (Config mode), and scan
in the devices (see Fig. 1). Acknowledge all dialogs with "OK", so that the configuration is in "FreeRun"
mode.
Fig.25: Scanning in the configuration (I/O Devices -> right-click -> Scan Devices...)
Appending a module manually
• The EtherCAT system must be in a safe, de-energized state before the EtherCAT modules are
connected to the EtherCAT network!
• Switch on the operating voltage, open the TwinCAT System Manager [}36] (Config mode)
• Append a new I/O device. In the dialog that appears select the device EtherCAT (Direct Mode), and
confirm with OK.
EP704133Version: 2.3
Commissioning/Configuration
Fig.26: Appending a new I/O device (I/O Devices -> right-click -> Append Device...)
Fig.27: Selecting the device EtherCAT
• Append a new box.
Fig.28: Appending a new box (Device -> right-click -> Append Box...)
• In the dialog that appears select the desired box (e.g. EP2816-0008), and confirm with OK.
EP704134Version: 2.3
Commissioning/Configuration
Fig.29: Selecting a Box (e.g. EP2816-0008)
Fig.30: Appended Box in the TwinCAT tree
EP704135Version: 2.3
Commissioning/Configuration
4.1.2Configuration via TwinCAT
In the left-hand window of the TwinCAT System Manager, click on the branch of the EtherCAT Box you wish
to configure (EP2816-0008 in this example).
Fig.31: Branch of the EtherCAT box to be configured
In the right-hand window of the TwinCAT System manager, various tabs are now available for configuring
the EtherCAT Box.
General tab
Fig.32: General tab
NameName of the EtherCAT device
IdNumber of the EtherCAT device
TypeEtherCAT device type
CommentHere you can add a comment (e.g. regarding the system).
DisabledHere you can deactivate the EtherCAT device.
Create symbolsAccess to this EtherCAT slave via ADS is only available if this checkbox is
activated.
EP704136Version: 2.3
Commissioning/Configuration
EtherCAT tab
Fig.33: EtherCAT tab
TypeEtherCAT device type
Product/RevisionProduct and revision number of the EtherCAT device
Auto Inc Addr.Auto increment address of the EtherCAT device. The auto increment address can
be used for addressing each EtherCAT device in the communication ring through
its physical position. Auto increment addressing is used during the start-up phase
when the EtherCAT master allocates addresses to the EtherCAT devices. With
auto increment addressing the first EtherCAT slave in the ring has the address
0000
. For each further slave the address is decremented by 1 (FFFF
hex
, FFFE
hex
etc.).
EtherCAT Addr.Fixed address of an EtherCAT slave. This address is allocated by the EtherCAT
master during the start-up phase. Tick the checkbox to the left of the input field in
order to modify the default value.
Previous PortName and port of the EtherCAT device to which this device is connected. If it is
possible to connect this device with another one without changing the order of the
EtherCAT devices in the communication ring, then this combobox is activated and
the EtherCAT device to which this device is to be connected can be selected.
Advanced SettingsThis button opens the dialogs for advanced settings.
hex
The link at the bottom of the tab points to the product page for this EtherCAT device on the web.
Process Data tab
Indicates the configuration of the process data. The input and output data of the EtherCAT slave are
represented as CANopen process data objects (PDO). The user can select a PDO via PDO assignment and
modify the content of the individual PDO via this dialog, if the EtherCAT slave supports this function.
EP704137Version: 2.3
Commissioning/Configuration
Fig.34: Process Data tab
Sync Manager
Lists the configuration of the Sync Manager (SM).
If the EtherCAT device has a mailbox, SM0 is used for the mailbox output (MbxOut) and SM1 for the mailbox
input (MbxIn).
SM2 is used for the output process data (outputs) and SM3 (inputs) for the input process data.
If an input is selected, the corresponding PDO assignment is displayed in the PDO Assignment list below.
PDO Assignment
PDO assignment of the selected Sync Manager. All PDOs defined for this Sync Manager type are listed
here:
• If the output Sync Manager (outputs) is selected in the Sync Manager list, all RxPDOs are displayed.
• If the input Sync Manager (inputs) is selected in the Sync Manager list, all TxPDOs are displayed.
The selected entries are the PDOs involved in the process data transfer. In the tree diagram of the System
Manager these PDOs are displayed as variables of the EtherCAT device. The name of the variable is
identical to the Name parameter of the PDO, as displayed in the PDO list. If an entry in the PDO assignment
list is deactivated (not selected and greyed out), this indicates that the input is excluded from the PDO
assignment. In order to be able do select a greyed out PDO, the currently selected PDO has to be
deselected first.
EP704138Version: 2.3
Commissioning/Configuration
Activation of PDO assignment
• the EtherCAT slave has to run through the PS status transition cycle (from pre-operational to
safe-operational) once (see Online tab [}42]),
• and the System Manager has to reload the EtherCAT slaves ( button)
PDO list
List of all PDOs supported by this EtherCAT device. The content of the selected PDOs is displayed in the
PDO Content list. The PDO configuration can be modified by double-clicking on an entry.
Column Description
IndexPDO index.
SizeSize of the PDO in bytes.
NameName of the PDO.
If this PDO is assigned to a Sync Manager, it appears as a variable of the slave with this
parameter as the name.
FlagsF Fixed content: The content of this PDO is fixed and cannot be changed by the System
Manager.
M Mandatory PDO. This PDO is mandatory and must therefore be assigned to a Sync Manager!
Consequently, this PDO cannot be deleted from the PDO Assignment list
SMSync Manager to which this PDO is assigned. If this entry is empty, this PDO does not take part in
the process data traffic.
SUSync unit to which this PDO is assigned.
PDO Content
Indicates the content of the PDO. If flag F (fixed content) of the PDO is not set the content can be modified.
Download
If the device is intelligent and has a mailbox, the configuration of the PDO and the PDO assignments can be
downloaded to the device. This is an optional feature that is not supported by all EtherCAT slaves.
PDO Assignment
If this check box is selected, the PDO assignment that is configured in the PDO Assignment list is
downloaded to the device on startup. The required commands to be sent to the device can be viewed in the
Startup [}39] tab.
PDO Configuration
If this check box is selected, the configuration of the respective PDOs (as shown in the PDO list and the
PDO Content display) is downloaded to the EtherCAT slave.
Startup tab
The Startup tab is displayed if the EtherCAT slave has a mailbox and supports the CANopen over EtherCAT
(CoE) or Servo drive over EtherCAT protocol. This tab indicates which download requests are sent to the
mailbox during startup. It is also possible to add new mailbox requests to the list display. The download
requests are sent to the slave in the same order as they are shown in the list.
EP704139Version: 2.3
Commissioning/Configuration
Fig.35: Startup tab
ColumnDescription
TransitionTransition to which the request is sent. This can either be
• the transition from pre-operational to safe-operational (PS), or
• the transition from safe-operational to operational (SO).
If the transition is enclosed in "<>" (e.g. <PS>), the mailbox request is fixed and cannot be
modified or deleted by the user.
ProtocolType of mailbox protocol
IndexIndex of the object
DataDate on which this object is to be downloaded.
CommentDescription of the request to be sent to the mailbox
Move UpThis button moves the selected request up by one position in the list.
Move Down This button moves the selected request down by one position in the list.
NewThis button adds a new mailbox download request to be sent during startup.
DeleteThis button deletes the selected entry.
EditThis button edits an existing request.
CoE - Online tab
The additional CoE - Online tab is displayed if the EtherCAT slave supports the CANopen over EtherCAT
(CoE) protocol. This dialog lists the content of the object directory of the slave (SDO upload) and enables the
user to modify the content of an object from this list. Details for the objects of the individual EtherCAT
devices can be found in the device-specific object descriptions.
EP704140Version: 2.3
Commissioning/Configuration
Fig.36: CoE - Online tab
Object list display
ColumnDescription
IndexIndex and subindex of the object
NameName of the object
FlagsRWThe object can be read, and data can be written to the object (read/write)
ROThe object can be read, but no data can be written to the object (read only)
PAn additional P identifies the object as a process data object.
ValueValue of the object
Update ListThe Update list button updates all objects in the displayed list
Auto Update If this check box is selected, the content of the objects is updated automatically.
AdvancedThe Advanced button opens the Advanced Settings dialog. Here you can specify which
objects are displayed in the list.
EP704141Version: 2.3
Commissioning/Configuration
Fig.37: Advanced settings
Online
- via SDO information
Offline
- via EDS file
Online tab
If this option button is selected, the list of the objects included in the object
directory of the slave is uploaded from the slave via SDO information. The list
below can be used to specify which object types are to be uploaded.
If this option button is selected, the list of the objects included in the object
directory is read from an EDS file provided by the user.
Fig.38: Online tab
EP704142Version: 2.3
Commissioning/Configuration
State Machine
InitThis button attempts to set the EtherCAT device to the Init state.
Pre-OpThis button attempts to set the EtherCAT device to the pre-operational state.
OpThis button attempts to set the EtherCAT device to the operational state.
BootstrapThis button attempts to set the EtherCAT device to the Bootstrap state.
Safe-OpThis button attempts to set the EtherCAT device to the safe-operational state.
Clear ErrorThis button attempts to delete the fault display. If an EtherCAT slave fails during
change of state it sets an error flag.
Example: An EtherCAT slave is in PREOP state (pre-operational). The master now
requests the SAFEOP state (safe-operational). If the slave fails during change of
state it sets the error flag. The current state is now displayed as ERR PREOP. When
the Clear Error button is pressed the error flag is cleared, and the current state is
displayed as PREOP again.
Current StateIndicates the current state of the EtherCAT device.
Requested StateIndicates the state requested for the EtherCAT device.
DLL Status
Indicates the DLL status (data link layer status) of the individual ports of the EtherCAT slave. The DLL status
can have four different states:
StatusDescription
No Carrier / OpenNo carrier signal is available at the port, but the port is open.
No Carrier / ClosedNo carrier signal is available at the port, and the port is closed.
Carrier / OpenA carrier signal is available at the port, and the port is open.
Carrier / ClosedA carrier signal is available at the port, but the port is closed.
File Access over EtherCAT
DownloadWith this button a file can be written to the EtherCAT device.
UploadWith this button a file can be read from the EtherCAT device.
EP704143Version: 2.3
Commissioning/Configuration
4.1.3Integration into the NC configuration
(Master: TwinCAT 2.11)
Installation of the latest XML device description
Please ensure that you have installed the corresponding latest XML device description in TwinCAT.
This can be downloaded from the Beckhoff website (http://www.beckhoff.de/german/default.htm?
download/elconfg.htm) and installed according to the installation instructions.
Integration into the NC can be accomplished as follows:
• The terminal must already have been inserted manually under I/O devices or have been scanned in by
the system (see section "Inserting the terminal in the EtherCAT Terminal network").
• First add a new task. Right-click on NC configuration and select "Append Task..." (see Fig. Adding anew task).
• Rename the task if required and confirm with OK.
Fig.39: Adding a new task
• Right-click on Axes, then add a new axis (see Fig. Linking the axis with the terminal).
Fig.40: Adding a new axis
• Select Continuous Axis type and confirm with OK (see Fig. 3).
EP704144Version: 2.3
Commissioning/Configuration
Fig.41: Selecting and confirming the axis type
• Left-click your axis to select it. Under the Settings tab select "Link To..." (see Fig. Linking the axis withthe terminal).
Fig.42: Linking the axis with the terminal
• Select the right terminal (Stepper Drive (MDP 703)) and confirm with OK.
Fig.43: Selecting the right terminal
• All main links between the NC configuration and the terminal are set automatically (see Fig. "Automaticlinking of all main variables")
EP704145Version: 2.3
Commissioning/Configuration
Fig.44: Automatic linking of all main variables
• Several parameters have to be set before the motor can be started up. The values can be found in
section "Configuration of the main parameters [}48]". Please set these parameters before continuing
with the motor commissioning procedure.
Commissioning the motor with the NC
• Once the parameters are set, the motor is basically ready for operation. Individual further parameters
have to be adapted to the respective application.
• To commission the axis, activate the configuration (Ctrl+Shift+F4), select the axis, select tab Online
and enable the axis under Set.
• Set all check marks and set Override to 100 (see Fig. 7). The axis can then be moved.
EP704146Version: 2.3
Commissioning/Configuration
Fig.45: Enabling an axis
You can now move the axis with the function keys F1, F2 (Backward) or F3, F4 (Forward).
Alternatively you can control the axis via the Functions tab.
Example
• Select as Reversing Sequence as the start mode.
• Enter the required Target Position1, e.g. 5000°.
• Enter the required Target Velocity, e.g. 1200°/s.
• Enter the required Target Position2, e.g. 0°.
• Enter the required Idle Time, e.g. 1 s.
• Select Start.
EP704147Version: 2.3
Commissioning/Configuration
Fig.46: Axis control, "Functions" tab
The motor now travels to Position1, remains there for 1s and then returns to Position2. This is repeated
until you click Stop.
4.1.4Configuration of the main parameters
The data specified here apply to an AS 1050-0120 stepper motor and are intended as an example. For other
motors the values may vary, depending on the application.
Setting the CoE objects
Execution of changes
Changes to CoE objects are only executed after the module has been placed in the Init state.
Changes are only active after that.
Adaptation of current and voltage
NOTE
The motor may overheat!
In order to prevent overheating of the connected motor it is important to adapt the current and voltage output from the stepper interface to the motor.
To do this, set the indices 0x8010:01 [}78]Maximal current and 0x8010:03 [}78]Nominal voltage in the
CoE register to suitable values (see Fig. Adaptation of current and voltage).
EP704148Version: 2.3
Commissioning/Configuration
Reduced current can be set in index 0x8010:02 [}78]. This reduces the coil current when at a standstill
(and therefore the power dissipation). Please note that the torque is also reduced.
Fig.47: Adaptation of current and voltage
Base frequency selection
Microstepping is set to 1/64 and cannot be changed. However, the base frequency can be changed (default:
2000). To do this, mark the module and select the CoE Online tab. Change the base frequency by doubleclicking on the index 0x8012:05 [}79]Speedrange (Fig. Setting the base frequency).
Fig.48: Setting the base frequency
Selecting the feedback system
The module with encoder connections provides a choice of two possibilities for the feedback system:
• Internal Counter (default): Use internal counter for position feedback
• Encoder: Use external encoder for position feedback
EP704149Version: 2.3
Commissioning/Configuration
Setting the feedback type
By default, the stepper module is set to internal counter. If an external encoder is used, the setting
must be changed by double-clicking on the index 0x8012:08 [}79] Feedback type in the Enum
menu (Fig. Selecting the feedback system).
Fig.49: Selecting the feedback system
KA factor (EP7041-0002 [}12] and EP7041-1002 [}12]only)
The KA factor can be used to adapt the current during the acceleration phases. The current increase is
calculated as follows.
Current increaseinmA=speed differencexKA/1000
The steeper the speed ramp, the higher the current increase.
EP704150Version: 2.3
Commissioning/Configuration
Fig.50: Speed ramps
This value can be set in index 0x8011:07 [}78]Ka factor (curr.) (see fig. Setting the KA factor).
Fig.51: Setting the KA factor
NC settings
Reference speed selection
The maximum speed can be calculated from the base frequency and the motor frequency.
The reference speed can be calculated by multiplying the maximum speed with the distance per revolution.
v
=10revolutions/sx360°=3600°/s
ref
EP704151Version: 2.3
Commissioning/Configuration
Fig.52: Reference speed parameter
Dead time compensation
The dead time compensation should theoretically be 3cycles of the NC cycle time, although in practice
4cycles are preferable. At a cycle time of 2ms it should therefore be 0.008s. The dead time compensation
can be found under Advanced Settings in the encoder parameters.
Fig.53: Dead time compensation parameter
Scaling factor
The scaling factor can be changed by selecting NC Axis 1_Enc and the Parameter tab in the NC (see fig.
Setting the scaling factor (example with encoder)). The value can be calculated with the formulas specified
below.
EP704152Version: 2.3
Commissioning/Configuration
Fig.54: Setting the scaling factor (example with encoder)
Calculation of the scaling factor
with encoder:
SF=distance per revolution/incrementsx4=360°/1024x4=0.087890625mm/INC
The position lag monitoring function checks whether the current position lag of an axis has exceeded the
limit value. The position lag is the difference between the set value (control value) and the actual value
reported back. If the terminal parameters are set inadequately, the position lag monitoring function may
report an error when the axis is moved. During commissioning it may therefore be advisable to increase the
limits of the Position lag monitoring slightly.
NOTE
ATTENTION: Damage to equipment, machines and peripheral components possible!
Setting the position lag monitoring parameters too high may result in damage to equipment, machines and
peripheral components.
EP704153Version: 2.3
Commissioning/Configuration
Fig.55: Position lag monitoring parameters
Kv factors (only with external encoder)
In the NC two proportional factors Kv can be set under Axis 1_Ctrl on the Parameter tab. First select the
position controller Type with two P constants (with KA) under the NC Controller tab. The two P constants are
for the Standstill range and for the Moving range (see Fig. Setting the proportional factor KV). The factors can
be used to set the start-up torque and the braking torque to a different value than the drive torque. The
threshold value can be set directly below (Position control: Velocity threshold V dyn) between 0.0 (0%) and
1.0 (100%). Fig. Velocity ramp with KV factor limit values shows a speed ramp with thresholds of 30%. The
Kv factor for Standstill (t1 and t3) can be different than the Kv factor for Moving (t2). In this case the same
factor was used, since for stepper motors this function is less crucial than for DC motors.
Fig.56: Speed ramp with KV factor limit values
EP704154Version: 2.3
Commissioning/Configuration
Fig.57: Setting the proportional factor K
V
Dead band for position errors
Microstepping can be used to target 200x64=12800positions. Since the encoder can only scan
1024x4=4096positions, positions between two encoder scan points may not be picked up correctly, in
which case the terminal will control around this position. The dead band for position errors is a tolerance
range within which the position is regarded as "reached" (Fig. Dead band for position errors).
Fig.58: Dead band for position errors
Setting the acceleration time
In order to pass through any resonances that may occur as quickly as possible, the ramps for the
acceleration time and the deceleration time should be as steep as possible.
EP704155Version: 2.3
Commissioning/Configuration
Fig.59: Setting the acceleration time
4.1.5Basic principles for the Positioning Interface
The Positioning interface offers the user a possibility to implement travel commands directly on the terminal.
4.1.5.1Predefined PDO Assignment
The "Predefined PDO Assignment" enables a simplified selection of the process data. Select the function
"Positioning interface" or "Positioning interface compact" in the lower part of the Process data tab. As a
result, all necessary PDOs are automatically activated and the unnecessary PDOs are deactivated.
Fig.60: Predefined PDO Assignment
4.1.5.2Parameter set
Two objects are at the user’s disposal in the CoE for the configuration – the "POS Settings" (Index 0x8020)
and the "POS Features" (Index 0x8021).
EP704156Version: 2.3
Commissioning/Configuration
Fig.61: Settings objects in the CoE
POS Settings: Velocity min.:
For reasons of performance when ramping down to the target position, the terminal needs a safety margin of
0.5%. That means that, depending on the maximum velocity reached and the configured deceleration, the
time is calculated at which the deceleration ramp begins. In order to always reach the destination reliably,
0.5% is subtracted from the position determined. If the deceleration ramp has ended and the destination has
not yet been reached, the terminal drives at the velocity “Velocity min.” to the destination. It must be
configured in such a way that the motor is able to stop abruptly and without a step loss at this velocity.
Velocity max.:
The maximum velocity with which the motor drives during a travel command
"Speed range" (index 0x8012:05) [applies to EL70x1]
Velocity min./max. are standardized to the configured "Speed range" (Index 0x8012:05). This
means that for a "Speed range" of 4000 full steps/second, for example, for a speed output of 100%
(i.e. 4000 full steps/second) 10,000 should be entered under "Velocity max.", and 5,000 for 50%
(i.e. 2000 full steps/second).
Acceleration pos.:
Acceleration time in the positive direction of rotation.
The 5 parameters for acceleration also refer to the set “Speed range” and are given in ms. With a setting of
1000, the terminal accelerates the motor from 0 to 100% in 1000 ms. At a speed of 50% the acceleration
time is linearly reduced to half accordingly.
Acceleration neg.:
Acceleration time in the negative direction of rotation.
Deceleration pos.:
Deceleration time in the positive direction of rotation.
Deceleration neg.:
Deceleration time in the negative direction of rotation.
EP704157Version: 2.3
Commissioning/Configuration
Emergency deceleration:
Emergency deceleration time (both directions of rotation). If “Emergency stop” is set in the appropriate PDO,
the motor is stopped within this time.
Calibration position:
The current counter value is loaded with this value after calibration.
Calibration velocity (towards plc cam):
Velocity with which the motor travels towards the cam during calibration.
Calibration velocity (off plc cam):
Velocity with which the motor travels away from the cam during calibration.
Target window:
Target window of the travel distance control. "In-Target" is set if the motor comes to a stop within this target
window.
In-Target timeout:
"In-Target" is not set if the motor is not within the target window after the expiry of the travel distance control
after this set time. This condition can be recognized only by checking the falling edge of “Busy”.
Dead time compensation:
Compensation of the internal propagation delays. This parameter does not have to be changed with
standard applications.
Modulo factor:
The “Modulo factor” is referred to for the calculation of the target position and the direction of rotation in the
modulo operating modes. It refers to the controlled system.
Modulo tolerance window:
Tolerance window for the determination of the start condition of the modulo operating modes.
POS Features:
Start type:
The "Start type" specifies the type of calculation used to determine the target position (see below).
Time information:
The meaning of the "Actual drive time" displayed is configured by this parameter. At present this value
cannot be changed, since there are no further selection options. The elapsed time of the travel command is
displayed.
Invert calibration cam search direction:
In relation to a positive direction of rotation, the direction of the search for the calibration cam is configured
here (travel towards the cam).
Invert sync impulse search direction:
In relation to a positive direction of rotation, the direction of the search is configured here in accordance with
the HW sync pulse (travel away from the cam).
4.1.5.3Information and diagnostic data
Via the information and diagnostic data, the user can obtain a more exact statement about which error
occurred during a travel command.
EP704158Version: 2.3
Commissioning/Configuration
Fig.62: Diagnostic objects in the CoE
POS Info data:
Status word:
The "Status word" reflects the status bits used in Index 0xA020 in a data word, in order to be able to process
them more simply in the PLC. The positions of the bits correspond to the number of the subindex-1.
Bit 0: Command rejected
Bit 1: Command aborded
Bit 2: Target overrun
State (drive controller):
The current status of the internal state machine is displayed here (see below).
POS Diag data:
Command rejected:
A dynamic change of the target position is not accepted each time by the terminal, since this is then not
possible. The new command is rejected in this case and indicated by the setting of this bit.
These 3 diagnostic bits are transmitted synchronously to the controller by setting “Warning” in the PDO.
Command aborted:
The current travel command was prematurely aborted due to an internal error or by an "Emergency stop".
Target overrun:
In the case of a dynamic change of the target position, the change may take place at a relatively late point in
time. The consequence of this may be that a change in the direction of rotation is necessary and that the
new target position may be overrun. “Target overrun” is set if this occurs.
4.1.5.4States of the internal state machine
The state (drive controller) (Index 0x9020:03) provides information about the current state of the internal
state machine. For diagnostic purposes this can be read out by the PLC for the propagation delay. The
internal cycle works constantly with 250 µs. A connected PLC cycle is very probably slower (e.g. 1 ms). For
this reason it may be the case that some states are not visible at all in the PLC, since these will sometimes
run through only one internal cycle.
EP704159Version: 2.3
Commissioning/Configuration
NameIDDescription
INIT0x0000 Initialization/preparation for the next travel command.
IDLE0x0001 Wait for the next travel command.
START0x0010 The new command is evaluated and the corresponding calculations are
performed.
ACCEL0x0011 Acceleration phase.
CONST0x0012 Constant phase
DECEL0x0013 Deceleration phase
EMCY0x0020 An "Emergency stop" has been triggered.
STOP0x0021 The motor has stopped.
CALI_START0x0100 Start of a calibration command.
CALI_GO_CAM0x0110 The motor is being driven towards the cam.
CALI_ON_CAM0x0111 The cam has been reached.
CALI_GO_SYNC0x0120 The motor is being driven in the direction of the HW sync pulse.
CALI_LEAVE_CAM0x0121 The motor is being driven away from the cam.
CALI_STOP0x0130 End of the calibration phase.
CALIBRATED0x0140 The motor is calibrated.
NOT_CALIBRATED0x0141 The motor is not calibrated.
PRE_TARGET0x1000 The set position has been reached; the position controller "pulls" the motor
further into the target; "In-Target timeout" is started here.
TARGET0x1001 The motor has reached the target window within the timeout.
TARGET_RESTART0x1002 A dynamic change of the target position is processed here.
END0x2000 End of the positioning phase.
WARNING0x4000 A warning state occurred during the travel command; this is processed here.
ERROR0x8000 An error state occurred during the travel command; this is processed here.
UNDEFINED0xFFFF Undefined state (can occur, for example, if the driver stage has no control
voltage).
Table 1: States of the internal state machine
4.1.5.5Standard sequence of a travel command
The “normally” sequence of a travel command is shown in the following flow diagram.
Coarse distinction is made between these four stages:
Startup
Test the system and the ready status of the motor.
Start positioning
Write all variables and calculate the desired target position with the appropriate “Start type”. Subsequently,
start the travel command.
Evaluate status
Monitor the terminal state and, if necessary, dynamically change the target position.
Error handling
In case of error, procure the necessary information from the CoE and evaluate it.
EP704160Version: 2.3
Commissioning/Configuration
Fig.63: Flow diagram for a travel command
4.1.5.6Start types
The Positioning interface offers different types of positioning. The following table contains all commands
supported; these are divided into 4 groups.
EP704161Version: 2.3
Commissioning/Configuration
NameCommandGroupDescription
ABSOLUTE0x0001
RELATIVE0x0002Relative positioning to a calculated target position; a specified posi-
ENDLESS_PLUS0x0003Endless travel in the positive direction of rotation (direct specification
ENDLESS_MINUS0x0004Endless travel in the negative direction of rotation (direct specifica-
ADDITIVE0x0006Additive positioning to a calculated target position; a specified posi-
ABSOLUTE_CHANGE0x1001
RELATIVE_CHANGE0x1002Dynamic change of the target position during a travel command to a
ADDITIVE_CHANGE0x1006Dynamic change of the target position during a travel command to a
MODULO_SHORT0x0105
MODULO_SHORT_EXT0x0115Modulo positioning along the shortest path to the modulo position;
MODULO_PLUS0x0205Modulo positioning in the positive direction of rotation to the calcu-
MODULO_PLUS_EXT0x0215Modulo positioning in the positive direction of rotation to the calcu-
MODULO_MINUS0x0305Modulo positioning in the negative direction of rotation to the calcu-
MODULO_MINUS_EXT0x0315Modulo positioning in the negative direction of rotation to the calcu-
MODULO_CURRENT0x0405Modulo positioning in the last direction of rotation to the calculated
MODULO_CURRENT_EXT0x0415Modulo positioning in the last direction of rotation to the calculated
CALI_PLC_CAM0x6000
CALI_HW_SYNC0x6100Start a calibration with cam and HW sync pulse (C-track)
SET_CALIBRATION0x6E00Manually set the terminal to "Calibrated"
SET_CALIBRATION_AUTO 0x6E01Automatically set the terminal to "Calibrated" on the first rising edge
CLEAR_CALIBRATION0x6F00Manually delete the calibration
Standard [}62]
Standard Ext.
[}63]
Modulo [}65]
Calibration [}64]
Absolute positioning to a specified target position
tion difference is added to the current position
of a speed)
tion of a speed)
tion difference is added to the last target position
Dynamic change of the target position during a travel command to a
new absolute position
new relative position (the current changing position value is used
here also)
new additive position (the last target position is used here)
Modulo positioning along the shortest path to the modulo position
(positive or negative), calculated by the "Modulo factor" (Index
0x8020:0E)
the "Modulo tolerance window" (Index 0x8020:0F) is ignored
lated modulo position
lated modulo position; the "Modulo tolerance window" is ignored
lated modulo position
lated modulo position; the "Modulo tolerance window" is ignored
modulo position
modulo position; the "Modulo tolerance window" is ignored
Start a calibration with cam (digital inputs)
on "Enable"
Table 2: Supported “Start types” of the “Positioning interface”
ABSOLUTE
The absolute positioning represents the simplest positioning case. A position B is specified and travelled to
from the start point A.
Fig.64: Absolute positioning
RELATIVE
In relative positioning, the user specifies a position delta S, which is added to the current position A,
producing the target position B.
EP704162Version: 2.3
Commissioning/Configuration
Fig.65: Relative positioning
ENDLESS_PLUS / ENDLESS_MINUS
The two start types ENDLESS_PLUS and ENDLESS_MINUS offer the possibility in the Positioning Interface
to specify a direct motor velocity in order to travel endlessly in the positive or negative direction with the
specified accelerations.
Fig.66: Endless travel
ADDITIVE
For additive positioning, the position delta S specified by the user is added to the target position E used for
the last travel command in order to calculate the target position B.
This kind of positioning resembles the relative positioning, but there is a difference. If the last travel
command was completed successfully, the new target position is the same. If there was an error, however,
be it that the motor entered a stall state or an Emergency stop was triggered, the current position is arbitrary
and not foreseeable. The user now has the advantage that he can use the last target position for the
calculation of the following target position.
These three kinds of positioning are completely identical to those described above. The important difference
thereby is that the user uses these commands during an active travel command in order to dynamically
specify a new target position.
The same rules and conditions apply as to the “normal” start types. ABSOLUTE_CHANGE and
ADDITIVE_CHANGE are unique in the calculation of the target position i.e. in absolute positioning an
absolute position is specified and in additive positioning a position delta is added to the momentarily active
target position.
EP704163Version: 2.3
Commissioning/Configuration
NOTE
Caution when using the RELATIVE_CHANGE positioning
The change by means of RELATIVE_CHANGE must be used with caution, since the current position of the
motor is also used here as the start position. Due to propagation delays in the system, the position indicated in the PDO never corresponds to the actual position of the motor! Therefore a difference to the desired target position always results in the calculation of the transferred position delta.
Time of the change of the target position
A change of the target position cannot take place at an arbitrary point in time. If the calculation of
the output parameters shows that the new target position cannot be readily reached, the command
is rejected by the terminal and the Command rejected [}58] bit is set. This is the case, for example,
at standstill (since the terminal expects a standard positioning here) and in the acceleration phase
(since at this point the braking time cannot be calculated yet).
The simplest calibration case is calibration by cam only (connected to one digital input).
Here, the motor travels in the 1st step with velocity 1 (Index 0x8020:09) in direction 1 (Index 0x8021:13)
towards the cam. Subsequently, in the 2nd step, it travels with velocity 2 (Index 0x8020:0A) in direction 2
(Index 0x8021:14) away from the cam. After the In-Target timeout"(Index 0x8020:0C) has elapsed, the
calibration position (Index 0x8020:08) is taken on by the terminal as the current position.
NOTE
Observe the switching hysteresis of the cam switch
With this simple calibration it must be noted that the position detection of the cam is only exact to a certain
degree. The digital inputs are not interrupt-controlled and are "only" polled. The internal propagation delays
may therefore result in a system-related position difference.
Fig.68: Calibration with cam
For a more precise calibration, an HW sync pulse (C-track) is used in addition to the cam. This calibration
proceeds in exactly the same way as described above, up to the point at which the motor travels away from
the cam. The travel is not stopped immediately; instead, the sync pulse is awaited. Subsequently, the In-Target timeout runs down again and the calibration position is taken on by the terminal as the current
position.
Fig.69: Calibration with cam and C-track
EP704164Version: 2.3
Commissioning/Configuration
If calibration by hardware is not possible due to the circumstances of the application, the user can also set
the Calibrated bit manually or automatically. The manual setting or deletion takes place with the commands
SET_CALIBRATION and CLEAR_CALIBRATION.
It is simpler, however, if the standard start types (Index 0x8021:01) are set to SET_CALIBRATION_AUTO.
The Calibrated bit will now be set automatically by the first rising edge on Enable. The command is
conceived only for this purpose; therefore, it does not make sense to use it via the synchronous data
exchange.
4.1.5.7Modulo - general description
MODULO
The modulo position of the axis is a piece of additional information about the absolute axis position. Modulo
positioning represents the required target position in a different way. Contrary to the standard types of
positioning, the modulo positioning has several pitfalls, since the desired target position can be interpreted
differently.
The modulo positioning refers in principle to the Modulo factor (Index 0x8020:0E), which can be set in the
CoE. In the following examples, a rotary axis with a "Modulo factor" equivalent to 360 degrees is assumed.
The Modulo tolerance window (Index 0x8020:0F) defines a position window around the current modulo
target position of the axis. The window width is twice the specified value (set position ± tolerance value). A
detailed description of the tolerance window is provided below.
The positioning of an axis is always referenced to its current actual position. The actual position of an axis is
normally the position moved to with the last travel command. Under certain circumstances (incorrect
positioning due to the axis stalling, or a very coarse resolution of the connected encoder), however, a
position not expected by the user may arise. If this possibility is not considered, subsequent positioning may
lead to unexpected behavior.
EP704165Version: 2.3
Commissioning/Configuration
Fig.70: Effect of the modulo tolerance window - modulo target position 0° in positive direction
Example
An axis is positioned to 0°, with the result that subsequently the actual position of the axis is exactly 0°. A
further modulo travel command to 360° in positive direction results in a full turn, with the subsequent modulo
position of the axis of once again being exactly 0°. If the axis comes to a stop somewhat in front of or behind
the target position for mechanical reasons, the next travel command does not behave as one would expect.
If the actual position lies slightly below 0° (see fig. Calibration with cam, below left), a new travel command to
0° in the positive direction leads only to a minimal movement. The deviation that arose beforehand is
compensated and the position is subsequently exactly 0° once more. If the position lies slightly above 0°,
however, the same travel command leads to a full revolution in order to reach the exact position of 0° again.
This problem occurs if complete turns by 360° or multiples of 360° were initiated. For positioning to an angle
that is significantly different from the current modulo position, the travel command is unambiguous.
In order to solve the problem, a "Modulo tolerance window" (Index 0x8020:0F) can be parameterized. This
ensures that small deviations from the position that are within the window do not lead to different axis
behavior. If, for example, a window of 1° is parameterized, in the case described above the axis will behave
EP704166Version: 2.3
Commissioning/Configuration
identically, as long the actual position is between 359° and 1°. If the position exceeds 0° by less than 1°, the
axis is re-positioned in positive direction at a modulo start. In both cases, a target position of 0° therefore
leads to minimum movement to exactly 0°. A target position of 360° leads to a full turn in both cases.
For values that are within the window range, the modulo tolerance window can therefore lead to movements
against the specified direction. For small windows this is usually not a problem, because system deviations
between set and actual position are compensated in both directions. This means that the tolerance window
may also be used for axes that may only be moved in one direction due to their construction.
Modulo positioning by less than one turn
Modulo positioning from a starting position to a non-identical target position is unambiguous and requires no
special consideration. A modulo target position in the range [0 ≤; position < 360] reaches the required target
in less than one whole turn. No motion occurs if target position and starting position are identical. Target
positions of more than 360° lead to one or more full turns before the axis travels to the required target
position.
For a movement from 270° to 0°, a modulo target position of 0° (not 360°) should therefore be specified,
because 360° is outside the basic range and would lead to an additional turn.
The modulo positioning distinguishes between three direction specifications: positive direction, negativedirection and along the shortest path (MODULO_PLUS, MODULO_MINUS, MODULO_SHORT). For
positioning along the shortest path, target positions of more than 360° are not sensible, because the
movement towards the target is always direct. In contrast to positive or negative direction, it is therefore not
possible to carry out several turns before the axis moves to the target.
NOTE
Only basic periods of less than 360° are permitted
For modulo positioning with start type "MODULO_SHORT", only modulo target positions within the basic
period (e.g. less than 360°) are permitted, otherwise an error is returned.
Positioning without the modulo tolerance window
The "Modulo tolerance window" (Index 0x8020:0F) is always taken into account in the "normal"
types of modulo positioning. However, this is less desirable in some situations. In order to eliminate
this "disadvantage", the comparable start types "MODULO_SHORT_EXT", "MODULO_PLUS_EXT", "MODULO_MINUS_EXT" and "MODULO_CURRENT_EXT" can be used, which
ignore the modulo tolerance window.
The following table shows examples of modulo positioning with less than one revolution.
In principle, modulo positioning by one or full turns are no different than positioning to an angle that differs
from the starting position. No motion occurs if target position and starting position are identical. For a full
turn, 360° has to be added to the starting position. The behavior described in the example shows that special
attention must be paid to positionings with whole revolutions. The following table shows positioning
examples for a starting position of approximately 90°. The modulo tolerance window is set to 1° here. Special
cases for which the starting position is outside this window are identified.
The following table shows examples of modulo positioning with whole revolutions
4.1.5.8Examples of two travel commands with a dynamic change of the target
position
Without overrun of the target position
TimePOS OutputsPOS InputsDescription
t1:Execute = 1
Target position = 200000
Velocity = 2000
Start type = 0x0001
Acceleration = 1000
Deceleration = 1000
t2:Accelerate = 0• End of the acceleration phase
t3:Target position = 100000
Velocity = 1500
Start type = 0x1001
Acceleration = 2000
Deceleration = 2000
t4:Decelerate = 1• Start of the deceleration phase
t5:Execute = 0Busy = 0
t6 - t9:• Absolute travel back to the start position 0
Busy = 1
Accelerate = 1
In-Target = 1
Decelerate = 0
• Specification of the first parameter
• Start of the acceleration phase
• Change of the parameters
• Activation by new start types
• End of the deceleration phase
• Motor is at the new target position
Fig.71: Scope recording without overrunning the target position
The axis scaling refers only to the positions, not to the speed or the status bits.
EP704169Version: 2.3
Commissioning/Configuration
With overrun of the target position
TimePOS OutputsPOS InputsDescription
t1:Execute = 1
Target position = 200000
Velocity = 5000
Start type = 0x0001
Acceleration = 3000
Deceleration = 5000
t2:Accelerate = 0• End of the 1st acceleration phase
t3:Target position = 100000
Velocity = 1500
Start type = 0x1001
Acceleration = 1000
Deceleration = 2000
Busy = 1
Accelerate = 1
Warning = 1
Decelerate = 1
• Specification of the 1st parameter
• Start of the 1st acceleration phase
• Change of the parameters
• Activation by new start types
• Warning of overrunning the target position
• Start of the 1st deceleration phase
t4:Accelerate = 1
Decelerate = 0
t5:Accelerate = 0
Decelerate = 1
t6:Execute = 0Busy = 0
In-Target = 1
Decelerate = 0
t7 - t10:• Absolute travel back to the start position 0
• End of the 1st deceleration phase
• Start of the 2nd acceleration phase in the
opposite direction
• End of the 2nd acceleration phase
• Start of the 2nd deceleration phase
• End of the 2nd deceleration phase
• Motor is at the new target position
Fig.72: Scope recording with overrunning of the final target position
The axis scaling refers only to the positions, not to the speed or the status bits.
EP704170Version: 2.3
Commissioning/Configuration
4.1.6Application example
EtherCAT XML Device Description
The display matches that of the CoE objects from the EtherCAT XML Device Description. We recommend downloading the latest XML file from the download area of the Beckhoff website and in-
stalling it according to installation instructions.
Motor control with visualization
Sample program (https://infosys.beckhoff.com/content/1033/EP7041/Resources/zip/3696560907.zip)
Used Master: TwinCAT 2.11 (for older versions the control loop has to be programmed manually; in this case
it is already implemented in the NC).
This application example demonstrates movement of a motor to any position or in continuous mode with the
aid of visualization. The velocity, the starting acceleration and the deceleration can be specified.
The sample program consists of 2 files (PLC file and System Manager file).
First open the PLC file and compile it so that you have the *.tpy file available that is required for the System
Manager.
Please note that you may have to adjust the target platform in the PLC program (default: PC or CX 8x86). If
required, you can select the right target platform in the Resources -> Controller configuration tab.
Fig.73: Selection of the target platform
Please note the following for the System Manager file:
• Start the System Manager in Config mode.
• Please ensure that the I/O configuration matches your actual configuration. In the sample program only
one EL7041 is integrated. If further terminals are connected you have to add them or re-scan your
configuration.
• You have to adjust the MAC address. To do this, click on your EtherCAT device, then select the
Adapter tab and click on Search after the MAC address (see Fig. Selecting the MAC address). Select
the right adapter.
EP704171Version: 2.3
Commissioning/Configuration
Fig.74: Selecting the MAC address
• In the PLC configuration you have to adjust the path for the PLC program. Click on the appended PLC
program and select the tab IEC1131 (see Fig. Changing the PLC path). Select Change and enter the
correct path.
Fig.75: Changing the PLC path
• Under NC configuration an EL7041 is already linked to the NC. To change the link or add additional
devices proceed as described under "Integration into the NC configuration".
The PLC program is configured as follows. The libraries TcMC.lib and TcNC.libmust be integrated (see Fig.
Required libraries).
EP704172Version: 2.3
Commissioning/Configuration
Fig.76: Required libraries
Once this is done, certain global variables are declared (see Fig. Global variables). The data types
PLCTONC_AXLESTRUCT and NCTOPLC_AXLESTRUCT deal with the communication between the PLC
and the NC.
Fig.77: Global variables
Once the global variables have been declared, programming can commence. Start with declaring local
variables (see Fig. Local variables).
MC_Direction is an enumeration type that specifies the direction of movement for the MC_MoveVelocity
function block, which in turn initiates continuous travel of the motor.
An axis reset is carried out with the MC_Reset function block. Absolute positioning is carried out with the
MC_MoveAbsolute function block. The current axis position can be read with the MC_ActualPosition function
block.
MC_Power enables the axis; MC_Stop is required for stopping the axis.
Fig.78: Local variables
The program code is as follows (see Fig. Program code):
EP704173Version: 2.3
Commissioning/Configuration
Fig.79: Program code
The motor can then be operated with the aid of the following visualization (see Fig. Visualization).
Press Enable to enable the axis. In "Free run mode" you can now use the Left or Right buttons, and the
motor will run with a speed defined under fbMoveVelocity_Axis_1 in the selected direction. In "Absolute
mode" you can specify a Velocity, Acceleration, Deceleration and the Setpoint Position and initiate the
motion with Start Job. If no values are entered for acceleration and deceleration the default value of the NC
is used.
EP704174Version: 2.3
Commissioning/Configuration
Fig.80: Visualization
Information on function blocks and data types
Further information on the function blocks and data types used can be found in the Beckhoff Information System.
EP704175Version: 2.3
Commissioning/Configuration
4.1.7Restoring the delivery state
To restore the delivery state for backup objects in ELxxxx terminals / EPxxxx- and EPPxxxx boxes, the CoE
object Restore default parameters, SubIndex 001 can be selected in the TwinCAT System Manager (Config
mode).
Fig.81: Selecting the Restore default parameters PDO
Double-click on SubIndex 001 to enter the Set Value dialog. Enter the value 1684107116 in field Dec or the
value 0x64616F6C in field Hex and confirm with OK.
All backup objects are reset to the delivery state.
Fig.82: Entering a restore value in the Set Value dialog
Alternative restore value
In some older terminals / boxes the backup objects can be switched with an alternative restore
value:
Decimal value: 1819238756
Hexadecimal value: 0x6C6F6164
An incorrect entry for the restore value has no effect.
Applies to EP7041-0002 [}12], EP7041-1002 [}12] and EP7041-2002 [}13].
EtherCAT XML Device Description
The display matches that of the CoE objects from the EtherCAT XML Device Description. We recommend downloading the latest XML file from the download area of the Beckhoff website and installing it according to installation instructions.
Parameterization via the CoE list (CAN over EtherCAT)
The EtherCAT device is parameterized via the CoE - Online tab [}40] (double-click on the respective object) or via the Process Data [}37] tab (allocation of PDOs).
Introduction
The CoE overview contains objects for different intended applications:
• Objects required for parameterization during commissioning [}78]
• Objects for indicating internal settings [}83] (may be fixed)
• Further profile-specific objects [}95] indicating inputs, outputs and status information
The following section first describes the objects required for normal operation, followed by a complete
overview of missing objects.
EP704177Version: 2.3
Commissioning/Configuration
4.2.1.1Objects for commissioning
Index 1011 Restore default parameters
Index (hex) NameMeaningData typeFlagsDefault
1011:0Restore default pa-
rameters
1011:01SubIndex 001If this object is set to "0x64616F6C" in the set value dia-