GOAL Application description
Introduction
Port GmbH’s EtherCAT stack provides different sample applications for GOAL. These applications have been created with help of Industrial Communication Creator and show how to setup and use the stack. The next chapter lists all application examples, which are located at appl/goal_ecat/. Related projects are placed at projects/goal_ecat* next to edt sub-directory ICC projects, EEPROM binaries and XML-device description files used by EtherCAT software like TwinCAT or EtherCAT Codesys Master for interacting with the device.
ECAT projects are organized into single-/ multi-core and full-source/ demo projects:
projects/goal_ecat - full source projects
projects/goal_ecat_lib - 3h demo library projects
projects/goal_ecat_rpc - multi-core projects
projects/goal_ecat_rpc_lib - 3h demo library projects for multi-core projects
Application description
All listed applications can be used for single-/ and multi-core platforms equally. Only exception is 00_rpc_cc, which is designed for the communication core of multi-core platforms.
In goal_appl.c is the initialization of GOAL and the EtherCAT stack located. The behavior of the sample application is controlled by goal_app_ecat.c, while the object dictionary is created by goal_appl_ecat_objects.c. Some additional, application specific files may be placed in the directories. Please note the file description of the related file for further information.
appl/goal_ecat/00_rpc_cc
This application must be run on the communication core of a device. It provides the functionality for all other examples to the application core. It is not restricted to the examples but also provides the full GOAL EtherCAT functionality to the user application.
The EtherCAT demo projects/00_goal_rpc_demo/ is a 3h time limited, full feature protocol stack library.
appl/goal_ecat/01_simple_io
This application is a simple example of handling IOs. It features FoE and CoE and is configured by an explicit device ID APPL_ECAT_EXPL_DEV_ID
of 5.
Following objects are mapped as I/O data and can be accessed from a PLC (e.g. TwinCAT or EtherCAT Codesys Master).
Object ID | variable name | description |
---|---|---|
0x6000:0x01 | applU8ButtonInput | 8 byte: button input |
0x6120:0x01 | applVarU32Input | 32 byte: input mirror data |
0x6200:0x01 | applU8LedOutput | 8 byte: LED output |
0x6320:0x01 | applVarU32Output | 32 byte: output mirror data |
appl/goal_ecat/02_eoe_http
This application is equal to appl/goal_ecat/01_simple_io expanded by EoE feature.
The file goal_appl.c contains a simple webserver content, which can be accessed via EoE at port APPL_TCP_PORT
(8081) of device’s IP. Up to APPL_HTTP_CHAN_CNT
(4) HTTP channels are available.