Commissioning the 9400 Highline TA CiA402 with EtherCAT and Beckhoff NC

Similar documents
Positioning Controllers. Communication Guide. Document ID: rel4896

EtherCAT User Manual. For SS EtherCAT

AN Use Beckhoff TwinCAT System Manager to configure EtherCAT masters for control of ABB MicroFlex e150 servo drives

EtherCAT User Manual. For STF EtherCAT

STF-EtherCAT User Manual

Manual. Global Drive. PLC Developer Studio. Global Drive. LenzeIOSystem.lib. Function library

Communications Manual

Configuring TwinCAT 3 for use with the Class 6 EtherCAT SmartMotor

Positioning Controller

Manual. NC PTP: Quick Starting Guide. TwinCAT 3. Version: Date: Order No.: TF5000

SIMATIC/SINAMICS. Getting started with SINAMICS V90 PN on S Motion Control. Fundamental safety instructions 1. Introduction

Safety module SY6 Manual

High Precision Drive Synchronisation with CANopen

No. FST-ZTH13079B. Machine Automation Controller NJ-series. EtherCAT Connection Guide. Kollmorgen Corporation Servo Drive (AKD )

L-force 9400 StateLine Servo Drives

EtherCAT SoE Interface User Manual

Options for ABB drives, converters and inverters. User s manual FECA-01 EtherCAT adapter module

User Manual. NanoCAN. Application for stepper motor controls and Plug & Drive motors (version V )

Type 70906X. Thyristor Power Controller TYA 201, 202 und 203. Interface description EtherCAT for Type , and XT92Z001K000

Application Note Commissioning VTEM connected to Beckoff PLC via CPX-FB38 bus node

Tritex II. CANopen - Option

SANYO DENKI Servo Amplifier SANMOTION R and Pro-face AGP-3****-CA1M/LT Connection Procedure. Instruction Manual. Version1.0 (

L-force Communication EDS84DMOTCAN Ä.HSsä. Communication Manual motec. E84DGFCCxxx. CANopen communication unit

Connection Guide HMS Industrial Networks

CANopen. Network configuration. Operating instructions Software. Integration of Bürkert devices in CANopen networks

DELTA ELECTRICS, INC.

APPLICATION NOTES. Advanced Graphical Interface - AGI Internal PLC (CODESYS V3) SHENDONG

EtherCAT CiA402 Profile Interface User Manual

Application Note FC1100/FC1121 (EtherCAT Slave Card)

CMMT-AS-PN controlled by SINAPOS functions block with Siemens S controller

Anybus CompactCom 40 Diagnostic Events for EtherCAT SCM ENGLISH

Positioning Controllers. Application Notes. Document ID: rel3986

Connection Procedure of WAGO CANopen Bus Coupler and Pro-face AGP-3****-CA1M/LT. Instruction Manual. Version1.1 (

Multi-Axis Position Control by EtherCAT Real-time Networking

Connection Guide FANUC CORPORATION

Using WAGO Series 750 EtherCAT coupler with CoDeSys SP Win V3 Application note

Accessories. EtherCAT E84AYCET. Inverter Drives 8400 Communication Manual EN. Ä.KôVä

CANopen IO X1 Fact sheet

Machine Automation Controller NJ-series. EtherCAT. Connection Guide. OMRON Corporation. Digital Sensor Communication Unit (E3NW-ECT) P563-E1-01

Supplementary device manual EtherCAT interface in the AS-i controllere A AC1391 AC1392

Device manual Profibus encoder. RM30xx RN30xx /00 06/2013

CAN 300 / CAN 400 Application Example DS402 ERL

CANopen IO X4 Fact sheet

EtherCAT Master Adapter Board (pn7729)

User manual. magnetic absolute positioning drive with AG03

Technical Documentation

PHOENIX CONTACT GmbH & Co. KG

LXM23A CANopen Fieldbus protocol for servo drive Fieldbus manual V2.00,

Documentation. EPI2xxx. IO-Link-Box Modules with digital inputs. Version: Date:

Courtesy of CMA/Flodyne/Hydradyne Motion Control Hydraulic Pneumatic Electrical Mechanical (800)

AG05. Actuator with CANopen interface User manual 055/18

C x Hexapod Motion Controller

CANopen MANUAL. TMCM axis stepper controller/driver board 2.8A RMS / 24V DC Encoder interface

EtherCAT Product Family

CANopen IO X2 Fact sheet

i550 PROFINET, EtherCAT, EtherNet/IP Ethernet Buses Commissioning Manual EN

Application Note FC1100/FC1121 (EtherCAT Slave Card)

CANopen User Guide. Rev for ENGEL devices with CANopen support. ENGEL Elektroantriebe GmbH Am Klingenweg 10 D Walluf

Decentralized positioning drives

Quick Start Guide PN/CAN-Gateway. Version. 1 en. from FW

User Manual. R Series Encoders with CANopen Interface RNX HE 11 / 2005

Documentation. FC7501 and FC7502. SERCOS interface PCI Cards. Version: Date:

ABSOLUTE ENCODER MEM-BUS. Instruction Manual

Linear-Encoders CANopen Profile

Motors Automation Energy Transmission & Distribution Coatings. Software WSCAN. User's Manual

External position feedback via DIMETIX FLS-C10 (SSI)

Documentation EtherCAT Library for LabVIEW 2.9

AFS60 EtherCAT AFM60 EtherCAT

Accessories. EtherCAT E94AYCET. Servo Drives 9400 Communication Manual EN. Ä.Tq,ä

MCD. Programming Reference. Programmable Positioning Controller. Documentation. maxon motor maxon motor control. EPOS P Positioning Controller

Everything s possible. Modbus Communication. Reference Manual. DigiFlex Performance Servo Drives. MNCMMBRF-02

Communications Manual MC 5010 MC 5005 MC 5004 MCS RS232 / WE CREATE MOTION

CANopen Getting Started User's Manual

ABSOLUTE ROTARY ENCODER WITH ETHERNET/IP INTERFACE USER MANUAL

Hexapod Motion Controller with EtherCAT

efesotomasyon.com - Klockner Moeller - inverter User Manual CAN-Monitor

hipecs-cio52 CANopen I/O module with 4 analog outputs

Machine Automation Controller NJ-series. EtherCAT. Connection Guide. OMRON Corporation. GX-series Digital I/O Terminal P517-E1-01

Safety PRECAUTIONS. Danger may be present. Read the message and follow the instructions carefully.

Options for ABB drives, converters and inverters. User s manual FECA-01 EtherCAT adapter module

CANopen User Manual IE25, IWN

Configuration Guideline for CANopen Networks

MotionView Configuration and Programming Software USER S MANUAL

CANopen. stepim. Reference Manual. Manual Revision: 1.3 Firmware Version:

4 Interpolated Position Mode

Positioning Controller

EtherCat for S300/400/600/700

Connection Guide. SMC Corporation. EtherCAT(R) Machine Automation Controller NJ-series

PLC2 Board Communication Manual CANopen Slave

User Manual. K Series Encoders with CANopen Interface KXN FE 09 / 2005

CANopen User manual Website: Technical Support: Skype: Phone: QQ: Technical forum:

Manual. CAN 300 PRO CANopen Slave. CAN Communication Modules for S7-300 as CANopen Slave. Edition 3 /

Controller-based Automation

vacon optec installation manual ethercat option board ac drives

Motors I Automation I Energy I Transmission & Distribution I Coatings. CANopen CFW500. User s Manual

Motor controllers CMMS-ST, for stepper motors

ARS 2000 series Universal servo drive

OPTEC. Ethercat option board installation manual

LB/FB8X09* / LB/FB8X05*

TF5xxx TwinCAT 3 Motion Control

Transcription:

Commissioning the 9400 Highline TA CiA402 with EtherCAT and Beckhoff NC Contents 1. Preface/aim of the Application Report...2 2. Introduction...3 2.1. General information on EtherCAT...3 2.2. General information on CiA 402...4 3. Components...5 4. Configuration notes for Lenze Engineer and 94xx Highline TA CiA 402...6 4.1. Creating an Engineer Project...6 4.2. TA CiA 402 configurations required for the Beckhoff NC... 11 4.3. Monitoring responses and telegram failure detection... 12 4.4. Diagnostics options... 13 5. Beckhoff IPC and TwinCAT configuration notes... 14 5.1. Configuring the Beckhoff NC with Lenze EtherCAT and TA CiA 402... 15 6. Creating a TwinCAT PLC project and assigning variables with the NC... 27 7. Example signal flow chart for the setpoint target position... 30 8. Distributed Clocks (DC) EtherCAT synchronisation... 31 9. Wireshark bus analyser with TwinCAT... 32 Page 1 of 33

1. Preface/aim of the Application Report This Application Report provides commissioning instructions for using a 94xx Highline servo inverter technology application (TA) CiA 402 with EtherCAT communication along with a guide to integration into the Beckhoff NC environment. It describes the procedures to be followed in the Lenze Engineer and Beckhoff TwinCAT software programs in order to commission such a system. This Application Report contains an example program for the Beckhoff PLC which is available for download from the Lenze homepage www.lenze.com. PC with Beckhoff TwinCAT NC and PLC Control Soft PLC EtherCat PC with integrated PCI Express Ethernet card 94xx Highline TA CiA402 with EtherCAT module Important note: The software is supplied to the user as described in this document. All risks resulting from its quality or use remain the responsibility of the user. Users must take appropriate precautions to protect against maloperation. We do not take any liability for direct or indirect damage, e.g. profit loss, order loss or any loss regarding business. 2009 No part of this document may be reproduced or distributed to third parties without the express written permission of Lenze Automation GmbH. The greatest care has been taken in compiling the information in this documentation and checking it against the hardware and software described here. Nevertheless, deviations cannot be ruled out completely. We do not assume any legal responsibility or liability for damage that may arise from its use. Necessary corrections will be introduced in subsequent editions. All trade names in this documentation are trademarks belonging to the related owners Page 2 of 33

2. Introduction This report is intended to explain, with the help of an example, how a Lenze 94xx Highline servo inverter with TA CiA402 can be commissioned or operated in conjunction with EtherCAT and a Beckhoff TwinCAT NC. The reports begins with a description of the configuration requirements on the Lenze 94xx to enable communication with EtherCAT. It then goes on to give a detailed description of how to carry out the configuration in the Beckhoff System Manager and how to access data, before concluding with a description of the TwinCAT NC example program. 2.1. General information on EtherCAT The EtherCAT fieldbus system is standardised by the EtherCAT user organisation (ETG). The driving force behind this is the company Beckhoff. Due to the advanced Ethernet technology used for EtherCAT, in future, customers can change from other fieldbus systems to EtherCAT or generally equip new plant models with EtherCAT. EtherCAT is a closed Ethernet system and uses a ring topology. Communication on EtherCAT is based on a master/slave operation. The update cycle between master and slave depends on the number of EtherCAT slaves and the set update time of the master. Due to the ring topology, in every bus cycle only one telegram is sent on the bus. The bus cycle time thus remains exactly the same in every cycle. The maximum cable length for Ethernet-based fieldbus systems is 100m between two nodes. The baud rate is 100 Mbit/s. The EtherCAT E94AYCET communication module supports a baud rate of 100 Mbit/s, is electrically isolated from EtherCAT and can be externally supplied with 24 V. A maximum of 32 process data words can be exchanged with the module and the 94xx Highline. In addition, the module is equipped with an optional parameter channel according to CoE (CAN over EtherCAT) EtherCAT specification. Page 3 of 33

2.2. General information on CiA 402 The CiA402 device profile describes predefined functions and modes of variable-speed drives. The individual process data for the modes are exactly defined. Standardised indices are used for the parameter setting of the axis and the bus configuration (PDO mapping). The following illustration shows the CiA 402 modes supported by the Lenze 94xx axis. Homing mode Interpolated position mode Cyclic synchronous position mode (IEC-61800-7) with additional speed and torque offset (option) Cyclic synchronous velocity mode (IEC-61800-7) with additional speed offset (option) Cyclic synchronous torque mode (IEC-61800-7) with additional torque offset (option) Page 4 of 33

For each mode there is a separate dialog available in the Lenze engineering software. Overview of all CiA indices Dialogs of the CiA modes The following dialogs show the PLC setpoints on the left-hand side and the actual values of the drive on the right-hand side. The "Interpolated position mode" and the "Cyclic synchronous position mode" only differ in the PDO mapping variables available. The functions of the modes are exactly the same. For more detailed information on TA CiA402, please see the Lenze documentation. 3. Components Lenze hardware 9400 Highline, FW 07.00 or higher EtherCAT communication module, FW 2.0 or higher Lenze software Lenze Engineer Highlevel version 2.10.2 (SP2) or higher Beckhoff TwinCAT TwinCAT V 2.11 (build 1539) and System Manager V 2.11.0 (build 1534) Page 5 of 33

4. Configuration notes for Lenze Engineer and 94xx Highline TA CiA 402 4.1. Creating an Engineer Project No. Action Comment 1 Start the Lenze Engineer. Engineer version 2.10.2.0 has been used in this guide. 2 Create a new project. Click Next to confirm. 3 Enter a project name for the project. Click Next to confirm. Page 6 of 33

4 Enter a project name and choose a storage location for the project. Click Complete. 5 The Start-up wizard: insert component opens automatically. Go to the Controller tab, select a 94xx Highline and enter a controller name. In this case, a 94xx Highline with FV 7.0 has been selected. The controller firmware version is indicated in the pull-out clip behind the keypad slot of the controller. Click Next to confirm. Page 7 of 33

6 You now need to decide which modules are to be inserted into which slots. The firmware version of the plugin modules is indicated on the right outside edge. Click Select to access a selection of all available modules. Select the EtherCAT communication module with the appropriate firmware. Click OK to confirm. 7 After inserting the EtherCAT communication module, the following dialog appears. TA CiA 402 requires at least memory module MM220. Memory and safety modules are assigned in the same way. Click Next to confirm. Page 8 of 33

8 Select the technology application (TA) CiA 402. TA Version 1.1.0 has been used in this example. The TA can only be selected for 94xx FW 7.0 or higher. Click Next to confirm. 9 In the next window, you can specify which components you wish to select in the subsequent dialog boxes. 10 If a Lenze motor has been connected, the motor can be selected in the Motor tab. Click Next to confirm. Page 9 of 33

11 If a gearbox has been connected, the gearbox factor and the gearbox name can be selected in the Gearbox tab. Click Complete. 12 The axis entered will now appear as follows in the project tree. Page 10 of 33

4.2. TA CiA 402 configurations required for the Beckhoff NC In the following, the settings to be selected for TA CiA 402 in conjunction with the Beckhoff NC will be described. The entire process data mapping (meaning of the individual process data) and the CiA 402 mode to be used for axis operation is configured in the EtherCAT master! No. Action Comment 1 Setting the feed constant: The feed constant is configured as scaling factor in the Beckhoff NC. For this, set the feed constant under code L-C2524 in the 94xx to 6.5536*. * 65536 applies to an encoder resolution of 16 bits under code L-C0100. The Lenze feed constant L-C2524 can also be set via the CiA402 index I-6092/1 by the EtherCAT master. 2 Beckhoff NC scaling factor: In the example, the motor feed is 150 mm/motor revolution. The scaling factor for the Beckhoff NC is calculated according to the following formula: 150 mm Inc 65536 motor revolution = 0.00228881835937 3 Beckhoff NC and EtherCAT cycle: In the 94xx, the TA CiA402 runs in a 1-ms task. If the EtherCAT bus cycle or the NC cycle differs from 1ms, this must be set in the codes Ip time units and Ip time index (L-C3637 and L-C3638). The default settings of these codes lead to a cycle of 1ms. In chapter 6, step 29 you can read where to enter the scaling factor in the Beckhoff NC. The codes can also be set via the CiA 402 indices I-60C2/1 and I-60C2/2 by the EtherCAT master. Page 11 of 33

4 Transfer the TA CiA402 to the axis. 4.3. Monitoring responses and telegram failure detection No. Action Comment 1 The communication monitoring time which starts to expire when leaving the Operational state is set in code L-C13881 or 14881. 65535 deactivates the monitoring response. 2 The response after expiry of the communication monitoring time selected in code 13881 or 14881 can be set in code L-C13880 or L-C14880. 3 In addition to the monitoring response, you can select in code L-C13855 / 14855 whether the last valid process data is to be frozen if an error occurs (default setting = 0) or whether all process data is to be set to zero (value 1) if an error occurs. 4 Internal communication monitoring between the 94xx and the module can be set in code L-C1501 (MX1) and L-C1502 (MX2). 5 When a telegram failure is detected, the setpoints (position, speed and torque) will be extrapolated. Based on the position, a squarelaw extrapolation algorithm will be used. MX1 = Slot 1 MX2 = Slot 2 This function is only available for TA CiA 402! Page 12 of 33

6 Telegram failure counter The telegram failures occurring during operation are evaluated in the application. The number of individual errors occurred is stored in L-C3011 and the number of multi-errors occurred (more than 1 telegram failure in succession) is stored in L-C3012. The error counter can be reset via L-C3013. If the number of telegram failures occurred in succession exceeds the limit value set in L-C03010 (Lenze setting: 1), the error response set in L-C05902/2 will be activated (Lenze setting: Information). 4.4. Diagnostics options The Lenze EtherCAT offers a range of display codes which can be used for diagnostics purposes. The most important of these are described below. Code Action Comment L-C13861 / 14861 Current bus status Display of current bus status L-C13879 / 14879 Current bus error Bit-coded display of bus error L-C13850/L-C14850 Subcodes 1-32 L-C13851/L-C14851 Subcodes 1-32 L-C13852/L-C14852 Subcodes 1-32 L-C13853/L-C14853 Subcodes 1-32 Display all words to the EtherCAT master Display of all words from the EtherCAT master Display all words to the basic drive Display all words from the basic drive All process data words (1-32) transmitted from the module to the master are displayed. All process data words (1-32) received by the module are displayed. All process data words (1-32) transmitted from the module to the basic drive (94xx) are displayed. All process data words (1-32) transmitted from the basic drive (94xx) to the module are displayed. Page 13 of 33

5. Beckhoff IPC and TwinCAT configuration notes A TwinCAT project consists of two components. The TwinCAT System Manager is used to create a configuration that represents the structure of the automation system. The configuration is stored in a configuration file (ending xxx.tsm). The TWIN CAT Control software is used to programme a PLC project which can subsequently be imported into the System Manager. PC with Beckhoff TwinCAT V 2.11.0 EtherCAT PCI Express Ethernet card integrated in the PC 94xx Highline with EtherCAT module Page 14 of 33

5.1. Configuring the Beckhoff NC with Lenze EtherCAT and TA CiA 402 No. Action Comment 1 Import the EtherCAT xml device description file 'Lenze_E94AYCET_MOTION_20100323.xml' required for the 94xx communication module EtherCAT E94AYCET FW 2.0. Copy the xml file into the following TwinCAT directory: C:\..\TwinCAT\Io\EtherCAT The Lenze xml file can be found in the download area on the Lenze homepage www.lenze.com 2 Start the Beckhoff System Manager In the example, the version V2.11 build 1534 was used. 3 Create a new project in Beckhoff System Manager. Menu => File => New 4 Select I/O Devices and append an EtherCAT master. 5 In the example, the EtherCAT master shall use the on-board Ethernet connection of the PC. Therefore, an EtherCAT master in direct mode has been selected. Beckhoff only guarantees the real time of an EtherCAT master if an on-board Ethernet interface of a motherboard with Intel chipset is used. Click OK to confirm your selection. Page 15 of 33

6 Under the Adapter => compatible Devices tab, you can see which Ethernet interface can be used as EtherCAT master. Select the EtherCAT interface. 7 Use the menu Actions => Choose Target System or F8 to select the target system. 8 When the physical EtherCAT connection to the Lenze EtherCAT module has been established, you can select Scan Boxes to carry out an online bus scan. An online bus scan is only possible in the Config mode of the System Manager! The Config mode is selected via the following icon in the System Manager. 9 Of course, it is also possible to configure the EtherCAT node offline on the EtherCAT master. For this select Append Box. Note: Since EtherCAT uses a ring topology, it must be ensured that the slaves are arranged in correct order on the bus when using the offline configuration! Page 16 of 33

10 If a CiA 402-conform axis has been found, the following dialog will appear: If the dialog is confirmed with Yes, an NC task will be created and the axis will be appended. As far as possible, variables of the TA CiA 402 axis will be automatically assigned in the NC axis. 11 The found CiA 402 axis appears as drive in the EtherCAT tree and an additional axis is created under the NC configuration. All information given in the different tabs of the Lenze node are default values from the xml file! 12 As you can see in screen shot 11, the TA CiA402 axis has been loaded with Cyclic Synchronous Position Mode and the corresponding process variables. The process variables are stored under the index I-1602 and I-1A02. This can be changed through the PDO Assignment by the user depending on the CiA402 mode you want to use. For a detailed list of the CiA 402 modes and the corresponding process variables, please see the document default PDO Mapping xml file.pdf In the PDO List you can find the predesigned PDO configurations. Each PDO configuration is stored under a different index I-1600 to I1609 and I-1A00 to I-1A09. You can only select one PDO configuration for RPDO and TPO! Page 17 of 33

13 In the example, the following variables have been assigned to the drive in the NC axis: TA CiA 402 variable TA CiA 402 index NC variable Controlword 0x6040 Axis 1_Drive_Out Variable nctrl1 and nctrl2 Target position 0x607A Axis 1_Drive_Out Variable noutdata1 and noutdata2 Statusword 0x6041 Axis 1_Drive_In Variable nstatus1 and nstatus2 Position actual value (units) 0x6064 Axis 1_Enc _In Variable nindata1 and nindata2 Process output data EtherCAT master Process input data EtherCAT master 14 If you check PDO Assignment and PDO Configuration, the complete PDO mapping will be written to the slave when the EtherCAT master is started. In the Startup tab, you can see the whole PDO mapping sent to the slave when the master is started. Page 18 of 33

15 The PDO mapping through the EtherCAT master is indicated in the following Lenze codes: Lenze code PDO Index 13231 / 14231 sub 1-32 RPDO-1 I-1600 sub 1-32 13232 / 14232 sub 1-32 RPDO-2 I-1601 sub 1-32 13233 / 14233 sub 1-32 RPDO-3 I-1602 sub 1-32 13234 / 14234 sub 1-32 RPDO-4 I-1603 sub 1-32 13235 / 14235 sub 1-32 RPDO-5 I-1604 sub 1-32 13236 / 14236 sub 1-32 RPDO-6 I-1605 sub 1-32 13237 / 14237 sub 1-32 RPDO-7 I-1606 sub 1-32 13238 / 14238 sub 1-32 RPDO-8 I-1607 sub 1-32 13239 / 14239 sub 1-32 RPDO-9 I-1608 sub 1-32 13238 / 14238 sub 1-32 RPDO-10 I-1609 sub 1-32 Lenze code PDO Index 13531 / 14531 sub 1-32 TPDO-1 I-1A00 sub 1-32 13532 / 14532 sub 1-32 TPDO-2 I-1A01 sub 1-32 13533 / 14533 sub 1-32 TPDO-3 I-1A02 sub 1-32 13534 / 14534 sub 1-32 TPDO-4 I-1A03 sub 1-32 13535 / 14535 sub 1-32 TPDO-5 I-1A04 sub 1-32 13536 / 14536 sub 1-32 TPDO-6 I-1A05 sub 1-32 13537 / 14537 sub 1-32 TPDO-7 I-1A06 sub 1-32 13538 / 14538 sub 1-32 TPDO-8 I-1A07 sub 1-32 13539 / 14539 sub 1-32 TPDO-9 I-1A08 sub 1-32 13538 / 14538 sub 1-32 TPDO-10 I-1A09 sub 1-32 16 Under the Lenze codes 13484 / 14484 (source RPDO) and 13784 / 14484 (source TPDO) you can see which of the 10 possible PDO mappings or PDO assignments has been transferred from the master to the slave and is effective. 17 Under the indices I-1C12/1 and I-1C13/1 you can also see which of the 10 possible PDO mappings is active. In this case, '2' stands in L-C 13484 and L-C 13784, i.e. I-1602 and I-1A02 are active. In this case, these are the indices I-1602 and I-1A02 =>Cyclic Position Mode Page 19 of 33

18 You can also change/adapt the preconfigured PDO mappings from the xml file. Use the context menu to Delete variables or Insert new variables. 19 You can insert any CiA 402 variables available. 20 The System Manager does not automatically assign the variables Mode of Operation and Mode of Operation Display to the NC. When using these variables, use the global variables of the PLC program and assign the variables manually to the PLC program. 21 For the Lenze CiA402 axis, the mode NEEDS TO BE set via EtherCAT! This can be done in two different ways: either via the process variable Mode of Operation or via the CiA 402 index I-6060. The index can either be set via the CoE parameter channel from the PLC program or you can insert it in the Startup tab for the EtherCAT slave. If the Mode of Operation is set via the index I-6060, there must be no Mode of Operation process variable available. Otherwise, this variable would overwrite the value! The CiA 402 mode is selected via Mode of Operation and the current CiA 402 mode of the axis is indicated via Mode of Operation Display. Page 20 of 33

22 In the Startup tab, you can also add additional codes which you want to sent to the slave when the EtherCAT master is started. Click the right mouse button => context menu => Insert or New to add new Startup codes. The index list in the screen shot shows the PDO mapping sent to the slave when the master is started. 23 The following dialog contains a list of all CiA 402 indices available in the Lenze 94xx TA. 24 In the box framed red you can find the Lenze codes. Page 21 of 33

25 If you wish to create additional Lenze codes in the Startup dialog, select the following settings in the Edit CANopen Startup Entry dialog. Enter the index using the Lenze formula 24575 Lenze code and conversion into hex. Select the subindex and enter the data to be written in a binary formula into the corresponding data field. In this case, the value 256 dec (0x00000100) was written to the Lenze code L-C0011 (24575 11 = 24564dex => 0x5FF4). 26 In the CoE tab (CAN over EtherCAT parameter channel), the standardised indices and their online values are displayed. 27 The current state of the EtherCAT slave is indicated in the Online tab. 28 As described under step 13, 4 variables have been automatically assigned to the CiA 402 drive in the NC axis. A CANopen DS402 axis has been selected as axis type. In the Settings tab of the NC you can select the measuring unit. In this case mm. In the NC, an axis is divided into several subaxes. The Axis 1_Enc takes care of the current actual position value. In the Axis 1_Drive, the position setpoint and the status and control word are edited and assigned. Page 22 of 33

29 Enter the scaling factor 0.00228881835937 from chapter 4.2, step 2 in the Parameter tab of the Axis 1_Enc. The scaling factor contains a point and no comma! Click Download to transfer changes in the Parameter tab to the NC! 30 To check whether the selected TwinCAT configurations are correct, activate the configuration in the Free Run mode. For this, check the configuration, activate the configuration and restart the configuration in the Free RUN mode. 31 After this, download the configuration to the EtherCAT master and restart the EtherCAT system through the master. In the Free Run mode, the EtherCAT master runs without PLC program in the background. Page 23 of 33

32 The Online NC user interfaces will now appear online and you can work with them. The actual position of the axis is displayed in the red window. 33 Before working with the user interfaces, select the Mode of Operation as described in step 21 and, if necessary, set a home position for the drive using bit 11 of the Controlword. 34 In the Parameter tab under the NC axis you can select many NC parameters such as reference velocities, etc. 35 Click Set in the Online NC user interface to enable the axis. Then click All in the Set Enabling dialog to set all enable bits required. Page 24 of 33

36 When the axis has enabled successfully, this will be indicated by the bit Ready in the Online dialog. To enable the axis, the NC sends the value 0x31 as Controlword to the drive. In the Engineer, the Cyclic Synchronous Position Mode dialog will appear as follows after the axis has been enabled. 37 In the Cyclic Synchronous Position Mode, the Controlword is assigned as follows: Bit Signal Meaning 0 SwitchOn Ready to switch on 1 Enable Voltage Speed follower is enabled 2 Quick Stop Quick stop 3 Enable Operation Controller inhibit 4 Enable Operation Controller inhibit Interpolated Position Mode 5-6 Reserved 7 Fault reset Fault reset 8 Halt 9-10 Reserved 10 Load Home Position Set home position 11 Reset Home Position Reset home position 12-15 Reserved Page 25 of 33

38 In the Cyclic Synchronous Position Mode, the Statusword is assigned as follows: Bit Signal Meaning 0 ReadyTo Switch On Device status: ready to switch on 1 Switch On Device status: switched on 2 Operation Enable Device status: operation 3 Fault Device status: fault 4 Voltage Enable DC-bus voltage is available 5 Quick Stop Quick stop is active 6 Switch on disabled Switch-on inhibit is active 7 Warning Warning is active 8 Following error Following error 9 Remote Drive can accept commands via fieldbus 10 Target Reach Target position reached 11 Reserved 12 Operation Mode active Operating mode is active 13 Reserved 14 Home Position available Home position is available 15 Reserved 39 Use the function keys F1-F4 to traverse the axis in the manual jog mode of the NC. 40 In the Functions tab, different start modes, e.g. Absolute position, can be selected for traversing. For this, a target position and a target velocity need to be selected. Click Start to start absolute positioning. The different start modes are also available as Motion FB in the Beckhoff PLC environment. Page 26 of 33

41 Each NC axis has a fixed variable structure for being transferred to the PLC program. These variables are used in the PLC program. The Beckhoff Motion library is available for this. From the NC to the PLC, the structure is called Axis_1_To_PLC and from the PLC to the NC Axis_1_FromPLC 6. Creating a TwinCAT PLC project and assigning variables with the NC These instructions are based on the Beckhoff PLC example TcNcsample PTPmoveV2_01.exe. The example is available on the Beckhoff homepage. No. Action Comment 1 Start the Beckhoff TwinCAT PLC Control software and open the example PLC project 94xx_Highline_CiA_402.pro In the example, a PC target system has been selected. 2 The PLC project has the following project structure. 3 The following libraries are integrated in the PLC project. Page 27 of 33

4 The transfer of the variable with the NC axis in the System Manager is declared as follows: 5 The structure of the MAIN program is very easy. Go to the Axis Enable POU. 6 Call the MC_Power POU. This POU enables the axis (Control and Statusword). The POU requires one enable bit each for Enable, Enable_Positive and Enable_Negative. Just like for the Online NC user interface, set the Override value to 100 %. In addition, you need the global variable structures NcToPLC and NCFromPLC. The MC_Power POU corresponds to release from the NC Online tab described in chapter 5.1, step 35. 7 The MAIN PRG contains a small program code for traversing the axis. The axis shall travel forward and backward between 0 and 2000 mm. Page 28 of 33

8 Use the MoveAxis POU to traverse the axis. The POU is enabled via the Execute input and also gets the Target position and Velocity from this input. Here, the variable structure NcToPlc is needed again. 9 Save and compile the project and load it into the target system. 10 Go to the System Manager and click the right mouse button to append a PLC program. 11 After appending the PLC program, the global variables will be indicated in the TwinCAT System Manager. Click Linked to... to assign the global variables to the NC variable structure. Now you can assign the PLC variable structure NcToPLC to the NC axis. Repeat this for the variable structure NcFromPLC. 12 After this, restart the System Manager configuration. 13 When the system is in the Run mode and the PLC program has been started, enable the Lenze CiA402 drive via the variable blenzeenable, blenzeenablepositive and blenzeenablenegative. Page 29 of 33

7. Example signal flow chart for the setpoint target position Beckhoff TwinCAT PLC Control NC NcToPLC This variable connection must be assigned by the user himself in the NC Axis 1_from_PLC Variable Axis 1_Drive_Out noutdata1 and noutdata2 Variable Position System Manager Variable Target Position xml files Index 0x607A Green arrows are automatic variable assignments through TwinCAT EtherCAT 94xx Highline TA CiA402 Index 0x607A Page 30 of 33

8. Distributed Clocks (DC) EtherCAT synchronisation The EtherCAT synchronisation contains 2 functions: 1. With the DC synchronisation, process data acceptance can be synchronised for all slaves. 2. In addition, it is possible to synchronise the controller cycle of the 94xx servo inverter. This is particularly useful for synchronous operation. With EtherCAT, the synchronicity between the fieldbus communication and the connected slaves is not as usual transmitted via the fieldbus, but each slave has its own internal 'clock' for this. One slave in the network acts as the so-called 'master clock' and the clocks of the other slaves are adapted to it with the runtimes on the bus being considered. In this way, the internal clock ensures the synchronous process data acceptance for each slave. The clocks are cyclically readjusted during bus operation. No. Action Comment 1 The synchronisation can be activated for every single EtherCAT node under the DC tab in the Beckhoff System Manager by selecting DC for synchronization. Changes will only become effective after reconfiguring and restarting the EtherCAT master! 2 When DC is active for the EtherCAT module, '1' is indicated under code L-C13883 / 14883. 3 In addition to synchronous process data acceptance on the EtherCAT module via DC, you can also synchronise the 94xx controller cycle. For this, set the sync source of the controller, code L-C1120, to the slot into which the EtherCAT module is plugged. This setting can also be selected via the application user interface of the EtherCAT module. Page 31 of 33

9. Wireshark bus analyser with TwinCAT No. Action Comment 1 The Twin CAT System Manager allows you to activate a mode with bus analyser for the EtherCAT master. Etherreal is the earlier name of the Wireshark software! 2 The Wireshark analyser software is free-of-charge available in the Internet at http://www.wireshark.org/. 3 When the EtherCAT system is started, the following message appears because operation with Wireshark is possible. 4 When EtherCAT is running, you can now start the Wireshark analyser software. 5 Select the EtherCAT interface used under the menu items Capture => Interface. 6 In the example, this is the interface with the IP address 169.254.143.191. Click Start to start the analysis. Page 32 of 33

7 After completion of the analysis, the recorded telegrams are listed. In the example, only the telegrams of the source dell_9f:ab:4c are of interest. LWR = Write data from master to slave LRD= Read data from slave to master Wireshark can only be used to record data. You cannot send data on the bus on your own! 6 process data bytes 0x0040 current status word In the user data, you can see the 6 process data bytes in both directions. 8 Note: Exact EtherCAT bus analyses can only be carried out with an additional hardware component from Beckhoff (ET2000). Page 33 of 33