This chapter describes all necessary steps for creating an application for the
EtherCAT library.
Files created by the Industrial Communication Creator
The Industrial Communication Creator (ICC) must be used to specify the options
for the library and to define the layout of the object dictionary.
Please refer to the manual of the ICC for details.
The following source files are created:
...
These files are considered to be part of the application. Other files generated
by the ICC are ignored for this chapter.
The object dictionary either has managed variables or application variables.
Managed variables are only accessible via the OD API of the library.
Application variables are declared in ec_objects.{c|h} and can be used directly.
...
The examples delivered with the EtherCAT library provide a good starting point
for developing your own application.
Info |
---|
IMPORTANT: Always include ecat_conf.h first before including any other |
...
EtherCAT header files. |
By including ec_header.h you have access to all public functions and defines.
Additionally you can include ec_objects.h if you want to use the application
variables of the object dictionary.
The file main.c demonstrates how to initialize and use the EtherCAT library.
Since you probably have your own "main.c" you will have to merge the setup and
main loop into your own files.
Other files contained in the example directory demonstrate how to implement the
indication functions and how to use other API functions.
...