Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited Typo and Style.

...

This document describes the process of running EtherCAT® using the ccm module.
It describes the initial setup of the device and the usage of the example application.

...

Chapter

Content

Introduction

Introduction of this document

EtherCAT® Evaluation

Basic information for evaluation

Logging

How to get log messages

Initial Setup

How to initially setup the EtherCAT device

Firmware Update

How to do a firmware update of the communication module

Example features

Description of features of the example application

...

EtherCAT® evaluation hardware

A working setup of AC (with an Application Controller (AC) - e.g. Synergy S7G2SK ) - and Communication Controller (CC (iRJ45) ) - iRJ45 or SoM - is required.

It is required to run the EtherCAT® example on the target device.

...

The additional board privides shown in the figure below provides an ID switch for Explicit Device Identification. The switch can be set to a value between 0 and 15.

The binary coded value can be seen on the LEDs on the board.

...

To get feedback from the application, all log messages from AC and CC are
transmitted to the UART of the AC. This is a an option used for the EtherCAT®
example s09_ecat_slave. It is achieved using a an RPC function call at application
setup time:

Code Block
/****************************************************************************/
/** Application Setup
 *
 * Setup the application.
 */
GOAL_STATUS_T appl_setup(
    void
)
{
    GOAL_STATUS_T res;                          /* result */
    char strVersion[APPL_VERSION_LEN];          /* version string */
    uint16_t devType = 0;                       /* device type */
    GOAL_ETH_MAC_ADDR_T mac;                    /* mac address */
    uint8_t fwSignature[16];                    /* firmware signature */
    uint32_t valObj = 0;                        /* object dictionary value */

    /* enable logging from AC to CC */
    res = appl_ccmLogToAcEnable();
    if (GOAL_RES_ERR(res)) {
        goal_logErr("failed to enable logging from CC to AC");
    }

    ...
}

For the Synergy S7G2SK a an USB to Serial Adapter is required, e.g. the FTDI
(<https://www.ftdichip.com/Support/Documents/DataSheets/Cables/DS_TTL-232RG_CABLES.pdf).>To use the UART on Synergy . To use the UART on the Synergy S7G2SK, please also check the user manual
(<https://www.renesas.com/us/en/doc/products/renesas-synergy/doc/r12um0004eu0100_synergy_sk_s7g2.pdf).>on the Renesas website.

Please set jumper J9 to 3-5 and 4-6 (RS485 mode). Then the UART TX line from the
Synergy CPU will be connected to Pin 4 of J10. This is where the RX line from
the USB-Serial converter needs to be connected. The UART is configured with baudrate 115200 and settings 8N1.

...

For the Renesas RIN32M3 module the following EtherCAT® example is prepared in the software delivery: projects/2015013_irj45/ac/09_ecat_slave

The associated device description for configuration tools is located here: appl/2015013_irj45/ac/09_ecat_slave/esi/09_evat_slave_renesas.xml

...

Initially the EEPROM of the EtherCAT® device, which stores the SII information
for configuration and identification, is empty. For a an EtherCAT® slave to
correctly operate its identification must be configured, which is stored in the
EEPROM connected to the EtherCAT® controller. Programming of this memory is
possible in different ways. For convenience it is possible to configure these
information initially using the application controller.

It is not recommended to overwrite those information with each start of the
application controller. The data also contains addressing information which can
be written by the EtherCAT® master. By overwriting this data, addressing of the
EtherCAT® slave may fail in certain scenarios.

...

Code Block
/****************************************************************************/
/* Local defines */
/****************************************************************************/
#define APPL_VERSION_LEN 32
#define APPL_ECAT_PDO_BUF_SIZE 12               /**< PDO buffer size */

/**< timeout trigger in ms */
#define APPL_TIMEOUT_TRIGGER_VAL (25 * GOAL_TIMER_MSEC)

/* Note: By setting this define, the SII eeprom will be overwritten. This
   should only be done initially since the PLC can store additional information
   in this area, e.g. the configured station alias. */

/**< set to force overwriting of slaves sii eeprom */
#define APPL_ECAT_SII_INIT 0

Change define APPL_ECAT_SII_INIT

Code Block
/**< set to force overwriting of slaves sii eeprom */
#define APPL_ECAT_SII_INIT 1

...

Code Block
[AC_I|goal_init:185] GOAL initialized
[AC_I|appl_setup:245] initializing EtherCAT SSI data
[AC_I|replaceString:997] replace string at position 234
[AC_I|replaceString:997] replace string at position 249
[AC_I|replaceString:997] replace string at position 214
...
[CC_I|appl_ccmEcatSsiUpdateServer:917] called

**Reset the define APPL_ECAT_SII_INIT **

Code Block
/**< set to force overwriting of slaves sii eeprom */
#define APPL_ECAT_SII_INIT 1

...

Setup from a Configuration Tool

Initial setup of a an EtherCAT® device is also possible over EtherCAT®. Following
this This process is shown using CODESYS, see figure \ref{ectm1}below. At first a project with an EtherCAT®
master is required. The ESI file (09_ecat_slave_renesas.xml) needs to be
installed to the device repository of the Configuration Tool.

...

EtherCAT® masters can determine informtion information about slaves from multiple sources.
Initial detection is done using the information in the SII. This is data stored
in the device (usually a an EEPROM). This data is accessible over EtherCAT®.

...

To configure the device initially, at first it must be added to the EtherCAT®
master manually. This procedure is shown here in figure.

...

Now writing of the ESI information within the devices EEPROM is possible using
“Write E2PROM XML”. Now After a Power Cycle is required. After that , the device should work properly in
EtherCAT® slave mode.

...

Firmware Update

This chapter describes the process of updating the firmware over EtherCAT®.

...

If the communication module is in EtherCAT® mode, the HTTP Update method will
not functionwork. Thus an update over FoE is possible.

Firmware update is possible using the Industrial Communication Explorer, which
will use the firmware package *.pfw for updating a device running in EtherCAT®
mode using FoE. Manual update is also possible.

At first the *.pfw file needs to be extractet extracted (it's a zip archive). The
containing fike file irj45_port.bin is required for firmware update.

The example application s09 09_ecat_slave sets the following properties for FoE
firmware update of the communication module:

...

Table: FoE update properties

To update the firmware a first , force the slave to enter BOOT state using the EtherCAT® master. Then initiate a FoE download using the file irj45_2port.dat and the given properties for firmware update from the table.

When the transfer is done, enter INIT state. This will trigger the verification and update process of the firmware. After some time (> 60 seconds) the device will be returning to normal operation.

...

This chapter describes the example application features. For the example a set
of available PDOs and mappable objects are provided. This is just of
demonstation purpsosefor demonstration purposes. A customer specific application can create additional
PDOs, mapping entries, mappable and non mappable objects. The required API is
documented in the EtherCAT® stack documentation.

The example slave supports PDO assignment and PDO mapping, thus the provided
default configuration can be changed during integration into an EtherCAT®
network within the available range.

...

The example project implements some functionality. The following table gives an overview.

Index

SubIndex

Object function

0x200C

0x00

Each each SDO Upload request (read) will increment the object value

0x200D

0x00

contains number of SYNC0 DC events when in DC mode

0x200E

0x00

contains number of SYNC1 DC events when in DC mode

0x200F

0x00

contains 1 when in DC mode, else 0

0x6200

0x01

pdo output data

0x6200

0x02

pdo output data

0x6411

0x01

pdo output data

0x6411

0x02

pdo output data

0x6000

0x01

mirrors value of 0x6200:0x01 process data

0x6000

0x02

mirrors value of 0x6200:0x02 process data

0x6401

0x01

mirrors value of 0x6411:0x01 process data

0x6401

0x02

mirrors value of 0x6411:0x02 process data

...

In order to operate the slave in Distibuted Clocks (DC) mode, one of the available dc DC sync modes must be selected:

Sync Mode

Operation

FeeRun/SM-Synchron

Application controller does not get sync information

DC-Synchron

Application controller gets SYNC0 event, device operates in DC mode

DC-Synchron with SYNC0 and SYNC1

Application controller gets both SYNC eventevents, device operates in DC mode

Table: Available sync modes of example application

For the slave to To detect sync events , for on the S7G2-SK board, some preparations haveto be made. Please make the following connections on the shield module using a wire bridge:

  • P6_13 (PD6) -> P2_2 (SYNC1)

  • P6_8 (PD5) -> P3_3 (SYNC0)

The application propagates the detected DC events in the objects 0x200D and 0x200E. The minimum cycle time for this example is set to 1 ms.

...

FoE read and write access is supported by the device. A buffer of 1840 acts as a local file, which can be read or written. The following properties have to be set:

FoE Property

Value

Filename

test.txt

Password

123456

...

When the slave is operating in a an EtherCAT® network with a PLC which supports EoE, following IP based services are availabe:

...

The firmware update of the CC module over HTTP will not function work in EtherCAT® mode. Thus if required use the FoE method for firmware update.

The device supports configuration of EoE, however any given MAC address will be ignored. The internal MAC address will be used instead. The IP-Address of the device can either be configured using the Industrial Communication Explorer or configured by the PLC.