–IPC as gateway - parameter setting & configuration
Systems«
DMS 3.1 EN 01/2011 TD17L7
Control technology | EtherCAT communication manual
About this documentation
Further technical documentations for Lenze components
More information about Lenze components that can be used together with "PC-based
automation" can be found in the following documents:
Mounting & wiringLegend:
MAs for Inverter Drives 8400 Printed documentation
MAs for Servo Drives 9400 Online help/PDF
MA EPM-Txxx (I/O system IP20)Abbreviations used:
MA EPM-Sxxx (I/O system 1000)SHB System Manual
MA 8200 vectorBA Operating Instructions
Wiring according to EMC, 8200 vectorMA Mounting Instructions
MAs for the ECS servo systemSW Software manual
MA communication card MC-CAN2KHB Communication manual
MA communication card MC-ETC
MA communication card MC-ETH
MA communication card MC-PBM
MA communication card MC-PBS
MA communication card MC-MPI
MAs for communication modules
Parameter setting, configuration, commissioning
SW Inverter Drive 8400
BaseLine / StateLine / HighLine / TopLine
SW Servo Drive 9400 HighLine / PLC
Commissioning guide 9400 HighLine
SHB I/O system IP20 (EPM-Txxx)
SHB I/O system 1000 (EPM-Sxxx)
SHB 8200 vector
BAs for the ECS servo system
KHBs for communication modules
Programming
SW 9400 function library
Creating a network
KHBs for communication modules
Tip!
Manuals and software updates for Lenze products can be found in the download
area at:
http://ww.Lenze.com
8LDMS 3.1 EN 01/2011 TD17
Target group
This documentation is intended for all persons who plan, install, commission and maintain
the networking of devices in the field of control technology.
1.1Document history
Material no.VersionDescription
-1.009/2008TD11
132962532.005/2009TD17 General revision
133173353.010/2009TD17 General revision
133694063.101/2011TD17 • General updates
Your opinion is important to us!
Control technology | EtherCAT communication manual
About this documentation
Document history
First edition
TD17
• Information on control technology release 2.5 has been added.
These instructions were created to the best of our knowledge and belief to give you the
best possible support for handling our product.
If you have suggestions for improvement, please e-mail us to:
feedback-docu@Lenze.de
Thank you for your support.
Your Lenze documentation team
DMS 3.1 EN 01/2011 TD17L9
Control technology | EtherCAT communication manual
About this documentation
Conventions used
1.2Conventions used
This documentation uses the following conventions to distinguish between different types
of information:
Type of informationWritingExamples/notes
Spelling of numbers
Decimal separatorPointThe decimal point is always used.
For example: 1234.56
Text
Version informationBlue text colourAll information valid for or from a certain software
Program name» «The Lenze PC software »Engineer«...
WindowItalicsThe Message window... / The Options dialog box...
Variable identifierBy setting bEnable to TRUE...
Control elementBoldThe OK button... / the Copy command... / the
Sequence of menu
commands
Shortcut<Bold>Use <F1> to open the online help.
Program codeCourier
KeywordCourier bold
version, is indicated accordingly in this
documentation.
Example: This function extension is available from
software version V3.0!
Characteristics tab... / the Name input field...
If the execution of a function requires several
commands in a row, the individual commands are
separated by an arrow: Select File
If a key combination is required for a command, a "+"
is placed between the key identifiers: With
<Shift>+<ESC>...
IF var1 < var2 THEN
a = a + 1
END IF
Open to ...
HyperlinkUnderlined
Symbols
Page reference ( 10)Optically highlighted reference to another page. It is
Step-by-step instructions
Optically highlighted reference to another topic. It is
activated with a mouse-click in this documentation.
activated with a mouse-click in this documentation.
Step-by-step instructions are indicated by a
pictograph.
10LDMS 3.1 EN 01/2011 TD17
1.3Terminology used
TermMeaning
»Engineer«Lenze engineering tools supporting you during the entire life cycle of a machine
»EtherCAT Configurator«
»Global Drive Control« (GDC)
»PLC Designer«
Code"Container" for one or several parameters used for Lenze Servo Drives parameter
SubcodeIf a code contains several parameters, they are stored in "subcodes".
MCFMaster configuration file (XML file for EtherCAT bus configuration)
SoEServo drive profile over EtherCAT
FBFunction block (contained in a function library)
FUNFunction (contained in a function library)
Control technology | EtherCAT communication manual
About this documentation
Terminology used
- from the planning phase to maintenance.
setting or monitoring.
In the documentation the diagonal slash "/" is used as a separator between the
designation of the code and subcode (e.g. "C00118/3").
DMS 3.1 EN 01/2011 TD17L11
Control technology | EtherCAT communication manual
About this documentation
Notes used
1.4Notes used
The following signal words and symbols are used in this documentation to indicate
dangers and important information:
Safety instructions
Structure of safety instructions:
Pictograph and signal word!
(characterises the type and severity of danger)
Note
(describes the danger and gives information about how to prevent dangerous
situations)
PictographSignal wordMeaning
Danger!Danger of personal injuries through dangerous electrical voltage
Danger!Danger of personal injury through a general source of danger
Application notes
PictographSignal wordMeaning
Stop!Danger of property damage
Note!Important note for trouble-free operation
Reference to an imminent danger that may result in death or serious
personal injury if the corresponding measures are not taken.
Reference to an imminent danger that may result in death or serious
personal injury if the corresponding measures are not taken.
Reference to a possible danger that may result in property damage if the
corresponding measures are not taken.
Tip!Useful tip for easy handling
Reference to another documentation
12LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
2Safety instructions
Please observe the following safety instructions when you want to commission a controller
or system using an industrial PC.
Read the documentation supplied with the system components thoroughly
before starting to commission the devices and the industrial PC!
The System Manual contains safety instructions which must be observed!
Danger!
According to our present level of knowledge it is not possible to ensure the
absolute freedom from errors of a software.
If necessary, systems with built-in controllers must be provided with additional
monitoring and protective equipment according to relevant safety regulations
(e.g. law on technical equipment, regulations for the prevention of accidents) so
that an impermissible operating status does not endanger persons or facilities.
Safety instructions
During commissioning persons must keep a safe distance from the motor or the
machine parts driven by the motor. Otherwise there would be a risk of injury by
the moving machine parts.
Stop!
If you change parameters in an engineering tool during an existing online
connection to a device, the changes are directly added to the device!
A wrong parameter setting can cause unpredictable motor movements. By
unintentional direction of rotation, too high speed or jerky operation, the driven
machine parts may be damaged!
DMS 3.1 EN 01/2011 TD17L13
Control technology | EtherCAT communication manual
The "PC-based automation" system
3The "PC-based automation" system
Industrial PCs (IPCs) are increasingly finding their way into automation technology. With
their scaling characteristics and the possible combination of visualisation and control in
one device, industrial PCs offer clear advantages for many applications.
Lenze industrial PCs are available with the following software equipments:
Industrial PC as component (optional with operating system) without any further
software
Industrial PC as visualisation system
Industrial PC as control and visualisation system
The "PC-based automation" system allows the central control of Logic and Motion systems.
For this purpose, Lenze provides coordinated system components:
Industrial PCs as control and visualisation system
– The IPC is the central component of the PC-based automation which control the
Logic and Motion functionalities by means of the runtime software.
– The IPC communicates with the field devices via the fieldbus.
– The IPCs are available in different designs.
Note!
Moreover, the HMI series EL 1xx PLC belongs to the "PC based automation"
system. These devices differ considerably from the industrial PCs in performance
and various other details. However the devices of the HMI series EL 1xx PLC are
able to fulfil smaller control functions.
14LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
The "PC-based automation" system
Engineering tools for the Engineering PC
– The Engineering PC communicates with the IPC via Ethernet.
– The different engineering tools are used to configure and parameterise the system.
Fieldbuses
Field devices
DMS 3.1 EN 01/2011 TD17L15
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Brief description of EtherCAT
4The Lenze control system with EtherCAT
Note!
For industrial PCs of the EL 1xx, EL x8xx, CS x8xx and CPC x8xx series in control
technology release 2.5, EtherCAT is not supported.
This chapter provides basic information about ...
the EtherCAT bus system;
the structure of the Lenze control system with the EtherCAT bus system;
the Lenze engineering tools required for commissioning.
the interaction of the components.
4.1Brief description of EtherCAT
Tip!
More detailed information about EtherCAT can be found on the Internet website of
the EtherCAT Technology Group under:
www.EtherCAT.org
4.1.1Features
EtherCAT is a high-performance bus system based on Ethernet.
Thanks to the integrated synchronisation mechanisms via "distributed clocks",
EtherCAT provides a higher bandwidth compared to CANopen:
– This enables motion and logic applications to be operated by the same bus.
– The number of the nodes to be controlled is higher.
– The maximally possible bus length is longer.
EtherCAT can access all field devices via a common interface. Therefore, a division into
Logic fieldbus and MotionBus is not required.
( 36)
16LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
4.1.2Structure of the EtherCAT bus system
Basic structure
The Lenze control system with EtherCAT
Brief description of EtherCAT
Physical structure
An EtherCAT master can communicate with one or more nodes ("slaves").
Internally, the EtherCAT bus has a ring topology. Since Ethernet cables are provided
with a going and a return conductor within one cable, for the installer the topology
seems to be a line. The last slave closes the ring.
Switches, hubs or other infrastructure components known from the Ethernet standard
must not be used because they impair the real-time performance.
DMS 3.1 EN 01/2011 TD17L17
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Brief description of EtherCAT
4.1.3Communication
Compared with the conventional Ethernet, the collision-free transfer of telegrams on the
bus makes EtherCAT a real-time capable bus system.
Communication is always initiated by the EtherCAT master, i.e. the industrial PC. A
telegram sent by the master passes through all EtherCAT slaves. The last slave of the
communication chain sends the telegram back to the EtherCAT master. On the way back,
the telegram is directly sent to the EtherCAT master, without being processed in the slaves.
With EtherCAT, telegram processing completely takes place on the hardware level. The
slaves take the data intended for them from the Ethernet frame and write their data back
to the Ethernet frame. Every datagram can be passed on with a minimum delay.
18LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
4.1.3.1The EtherCAT state machine
Before communication via EtherCAT is possible, the bus runs through the EtherCAT state
machine during power-up. The following illustration shows the possible state change from
an EtherCAT slave's point of view:
The Lenze control system with EtherCAT
Brief description of EtherCAT
Init
Pre-Operational
Safe-Operational
Operational
StatusDescription
Init • Initialisation phase
• No SDO/PDO communication with the slaves
• Device can be detected by fieldbus scan
Pre-Operational • The fieldbus is active.
• SDO communication (mailbox communication) is possible.
• No PDO communication
Safe-Operational • SDO communication (mailbox communication) is possible.
• PDO communication:
–The input data is transmitted to the master and evaluated.
–The output data have the "Safe" state. It is not forwarded to the basic device.
Operational • Normal operation
–SDO communication
–PDO communication
–Fieldbus synchronisation has been successful (if used)
Note!
• Scanning of the EtherCAT fieldbus is possible in all states:
Determining the physical EtherCAT configuration (fieldbus scan)
• SDO communication via the EtherCAT fieldbus is only possible when at least
the Pre-Operational state has been reached.
E94AYCET009
( 47)
DMS 3.1 EN 01/2011 TD17L19
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Brief description of EtherCAT
4.1.3.2Addressing of the slaves
The EtherCAT system uses two types of addressing for the slaves:
Auto-increment addressing
Fixed-address addressing
The auto-increment addressing is used by the master during the initialisation phase of the
fieldbus. When the Pre-Operational state has been reached, the master uses the FixedAddress addressing.
Auto-increment addressing
The auto-increment addressing is based on the bus topology. Each slave can be addressed
by means of its physical position within the fieldbus.
The master transmits a telegram to the slave address. Each slave increments the address
during the telegram cycle. A slave to which a telegram is addressed recognises the
telegram by means of the address 0.
A configuration example is given under:
Determining the physical EtherCAT configuration (fieldbus scan)
Fixed-address addressing
With the fixed-address addressing, the slaves are addressed via the station address
distributed by the master in the start-up phase.
In the EtherCAT bus topology in the »PLC Designer«, the first slave gets the address 1001,
the second slave the address 1002, etc. The EtherCAT addresses cannot be changed.
The EtherCAT address of the master is 0. Master objects with this address can also be
accessed via CoE.
Example
The first slave of a configuration obtains the following addresses:
0 by the auto-increment mode
( 47)
1001 by the fixed addressing mode (default address of the first slave in the »EtherCAT
Configurator«).
20LDMS 3.1 EN 01/2011 TD17
4.1.3.3Working counter
Each EtherCAT datagram contains a working counter (WKC) which is incremented by each
slave after the data have been processed successfully.
In every cycle, the control unit compares the expected value of the working counter with
the value read back via the fieldbus. If the read-back value is lower than the expected value,
the telegram has not reached all addressed slaves. The control unit recognises this and
signals an error.
The working counter (WKC) can be used as a diagnostics option to check the processing of
the EtherCAT telegrams by the slaves.
Example
10 slaves read/write process data in the Operational status
Expected value of the WKC: 10
A cable break between the 8th and 9th slave causes the master to be unable to access
slave 9 and slave 10:
– Value of the restored WKC: 8
– An error response is initiated in the control.
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Brief description of EtherCAT
DMS 3.1 EN 01/2011 TD17L21
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required hardware components
4.2Required hardware components
4.2.1The industrial PC - the central component
The industrial PC is the central component in the EtherCAT bus system:
The industrial PC is the EtherCAT master.
The industrial PC acts as EtherCAT gateway to be able to access the field devices from
the engineering PC via Ethernet and EtherCAT.
The devices must be connected in a line. To ensure that the system operates properly,
the physical arrangement of the EtherCAT field devices must comply with the bus
topology created in the »EtherCAT Configurator«.
Each EtherCAT slave has two EtherCAT ports.
– In contrast to Ethernet, one port is assigned as input, the other one as output.
– Input (IN) and output (OUT) must not be reversed!
A bus termination at the last slave is not required since the bus system at the last slave
is terminated automatically.
22LDMS 3.1 EN 01/2011 TD17
4.2.2Field devices
The Lenze control system supports the following EtherCAT-capable logic and motion
components:
Field devicesEtherCAT bus
Industrial PCsEL x1xx PLCz-
Servo Drives 9400 1)HighLinez
Inverter Drives 8400 2)BaseLinez
I/O system 1000EPM-Sxxxz
ECS servo system 3)ECSxEz
1) With EtherCAT E94AYCET communication module
2) With EtherCAT E84AYCET communication module
3) With EtherCAT EMF2192IB communication module
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required hardware components
LogicMotion
EL x7xxzz
CS x7xxzz
CPC x7xxzz
Highline with CiA402zz
PLCz
StateLinez
HighLinez
TopLinez
ECSxS (Speed & Torque)z
ECSxP (Posi & Shaft)z
ECSxM (Motion)z
ECSxA (Application)z
Field devices of other manufacturers can be integrated as logic nodes if they provide a
standard-compliant EtherCAT device description.
DMS 3.1 EN 01/2011 TD17L23
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required hardware components
4.2.3EtherCAT product codes
The product codes serve to assign device descriptions to the corresponding devices. Device
descriptions can be installed via the device repository.
Importing missing field devices
The product codes are part of the device ID.
Structure of the device ID: <Manufacturer ID>_<Productcode><Revision number
IdentificationMeaning
Manufacturer IDClear identification for the manufacturer, for Lenze devices: 0x3B
Product codeProduct code of the product range/the device
Revision numberRevision number, consists of Major Revision (CANopen behaviour) and
If, for instance, a device available at the fieldbus witout an installed device description is
detected during a Fieldbus scan with the »EtherCAT Configurator«
the device ID as hexidecimal value is displayed.
( 59)
Minor Revision (device version)
(59
hex
dec
( 47) , a message with
)
In the example, the device description for a Lenze Servo Drive 9400 HighLine, actuator –
speed, is not installed (0x38079CD9
= 940023001
hex
dec
).
Product codes for Servo Drives 9400
Product code [dec]Meaning
9 4 0 0 2 1 x x xServo Drive 9400 in general
9 4 0 0 2 2 x x xServo Drive 9400 StateLine
9 4 0 0 2 3 x x xServo Drive 9400 HighLine
9 4 0 0 2 4 x x xServo Drive 9400 TopLine
9 4 0 0 2 5 x x xServo Drive 9400 PLC
9 4 0 0 2 6 x x xServo Drive 9400 V/R (regenerative power supply module)
Applications:
0 0 0 Empty application
0 0 1 Actuating drive speed
0 0 2 Actuating drive torque
0 0 3 Electronic gearbox
0 0 4 Synchronism with mark synchronisation
0 0 5 Table positioning
0 0 6 Positioning sequence control
0 0 7 PLC application
000
89Reserved
...
...
9
Reserved
1 x x Reserved for device profiles
1 0 1 CiA402
2 x x Reserved for Lenze applications
2 0 1 Regenerative power supply module application
24LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required hardware components
4.2.4EtherCAT hardware for the industrial PC
MC-ETC communication card
The MC-ETC communication card is a plug-in card for connecting an industrial PC to an
EtherCAT network.
Note!
In case of a correct connection to the field devices, the LEDs of the
communication card are lit.
Connection RJ45 socket / LEDs
( 34)
A Front panel
B Board
C Coding
D Connection
E EtherCAT connection
Connection RJ45 socket / LEDs
( 34)
MC-ETC-001
Technical data of the
MC-ETC communication card ( 34)
26LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required hardware components
Possible applications
Note!
The industrial PC only supports one communication card MC-ETC!
Industrial PCCan be combined with CANopenCommunication card for CANopen
EL x7xxyesMC-CAN2
CS x7xxno
CPC 2700yesMC-CAN2
Example: Industrial PC EL x7xx with MC-ETC
Legend
EL x7xxIndustrial PC of the EL x7xx series
ETC1EtherCAT network connection
MC-ETCMC-ETC communication card
MC-ETC_ELx7xx
DMS 3.1 EN 01/2011 TD17L27
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required engineering tools
4.3Required engineering tools
The engineering tools required for configuration and parameter setting are installed on
the engineering PC.
»Engineer«, »EtherCAT Configurator« and »PLC Designer« are engineering PC tools
which are independent of each other.
The EtherCAT bus, the industrial PC and the EtherCAT-capable field devices are
configured with the engineering tools highlighted in grey.
28LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Required engineering tools
Brief description of the engineering tools
L-force »Engineer«
With the »Engineer«, you can ...
parameterise, configure and diagnose ...
– Servo Drives 9400;
– Inverter Drives 8400;
– the I/O system 1000.
access the supported field devices via the gateway function of the industrial PC.
»Global Drive Control« ((GDC))
With (GDC) you can ...
parameterise, configure and diagnose controllers which are not supported by the
»Engineer« (e.g. devices of the ECS servo system).
access the supported field devices via the gateway function of the industrial PC (not
with PROFIBUS).
L-force »PLC Designer«
The »PLC Designer« is needed to ...
create the control program for the industrial PC;
transfer the PLC projects to the industrial PC.
DMS 3.1 EN 01/2011 TD17L29
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Interaction of the components
4.4Interaction of the components
4.4.1The state machine of the Lenze control technology
In the Lenze control technology, the states of the PLC and the EtherCAT fieldbuses are
coupled. The PLC controls the fieldbus.
After switch-on the system automatically powers up if the following conditions are
fulfilled:
The IPC is provided with the configuration file for the EtherCAT master (master-XML
file), the contents of which corresponds to the real bus topology.
The IPC is provided with an executable PLC boot project.
The slaves at the fieldbus can be accessed.
The following illustration shows the linkage of the states in the state machine of the Lenze
control technology when the conditions for the automatic acceleration of the system are
fulfilled (boot project with EtherCAT BusInterface and EtherCAT master configuration):
Switch on industrial PC and field devices
PLC:Original
EtherCAT:Unknown
PLC:Original
EtherCAT:Init
PLC:Original
EtherCAT: Pre-Operational
PLC:Running
EtherCAT: Safe-Operational
PLC:Running
EtherCAT:Operational
Legend
Transitional state, automatic change to next state
Stationary state, change to next state by external actions
PLCState of the PLC
EtherCATState of the EtherCAT fieldbus
30LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Interaction of the components
Explanation of the transitions during system start
While a state is passed through, different tests are carried out (e.g. it is tested whether the
physical topology complies with the configuration). If the tests are successful, the system
automatically changes to the next state.
StatusWhat happens?What is tested?
PLCEtherCAT
OriginUnknownThe system starts.Is a master XML file available?
OriginInitEtherCAT is initialised.
Master XML file is imported.
Bus scan is executed
OriginPre-OperationalEtherCAT is active.
SDO communication is possible.
RunningSafe-Operational The PLC program is being loaded.
The PLC is running.
The inputs are transferred, the
outputs are still in a safe state.
RunningOperationalThe system is running.
Does the imported master XML
comply with the result of the bus
scan?
Is an executable boot project
available?
Are all inputs ok and initialised?
Detailed information about the possible bus states and the required commissioning steps
can be found here:
Commissioning of the system
( 42)
DMS 3.1 EN 01/2011 TD17L31
Control technology | EtherCAT communication manual
The Lenze control system with EtherCAT
Interaction of the components
4.4.2Communication between engineering PC and field devices
For commissioning of the field devices, an online connection is required between the
engineering PC and the corresponding field device. Depending on the state of the EtherCAT
bus, there are two options:
EtherCAT bus not in operation
EtherCAT bus in operation (gateway function) ( 33)
4.4.2.1EtherCAT bus not in operation
You can communicate serially or via CANopen.
Condition:
Serial communication:
– You require the E94AZCUS diagnostic adapter.
– Field device and engineering PC (USB interface) must be connected via the diagnostic
adapter.
Communication via CANopen
– You required the EMF2177IB USB system bus adapter .
– Field devices and the engineering PC are connected via the system bus adapter -
either via a point-to-point connection or via the bus system.
Advantage:
Quick option of communication without commissioning of the EtherCAT bus.
( 32)
Disadvantage:
You require additional hardware.
Tip!
As soon as the fieldbus has been commissioned and at least achieved the PreOperational state, this communication path comes second. We recommend to
commission the EtherCAT bus as soon as possible to be able to use the gateway
function.
32LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
4.4.2.2EtherCAT bus in operation (gateway function)
You directly communicate via EtherCAT and use the industrial PC as gateway.
Note!
A PLC program does not need to run to be able to use the gateway function.
The Lenze control system with EtherCAT
Interaction of the components
Condition
The bus configuration has been created using the »PLC Designer« and corresponds to
the hardware configuration.
The bus configuration has been loaded onto the industrial PC using the »PLC Designer«
and is active.
The fieldbus state is at least Pre-Operational.
Advantage:
You do not require any additional hardware.
The entire communication (process data, parameter data, and diagnostic data) are
transferred at the same time using a single bus connection.
DMS 3.1 EN 01/2011 TD17L33
Control technology | EtherCAT communication manual
Technical data
General data of the EtherCAT bus
5Technical data
5.1General data of the EtherCAT bus
FieldValues
Communication mediumS/FTP (Screened Foiled Twisted Pair, ISO/IEC 11801 or EN 50173), CAT5e
Network topologyLine
Number of nodesMax. 65535 ( in the entire network )
Max. cable length100 m between two nodes
Baud rate100 Mbit/s
EtherCAT moduleDirect mode
Communication profileCoE (CANopen over EtherCAT)
SynchronisationDistributed clocks
5.2MC-ETC communication card
FieldValues
Possible baud rate100 Mbit/s
Type within the networkMaster
ConnectionRJ45 socket in accordance with EN 50173
Connection RJ45 socket / LEDs
ViewDescriptionCable type
Pin assignment
RJ45 socketPinAssignment
1
MC-ETH-001
E94YCEP018
EtherCAT connection
•LED "Link":
–On: connection ok
–Blinking: data exchange
• LED "Speed":
–Green: 100 MBit/s
1Tx +
2Tx -
3Rx +
4-
5-
6Rx -
7-
8-
•CAT5e S/FTP network cable
(recommended) in accordance
with ISO/IEC 11801 or EN 50173
• Cable length: max. 100 m
34LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
5.3Communication times and drive-specific data
FieldValues
User data per frame1344 bytes
Process data words (PZD) for Servo
Drives 9400 HighLine
Parameter data (SDO) transferMax. 128 bytes
Permissible EtherCAT cycle times1 … 10 ms
Max. number of Servo Drives 9400
HighLine per frame
Total signal runtime for a cycle time
of 1ms
Drive
Control Drive
Runtime of the setpoints
Control
Drive
Runtime of the actual values
Drive
Control
Cross communicationNot possible
Cycle synchronisation with locked
PLL (jitter)
max. 32 words (64 bytes)
User data of the frame (1344 bytes) divided by the process data length
resulting from setpoints and actual values of the drives:
Control technology | EtherCAT communication manual
Synchronisation with "Distributed clocks"
6Synchronisation with "Distributed clocks"
The "Distributed clocks" (DC) function enables an exact time adjustment for applications
where several auxiliary axes carry out a coordinated movement at the same time. The data
is accepted synchronously with the PLC program. With the DC synchronisation, all slaves
are synchronised with a reference clock, called the "DC master".
Note!
• Motion applications always require DC synchronisation.
• DC synchronisation can also be used for Logic applications.
• Some slaves do not support the DC functionality.
– To be able to use the DC function, the first slave connected to the EtherCAT
master (IPC) must be DC-master-capable.
– In the arrangement of the slaves following then, DC-capable and non-DC-
capable devices can be mixed.
• The first EtherCAT node connected to the IPC must
provides the other EtherCAT nodes (including the IPC) with the exact time.
be the DC master which
The settings for the DC synchronisation are made with the »EtherCAT Configurator«.
Adjusting task cycle time and DC cycle time
( 38)
Setting the DC synchronisation with the »EtherCAT Configurator« ( 39)
36LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
6.1Synchronous communication
The DC synchronisation provides for a phase-synchronous operation of master and slaves:
Within one bus cycle the setpoints are accepted and the actual values are detected in the
fieldbus at exactly the same time.
If the control (IPC) is synchronous to the distributed clocks, the data (actual values)
collected by the slave are assigned to the master at the end of the bus cycle and data from
the master (setpoints) are sent to the slaves for processing.
When the next DC synchronisation event occurs, the data are accepted.
Note!
State change and DC synchronisation for Servo Drives 9400 HighLine
During the state change from Operational to Pre-Operational, the DC
synchronisation is deactivated (C13883/C14883 = 0).
Synchronisation with "Distributed clocks"
Synchronous communication
In order to re-activate the sync pulses adjust your PLC program in the following
way:
• Call the function block ResetAxisGroup.
– In this way, the EtherCAT fieldbus is reinitialised.
– The DC synchronisation is active again (C13883/C14883 = 1).
DMS 3.1 EN 01/2011 TD17L37
Control technology | EtherCAT communication manual
Synchronisation with "Distributed clocks"
Adjusting task cycle time and DC cycle time
6.2Adjusting task cycle time and DC cycle time
The industrial PC is the fieldbus master in the EtherCAT network. The clock pulse of the
EtherCAT bus system is determined by the cycle time of the task which is assigned to the
drives (slaves) in the »PLC Designer«.
The task settings in the »PLC Designer« only support integer millisecond cycles and the
smallest possible bus cycle is 1 millisecond. This cycle time can be defined via the taskconfiguration of the »PLC Designer«.
Note!
• The DC cycle time to be set in the »EtherCAT Configurator« must comply with
EtherCAT task cycle time set in the »PLC Designer«.
• Select the cycle times, according to the technical data, between 1 and 10 ms.
38LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Synchronisation with "Distributed clocks"
Setting the DC synchronisation with the »EtherCAT Configurator«
6.3Setting the DC synchronisation with the »EtherCAT Configurator«
Note!
The manual configuration of the slave DC features requires a detailed
knowledge of EtherCAT and the field device. Thus, DC settings should only be
made by experts.
A faulty configuration can cause maloperation and negative influences on the
system.
How to set the DC synchronisation:
1. Set the Distributed clocks (DC) cycle time at the EtherCAT Master:
• The DC cycle time to be set in the »EtherCAT Configurator« must comply with
the EtherCAT task cycle time set in the »PLC Designer«.
• Select the cycle times, according to the technical data, between 1 and 10 ms.
• The (basic) cycle time set here is valid for all Logic and Motion nodes
synchronised by distributed clocks.
• For field devices with communication modules (e.g. Servo Drives 9400 or
Inverter Drives 8400), a synchronisation source must be selected via code
C01120. If the DC setting and the selection of the sync source differ from each
other (C01120 = MXI1 and "DC nused"), the devices cannot be set to the
Operational state.
•For Servo Drives 9400, code C13892/C14892 = 1 must be set (process data
mode = "deterministic mode").
DMS 3.1 EN 01/2011 TD17L39
Control technology | EtherCAT communication manual
Synchronisation with "Distributed clocks"
Setting the DC synchronisation with the »EtherCAT Configurator«
2. Activate the DC functionality for the first slave (DC master) connected to the bus
master (select "DC for synchronization"):
3. Also activate the DC functionality (select "DC for synchronization") for all other
slave devices which are to use the DC synchronisation.
Note!
Maintain all other basic DC settings for the slaves to ensure a correct DC
synchronisation.
40LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
6.4Check of the DC synchronicity
The DC synchronicity can only be checked in the Operational bus state.
Synchronisation with "Distributed clocks"
Check of the DC synchronicity
You can check the DC synchronicity via the "ECAT DC: Status" parameter (code C1082/1
C1582/1
bEC_NOTIFY_DC_SLV_SYNC.
) or via the Notifications ( 120) bEC_NOTIFY_DC_STATUS and
/
DMS 3.1 EN 01/2011 TD17L41
Control technology | EtherCAT communication manual
Commissioning of the system
7Commissioning of the system
This chapter provides information about how to commission the Lenze control system
with EtherCAT.
Commissioning of the system requires the following Lenze engineering tools:
»EtherCAT Configurator«
»PLC Designer«
»Engineer«
An overview of the commissioning steps is given in the next section Overview of
commissioning steps ( 43). Follow the instructions of these sections step by step in order
to commission your system.
At the end of this chapter you will find a chart showing a Detailed overview of the
commissioning steps ( 90) with regard to the different Lenze engineering tools.
42LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.1Overview of commissioning steps
Commissioning of the system
Overview of commissioning steps
DMS 3.1 EN 01/2011 TD17L43
Control technology | EtherCAT communication manual
Commissioning of the system
Overview of commissioning steps
The main commissioning steps are listed in the following table:
StepActivitySoftware used
1.Installing field devices
2.Creating a project folder
3.Fieldbus scan with the »EtherCAT Configurator«
Fieldbus scan with the »scandf« command line tool
4.Inserting devices available on the fieldbus into the »EtherCAT
Configurator« project ( 55)
Creating the configuration in the »EtherCAT Configurator«
5.Export of EtherCAT configuration
6.Configuration in the »Engineer«
8.Configuration in the »PLC Designer«
9.Loading the control configuration onto the IPC
10.Loading the master configuration onto the EtherCAT master
11.Loading and starting the PLC program
( 45)
( 46)
( 47)»EtherCAT Configurator«
( 51)Command line tool »scandf«
( 56)
( 67)»EtherCAT Configurator«
( 54)»Engineer«
( 68)»PLC Designer«
( 78)»PLC Designer«
( 79)»PLC Designer«
( 79)»PLC Designer«
»EtherCAT Configurator«
44LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2Detailed commissioning steps
In the following sections, the individual commissioning steps are described.
More detailed information about how to work with the Lenze engineering tools
can be found in the corresponding manuals and online helps.
7.2.1Planning the bus topology
Before you start to set up an EtherCAT network, first create a plan of your EtherCAT bus.
Brief description of EtherCAT
How to plan the bus topology for your configuration:
1. Create an overview of the planned EtherCAT network with all field devices to be
integrated.
Commissioning of the system
Detailed commissioning steps
( 16)
2. Start with the industrial PC.
3. Add the other field devices below.
4. You have to distinguish between the following two cases:
• Operation without synchronisation via distributed clocks:
DC synchronisation is not required if exclusively Logic field devices are to be
operated on the network. The sequence of the field device interface connections
on the bus can freely be selected.
• Operation with synchronisation via distributed clocks:
DC synchronisation is required if Motion and Logic field devices are to be
operated on the network. The first node connected to the control IPC must be
capable of being a DC master. The sequence of the other Logic and Motion field
device interface connections can freely be selected.
7.2.2Installing field devices
For the installation of a field device, follow the mounting instructions for the respective
device.
Note!
• The EtherCAT interfaces of all devices must be wired according to the planned
topology. The inputs (IN) and outputs (OUT) must not be reversed because
otherwise the topology changes.
Communication
• The structure of the EtherCAT configuration must be identical with the order
of the devices in the »EtherCAT Configurator«.
• The master automatically assigns the node addresses to the slaves.
Therefore, a manual address assignment is not required.
DMS 3.1 EN 01/2011 TD17L45
( 18).
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.3Creating a project folder
Create a project folder on the engineering PC.
Use this project folder to store the below data generated in the different project
configuration steps:
The project file created in the »EtherCAT Configurator«
The configuration files exported from the »EtherCAT Configurator«:
– ECAT_PLC_CFG_1.XML
– ECAT_MASTER_1.XML
The project data created in the »Engineer«
The project file created in the »PLC Designer«
Tip!
Create a separate project folder for every EtherCAT configuration and store the
project and configuration files in this folder.
46LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.4Determining the physical EtherCAT configuration (fieldbus scan)
You can execute a fieldbus scan with the »EtherCAT Configurator« on the IPC in order to
check the physical EtherCAT configuration. Alternatively, the command line tool »scandf«
( 51) is also available on the IPC.
Note!
• Scanning of the EtherCAT fieldbus is also possible without an appropriate
EtherCAT configuration.
• Communication to field devices via the EtherCAT fieldbus is only possible if at
least the Pre-Operational state has been reached.
7.2.4.1Fieldbus scan with the »EtherCAT Configurator«
The »EtherCAT Configurator« offers the possibility to execute an online search for devices
which are connected to the EtherCAT fieldbus.
In order to search for devices you must first establish an online connection of the
»EtherCAT Configurator« with the industrial PC.
How to execute a fieldbus scan with the »EtherCAT Configurator«:
1. Enter the IP address of the industrial PC:
• Select the L-force Controller by double-clicking in the device tree:
• Enter the IP address of the industrial PC which should serve as control unit of the
configuration into the Online access configuration dialog box in the Master configuration area:
DMS 3.1 EN 01/2011 TD17L47
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
2. Execute the Login command in the context menu of the L-force Controller:
After a successful login, the L-force Controller (the industrial PC) is connected to the
engineering PC:
3. After a successful login, execute the Start Search command in the context menu of
the L-force Controller :
48LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
The »EtherCAT Configurator« determines the EtherCAT nodes available at the
fieldbus. In the Start Search dialog box, the devices are listed according to the
physical order at the fieldbus:
Further information on the Start Search dialog box can be found here:
Inserting devices available on the fieldbus into the »EtherCAT Configurator«
project ( 55)
DMS 3.1 EN 01/2011 TD17L49
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
Missing device descriptions
If a device available at the fieldbus is not present in the device repository, an error message
within the Start Search dialog box will inform you about it:
The device cannot be interpolated into the project as the corresponding device
description has not been installed.
In order to install the device in the device repository, the corresponding device
description file from the manufacturer is required. The device identification (device ID)
can be helpful to identify the device (see also EtherCAT product codes
( 24)).
Importing missing field devices
( 59)
50LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.4.2Fieldbus scan with the »scandf« command line tool
Fieldbus scanning command
Command: scanfd<interface>/option
The interface for the EtherCAT slaves to be scanned on the fieldbus is called ECAT.
OptionOutput on the console
/iDetermine available interfaces
/tDisplay device information for every network node.
/fDisplay additional device parameters for every device if available.
/nSuppress prompt before execution of the fieldbus scan.
How to carry out a fieldbus scan:
1. Establish a Telnet connection to the IPC.
Commissioning of the system
Detailed commissioning steps
More detailed information is provided in the documentation for the IPC.
2. Call scanfd.exe via the command line box of the IPC to scan the fieldbus.
3. Determine the available interfaces of the IPC:
• Enter scanfd /i.
Output example:
The fieldbus scanner displays the available interfaces:
• ECAT for the EtherCAT-capable field devices,
• CAN1 and CAN2 for the CAN field devices.
DMS 3.1 EN 01/2011 TD17L51
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
4. Determine the field devices physically available at the ECAT
interface:
• scanfd ecat /t /f /n
Output example:
After executing the scanfd.exe file, the console displays the result of the fieldbus
scan. The first output line contains the number (x) of slaves found on the fieldbus:
x devices at interface ´ecat´!
The further output lines provide informationen on each slave:
52LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
Information about the field devices
The individual slaves are generally listed according to the auto-increment addressing
scheme in their physically order.
The first slave connected to the master has the node address 0. The second slave has
the negative node address -1. The other slaves have negative node addresses (-n)
corresponding to their positions on the fieldbus.
InformationFunction
DeviceIDNode address of the slave:
• Display of the auto-increment address.
• The first slave has the node address 0.
VendorName of the manufacturer
ProductCodeProduct designation in hexadecimal format
RevisionNumberVersion number in hexadecimal format
SerialNumberSerial number in hexadecimal format
( 24))
Troubleshooting
If the fieldbus scan does not find any field devices at the selected interface, the following
error message appears:
How to check the physical configuration:
1. Analyse the messages in the Logbook of the IPC
( 142)
2. Check the wiring.
( 140). IPC logbook messages
DMS 3.1 EN 01/2011 TD17L53
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.5Configuration in the »Engineer«
The »Engineer« is used to configure and parameterise the Lenze field devices connected to
the EtherCAT bus.
Note!
PDO mapping settings
The mapping required for a cross communication must be created in the
»EtherCAT Configurator«/»PLC Designer«.
During start-up of the PLC, the complete configuration/PDO mapping is written
into the EtherCAT slaves. Mapping entries, e.g. from the »Engineer«, are not
overwritten.
Executing PDO mapping
Editing the EtherCAT I/O image ( 66)
( 65)
How to configure the drives in the »Engineer«:
1. Create a new »Engineer« project or open an already existing project.
2. Insert the Lenze field devices in the device tree and select the hardware
configuration of the axes.
For Servo Drives 9400:
• Select inverter.
• Select motor.
• Select modules.
3. Assign an application to the field devices and set the drive parameters.
4. Save the »Engineer« project to the project folder.
54LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.6Inserting devices available on the fieldbus into the »EtherCAT Configurator« project
After a Fieldbus scan with the »EtherCAT Configurator«
listed according to their physical order at the fieldbus in the Start Search dialog box:
Here you can...
assign individual unique device names in the Device name column. Observe the
IEC 61131 syntax (no spaces and leading digits in variable names)!
select individual devices in the Device name column and copy them into your
»EtherCAT Configurator« project:
– Activate the Copy into project button.
–The Copy into project button will only appear if one or more devices are selected.
( 47) the EtherCAT nodes are
copy all available devices into your »EtherCAT Configurator« project.
– Activate the Copy all devices into project button.
Note!
We recommend to copy all devices into the project.
After pasting you must check if the order of the devices in the project
corresponds to the physical order in the network.
( 55)
DMS 3.1 EN 01/2011 TD17L55
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.7Creating the configuration in the »EtherCAT Configurator«
The »EtherCAT Configurator« is used to set up the EtherCAT configuration. During this
process, the ECAT_PLC_CFG_1.XML and ECAT_MASTER_1.XML configuration files are
created.
These files...
illustrate the physical structure of the EtherCAT configuration;
contain synchronisation settings, SoftMotion parameter values (only of SoftMotion
nodes) and the variable mapping of the EtherCAT nodes.
At a later time, you have to
import the ECAT_PLC_CFG_1.XML file into the control configuration using the »PLC
Designer«.
write the ECAT_MASTER_1.XML file to the IPC.
Note!
• The order of the EtherCAT slaves in the device tree must correspond to the
physical order of the EtherCAT configuration.
• In order that the system works properly, end terminals must not be used
when setting up the system configuration in the device tree.
• For the integration of external devices, the »EtherCAT Configurator« only
Observe the following conditions before you lay out a topology in the »Engineer«:
SoftMotion operation is only possible with Servo Drives 9400 Highline CiA402.
The »EtherCAT Configurator« supports Lenze EtherCAT slaves and EtherCAT devices of
other manufacturers. The integration of third-party devices requires the respective
manufacturer's device descriptions.
Importing missing field devices
supports device descriptions meeting the standards.
• Select the cycle times, according to the technical data, from 1 ... 10 ms. The
cycle times are carried out by the configurations in the »EtherCAT
Configurator« and »PLC Designer«.
( 59)
56LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.7.1Setting up the EtherCAT configuration in the device tree
Note!
The order of the devices in the »EtherCAT Configurator« must correspond with
the physical structure of the EtherCAT configuration.
How to set up the EtherCAT configuration in the device tree:
1. Create a new project in the »EtherCAT Configurator«:
• Menu command: FileNew Project.
2. Map the physical configuration in the device tree:
• Add the individual field devices to the EtherCAT_Master of the configuration:
Execute the Add Device command of the EtherCAT_Master context menu:
Commissioning of the system
Detailed commissioning steps
DMS 3.1 EN 01/2011 TD17L57
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
3. Select the device in the selection list of the Add Device dialog box:
4. Enter the device name in the Name input field (example: X_axis_vertical),
• Click the Add Device button.
5. Add more slaves of the configuration to the device tree:
• Select the device to which a slave is to be added. Select the Insert Device
command from the device context menu.
• Devices missing in the selection list can be added by importing the
corresponding device description file.
Importing missing field devices
6. Close the dialog box by clicking the Close button.
( 59)
58LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.7.2Importing missing field devices
Additional device descriptions can be installed via the device repository.
The device repository manages the device description files stored locally on the system.
How to import additional device descriptions:
1. Open the device repository with the ToolsDevice Repository menu command:
Commissioning of the system
Detailed commissioning steps
2. Click the Install button.
3. Select the device description file(s) to be imported from the Installed device descriptions dialog box appearing now.
4. Finally, click the Open button to execute the file import command.
• A progress bar indicates the installation process.
DMS 3.1 EN 01/2011 TD17L59
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.7.3Setting up a DC synchronisation
Note!
The manual configuration of the slave DC features requires a detailed
knowledge of EtherCAT and the field device. Thus, DC settings should only be
made by experts.
A faulty configuration can cause maloperation and negative influences on the
system.
Motion applications always require
DC synchronisation can also be used for Logic applications.
To be able to use the DC function, the first slave connected to the EtherCAT master (IPC)
must be DC-master-capable.
The first EtherCAT node connected to the IPC is the DC master which provides the other
bus nodes (including the IPC) with the exact time.
In the arrangement of the slaves following then, DC-capable and non-DC-capable
devices can be mixed.
For field devices with communication modules (e.g. Servo Drives 9400 or Inverter
Drives 8400), a synchronisation source must be selected via code C01120. If the DC
setting and the selection of the sync source differ from each other (C01120 = MXI1 and
"DC nused"), the devices cannot be set to the Operational state.
For Servo Drives 9400, code C13892/C14892 = 1 must be set (process data mode =
"deterministic mode").
DC synchronisation.
60LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
How to set the DC synchronisation:
1. Configure the synchronisation of the EtherCAT slaves via distributed clocks (DC).
• Set the Distributed clocks (DC) cycle time at the EtherCAT Master:
• The DC cycle time to be set in the »EtherCAT Configurator« must be identical to
the EtherCAT task cycle time set in the »PLC Designer«.
• Select the cycle times, according to the technical data, between 1 and 10 ms.
• The (basic) cycle time set here is valid for all Logic and Motion nodes
synchronised by distributed clocks.
DMS 3.1 EN 01/2011 TD17L61
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
2. Activate the DC functionality for the first slave (DC master) connected to the bus
master (select "DC for synchronization"):
3. Also activate the DC functionality (select "DC for synchronization") for all other
slave devices which are to use the DC synchronisation.
Note!
Maintain all other basic DC settings for the slaves to ensure a correct DC
synchronisation.
62LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.7.4Set SoftMotion parameters.
Note!
The SoftMotion Drive: Basic tab is only available for Lenze EtherCAT slaves using
the CiA402 application (SM_Drives).
The settings depend on the application:
Commissioning of the system
Detailed commissioning steps
Input fieldsFunction/description
Axis type and limits
• Virtual modeActivate virtual mode for the configuration to be selected.
• RotarySelect configuration for rotary axis.
• LinearSelect configuration for linear axis.
Modulo settings (only for rotary operation)
• Modulo valueDefine SoftMotion units for rotary operation.
(With the value 360.0, the drive would carry out exactly one mechanical
revolution.)
Software limits (only for linear operation)
• ActivatedActivate software limit switches.
• NegativeDefine value for negative software limit switch.
• PositiveDefine value for positive software limit switch.
Limits for CNC (limits are only effective for CNC operation.)
• VelocityDefine maximum (setpoint) velocity of the axis.
• AccelerationDefine maximum acceleration.
• DecelerationDefine maximum deceleration.
Velocity ramp type
• TrapezoidTrapezium
2
•sin
• ParabolicParabola
• JerkValue for jerk (only for the ramp types "sin
Sine curve
2
" and "parabolic")
A detailed description of the velocity ramp types can be found in the
documentation/online help for the »PLC Designer« (SoftMotion).
DMS 3.1 EN 01/2011 TD17L63
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
Not all parameters required for operating a Motion drive acan be set automatically via the
control.
Set the following parameters for the Servo Drives 9400 HighLine CiA402 manually via the
»Engineer« or the »Global Drive Control«:
Homing mode (C02640, to be set machine-dependent)
Touch-probe interface (to be set machine-dependent)
Control of a holding brake (0x60FB/2 | Brake control)
– Depending on the setting of this parameter, the holding brake is applied for a short
time after the conclusion of the home position path. In order to avoid this, set bit 2
in this parameter (disable stop => does not apply the brake in standstill).
64LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.7.5Executing PDO mapping
Note!
The PDO mapping must only be set for the Servo Drives 9400 HighLine CiA402.
Set the PDO mapping via the process data tab (standard setting for Servo Drives 9400
HighLine CiA402):
Commissioning of the system
Detailed commissioning steps
The settings for the outputs and inputs must be identical.
In order to change the setting, you must first deselect the current setting. After that you
can freely select the wanted setting.
DMS 3.1 EN 01/2011 TD17L65
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.7.6Editing the EtherCAT I/O image
Assign non-ambiguous variable names to the input and output objects according to
IEC 61131 syntax (no blanks and leading digits in the variable name). After the import
of the EtherCAT configuration into the »PLC Designer« control configuration,
corresponding system variables are available for the PLC program.
Note!
• Always use the system variables within the PLC program in order to access the
input and output objects or assign values to them.
• When copying a device in the »EtherCAT Configurator«, you must rename the
variables for the device copy, otherwise there will be a compiler error during
the compilation in the »PLC Designer«.
By double-clicking the corresponding fields, you can make the adjustments:
In the example, variable names have been assigned to the first three output objects.
Moreover, an offset of ’1000’ has been entered for the first output object (%QW...) and the
first input object (%IW...).
The »EtherCAT Configurator« does not work with byte addresses. The objects are
addressed with the byte address in the control configuration:
ObjectsAddresses in the
»EtherCAT Configurator«
Output objects%QX1000.0%QB1000
%QB1000%QB1000
%QW1000%QB500
%QD1000%QB250
Input objects%IX1000.0%IB1000
%IB1000%IB1000
%IW1000%IB500
%ID1000%IB250
Byte addresses
66LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.7.7Export of EtherCAT configuration
First save your project with the menu command FileSave project to in the project folder
before you export the EtherCAT configuration.
During the export of the EtherCAT configuration, the configuration files
ECAT_PLC_CFG_1.XML and ECAT_MASTER_1.XML created.
At a later time, you have to
import the ECAT_PLC_CFG_1.XML file into the control configuration using the »PLC
Designer«.
write the ECAT_MASTER_1.XML file for the EtherCAT master stack to the IPC.
How to export the EtherCAT configuration files:
1. Select Export EtherCAT Configuration from the context menu of the master:
Commissioning of the system
Detailed commissioning steps
2. A directory tree appears. Select the prepared project folder for storing.
3. Confirm the selection by clicking the OK button.
The configuration files ECAT_PLC_CFG_1.XML and ECAT_MASTER_1.XML is now
saved to the project folder.
DMS 3.1 EN 01/2011 TD17L67
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.8Configuration in the »PLC Designer«
The »PLC Designer« serves to illustrate the field device topology in the control
configuration.
Tip!
Nodes at other fieldbus systems can be configured in the »PLC Designer«.
EtherCAT with CANopen or PROFIBUS
7.2.8.1Set-up of control configuration
How to set up the control configuration in the »PLC Designer«:
1. Create a new »PLC Designer« project:
• Menu command: FileNew
2. Select the suitable target system from the Target Settings dialog box:
• L-force_Logic_x700_Vx.xx.xx for Logic target systems
• L-force_Motion_x700_Vx.xx.xx for pure Motion target systems or Motion- and
Logic target systems
( 91)
EtherCAT with CANopen or PROFIBUS
3. Confirm the configuration of the target system setting by clicking the OK button.
68LDMS 3.1 EN 01/2011 TD17
( 91)
4. Create a block:
Note!
The program organisation unit must contain at least one instruction to function
properly.
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
DMS 3.1 EN 01/2011 TD17L69
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
5. Create the control configuration:
•Open the Resources dialog box:
•Open the PLC Configuration dialog box:
SettingDescription
Automatic calculation of addressesEvery newly added module automatically gets an address which results from
Check for overlapping addressesDuring the compilation of the project, a check for address overlapping is
Save configuration files in projectThe data of the configuration file(s) *.cfg and device files on which the
the address of the module integrated before and the size of this module. If a
module is removed from the configuration, the addresses of the subsequent
modules are adapted automatically.
The ExtrasCalculateaddresses menu command serves to recalculate the
addresses starting with the currently selected node (module).
carried out and overlapping addresses are indicated.
current control configuration is based are stored in the project.
Note!
We recommend to keep the standard setting. In case of a manual address
allocation, you must ensure that each object address is non-ambiguous in the
entire control configuration.
Detailed information on this can be found in the documentation for the »PLC
Designer«.
6. Add the bus interface to the PLC configuration:
Select the Append subelement BusInterface_EtherCAT command from the
PLC_configuration context menu.
70LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7. Import the EtherCAT components (file ECAT_PLC_CFG_1.XML) for the control
configuration:
• Select the Import module command in the context menu of
BusInterface_EtherCAT:
• Select the file ECAT_PLC_CFG_1.XML from the project folder and Open:
DMS 3.1 EN 01/2011 TD17L71
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
• When the file has been imported successfully, the Axis_IO_Group/IO_Group is
added to the configuration:
• The configuration created in the »EtherCAT Configurator« is attached below the
Axis_IO_Group/IO_Group.
Note!
• The EtherCAT components of the control configuration (device and variable
names) may only be changed in the »EtherCAT Configurator«!
Changes made in the »PLC Designer« will get overwritten at the import of the
ECAT_PLC_CFG_1.XML file.
•The Axis_IO_Group/IO_Group must not be renamed!
•The Axis_IO_Group/IO_Group is overwritten at every import of the
ECAT_PLC_CFG_1.XML file.
•The Axis_IO_Group/IO_Group is created automatically at every import of the
ECAT_PLC_CFG_1.XML file and assigned a default name.
72LDMS 3.1 EN 01/2011 TD17
7.2.8.2Creating a task
How to create a task in the »PLC Designer«:
1. Select the Resources tab:
2. Select Task Configuration:
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
3. Select the Append Task command from the Task Configuration context menu.
4. Create a new task and make the settings relevant for the respective configuration:
Define the task cycle time. (Example in the screenshot: 1 ms)
Note!
The task cycle time must be identical with the DC cycle time set in the »EtherCAT
Configurator«.
DMS 3.1 EN 01/2011 TD17L73
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
5. Assign a program call to the task:
• Select Attach program call in the context menu of the task.
•Open the input assistance via the button:
ü
• Select the required program from the list of user-defined programs.
6. Compile the project with <F11> or save the project.
Compiling project data
7. Assign a task to the Axis_IO_Group/IO_Group:
( 77)
74LDMS 3.1 EN 01/2011 TD17
Use of breakpoints
Note!
The setting of breakpoints in the PLC task assigned to the EtherCAT bus is
permissible.
Please observe:
• When reaching a breakpoint this task will be stopped.
• No new setpoints are calculated (Motion drives come to a standstill), no
deceleration ramp is generated.
• The control still sends EtherCAT frames. After restarting the PLC task, the
interrupted processing is resumed.
• Motion drives continue the interrupted motion, no acceleration ramp is
generated.
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
Detailed information on breakpoints can be found in the documentation/online
help for the »PLC Designer«.
DMS 3.1 EN 01/2011 TD17L75
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.8.3Configuring the communication parameters
Set the communication parameters to establish a connection to the respective IPC.
How to configure the communication parameters
1. Select the OnlineCommunication Parameters command:
• Enter the designation of the new channel in the Name input field.
• Confirm the entry by clicking the OK button.
2. Enter the parameters in the Values column in the Communication parameters
dialog box.
• Double-click the respective value to edit the default values:
76LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
3. Click the Gateway button to configure a gateway connection:
• Select the TCP/IP connection type from the Connection selection field.
• Confirm the selection by clicking the OK button.
7.2.8.4Compiling project data
To compile the project data, select the ProjectBuild menu command or press the <F11>
function key.
If errors occurred during the compilation process, you can locate and eliminate them by
means of the »PLC Designer« error messages. Then compile the project data again.
If no errors occurred during the compilation process, save the »PLC Designer« project to
the project folder.
7.2.8.5Logging on to the control system with the »PLC Designer«
To log the »PLC Designer« on to the control system, select the OnlineLogin menu
command.
For this, the PLC program must be error-free.
Confirm the appearing query dialog whether the new program is to be loaded with Yes.
DMS 3.1 EN 01/2011 TD17L77
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed commissioning steps
7.2.8.6Loading the control configuration onto the IPC
How to load the control configuration onto the IPC:
1. Select the OnlineWrite file to PLC menu command.
2. Select the required file from the Write file to PLC dialog box.
3. Confirm the selection by clicking the Open button.
The file is loaded onto the IPC and saved there under the same name.
Tip!
The OnlineRead file from PLC menu command can be used to reload a file from
the IPC onto the »PLC Designer« project.
78LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.2.8.7Loading the master configuration onto the EtherCAT master
The Reset (original) command serves to load the master configuration
(ECAT_MASTER_1.XML) onto the EtherCAT master:
1. Reset (original) re-initialises the EtherCAT master stack.
2. The master compares the EtherCAT configuration with the physical bus topology. If the
EtherCAT configuration is identical with the bus topology, the bus enters the Pre-Operational state.
3. Now it is possible communicate with the slaves via the EtherCAT fieldbus.
Checking with »WebConfig« or »Engineer«
Under Master Configuration, you can check whether the configuration file
ECAT_MASTER_1.XML matches the physical bus structure.
Depending on the slot used for the EtherCAT (MC-ETC) communication card, the
parameters of the following codes should be checked:
– MC-ETC in slot 1: codes 1080.2 / 1080.3 / 1080.4
– MC-ETC in slot 2: codes 1580.2 / 1580.3 / 1580.4
Commissioning of the system
Detailed commissioning steps
If the ECAT_MASTER_1.XML configuration file corresponds to the physical bus
structure, the checksums of "ECAT Master Config" and "ECAT Stack Master" are identical
and the "ECAT Bus Scan Match" parameter has the value 1.
7.2.8.8Loading and starting the PLC program
Select the OnlineDownload menu command to load the PLC program included in the
configuration onto the control system.
Select the OnlineRun menu command to start the PLC program.
DMS 3.1 EN 01/2011 TD17L79
Control technology | EtherCAT communication manual
Commissioning of the system
Checking the system startup
7.3Checking the system startup
Note!
Checking of the system startup is only possible for SoftMotion target systems.
To check whether the system has started up correctly, you can do the following
Evaluation of the boot-up error message of the SM_DriveBasic.lib library
Evaluation of the Axis_IO_Group state
Evaluation of the axis state
7.3.1Evaluation of the boot-up error message of the SM_DriveBasic.lib library
To check that the system has started up correctly, you can evaluate the boot-up error. For
this purpose, the scope of the global variables contained in the SM_DriveBasic.lib library
includes the element g_strBootupError. This element displays error messages in text
form:
g_strBootupError = no error
no error indicates that the system has started up correctly:
( 82).
( 81);
( 80);
80LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.3.2Evaluation of the Axis_IO_Group state
The Axis_IO_Group structure contains the global variable wState.
The following value ranges have to be evaluated for the system startup check:
Commissioning of the system
Checking the system startup
The value of the wState variable has the following meaning:
State of the Axis_IO_GroupState of the system
wState = 0 •Initial state
•Project loaded
• PLC in stop
wState = 1...99 • System is starting up
•Project loaded
•PLC started
wState = 100 • System has started up successfully
wState > 1000 • Error occurred during startup, compare error message in
g_strBootupError
DMS 3.1 EN 01/2011 TD17L81
Control technology | EtherCAT communication manual
Commissioning of the system
Checking the system startup
7.3.3Evaluation of the axis state
The global Ax_Ref structure of the Motion axes contains the element bCommunication:
The following axis states have to be evaluated:
State of the axisState of the system
bCommunication = trueCyclic communication is functioning properly.
bCommunication = falseCyclic communication is not functioning properly.
82LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.4Typical commissioning scenarios
In this chapter you will find typical commissioning scenarios and the corresponding state
diagrams, which will help you to carry out simple analyses of the system behaviour.
7.4.1Switching on a completely configured system
Initial situation:
The PLC application has been loaded on the IPC.
The ECAT_Master_1.XML file matching the bus topology is available on the IPC.
System behaviour:
The system starts up automatically.
Commissioning of the system
Typical commissioning scenarios
DMS 3.1 EN 01/2011 TD17L83
Control technology | EtherCAT communication manual
Commissioning of the system
Typical commissioning scenarios
Switch on industrial PC and field devices
PLC:Original
EtherCAT:Unknown
Read ECAT_MASTER_1.XML
PLC:Original
EtherCAT:Init
PLC:Original
EtherCAT: Pre-Operational
PLC:Running
EtherCAT: Safe-Operational
PLC:Running
EtherCAT:Operational
System is running
Legend
PLC:
EtherCAT:
PLC:
EtherCAT:
Reset
(origin)
Transient state of PLC and EtherCAT
Automatic change to next state
Steady state of PLC and EtherCAT
Change to next by means of an external
action
Reset the PLC.
The PLC application is deleted.
Load PLCLoad PLC application
Start PLCStart PLC application
84LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
7.4.2Switching on a system with an incomplete configuration
Initial situation:
The PLC application has been loaded on the IPC.
The ECAT_Master_1.XML file is not available on the IPC or does not match the physical
bus topology.
System behaviour:
EtherCAT remains in "Unknown" state.
The PLC does not start up.
How to complete the configuration:
1. Load the correct "ECAT_Master_1.xml" file onto the IPC.
2. Execute "Reset (Original)".
– The PLC is reset, the PLC application is deleted.
Commissioning of the system
Typical commissioning scenarios
3. The system starts up.
– You have to manually load and start the PLC application.
DMS 3.1 EN 01/2011 TD17L85
Control technology | EtherCAT communication manual
Commissioning of the system
Typical commissioning scenarios
Switch on industrial PC and field devices
PLC:Original
EtherCAT:Unknown
ECAT_MASTER_1.XML
available?
YES
Read ECAT_MASTER_1.XML
PLC:Original
EtherCAT:Init
ECAT_MASTER_1.XML
OK?
YES
NO
NO
PLC:Original
EtherCAT:Unknown
Load PLC
PLC:Stop
EtherCAT:Unknown
Load correct
ECAT_MASTER_1.XML
onto IPC
Reset
(Original)
Reset
(Original)
PLC:Original
EtherCAT: Pre-Operational
Load PLC
PLC:Stop
EtherCAT: Pre-Operational
Start PLC
Legend
PLC:
EtherCAT:
PLC:
EtherCAT:
Reset
(origin)
PLC:Running
EtherCAT: Safe-Operational
PLC:Running
EtherCAT:Operational
System is running
Transient state of PLC and EtherCAT
Automatic change to next state
Steady state of PLC and EtherCAT
Change to next by means of an external
action
Reset the PLC.
The PLC application is deleted.
Load PLCLoad PLC application
Start PLCStart PLC application
86LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Commissioning of the system
Typical commissioning scenarios
7.4.3Updating the PLC application while the EtherCAT configuration remains unchanged
3. The PLC application must call the "SMC_ResetAxisGroup" program organisation
unit.
4. The system is running again.
Legend
PLC:
EtherCAT:
PLC:
EtherCAT:
Reset
(origin)
Start
Transient state of PLC and EtherCAT
Automatic change to next state
Steady state of PLC and EtherCAT
Change to next by means of an external
action
Reset the PLC.
The PLC application is deleted.
PLC:Running
EtherCAT:Operational
PLC:Stop
EtherCAT: Pre-Operational
PLC:Running
EtherCAT: Safe-Operational
System is running
Stop PLC
Start PLC
Call
<SMC_ResetAxisGroup>
POU
from PLC application
Load PLCLoad PLC application
Start PLCStart PLC application
StartBeginning of the scenario
DMS 3.1 EN 01/2011 TD17L89
Control technology | EtherCAT communication manual
Commissioning of the system
Detailed overview of the commissioning steps
7.5Detailed overview of the commissioning steps
In the following diagram the individual commissioning steps and their processing order
are summarised once again. Detailed information on the individual processing steps can
be found in the chapter Detailed commissioning steps
( 45).
90LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
8EtherCAT with CANopen or PROFIBUS
Note!
A mixed operation is only possible with industrial PCs which have two additional
slots for communcation cards. A mixed operation is not possible with the
"Command Station".
The EtherCAT bus system can be combined with CANopen or PROFIBUS. This makes sense
if not all field devices are available for the same bus system or a motion bus is required
parallelly to the PROFIBUS. The bus systems are sychronised in the control.
The following combinations are allowed:
CANopen and EtherCAT
– CANopen configuration in the »PLC Designer«
– EtherCAT configuration in the »EtherCAT Configurator«
EtherCAT with CANopen or PROFIBUS
PROFIBUS (as logic bus) and EtherCAT (as motion bus)
– PROFIBUS configuration in the »PLC Designer«
– EtherCAT configuration in the »EtherCAT Configurator«
Communication manual "CANopen control technology"
Here you can find detailed information on how to commission CANopen
components.
Communication manual "PROFIBUS control technology"
Here you can find detailed information on how to commission PROFIBUS
components.
DMS 3.1 EN 01/2011 TD17L91
Control technology | EtherCAT communication manual
EtherCAT with CANopen or PROFIBUS
Addressing the PROFIBUS and CANopen stations
8.1Addressing the PROFIBUS and CANopen stations
The addresses for input and output objects of the PROFIBUS and CANopen stations are
automatically allocated in the »PLC Designer« (standard setting):
Note!
We recommend to keep the standard setting. In case of a manual address
allocation, you must ensure that each object address is non-ambiguous in the
entire control configuration.
Detailed information on this can be found in the documentation/online help of
the »PLC Designer«.
92LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
EtherCAT with CANopen or PROFIBUS
Addressing EtherCAT nodes using CANopen/PROFIBUS nodes
8.2Addressing EtherCAT nodes using CANopen/PROFIBUS nodes
The addresses for input and output objects of the EtherCAT stations are allocated in the
»EtherCAT Configurator«. Afterwards, the EtherCAT configuration is imported into the
»PLC Designer« control configuration.
There are two cases for the control configuration in the »PLC Designer«:
1. PROFIBUS/CANopen before EtherCAT:
– Keep the standard settings for address allocation for the PROFIBUS/CANopen
stations in the »PLC Designer« control configuration. (The addressing of the
PROFIBUS/CAN stations starts with ’0’.)
– Define a sufficient address offset for the first input and output object in the
»EtherCAT Configurator« at the first EtherCAT slave (> PROFIBUS/CAN addresses).
The addresses of the other input and output objects are updated automatically after
the entry.
Thus, address conflicts can be prevented after the import of the EtherCAT
configuration into the »PLC Designer« control configuration.
2. EtherCAT before PROFIBUS/CANopen:
– Do not define any address offsets in the »EtherCAT Configurator«. (The addressing of
the EtherCAT stations starts with ’0’.)
– For PROFIBUS/CANopen stations, no address offsets must be defined in the »PLC
Designer« control configuration. If address offsets are defined, the offsets must be
greater than the EtherCAT addresses.
Settings in the »EtherCAT Configurator«
( 94)
DMS 3.1 EN 01/2011 TD17L93
Control technology | EtherCAT communication manual
EtherCAT with CANopen or PROFIBUS
Addressing EtherCAT nodes using CANopen/PROFIBUS nodes
Settings in the »EtherCAT Configurator«
Assign non-ambiguous variable names to the input and output objects according to
IEC 61131 syntax (no blanks and leading digits in the variable name). After the import
of the EtherCAT configuration into the »PLC Designer« control configuration,
corresponding system variables are available for the PLC program.
Note!
Always use the system variables within the PLC program in order to access the
input and output objects or assign values to them.
By double-clicking the corresponding fields, you can make the adjustments:
In the example, variable names have been assigned to the first three output objects.
Moreover, an offset of ’1000’ has been entered for the first output object (%QW...) and the
first input object (%IW...).
The »EtherCAT Configurator« does not work with byte addresses. The objects are
addressed with the byte address in the control configuration:
ObjectsAddresses in the
»EtherCAT Configurator«
Output objects%QX1000.0%QB1000
%QB1000%QB1000
%QW1000%QB500
%QD1000%QB250
Input objects%IX1000.0%IB1000
%IB1000%IB1000
%IW1000%IB500
%ID1000%IB250
Byte addresses
94LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
EtherCAT with CANopen or PROFIBUS
Addressing EtherCAT nodes using CANopen/PROFIBUS nodes
In the »PLC Designer«, the output and input objects are "byte-addressed". The original
address offset of ’1000’ (word level) for the first output and input objects is set accordingly
to '2000" after the import of the EtherCAT configuration. The addresses of the other input
and output objects are also updated.
Note!
• Changes of the EtherCAT configuration in the »PLC Designer« are overwritten
when the EtherCAT configuration is re-imported.
Always adapt the EtherCAT configuration to the »EtherCAT Configurator«.
• In a mixed operation, it must always be ensured that the CAN-Motion task
has the highest priority. The task assigned to the EtherCAT bus should have
the second-highest priority. The tasks assigned to the Logic bus systems
should be configured with a lower priority.
DMS 3.1 EN 01/2011 TD17L95
Control technology | EtherCAT communication manual
EtherCAT function libraries
Usability
9EtherCAT function libraries
The SM_Ethercat.lib and AtEm.LIB function libraries contain function blocks and functions
that are required for the creation of your »PLC Designer« project.
These function blocks and functions support:
The setting and reading of the master/slave states;
The network management;
The network diagnostics;
The upload and download of CoE parameters.
9.1Usability
The SM_Ethercat.lib and AtEm.LIB function libraries are integrated in the following target
systems:
L-force Logic x700 from version 6.x
L-force Motion x700 from version 6.x
Via the Library manager of the »PLC Designer« you can integrate the function libraries into
the »PLC Designer« project. They can be found in the library directory of the corresponding
target system in the subdirectory "EtherCAT".
Note!
The integration of the SM_EthercatDrive.lib function library into a »PLC
Designer« project is not required, as the function blocks and the functions of this
library are not relevant.
In the course of this chapter only the function blocks and functions required for
the creation of a »PLC Designer« project are described.
96LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
EtherCAT function libraries
Function blocks/functions required for a »PLC Designer« project (overview)
9.2Function blocks/functions required for a »PLC Designer« project (overview)
Note!
Use the function blocks and functions of the function library AtEm.lib only if the
master is configured completely. Otherwise it can lead to instabilities of the
control system. A check of the master configuration can be executed with the
ecatMasterIsConfigured (FUN)
Function libraryFunction block (FB) / function (FUN)
Control technology | EtherCAT communication manual
EtherCAT function libraries
Properties of function blocks
9.3Properties of function blocks
The function blocks are equipped with inputs and outputs for the activation of the POU,
the display of the current POU status, and for the output of error messages:
Input/outputData typeAction
bExecute / bEnableBOOLbExecute and bEnable are edge-controlled:
In the case of a positive edge, the function block is executed.
bBusyBOOLAs long as a function block is executed, bBusy is TRUE and bDone is FALSE.
bDoneBOOLIf a function block has been executed, bDone is set to TRUE and bBusy is set
bErrorBOOLIf an error has occurred, bError is set to TRUE.
dwErrorCodeDWORDIf an error has occurred (output bError = TRUE), a hexadecimal error code (see
to FALSE.
If bExecute/bEnable has been reset, bDone is only active during the function
block call. If bExecute/bEnable is TRUE, then bDone remains TRUE as long as bExecute/bEnable is reset.
also System error messages ( 157)) is displayed at the output dwErrorCode.
The error code is only available during the function block call (if
bDone =TRUE).
9.4The EC_T_STATE structure
Note!
The ECAT_STATE structure describes all possible states of the EtherCAT bus system:
StatusIdentifierValue (DINT)
UnknowneEcatState_UNKNOWN0
InitializationeEcatState_INIT1
Pre-OperationaleEcatState_PREOP2
Bootstrap Mode
(Is currently not supported.)
Safe-OperationaleEcatState_SAFEOP4
OperationaleEcatState_OP8
The identifiers itemised here cannot be found in IEC 61131. For all state inputs
and outputs, always the numerical values are indicated.
eEcatState_BOOT3
98LDMS 3.1 EN 01/2011 TD17
Control technology | EtherCAT communication manual
Function blocks and functions for master/slave states
9.5Function blocks and functions for master/slave states
The function blocks and functions described in the following support the setting and
reading of the master/slave states.
State changes are usually carried out automatically by the control system. By
means of this function block you can change the state manually. Please note
that the bus system may become unstable if the state is changed manually.
Inputs (VAR_INPUT)
Identifier/data typeMeaning/possible settings
bEnable
dwTimeout
DWORD
Outputs (VAR_OUTPUT)
Identifier/data typeMeaning/possible settings
bDone
bBusy
bError
dwErrorCode
DWORD
The function block is activated in an edge-controlled manner:
BOOL
• Positive edge (TRUE) = function block is executed.
Time-out in milliseconds
• If the action could not be carried out successfully after time-out, bError is set
to TRUE.
• The time required for the action depends on the structure of the EtherCAT
network.
FALSE: Function block is active or has not been called
BOOL
TRUE: Function block has been executed.
FALSE: Function block is not active.
BOOL
TRUE: Function block is active.
FALSE: No error
BOOL
TRUE: An error has occurred.
Display of a hexadecimal error code (see also System error messages
error has occurred (bError =TRUE).
( 157)) if an
100LDMS 3.1 EN 01/2011 TD17
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.