How to read this guide¶
Where should you start?
You will learn:
- who the guide is for
- which board the examples use
- where to find other KickCAT documents
- which chapters to read first
Who the guide is for¶
This guide assumes you can read C++ and have built a CMake project. The EtherCAT background chapters introduce EtherCAT. You can start here without experience with industrial networks.
- What is EtherCAT? introduces the protocol and explains its speed.
- Frames and datagrams shows what travels on the wire.
- Inside a slave: the ESC describes the slave controller chip.
- The EtherCAT state machine explains slave states.
- Process data shows how inputs and outputs move every cycle.
- Mailboxes: CoE and FoE covers messages sent outside the regular exchange.
- Topology, redundancy and clocks covers cables, redundancy and clocks.
- Describing a device explains device description files.
Overview and principles explains KickCAT's design principles. A map of the code describes the source directories. Later chapters cover individual parts of the stack.
If you already know EtherCAT, skip the EtherCAT background and start at Overview and principles.
One example through the guide¶
The examples use the Freedom K64F board, an NXP development board with a LAN9252 EtherCAT Slave Controller. KickCAT includes the firmware and an XML file that describes the board.
The master exchanges the following data with the board.
- 3 output bytes set the red, green, and blue levels of an LED.
- 12 input bytes contain three accelerometer readings and three magnetometer readings. Each is a signed 16-bit integer.
- A mailbox lets the master read and write configuration objects using CoE.
You can run the simulated_bus example without a board. It uses the device
description to emulate the board and runs the master in the same process. Your first bus walks through the example.
How a chapter is shaped¶
Each chapter describes the problem, the options, and the reason for the design. The "In the code" section lists the relevant source files.
The guide explains the main classes and the order of calls in the API. Use the headers for current function signatures.
The other documents¶
| Document | Contents |
|---|---|
| This guide | KickCAT design and how the parts work together |
| Features | Supported master and slave features |
| Building | Build and test instructions |
| Hardware | Running KickCAT on hardware |
| Simulation | Running a master with emulated slaves |
| Tools | Command-line tools and graphical user interfaces |
| Performance | Linux settings for real-time operation |
| The headers | Function arguments and return values |
A reading path for a newcomer¶
- Read the EtherCAT background, from What is EtherCAT? through Describing a device.
- Read Overview and principles for the design principles.
- Follow Building, then run
simulated_busas shown in Your first bus. Watch the slave reach OP. - For master development, read The master, Transport, and Mailboxes in KickCAT. For firmware, read The slave stack, Mailboxes in KickCAT, and From XML to bytes.
- Read the remaining chapters in any order. Read Testing a change before changing the code.
Where to go next¶
- What is EtherCAT?, the first page of the EtherCAT background.
- The full list of chapters: the guide's index.