5 create an application, 1 adding a new application, 2 examples – BECKHOFF ET9300 User Manual

Page 33: 1 sample application process data enhancement, Create an application, Adding a new application, Examples

Advertising
background image

Application Note ET9300

31

Name

pEEPROM

Type

UINT8 *

Description

Pointer to the EEPROM buffer, it is only required if EEPROM emulation is
enabled (ESC_EEPROM_EMULATION = 1).
It is defined in ecatappl.h and shall be set by the application during power up
(before MainInit() is called). The size of the EEPROM buffer is defined by the
setting ESC_EEPROM_SIZE (default 2048)

6.5

Create an Application

A user specific application can either be created from the scratch, by adapting an existing sample
application or import/create an application definition file (see chapter 13).
The default SSC sample applications are listed at the beginning of this chapter. Other (sample)
applications might be available by other vendors and can be added to the slave project manually, by
patch file of the application vendor or the SSC Tool. See chapter 6.5.1 for details.

How to configure…

no mailbox support:
It is recommended that each complex EtherCAT slave supports at least the CoE mailbox
protocol.
To disable the mailbox

handling all protocol settings shall be set to 0 ( “AOE_SUPPORTED”,

“COE_SUPPORTED”, “EOE_SUPPORTED”, “FOE_SUPPORTED”, “SOE_SUPPRTED” and
“VOE_SUPPORTED”).

NOTE: Even if no mailbox is supported the SyncManager0 and SyncManager1 shall just be
disabled and reserved for mailbox communication. If the SM are removed the SSC need to be
adapted.

input/output only device:
To create a input/output only EtherCAT slave set either “MAX_PD_INPUT_SIZE” or
“MAX_PD_OUTPUT_SIZE” to 0. Otherwise these settings shall be set to the maximum
process data size.

NOTE: The not used process data Sync Manager shall just be disabled. If the SM is removed
the SSC need to be adapted.

6.5.1

Adding a new Application

The most comfortable way to add a new application to the SSC is using the SSC Tool. Just create a
new project and define an application by selecting “Tool->Application->Create new”. The syntax for
the opened table is described in chapter 13. A step-by-step instruction is available in the EtherCAT
Slave Quick Design Guide ([8] ).

To add a new application manually to the slave project all default sample applications need to be
disabled (see 6.1). Afterwards the header file including the function definitions need to be included in
the files “coeappl.c”, “ecatappl.c” and “ecatslv.c” (see “APPLICATION_FILE” comment). The
corresponding ESI file needs to be created from the scratch or by adapting an existing one.

Adding an application via a patch file please refer to the instructions of the application vendor. The
ESI file should be provided with the application source files.

6.5.2

Examples

6.5.2.1

Sample Application process data enhancement

This example base on the SSC version 5.01 and describes how to add new process data to the
default sample application (SAMPLE_APPLICATION).

The default sample application provides the following process data:

-

32Bit Input Counter (0x6000)

Advertising