+ All Categories
Home > Documents > EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with...

EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with...

Date post: 05-May-2018
Category:
Upload: doandan
View: 218 times
Download: 2 times
Share this document with a friend
52
EtherCAT® Design Tool User Manual © port GmbH, Halle 2014/07/01; EtherCAT® Design Tool Version 1.1.1
Transcript
Page 1: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

EtherCAT® Design Tool

User Manual

© port GmbH, Halle 2014/07/01; EtherCAT® Design Tool Version 1.1.1

Page 2: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Disclaimer

All rights reserved

The programs, boards and documentations supplied by port GmbH are created with duediligence, checked carefully and tested on several applications.

Nevertheless, port GmbH can not take over no guarantee and no assume del credere lia-bility that the program, the hardware board and the documentation are error-free respec-tive are suitable to serve the special purpose.

In particular performance characteristics and technical data given in this document maynot be constituted to be guaranteed product features in any leg al sense.

For consequential damages, which are emerged on the strength of use the program andthe hardware boards therefore, every legal responsibility or liability is excluded.

port has the right to modify the products described or their documentation at any timewithout prior warning, as long as these changes are made for reasons of reliability ortechnical improvement.

All rights of this documentation lie with port. The transfer of rights to third parties orduplication of this document in any form, whole or in part, is subject to written approvalby port. Copies of this document may however be made exclusively for the use of theuser and his engineers. The user is thereby responsible that third parties do not obtainaccess to these copies.

The soft- and hardware designations used are mostly registered and are subject to copy-right.

CANopen®is registered trademark, licensed by CiA - CAN in Automation e.V., Germany.

EtherCAT®is registered trademark and patented technology, licensed by Beckhoff AutomationGmbH, Germany.

We are thankful for hints of possible errors and may ask around for an information.

We will go all the way to verify such hints fastest

Copyright

© 2014 port GmbHRegensburger Straße 7D-06132 HalleTel. +49 345 - 777 55 0Fax. +49 345 - 777 55 20E-Mail [email protected] http://www.port.de

Page 3: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Table of Contents

1. Abbreviations . . . . . . . . . . . . . . . . . . . . . 5

2. References . . . . . . . . . . . . . . . . . . . . . . 7

3. Introduction . . . . . . . . . . . . . . . . . . . . . . 9

3.1. Product overview . . . . . . . . . . . . . . . . . . . . 9

3.2. Product structure . . . . . . . . . . . . . . . . . . . . 10

3.3. System requirements . . . . . . . . . . . . . . . . . . . 11

3.4. Installation . . . . . . . . . . . . . . . . . . . . . . 11

3.5. Support by port . . . . . . . . . . . . . . . . . . . . 12

4. Device structure . . . . . . . . . . . . . . . . . . . . . 13

5. File structure . . . . . . . . . . . . . . . . . . . . . . 15

5.1. DT project file . . . . . . . . . . . . . . . . . . . . . 15

5.2. Profile databases . . . . . . . . . . . . . . . . . . . . 15

5.3. Generated files . . . . . . . . . . . . . . . . . . . . 16

6. Graphical user interface . . . . . . . . . . . . . . . . . . 17

6.1. Menu . . . . . . . . . . . . . . . . . . . . . . . 17

6.1.1. File . . . . . . . . . . . . . . . . . . . . . . . 17

6.1.2. Edit . . . . . . . . . . . . . . . . . . . . . . . 17

6.1.3. Generate . . . . . . . . . . . . . . . . . . . . . . 17

6.1.4. Show . . . . . . . . . . . . . . . . . . . . . . . 17

6.1.5. Options . . . . . . . . . . . . . . . . . . . . . . 17

6.1.5.1. View Options . . . . . . . . . . . . . . . . . . . . 17

6.1.5.2. Generation Options . . . . . . . . . . . . . . . . . . 18

6.1.5.3. Import Options . . . . . . . . . . . . . . . . . . . 18

6.1.6. Help . . . . . . . . . . . . . . . . . . . . . . . 18

6.2. Toolbar . . . . . . . . . . . . . . . . . . . . . . . 19

6.3. Project tree . . . . . . . . . . . . . . . . . . . . . . 19

6.3.1. General settings . . . . . . . . . . . . . . . . . . . . 19

6.3.1.1. C Code Generation . . . . . . . . . . . . . . . . . . 19

6.3.1.2. Advanced Configuration . . . . . . . . . . . . . . . . 19

6.3.1.3. Service Settings . . . . . . . . . . . . . . . . . . . 19

6.3.2. EtherCAT Slave Information . . . . . . . . . . . . . . . 20

6.3.3. Hardware configuration . . . . . . . . . . . . . . . . . 20

6.3.4. Line . . . . . . . . . . . . . . . . . . . . . . . 20

6.3.4.1. Object Dictionary . . . . . . . . . . . . . . . . . . 20

Version: 1.1.1 EtherCAT® Design Tool Page 3 of 52

Page 4: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

7. Project editing . . . . . . . . . . . . . . . . . . . . . 21

7.1. Beginning a project . . . . . . . . . . . . . . . . . . . 21

7.2. Hardware configuration . . . . . . . . . . . . . . . . . . 21

7.3. Application variables . . . . . . . . . . . . . . . . . . 21

7.3.1. C Implementation . . . . . . . . . . . . . . . . . . . 22

7.4. Parameterization . . . . . . . . . . . . . . . . . . . . 23

7.5. Generation of source code . . . . . . . . . . . . . . . . . 23

7.6. %-Variables . . . . . . . . . . . . . . . . . . . . . 24

7.7. {}-Expressions . . . . . . . . . . . . . . . . . . . . 24

8. Complex data types . . . . . . . . . . . . . . . . . . . . 27

9. Slave information interface coding . . . . . . . . . . . . . . . 29

10. Manufacturer-specific object descriptions . . . . . . . . . . . . 33

10.1. Format descriptors . . . . . . . . . . . . . . . . . . . 33

10.2. Example for html-documentation . . . . . . . . . . . . . . 35

10.3. Example for tcl-scripts . . . . . . . . . . . . . . . . . . 36

10.4. Example for rtf documents . . . . . . . . . . . . . . . . 36

10.5. Example for csv-files . . . . . . . . . . . . . . . . . . 37

11. EtherCAT-Merge PlugIn . . . . . . . . . . . . . . . . . . 39

11.1. Project View . . . . . . . . . . . . . . . . . . . . . 39

11.2. Detail View . . . . . . . . . . . . . . . . . . . . . 40

12. Extension module: csv-import . . . . . . . . . . . . . . . . 41

12.1. Structure of the csv-file . . . . . . . . . . . . . . . . . 41

12.2. Input parameters for the csv-import . . . . . . . . . . . . . . 42

12.2.1. Line . . . . . . . . . . . . . . . . . . . . . . . 42

12.2.2. Index offset . . . . . . . . . . . . . . . . . . . . 42

12.2.3. csv-file . . . . . . . . . . . . . . . . . . . . . . 43

12.2.4. Header in csv-file . . . . . . . . . . . . . . . . . . . 43

12.2.5. csv-specifier line . . . . . . . . . . . . . . . . . . . 43

12.3. csv-specifiers . . . . . . . . . . . . . . . . . . . . . 43

12.4. csv-separator . . . . . . . . . . . . . . . . . . . . . 50

12.5. Limitations . . . . . . . . . . . . . . . . . . . . . 50

Index . . . . . . . . . . . . . . . . . . . . . . . . . 51

Page 4 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 5: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

1. Abbreviations

CAN Controller Area Network

CiA CAN in Automation international users and manufacturers group e.V.

COB Communication Object (CAN Message)

COB-ID Communication Object Identifier

CSDO Client SDO

csv comma separated value files

DT Design Tool

EDS Electronic Data Sheet

EMCY Emergency Object

ESC EtherCAT Slave Controller

ESI EtherCAT Slave Information

GUI graphical user interface

NMT Network Management

PDO Process Data Object

SDO Service Data Object

SSDO Server SDO

SYNC Sychronization Object

TIME Time Stamp Object

XDD XML device description

XML eXtensible Markup Language

Version: 1.1.1 EtherCAT® Design Tool Page 5 of 52

Page 6: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 6 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 7: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

2. References

/CiA-306-1/ CiA standard 306-1 "Electronic device description, EDS and DCF",V1.3.5

/ETG 1000.5/ EtherCAT Specification - Part 5"Application Layer service definition", V1.0.2

/ETG 1000.6/ EtherCAT Specification - Part 6"Application Layer protocol specification", V1.0.2

/ETG 2000/ EtherCAT Slave Information "Specification", V1.0.2

/RFC 4180/ Network Working Group, Request for Comments: 4180Y. Shafranovich, SolidMatrix Technologies Inc., October 2005

Version: 1.1.1 EtherCAT® Design Tool Page 7 of 52

Page 8: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 8 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 9: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

3. Introduction

3.1. Product overview

The EtherCAT® Design Tool of port is a software tool for the development of Ether-CAT® devices. It manages properties, hardware configurations and the CANopen objectdictionary of the EtherCAT® device. In the result the EtherCAT® Design Tool gener-ates:

• C code for the configuration, optimization and initialization of the Library,

• the object dictionary as C code,

• electronic device descriptions and

• various documentations.

Design Tool project

description templates formanufacturer-specificobject documentations

import:hardware configurationselectronic device descriptionsCSV object documentation

C code for Library configurationC code for Library initializationC code for Object Dictionaryelectronic device descriptionsHTML documentationTXT docuentation

export:hardware configurationsmanufacturer-specific profile databases

Design Tool

hardware configurationsprofile databasesextensions

processes

Design Tool project

settings about the GUI

manufacturer-specificobject documentations

manufacturer-specificdatabases

manufacturer-specificdatabases

figure 1: Design Tool

With the EtherCAT® Design Tool an instrument is available which frees the developer oferror-prone activities repeating itself. It ensures consistency of implemented functional-ity, electronic device descriptions and device documentations.

The created object dictionary supports numerous options of the EtherCAT® Library fromport. A tree representation of all implemented parameters and data eases the maintenanceof device software. With the EtherCAT® Design Tool the beginning with the Ether-CAT® protocol is less difficult and the development of a device is accelerated.

Version: 1.1.1 EtherCAT® Design Tool Page 9 of 52

Page 10: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

3.2. Product structure

functionality DT demo version DT full version

availability free licensed

15 allmaximal number of main-indices

65 allmaximal number of sub-indices

255 512maximal number of PDOs

x xgeneration of Library configuration

generation of C-code x x

x xgeneration of ESI

x xgeneration of documentation in html-format

x xgeneration of documentation in txt-format

x xgeneration of manufacturer-specific object

descriptions

EtherCAT communication profile x x

profile database 401 — licensed

profile database 402 — licensed

profile database 405 — licensed

profile database 406 — licensed

profile database 410 — licensed

profile database 417 — licensed

profile database 418 — licensed

profile database 419 — licensed

profile database 452 — licensed

extension csv-import — licensed

extension Merge — licensed

table 1: product structure

The profile databases include the object specifications of the suitable CiA standard forimport. The scope of delivery of the EtherCAT® Design Tool comprises:

• software of the EtherCAT® Design Tool

• user manual

• profile databases

• extensionsThe EtherCAT® Design Tool is available on the web-site of port for download under

Products / EtherCAT / Tools / EtherCAT® Design Tool.

Page 10 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 11: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

All licensed parts of the EtherCAT® Design Tool must be activated by a valid licensebefore usage.

3.3. System requirements

The EtherCAT® Design Tool runs on PC’s with Microsoft Windows™ or Linux.

Operating System: Windows 2000, Windows XP, Vista, Windows 7, LinuxProcessor: Pentium IV or laterRAM: 512 MByteHard-disk Space: 45 MByte

3.4. Installation

For installation do the following steps:

1. Unpack the archive in zip-format.

2. for Windows™: Execute the setup program setup.exe.

for Linux: Unpack the archive in tgz-format.

After installation you will find the directory structure shown in figure 2 with:

• profiles: contains all profile databases for import

• examples: contains sample files for import

• manual: contains the user manual

• help: only for private usage of the EtherCAT® Design Tool

Design Tool

profiles

examples

help

<example 1>

<example n>

manual

figure 2: directory structure of the EtherCAT® Design Tool

Version: 1.1.1 EtherCAT® Design Tool Page 11 of 52

Page 12: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

On Windows™ systems the EtherCAT® Design Tool can be started by the icon on thedesktop or via the start menu.

On Linux systems the EtherCAT® Design Tool can be started by calling the programdesigntool.

3.5. Support by port

Please contact us for sales via

e-mail: [email protected]

phone: +49 345 777 55 - 0

fax: +49 345 777 55 - 20

Please contact us for technical support via

e-mail: [email protected]

The engineers at port will give you some assistance as soon as possible.

port provides consultations in the whole field of EtherCAT® e.g. network planning, net-work configuration, message distribution, selection of devices and EtherCAT® Profileimplementations.

Page 12 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 13: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

4. Device structure

Each DT project specifies a field device with 1 EtherCAT® device. Each EtherCAT®device is connected with one EtherCAT® network. That means each EtherCAT® deviceis assigned to an EtherCAT® line.

field device

EtherCAT device

communication

segment

1st logical device

manufacturer-specific

segment

device-profile

segment

.

.

.

.

8th logical device

manufacturer-specific

segment

device-profile

segment

manufacturer-specific

segment

figure 3: device structure

Each EtherCAT® device can have 1-8 logical devices.

Version: 1.1.1 EtherCAT® Design Tool Page 13 of 52

Page 14: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 14 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 15: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

5. File structure

5.1. DT project file

All information of a DT project is stored in the DT project file. Nevertheless it is usefulto have a working directory for each DT project, because the most generated files will bestored in the working directory of the DT. The file extension for the EtherCAT® DesignTool is ".ect".

5.2. Profile databases

Profile databases contain standardized objects with their attributes and allow implementa-tions in shortest time. The EtherCAT® Design Tool is delivered with profile databasesfor communication objects according to ETG standards.

If communication objects are set up with the EtherCAT® Design Tool, the objects will beloaded automatically from the profile databases. Additionally various profile databases toprofile device standards are available at port, see table 1 and table 2.

Objects within segments in the project tree can be exported to own profile databases. Theobjects from all profile databases can be imported. The generation with objects from pro-file databases, created by port, fails without a valid license for the suitable profile data-base.

profile database file reference to standard

version content

ecat_comm.pro ETG 1000, V1.0.2 communication profile

profile401.pro CiA-401, V2.1 generic I/O modules

profile402.pro IEC 61800-7,December 2007

drives and motion control

profile405.pro CiA-405, V1.0 IEC 61131-3 programmabledevices

profile406.pro CiA-406, V3.2 +V3.1

encoder

profile410.pro CiA-410, V1.1 inclinometer

profile417-3.pro CiA-417-3, V2.0 lift

profile417-4.pro CiA-417-4, V2.0

profile418.pro CiA-418, V1.0.1 battery modules

profile419.pro CiA-419, V1.0.1 battery chargers

profile452_v1_0_0.pro CiA-452, V1.0.0 PLCopen motion control

table 2: overview about profile databases

Version: 1.1.1 EtherCAT® Design Tool Page 15 of 52

Page 16: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

5.3. Generated files

An overview about the generated output files gives table 3.

File Description

ecat_conf.h configuration file for the Library in C code

ec_od.c Object dictionary implementation in C code

ec_objects.[h,c] generated application variables in C code

ec_init.c initialization file for the Library in C code

<edsFileName>.eds EDS file according to /CiA-306/

<edsFileName>.xml ESI file in xml-format according to /ETG 2000/

<edsFileName>.txt description file for the EtherCAT® Device Monitor

<projectName>_docu.txt documentation of implemented objects in txt-format

<projectName>.html documentation of the DT project in html-format

<projectName>_eeprom.bin SII configuration for storage in the EEPROM

according to /ETG 1000.6/

<manufacturer-specific> manufacturer-specific object descriptions (optional)

generate.err information file with error and warning messages

table 3: generated files

Page 16 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 17: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

6. Graphical user interface

The EtherCAT® Design Tool is controlled via

• menu,

• toolbar and

• project tree with masks on tabs.

Information in html-format are indicated in the standard browser.

6.1. Menu

6.1.1. File

The menu File controls the DT project files and terminates the DT.

6.1.2. Edit

The menu Edit allows to copy, cut, paste, delete and duplicate objects in the project tree.

6.1.3. Generate

The menu Generate provides the generation process of the output files depending on thesetting in the menu Generate / Generate Documentation and the settings in the menuOptions / Generation Options. The content of the output files can be specified about thesettings in the project tree, see chapter 6.3.

It is possible to execute application-specific programs before and after generation. Thecommands can be entered about the menu items Pre-Generation Command and Post-

Generation Command. The command can be a shell-script or a batch file, or you can callan executable file, e.g. the EDS checker, make all. The output of the command is writteninto the information file "generate.err".

6.1.4. Show

The menu Show allows to indicate all generated files.

6.1.5. Options

The menu Options provides configuration settings related to the DT itself.

Version: 1.1.1 EtherCAT® Design Tool Page 17 of 52

Page 18: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

6.1.5.1. View Options

Use mask view:This option determines the active tab after selection of an object in the project tree.

on: Tab Mask is indicated first.

off: Tab Structure is indicated first.

Hexadecimal value presentation:This option determines the format for the indication of numerical values.

on: hexadecimal

off: decimal

Font settings:The font of views can be configured.

Expert Mode:Properties of objects in the Communication Segment of the project tree are restrictedto avoid settings which violates CiA standards. This constraint can be removedabout this option.Modifications made in the Expert Mode are not reset if the Expert Mode is switchedoff. It is possible to load the default settings for the object from the profile databaseabout tab Structure / button Default Values.

on: The Expert Mode is active. Object properties can be adapted to special applica-tion requirements. ATTENTION! It is possible that the modified object proper-

ties violates standards and the ETG Conformance Test is not passed.

off: The Expert Mode is deactive.

6.1.5.2. Generation Options

Manufacturer-specific object description:About this option the user can configure up to 3 description templates and thedesired documentation files. For more details see chapter 10.

6.1.5.3. Import Options

Use Application Variables:This option activates an function which converts the data type of sub-index 0 forobjects of object code "ARRAY" or "RECORD" and the C implementation type isset to "Application Variable", if the implementation type is unknown.

6.1.6. Help

The menu Help provides:

Page 18 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 19: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

• context help to the selected view,

• DT user manual

• overview about available compiler defines,

• information about the current license and available extensions,

• routine for installing license,

• actual version of the DT and

• information to the newest available DT version.

6.2. Toolbar

The toolbar below the menu provides a fast access to:

• control functions for DT project files

• editing functions for the project tree

• generation process

• query of the newest available DT version

6.3. Project tree

The project tree represents all information to the field device. About button <F1> theonline help for each view is available.

6.3.1. General settings

The general settings makes common configurations related to the field device.

6.3.1.1. C Code Generation

These options determine code-specific properties to allow the integration of the Libraryinto application code.

6.3.1.2. Advanced Configuration

This mask allows to make device-specific definitions. These definitions have to be writ-ten in C syntax and are taken over into the configuration file for the Library.

6.3.1.3. Service Settings

The service settings are specific settings for communication services related to the fielddevice.

Version: 1.1.1 EtherCAT® Design Tool Page 19 of 52

Page 20: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

6.3.2. EtherCAT Slave Information

Information about the manufacturer and the device are necessary for the ESI file.

6.3.3. Hardware configuration

The DT provides the possibility to configure more than one hardware configuration forthe field device. This can be useful when different hardware environments are used dur-ing development, test and production for instance. But only one hardware configurationcan be active.

The hardware configuration is generated to the configuration file ecat_conf.h and is usedby the EtherCAT® driver.

It is configurable to generate the C code settings for all hardware configurations or onlyfor the active hardware configuration about General Settings / C Code Generation / Gen-

erate only active hardware configuration. In the case that the C code settings for all hard-ware configurations are generated only the settings for the active hardware configurationis valid during compilation of the application code.

6.3.4. Line

The Line item in the project tree includes the object dictionary for the line.

6.3.4.1. Object Dictionary

The object dictionary specifies all needed objects and their properties.

Page 20 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 21: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

7. Project editing

This chapter describes the working flow for creating and editing projects. The order ofthe flow is not mandatory, but very useful. Basic parameter like the number of Ether-CAT® lines and the kind of the device (Slave or Master) should be clear at the beginningof the development. The necessary steps are the following:

• configuration of global parameter

• configuration of global ESI resp. EDS parameter

• configuration of the hardware settings

• configuration of standard and additional settings

• definition of application variables

• parameterization of application variables

• definition of communication variables

• parameterization of communication variables

• optimization of each object if needed

• generation of outputs

7.1. Beginning a project

A project is created by the menu File → New Project.Existing projects are opened by the button Open Project or the menu File.Each EtherCAT® line can be preset with data from a profile or an EDS file.

7.2. Hardware configuration

At first the target hardware has to be configured. The most important decision is tochoose a CPU resp. an operating system.These configuration files (conf_xxxx.h) can be imported via "Import Configuration".

If the CPU is set, the other CPU settings are set to CPU-specific default values. Thesedefault values are suitable in the majority of cases. At Compiler Settings the used com-piler can be selected.

If the application shall be used on different hardware plattforms, more than one hardwareconfiguration can be created. If no configuration is marked as active, the define CON-

FIG_USE_TARGET_x must be set to 1 in the Makefile or in the compiler project.

7.3. Application variables

Definition of application variables is the creation of objects with indices in the range of2000h − 5FFFh for manufacturer-specific objects or in the range of 6000h − 9FFFh forstandardized device-profile objects. There are two ways for the definition:

Version: 1.1.1 EtherCAT® Design Tool Page 21 of 52

Page 22: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

• loading from a profile database and

• creation by hand

Certain objects can be selected by means of their index from a profile database. Data-bases for the standardized EtherCAT® device profiles are available from port. If a data-base does not yet exist, please contact port (see chapter 3.5). All non-standardizedobjects and not provided objects by a database can be created by hand.The main-index defines the structure and properties for all sub-indices of the object.

Figure 8, import mask for profiles

7.3.1. C Implementation

There are different possibilities of the C implementation of an object. These possibilitiesare explained in the following table.

Type Description

Managed Constant The value of the object cannot be changed and it is managed

by the CoE library.

Managed Variable The value of the object can be modified at run-time from

EtherCAT (according to the access right) and from the appli-

cation using the function putObj().

The memory for this object is allocated by the CoE library.

Page 22 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 23: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Type Description

Application Variable An variable of the application is used for this object. If the

value of the object is changed via EtherCAT the variable is

updated automatically. The value of the object can be

changed from EtherCAT or from the application using the

function putObj() or directly using the variable name.

If the optimization option "Create Variable" is active, the

variable is defined (created) by the EtherCAT® Design Tool.

Otherwise an existing variable can be reused.

Application Array This setting is only valid for ’Array’ objects. The object

object an C array of the application is used. If the values of

the objects are changed via EtherCAT the array elements are

updated automatically. The value of the objects can be

changed from EtherCAT or from the application using the

function putObj() or directly using the variable name.

Sub index 1 of the object corresponds to the array element 0

if the array in C. This kind of implementation can only be

used, if all sub indices (starting at 1) share the same default

values, limits and access rights.

If the optimization option "Create Variable" is active, the

variable is defined (created) by the EtherCAT® Design Tool.

Otherwise an existing variable can be reused.

Table 4, C implementation types

Hints for migrating from CANopen or Powerlink Design Tool:

With the CANopen Design Tool only ’Application Variable’ resp. ’Application Array’was possible and with the Powerlink Design Tool only ’Managed Constant’ or ’ManagedVariable’. The EtherCAT Design Tool supports now all implementation types.

At the import of existing projects of the other Design Tools the implementation type is setaccording to the setting Options→Import Options→Use Application Variables.

7.4. Parameterization

For parameterization of communication variables the mask view can be used. With theseforms the parameterization of more complex data like PDO parameter and PDO mappingis very easy.

Version: 1.1.1 EtherCAT® Design Tool Page 23 of 52

Page 24: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

7.5. Generation of source code

When the button Generate is pressed the object dictionary implementation in C-code theinitialization and configuration files and furthermore an EDS resp. ESI file for each Ether-CAT® line (<ProjectName>line<lineNo>.eds and if activated a documentation(<project name>.html) are generated. These files are always consistent and contain thedate and the time of generation. Another file (generate.err) contains warnings anderrors. It is recommended, to have a look to this file by means of Show after each genera-tion.

7.6. %-Variables

%-variables can be used in object names and variable names of indices and object namesof sub-indices. In the file objects.c, in the EDS files and in the documentation and also inthe object tree they are replaced by their current values.

Name Description

%i number of the index

%s number of the sub-index

%l number of the line

%f number of the service (SSDO, CSDO,

RPDO, RPDO-Mapping, TPDO-Mapping,

SRDO, SRDO-Mapping) starting at 1

%p (index - start of segment) starting at 0

%q (index - start of segment + 1) starting at 1

%u (index - start of sub segment) starting at 0

%v (index - start of sub segment + 1) starting at 1

%t short name of data type

Table 5, %-variables

When using lower case letters for the variables a decimal value is returned. Otherwise ahexadecimal value without leading "0x". Variables that are undefined in the current con-text (e.g. %s at an index) return an empty string.

Examples für the usage of these %-variables can be found at the SDO or PDO objects inthe communication profile.

7.7. {}-Expressions

The {}-expressions allow the usage of %-variables and mathematical operators. Inside ofthe braces %-variables, constants (decimal/hexadecimal) and the operators + - * and / canbe used.

Page 24 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 25: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Examples for valid object names with {}-expressions:

• output {%i - 0x100}

• state {%p + 100} at device %l

Version: 1.1.1 EtherCAT® Design Tool Page 25 of 52

Page 26: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 26 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 27: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

8. Complex data types

The standard /CiA-301/ allows the definition of manufacturer-specific complex data typeswithin the index range 0040h-005Fh and device profile specific standard and complexdata types within the index range 0060h-025Fh. The DT only supports the device profilespecific complex data types with the object code DEFSTRUCT.

Before objects of such data types can be specified, the data type must be created in theDT. Data types are considered line-dependent, i.e. in order to specify objects of complexdata types the complex data type must be available on the same line.The following steps are necessary to create a new data type:

1. select Data Types in the project tree under Line / Object Dictionary

2. press Add new Data Type on tab Mask

→ the input dialog Add new Index is opened

3. enter the desired index into the dialog Add new Index in hexadecimal format withoutspecial identifier, example: 0040, and press <Enter>→ an entry for the new data type is in the project tree, see Line / Object Dictio-

nary/Data Types/<new index>

4. specify the new data type about button Add new Sub-Index, tab Structure and tabOptimization

If the data type is created, objects of the data type can be defined, when the objects havethe Object Code RECORD.

Version: 1.1.1 EtherCAT® Design Tool Page 27 of 52

Page 28: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 28 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 29: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

9. Slave information interface coding

The slave information interface implies the configuration for the EtherCAT Slave Con-troller (ESC). The EtherCAT Design Tool generates a binary EEPROM file<dt_project_name>_eeprom.bin, with the configuration for downloading and nonvolatilestorage in the EEPROM. The EEPROM mapping is specified in the standard /ETG1000.6/ in chapter "5.4 SII coding".

The EtherCAT Design Tool stores the slave information for the active hardware configu-ration as follow:

parameter GUI reference

PDI Control Hardware Configuration / Configuration / EEPROM Set-

tings / Config Data

PDI Configuration

SyncImpulseLen

PDI Configuration2

Configured Station

Alias

reserved

Checksum —

Vendor ID Line / Object Dictionary / Communication Segment /

<object 1018h/1>

Product Code Line / Object Dictionary / Communication Segment /

<object 1018h/2>

Revision Number Line / Object Dictionary / Communication Segment /

<object 1018h/3>

Serial Number Line / Object Dictionary / Communication Segment /

<object 1018h/4>

reserved —

Bootstrap Receive

Mailbox Output

Common Service Settings / NMT Settings / MBox-In start

address

Bootstrap Receive

Mailbox Size

Common Service Settings / NMT Settings / MBox-In size

Bootstrap Send Mail-

box Offset

Common Service Settings / NMT Settings / MBox-Out

start address

Bootstrap Send Mail-

box Size

Common Service Settings / NMT Settings / MBox-Out

size

Version: 1.1.1 EtherCAT® Design Tool Page 29 of 52

Page 30: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

parameter GUI reference

Standard Receive

Mailbox Offset

Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - Start Address

Standard Receive

Mailbox Size

Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - Default size

Standard Send Mailbox

Offset

Line / Object Dictionary / Communication Segment /

<object 1C11h> / Tab Mask - Start Address

Standard Send Mailbox

Size

Line / Object Dictionary / Communication Segment /

<object 1C11h> / Tab Mask - Default size

Mailbox Protocol General Settings / File over EtherCAT Support

General Settings / Ethernet over EtherCAT Support

Note: CoE is always supported.

reserved —

Size Hardware Configuration / Configuration / EEPROM Set-

tings / Size

Version —

category STRING

str1_len

str_1

EtherCAT Slave Information / Device / Name

str2_len

str_2

Note: image name " " (2 spaces)

str3_len

str_3

Note: order name " " (2 spaces)

str4_len

str_4

EtherCAT Slave Information / Device Group / Group

Name

str5_len

str_5

Note: name of the EtherCAT Design Tool

category General

GroupIdx —

Note: group information is set to 4

ImgIdx —

Note: image name is set to 2

OrderIdx —

Note: device order number is set to 3

NameIdx —

Note: device name information is set to 1

Page 30 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 31: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

parameter GUI reference

reserved —

CoE Details bit 0: always set

bit 1: Common Service Settings / SDO Settings /

SDO Info Service

bit 2: always set

FoE Details General Settings / File over EtherCAT Support

EoE Details General Settings / Ethernet over EtherCAT Support

SoE Details —

Note: reserved according to /ETG 1000.6/

DS402Channels —

Note: reserved according to /ETG 1000.6/

SysmanClass —

Note: reserved according to /ETG 1000.6/

Flags —

Note: not supported by EtherCAT Design Tool

CurrentOnEBus —

Note: not supported by EtherCAT Design Tool

PAD_Byte1 (reserved) —

Physical Port EtherCAT Slave Information / Device / Interface Physics

Note: 1.char is assigned to port 0, 2.char is assigned to port 1 etc., port

0-3 are supported.

PAD_Byte2 (reserved) —

category SyncM

Physical Start Address Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - Start Address

Length Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - Default size

Control Register Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - Initial Control Register

Value

Status Register —

Note: do not care

Enable Synch Manager Line / Object Dictionary / Communication Segment /

<object 1C10h> / Tab Mask - SyncManager enabled

Version: 1.1.1 EtherCAT® Design Tool Page 31 of 52

Page 32: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

parameter GUI reference

Sync Manager Type —

Note: not supported by EtherCAT Design Tool

analog for objects 1C11h, 1C12h and 1C13h

category FMMU

FMMU0 EtherCAT Slave Information / Device / FMMU MBox

State Entry

Note: used for outputs

FMMU1 EtherCAT Slave Information / Device / FMMU MBox

State Entry

Note: used for inputs

FMMU2 EtherCAT Slave Information / Device / FMMU MBox

State Entry

Note: used for SyncM status

FMMU3 EtherCAT Slave Information / Device / FMMU MBox

State Entry

Note: not used

table 6: EEPROM mapping generated by the EtherCAT Design Tool

The EtherCAT Design Tool assigns the categories in the order described in table 6. Acatagory is not stored if there is no enough EEPROM memory available and a warning isreported about the information file "generate.err". The EtherCAT Design Tool continousthe generation with the next category.

The categories TXPDO and RXPDO are not supported by the EtherCAT Design Tool.

The EEPROM size is set to 0 and the generated EEPROM file is empty, if there is nohardware configuration specified.

Page 32 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 33: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

10. Manufacturer-specific object descriptions

The DT provides format descriptors for the generation of manufacturer-specific objectdescriptions in ASCII-format for different document types.

The description template is a text in ASCII-Format including format descriptors forobject-specific information and is stored in a file. During the generation of all files thedescription template is applied to each object. In the result an object description is cre-ated. The description of all objects are stored in an object description file.

The DT is able to generate up to 3 different manufacturer-specific object descriptions dur-ing generation process. The files with the description templates and the location of theobject descriptions is configurable about the menu Options / Generation Options / Manu-

facturer-specific object descriptions, see figure 9.

figure 9: dialog Options / Generation Options / Manufacturer-specific object descriptions

10.1. Format descriptors

The DT supports the following format descriptors:

format

descriptor

description

%A access type in state SAFE-OPERATIONAL of the sub-index: RO,

WO, RW

%a access type in state PRE-OPERATIONAL of the sub-index: RO, WO,

RW

%B object code of the main-index in hexadecimal format without prefix

(example: 07)

%b access type in state OPERATIONAL of the sub-index: RO, WO, RW

Version: 1.1.1 EtherCAT® Design Tool Page 33 of 52

Page 34: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

format

descriptor

description

%d data type of the sub-index according to CiA-309-3 (example: u32)

%e object name of the main-index

%G C name of the data type of the main-index as string (example:

DATATYPE_T)

%g size in bytes of the sub-index in decimal format (example: 12)

%H data type number of the main-index in hexadecimal format without

prefix (example: 004A)

%h data type number of the sub-index in hexadecimal format without pre-

fix (example: 004A)

%I main-index in hexadecimal format without prefix (example: 1A00)

%i main-index in decimal format (example: 4096)

%L line number in hexadecimal format without prefix (example: A)

%l line number in decimal format (example: 12)

%m lower (minimum) limit of the sub-index

• for numerical objects: in hexadecimal format with prefix "0x"

(example: 0xFFFFFFFF)

• for string objects: <empty string>

%N object name of the sub-index as string

%p PDO mapping allowed for the sub-index: no, RxPDO, TxPDO, both

%q name of the sub-index in C code

%S sub-index in hexadecimal format without prefix (example: A)

%s sub-index in decimal format (example: 12)

%T description of the object

Take note that the Design Tool can not convert special characters

because it does not know the desired document type.

%U upper limit of the sub-index

• for numerical objects: in hexadecimal format with prefix "0x"

(example: 0xFFFFFFFF)

• for string objects: <empty string>

%u unit of the sub-index (example: 100 ms)

Page 34 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 35: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

format

descriptor

description

%V default value of the sub-index

• for numerical objects: in hexadecimal format with prefix "0x"

(example: 0xFFFFFFFF)

• for string objects: without quotation tags

(example: Test string)

%v default value of the sub-index

• for numerical objects: in decimal format

(example: 1614872592)

• for string objects: without quotation tags

(example: Test string)

%z enumeration counter of the object in decimal format, counting starts

with 0 (example: 12, i.e. it is the 12th object)

table 7: format descriptors

10.2. Example for html-documentation

Each object in the object dictionary is listed with index, sub-index in bold text style andthe object description. The following example only refers to object 1000h and 1001h.

description template:<p>

<b> object %Ih/%S </b>: %T</p>

object description:<p><b> object 1000h/0 </b>: The device type specifies the kind of device. The lower16 bit contain the device profile number and the upper 16 bit an additional informa-tion.</p><p> <b> object 1001h/0 </b>: The error register is a field of 8 bits, each for a cer-tain error type. If an error occurs the bit has to be set: Bit 0 generic error, Bit 1current, Bit 2 voltage, Bit 3 temperature, Bit 4 communication error (overrun,error state), Bit 5 device profile specific, Bit 6 reserved, Bit 7 manufacturer spe-cific</p>

indication in the web-browser:

object 1000h/0: The device type specifies the kind of device. The lower 16 bit con-tain the device profile number and the upper 16 bit an additional information.object 1001h/0: The error register is a field of 8 bits, each for a certain error type. Ifan error occurs the bit has to be set: Bit 0 generic error, Bit 1 current, Bit 2

Version: 1.1.1 EtherCAT® Design Tool Page 35 of 52

Page 36: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

voltage, Bit 3 temperature, Bit 4 communication error (overrun, error state), Bit 5device profile specific, Bit 6 reserved, Bit 7 manufacturer specific

10.3. Example for tcl-scripts

A list of all objects is created. The entry for each object starts with a comment includingthe enumeration counter. The enumeration counter is also used as list index for the listobjTab. The index, sub-index and the default value are listed for each object. The fol-lowing example only refers to object 1000h and 1001h.

description template:

#object %zset objNum %zset objTab($objNum,indexHex) 0x%Iset objTab($objNum,subHex) %Sset objTab($objNum,defValHex) "%V"

object description:

#object 0set objNum 0set objTab($objNum,indexHex) 0x1000set objTab($objNum,subHex) 0set objTab($objNum,defValHex) "0x00000000"#object 1set objNum 1set objTab($objNum,indexHex) 0x1001set objTab($objNum,subHex) 0set objTab($objNum,defValHex) "0x00"

The generated object list can be used after sourcing in a tcl-scripts .

10.4. Example for rtf documents

Each object in the object dictionary is listed with index, sub-index and the name. Thefollowing example only refers to object 1000h and 1001h.

description template:\par{\b Index:} 0x%I \par{\b Sub-index:} %s \par{\b Name:} %e \par\par

object description:\par{\b Index:} 0x1000 \par{\b Sub-index:} 0 \par

Page 36 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 37: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

{\b Name:} Device Type \par\par\par{\b Index:} 0x1001 \par{\b Sub-index:} 0 \par{\b Name:} Error Register \par\par

adjustments for import in WORD documents:

The generated object description has to be bracket with a RTF command. The first lineand the last line has to be added as follow:

{\rtf1\par{\b Index:} 0x1000 \par{\b Sub-index:} 0 \par{\b Name:} Device Type \par\par\par{\b Index:} 0x1001 \par{\b Sub-index:} 0 \par{\b Name:} Error Register \par\par}

10.5. Example for csv-files

The generation of manufacturer-specific object descriptions can be used for csv-export.

csv-specifier line (see chapter 12.2.5):

index;sub;mObjCode;mDtIndex;sDtIndex;size;acc;min;max;val;

description template:

0x%I;%s;0x%B;0x%H;0x%h;%g;%a;%m;%U;%V;

object description:

0x2000;0;0x07;0x0006;0x0006;2;RO;0x0000;0xFFFF;0x1234;

0x3000;0;0x07;0x0007;0x0007;4;RW;0x00000000;0xFFFFFFFF;0x12345678;

Version: 1.1.1 EtherCAT® Design Tool Page 37 of 52

Page 38: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Page 38 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 39: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

11. EtherCAT-Merge PlugIn

EtherCAT-Merge provides functions to visualize and modify differences between differ-ent EtherCAT® Design Tool projects. The EtherCAT-Merge extension module is anoptional PlugIn which is activated by the license file of the EtherCAT® Design Tool. If avalid license is present, EtherCAT-Merge can be started by the EtherCAT-Merge menu inthe menu bar of the EtherCAT® Design Tool.

Figure 10, EtherCAT-Merge main window displaying 2 projects

11.1. Project View

The project view shows different settings, sub segments, objects and sub indices with dif-ferent colors. By using the Merge function in the tool bar these elements can be copiedfrom one project into the other one.

Via the menu File the modified projects can be saved to disk or imported into the Ether-CAT® Design Tool. The menu entries like Save resp. Open refer to the active projecttree. Via Generate Diff Report an overview about the differences between the projectscan be generated. This diff report is an XML file containing all differences.

Version: 1.1.1 EtherCAT® Design Tool Page 39 of 52

Page 40: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Via Options several settings can be configured. These include the attributes to be com-pared or merged and further options.

11.2. Detail View

Figure 11, EtherCAT-Merge diff window displaying differences of 2 sub indices

The detail view displays differences of global settings, indices and sub indices.Attributes of indices and sub indices can be modified directly within this view. Modifica-tions have to be confirmed by the button SAVE in the tool bar. A plausibility check is per-formed when saving these settings.

Page 40 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 41: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

12. Extension module: csv-import

The DT provides the import of object specifications in the csv-format for:

• manufacturer-specific complex data types (index range: 0040h - 005Fh)

• profile-specific complex data types (index range: 0080h - 025Fh)

• objects for the communication, manufacturer-specific and device profile index range(index range: 1000h - 9FFFh)

• object-specific options for the code generation

All data from the csv-file are imported into the specified line of the actual DT project.

The specification of an object refers to:

• main-index, i.e. these specifications are valid for all sub-indices of the object, and

• sub-index, i.e. these specifications are only valid for the specific sub-index of theobject.

The differentiation between main-index and sub-index is relevant for objects of objectcode ARRAY or RECORD especially.

figure 12: dialog CSV object import

If the object already exist in the DT project it is completely substituted by the importedobject specification, i.e. the object is deleted with all sub-indices and then the new objectis imported. Sub-index 0 must be imported before higher sub-indices.

Errors during csv-import are reported about the GUI.

Numerical values in hexadecimal format has to be written with the prefix "0x" in C Syn-tax, example: 0x123A.

Version: 1.1.1 EtherCAT® Design Tool Page 41 of 52

Page 42: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

12.1. Structure of the csv-file

The csv-import has taken the recommendations from /RFC 4180/ in consideration andexpects csv-files with the following structure:

line number in csv-file content of the csv-data line

1 • header with a comment OR

• header with the csv-specifier line OR

• csv-data

2 - n csv-data

table 9: structure of csv-file

Empty lines between the csv-data are allowed. Empty lines means lines without any charor lines containing only the csv-separators in the correct number. These lines are ignoredduring the csv-import. Additional comment lines are not supported because they are notrecommended by /RFC 4180/.

Each csv-data line has to contain the specification of one object identified by the main-index and sub-index. This specification is a list of object properties, which can bearranged application-specific. The specification is defined by the csv-specifier line. Thecsv-specifier line includes special keywords for each object property separated by thecsv-separator sign. All csv-data lines has to use the same csv-specifier line.

The csv-specifier line can be enter about the GUI or can be loaded from the 1st line of thecsv-file.

12.2. Input parameters for the csv-import

The following input parameters can be specified in the dialog CSV object import aboutthe menu CSV / Object import.

12.2.1. Line

description: The csv-import works line-related, i.e. the csv-data are only importedinto one line. This parameter specifies the number of the desired line.

value range: 0

Page 42 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 43: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

12.2.2. Index offset

description: The csv-data can be imported into different index ranges within a line.

This parameter specifies an offset for shifting the main-index from the

csv-data to the object in the DT project according to: obj_main_index

= csv_main_index + index_offset

value range: 0x0000 - 0x9FFF

12.2.3. csv-file

description: The directory and the name of the csv-file can be specified by this

input parameter.

12.2.4. Header in csv-file

description: This setting determines the interpretation of the 1st line in the csv-file.

value range: • absent: The csv-file does not contain a header in the 1st line. csv-

data start in the 1st line.

• present, used as csv-specifier line: The 1st line in the csv-file defines

the csv-specifier line.

• present, ignored as csv-specifier line: The 1st line in the csv-file con-

tains any comment. This line is ignored during csv-import.

12.2.5. csv-specifier line

description: The csv-specifier line specifies the meaning of the csv-data by special

csv-specifier keywords. The csv-specifiers are described in chapter

12.3 and have to be separated by the csv-separator sign.

12.3. csv-specifiers

The csv-import supports the following csv-specifiers:

csv-specifier name category description

index description: This csv-specifier defines the numeri-cal number of the main-index.

category: mandatory

Version: 1.1.1 EtherCAT® Design Tool Page 43 of 52

Page 44: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

value range: 0x0040 - 0x9FFF

sub description: This csv-specifier defines the numeri-cal number of the sub-index.

category: mandatory

value range: 0 - 255

mObjCode description: This csv-specifier defines the numeri-cal value of the object code accordingto /CiA-301/.

category: mandatory

related to: main-index

value range: 0x06 for DEFSTRUCT0x07 for VAR0x08 for ARRAY0x09 for RECORD

GUI reference: object main-index / tab Structure /Object Code

mDtIndex description: This csv-specifier defines the numeri-cal value of the data type according to/CiA-301/.

category: mandatory

related to: main-index

value range: 0x0001 - 0x025F

GUI reference: object main-index / tab Structure /Data Type

mEdsName description: This csv-specifier defines the name ofthe object for the documentation. Ifno name is specified the DT generatesa name DAT ATYPE_<index> orobj_<index>.

category: optional

related to: main-index

GUI reference: object main-index / tab Structure /Object Name

desc description: This csv-specifier defines the docu-mentation of the object.

category: optional

related to: main-index

GUI reference: object main-index / tab Structure /Description

Page 44 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 45: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

sCName description: This csv-specifier defines the name ofthe sub-index used in the generated Ccode. If no name is specified thename is generated by the DT as fol-low:1. for object code VAR: The objectname of the sub-index is used. If noobject name of the sub-index is speci-fied, the object name of the main-index is used. If no object name ofthe main-index is specified, the DTgenerates a name obj_<index>.2. for object Code ARRAY orRECORD: The name is generated:sub_<sub>, example: sub_012.<sub> is a decimal number with 3digits.

category: optional

related to: sub-index

GUI reference: object sub-index / tab Structure / CName

sEdsName description: This csv-specifier defines the name ofthe sub-index used in the documenta-tion.1. for object code VAR: The specifiedname is overwritten by mEdsName.2. for object Code ARRAY orRECORD: If no name is specified thename is generated by the DT as fol-low: sub_<sub>, example: sub_012.<sub> is a decimal number with 3digits.

category: mandatory

related to: sub-index

GUI reference: object sub-index / tab Structure /Object Name

sDtIndex description: This csv-specifier defines the numeri-cal value of the data type of the sub-index according to /CiA-301/.

category: mandatory

related to: sub-index

value range: 0x0001 - 0x001B

Version: 1.1.1 EtherCAT® Design Tool Page 45 of 52

Page 46: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

GUI reference: object sub-index / tab Structure / DataType

size description: This csv-specifier defines the size ofthe sub-index. This csv-specifier isrelevant for extended data types, e.g.VISIBLE_STRINGs.

category: optional

related to: sub-index

default value: • basic data types: size of the datatype• VISIBLE_STRING: 125 bytes• OCTET_STRING: 125 bytes

GUI reference: object sub-index / tab Structure / Size

unit description: This csv-specifier defines the unit ofthe object.

category: optional

related to: sub-index

value range: <any string>

default value: <empty>

GUI reference: object sub-index / tab Structure / Unit

acc description: This csv-specifier defines the accessright of the sub-index in the statePRE-OPERATIONAL.

category: optional

related to: sub-index

value range: RO, RW, WO

default value: RO

GUI reference: object sub-index / tab Structure /Access (PRE-OP)

accSafeOp description: This csv-specifier defines the accessright of the sub-index in the stateSAFE-OPERATIONAL.

category: optional

related to: sub-index

value range: RO, RW, WO

default value: RO

GUI reference: object sub-index / tab Structure /Access (SAFE-OP)

Page 46 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 47: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

accOp description: This csv-specifier defines the accessright of the sub-index in the stateOPERATIONAL.

category: optional

related to: sub-index

value range: RO, RW, WO

default value: RO

GUI reference: object sub-index / tab Structure /Access (OPERATIONAL)

max description: This csv-specifier defines the upperlimit of numerical objects.

category: optional

related to: sub-index

value range: range of the numerical data type

default value: maximum of the data type

GUI reference: object sub-index / tab Structure /Upper Limit

min description: This csv-specifier defines the lowerlimit of numerical objects.

category: optional

related to: sub-index

value range: range of the numerical data type

default value: minimum of the data type

GUI reference: object sub-index / tab Structure /Lower Limit

val description: This csv-specifier defines the value ofthe object.

category: optional

related to: sub-index

default value: 0

GUI reference: object sub-index / tab Structure /Default Value

defVal description: This csv-specifier defines the defaultvalue. The DT set the object on thisvalue after pressing the button"Default Values".

category: optional

related to: sub-index

default value: 0

Version: 1.1.1 EtherCAT® Design Tool Page 47 of 52

Page 48: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

GUI reference: object sub-index / tab Structure / but-ton Default Values

mapPdo description: This csv-specifier defines the permis-sion to map the object into a PDO.

category: optional

related to: sub-index

value range: no - PDO mapping is not allowedTxPDO - mappable into TPDORxPDO - mappable into RPDOboth - mappable into TPDO andRPDO

default value: no

GUI reference: object sub-index / tab Structure /PDO-Mapping

optCreateExternal description: This csv-specifier defines if an exter-nal declaration shall be generated.

category: optional

related to: main-index

value range: 0 - extern declaration is not generated1 - extern declaration is generated

default value: 1

GUI reference: object main-index / tab Optimization /Create extern declaration

optCreateTypeDef description: This csv-specifier defines if the Cstruct for an complex data type shallbe generated in C code.

category: optional

related to: main-index

value range: for complex data types:0 - data type struct is not generated1 - data type struct is generatedfor variables: 0

default value: for complex data types: 1for variables: 0

GUI reference: object main-index / tab Optimization /Create type definition

optCreateVariable description: This csv-specifier defines if the vari-able shall be generated in C code.

category: optional

related to: main-index

Page 48 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 49: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

csv-specifier name category description

value range: for complex data types: 0for variables:0 - variable is not generated1 - variable is generated

default value: for complex data types: 0for variables: 1

GUI reference: object main-index / tab Optimization /Create Variable

optVirtualObject description: This csv-specifier defines if the objectshall be interpreted as virtual or nor-mal object.

category: optional

related to: main-index

value range: 0 - normal object1 - virtual object

default value: 0

GUI reference: object main-index / tab Optimization /Virtual object

table 10: csv-specifier

Mandatory csv-specifiers must be included in the csv-specifier line. Optional csv-speci-fier may be included in the csv-specifier line. If optional csv-specifiers are not used in thecsv-specifier line the DT uses the default value.

Settings related to the main-index are taken from sub-index 0. Changed object propertiesrelated to the main-index in sub-index 1..n are ignored.

Example: The entry for mDtIndex of the objects 3003h/1 and 3003h/2 is ignored. Thedata type related to the main-index is imported from object 3003h/0.

index;sub;mEdsName;mObjCode;mDtIndex;sCName;sDtIndex;acc;min;max;val;

0x3003;0;ARR_I16;0x08;0x0003;Highest Sub;0x0003;CONST;0x02;0x02;0x02;

0x3003;1;ARR_I16;0x08;0x0005;sub1;0x0003;RW;0x8000;0x7FFF;0x1234;

0x3003;2;ARR_I16;0x08;0x0005;sub2;0x0003;RW;0x8000;0x7FFF;0x5678;

The format of values is determined by the data type of the sub-index (sDtIndex). Thespecified values for max, min, val and/or defVal have to match this format.

index;sub;mCName;mObjCode;mDtIndex;sCName;sDtIndex;size;acc;min;max;val;

correct:

0x3001;0;arr_r32_2;0x08;0x0008;num;0x0008;4;CONST;2.0;2.0;2.0;

wrong:

0x3001;0;arr_r32_2;0x08;0x0008;num;0x0005;4;CONST;2.0;2.0;2.0;

Version: 1.1.1 EtherCAT® Design Tool Page 49 of 52

Page 50: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Objects which shall be mapped into PDOs must be imported with the csv-specifier map-Pdo. The generation process reports an PDO mapping error without this setting.

12.4. csv-separator

The csv-separator can be the comma, colon, semicolon or tabulator sign and is taken fromthe csv-specifier line according to the following rules:

1. If the lines in the csv-file are closed with comma, semicolon, colon or tabulator thissign is taken as csv-separator.

2. Otherwise the first occurrence of comma, colon, semicolon or tabulator is taken asseparator.

The possible csv-separator signs are handled in the listed order.

12.5. Limitations

The extension csv-import in the DT has some limitations. The limitations result from thecondition, that csv-files contains object properties and each line of the csv-file containsthe same information. Therewith the following settings can not be imported by csv-files:

• general settings

• EtherCAT Slave Information with except of derived value from object 1000h(p301_device_type)

• hardware configurations

• manufacturer-specific advanced configurations

During csv-import only the format of the imported csv-data are checked. The contentand dependencies are checked during generation, i.e. wrong imported csv-data can causeerrors during generation. The imported csv-data are not checked against profile data-bases, so it is possible that settings break standards. The csv-file shall be generated care-fully.

Page 50 of 52 EtherCAT® Design Tool Version: 1.1.1

Page 51: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

Index

- -

device, EtherCAT® 13

- B -

bootstrap, EEPROM 29

- C -

categoryFMMU 29General 29RXPDO 32STRINGS 29SyncM 29TXPDO 32

conversion, old DT projects 18csv-export 37csv-import

comments 42empty lines 42hardware configurations 50main-index properties 49mandatory csv-specifier 49optional csv-specifier 49PDO mapping 50settings 50value format 49

- D -

data typecomplex 27creation 27DEFSTRUCT 27device profile-specific 27manufacturer-specific 27

DEFSTRUCT 27description template 33device

EtherCAT® 13field 13

- E -

EEPROMcategory 29file 29

EtherCAT® device 13expert mode 18

- F -

field device 13font settings 18

- G -

generationpost command 17pre command 17

- H -

hexadecimal indication 18

- L -

line 13list.conf 33

- M -

main-index 41

- O -

object1C10h 291C11h 291C12h 291C13h 29description 33

Version: 1.1.1 EtherCAT® Design Tool Page 51 of 52

Page 52: EtherCAT Design Tool - port · tions in shortest time. The EtherCAT® Design Tool is delivered with profile databases for communication objects according to ETG standards.

- P -

post command 17pre command 17

- S -

single-line 13sub-index 41

- T -

typecomplex, data 27creation, data 27DEFSTRUCT, data 27device profile-specific, data 27manufacturer-specific, data 27

Page 52 of 52 EtherCAT® Design Tool Version: 1.1.1


Recommended