|
1 |
| -# Ethercat ESI configuration files |
| 1 | +## EtherCAT configuration files |
2 | 2 |
|
3 |
| -This directory contains the Ethercat Slave Information (ESI) files for the Ethercat slaves used in the project. The ESI files are used by the Ethercat master to configure the slaves. The ESI files are generated by the slave manufacturers and are specific to each slave. |
4 |
| - |
5 |
| -The ESI files are stored in the `esi/` directory. |
6 |
| - |
7 |
| - |
8 |
| -## Python ESI generator |
9 |
| -The directory contains a simple python esi file generator for orbita2d and orbita3d networks. It allows to create the files from the yaml files. |
10 |
| -You can use it by running the following command: |
11 |
| -```bash |
12 |
| -cd esi_generator |
13 |
| -python3 esi_from_yaml.py ../orbita2d.yaml # path to the yaml file |
14 |
| -``` |
15 |
| -It generates the ESI files and saves it to the esi path given in the yaml file `ethercat>esi`. |
16 |
| - |
17 |
| -You can also use the generator directly without the yaml file: |
18 |
| - |
19 |
| -```python |
20 |
| -from ethercat_esi_generator import * |
21 |
| - |
22 |
| -# Generate XML for the master with two slaves |
23 |
| -# 0: orbita 3d |
24 |
| -# 1: orbita 2d |
25 |
| -tree_3d = generate_xml([3,2]) |
26 |
| -write_xml(tree_3d, "orbitas.xml") |
27 |
| - |
28 |
| -print("XML files generated successfully.") |
29 |
| -``` |
30 |
| - |
31 |
| - |
32 |
| -## Orbita Poulpe configuration - Flushing the EEPROM |
33 |
| - |
34 |
| -The Orbita Poulpe slaves have an EEPROM that stores the configuration. If the EEPROM is not properly configured, the slaves will not work. To flush the EEPROM first we need to convert the ESI file to a binary file. This can be done using the `siitool` tool. |
35 |
| - |
36 |
| -for orbita2d |
37 |
| -```bash |
38 |
| -siitool orbita2d.xml -m -o orbita2d.bin |
39 |
| -``` |
40 |
| -or for 3d |
41 |
| -```bash |
42 |
| -siitool orbita3d.xml -m -o orbita3d.bin |
43 |
| -``` |
44 |
| -> You can install the `siitool` by following the instructions in the [siitool repository](https://github.com/synapticon/siitool) |
45 |
| -
|
46 |
| - |
47 |
| -Once you have the binary file, you can use the `ethercat` tool to flash the EEPROM. |
48 |
| - |
49 |
| -```bash |
50 |
| -ethercat sii_write -p0 orbita2d.bin # may need sudo |
51 |
| -``` |
52 |
| -Make sure to put the proper slave index `p0` is for slate 0, `p1` for slave 1, etc. |
53 |
| -Also make sure to use the proper binary file, `orbita2d.bin` for orbita2d and `orbita3d.bin` for orbita3d. |
0 commit comments