Slave Editor

Overview

The Slave Editor is an EtherCAT slave design tool supporting the developer in creating EtherCAT conformant slaves by providing all necessary outputs in an information aligned way and by providing a SOES EtherCAT slave stack application API for the application to use.

slaveeditor_output_objects.png
EtherCAT Slave Editor output objects ESI-file, C Object Dictionary and EEPROM image.

Start the Slave Editor

  1. Start the stand-alone EtherCAT SDK or Workbench hosting the EtherCAT SDK plug-in.
  2. Create or use an existing workspace
  3. Create a new or use an existing project for Slave Editor output
slaveeditor_start.png
Example with simple Hello World project

Create an EtherCAT Slave Editor Project

  1. Go to the create new project wizard File > New > Other...
  2. Select wizard EtherCAT > EtherCAT Slave Description
    slaveeditor_new_project.png
    Select Wizard
  3. Press Next and choose location for generated output.
  4. Enter the EtherCAT slave information details, it is used to identify and present details of the slave device.
    slaveeditor_slave_parameters.png
    Add slave information
    1. Product ID, Device type identity, not used for identification
    2. Product Code, Vendor specific product code, used for identification in conjunction with vendor id
    3. Product Name, Detailed name of device, not used for identification
    4. Group Type, Group for similar devices with slightly different features (The Slave Editor treat it as one device in one group)
    5. Group Name, Name for this group (The Slave Editor treat it as one device in one group)
    6. Vendor ID, assigned by the EtherCAT Technology Group, used for identification in conjunction with product code
    7. Vendor Name, Vendor Name
  5. Press finish to complete creating the EtherCAT Slave Editor project

Edit EtherCAT Slave Identity Information

slaveeditor_slave_tab.png
Slave Tab

Contains general slave information given when creating the EtherCAT Slave Editor project, here it is possible to add, update and remove given information and also add local language support where applicable. In addition, you can also add

  • URL, for further information on the device. Usually pointing to the vendors homepage where up to date ESI files can be downloaded
    • Company, Company URL
    • Description, URL to ESI files

Enter EtherCAT slave Data Link Layer Configuration

slaveeditor_configuration_tab.png
Configuration TAB

Basic configuration of the EtherCAT slave Data Link Layer including device Mailbox, FMMU and SM. Settings here are shared among EEPROM and ESI-file.

  • Mailbox, description of available mailbox protocols
    • Bootstrap, address and length of bootstrap mailboxes, activate in bootstrap mode only.
    • Standard, address and length of standard mailboxes, standard mailbox settings are used during normal operations
  • FMMU, definition of FMMU usage
    • Outputs, used for RxPDO
    • Inputs, used for TxPDO
    • MBoxState, FMMU used to poll Input MailboxState
  • SM description of SyncManager including start address and direction
    • MBoxOut, Mailbox Data Master > Slave
    • MBoxIn, Mailbox Data Slave > Master
    • Outputs, Process Data Master > Slave
    • Inputs, Process Data Slave > Master
  • DC, description of synchronization mode for offline configuration
    • Name, unique identifier of operation mode for configuration tool
    • Description, vendor specific description of operation mode, recommended 'Free Run - no sync', 'SM Synchronous - synchronized on SyncManager event when process data is written' and 'DC-Synchronous - synchronized on DC event '
    • Assign / Activate - value of latch and sync control registers
    • Cycle Time - Cycle Time
    • Shift Time - Shift offset

Enter EtherCAT slave EEPROM PDI Settings

slaveeditor_eeprom_tab.png
EEPROM Tab

EEPROM only settings for the EtherCAT Slave Controller Configuration Area, required to boot the ESC properly (this is ESC dependent). Most EEPROM data are taken from already given information and not presented here.

  • Configuration, initialization values for ESC PDI configuration registers. Consult the ESC manual for proper settings.
  • PDI Control, initialization values for ESC PDI control registers. Consult the ESC manual for proper settings.
  • Custom Category, add custom category header and allocate room for custom category data in the EEPROM. Data will not be populated.

Add EtherCAT Slave PDO and Configuration Parameters

slaveeditor_application_tab.png
Application TAB

Here the application defines process data, configuration parameters and manufacture specific data. Objects entered in the different areas will get indexes according to ranges specified by the MDP (Modular Device Profile).

  • 0x2000-0x5FFF, Manufacture Specific Area
  • 0x6000-0x6FFF, Inputs Area, Objects that will be mapped to TxPDO
  • 0x7000-0x7FFF, Outputs Area, Objects that will be mapped to RxPDO
  • 0x8000-0x8FFF, Configuration Area, Configuration and settings objects. TIP: The EtherCAT master should write settings variables, the 0x8000 range, every time before making the state transition from PRE-OP to SAFE-OP.

The application can specify objects of 3 types.

  1. Record - a group of variables of same or different datatypes that belong together, a struct in C terms
  2. Array - an array of variables of same datatype with a size describing number of elements, different datatypes may be used for the array.
  3. Variable - a single variable of different datatypes

The GUI provide assistance on allowed data types for the different types.

Properties for objects entered in the different areas

  • General,
    • added object will automatically get assigned next free index in specified range.
    • index and sub index can be changed in the GUI by placing the cursor on the number and edited.
    • callbacks for inputs, outputs and RW parameters in generated C API must be implemented in the application.
  • Inputs,
    • object will automatically get included in the TxPDO map.
    • object will automatically get a callback created in generated C API code for reading local data to the TxPDO object, cb_get_<object name>
  • Outputs,
    • object will automatically get included in the RxPDO map.
    • object will automatically get a callback created in generated C API code for setting local data read from the RxPDO object, cb_set_<object name>
    • object will automatically get added to the default APP_safeoutput in the C API, there outputs are set to their default
  • Parameters,
    • record, array or variable objects with access Read-Write will automatically get a post SDO download callback created in the generated C API code, cb_post_write_<object name>
  • Manufacture,
    • no restrictions

Generate C Source Code, EEPROM and ESI-file

slaveeditor_od_tab.png
Object Dictionary Tab

Overview of the resulting Object Dictionary. The buttons in the right upper corner icon "IOIO" and icon "C" are used to generate the output. Code can be generated from any view.

  • "IOIO"
    • *.bin, the EEPROM image. Targets using emulated EEPROM use objcopy to create a linkable object included in the target executable
    • *.xml, ESI file.
  • "C" generate C source code.
    • utypes.h - user types created for the objects defined for the application
    • config.h - stack configuration parameters to setup hardware objects
    • <project name>.c/.h generated and fixed stack C API
    • <project name>_objectlist.c generated C object dictionary