-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathsoem.dox
158 lines (158 loc) · 6.77 KB
/
soem.dox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/**
* \mainpage Simple Open EtherCAT Master or SOEM
*
* \section overview Overview
* SOEM is an EtherCAT master library written in c. Its purpose is to learn and
* to use. All users are invited to study the source to get an understanding
* how an EtherCAT master functions and how it interacts with EtherCAT slaves.
*
* As all applications are different SOEM tries to not impose any design architecture.
* It can be used in generic user mode, PREEMPT_RT or Xenomai.
*
* Preconditions :
* - Linux 2.6 kernel.
* - GCC compiler (others might work, just not tested).
* - One (or two if in redundant mode) 100Mb/s NIC that can connect to a RAW socket.
* - Application must run as root / kernel.
*
* Features as of 1.1.2 :
* - Connects to a standard RAW socket.
* - Full redundancy support.
* - Recovery of "out-of-order" frames.
* - Low level functions, BRD, BWR, APRMW, FPRD, LRW....
* - Blocking or non blocking transfers.
* - Automatic configuration of slaves.
* - Use of internal configuration table (quick).
* - Use of slave internal data in EEprom and/or CoE.
* - Setting and reading of slave state.
* - Automatic generation of processdata mapping.
* - Mailbox link layer support with resend toggle.
* - CoE, SDO read / write.
* - CoE, Complete Access support.
* - CoE, Segmented transfer support.
* - CoE, Object Description list
* - CoE, Emergency and abort SDO support.
* - Distributed Clock (DC) support.
* - Automatic configuration of DC slaves.
* - Automatic sync of clocks with process data exchange.
* - Flexible settting of sync0 and sync1 firing per slave.
* - Access to slave functions through one slave structure.
* - EEPROM read / write.
* - Local cache for EEPROM access with automatic 4/8 byte reading.
* - SII parsing.
* - Portable code, only standard c, usable for embedded applications.
* - All buffers are static so can be memory locked.
* - Support for Little and Big endian targets.
*
* Features as of 1.1.3 :
* - CoE, TxPDO and RxPDO, master is client (beta).
* - FoE, Read and Write file (beta).
*
* Features as of 1.1.4 :
* - FMMU allocation is floating instead of fixed. If needed more than 2 FMMUs are used.
* - SYNC1 generation supported.
*
* Features as of 1.2.0 :
* - Changed license to GPLv2 only. Adresses leagal concerns about master licensing.
* - Slave init and process data mapping is split in two functions. This allows
* dynamic user reconfiguration of PDO mapping.
* - Eeprom transfer to and from PDI
* - Eeprom is released to PDI when going to SAFEOP.
*
* Features as of 1.2.2 :
* - Redesign of topology and delay measurement. 4 port slaves are fully supported now.
* - Delay measurement of slaves that are reverse connected work too.
* - New ethercatprint unit to display errors in readable text.
*
* Features as of 1.2.4 :
* - SoE, servo over EtherCAT support.
* - SoE read request and write request.
* - SoE segmented transfers.
* - SoE error response.
* - Added SoE errors to print module.
* - Auto config of SoE process data.
*
* Features as of 1.2.5 :
* - Added eepromtool, it can read and write the ESC eeprom of a designated slave.
* - Rewrite of eeprom read/write functions.
* - Added infrastructure change to allow slave groups.
* - Added recovery and reconfiguration of slaves after connection loss.
* - Improved CoE PDO assignment read from slaves, no longer assume assign indexes
* as functionally fixed.
*
* \section start Getting started
* For examples see simple_test.c in ~/src.
* First try (assume EtherCAT on eth0): sudo ./simple_test eth0
* As SOEM uses RAW sockets it will need to run as root.
*
* \section bugs Squashed bugs
* Version 1.1.3
* - Added missing Big-Endian conversion in ethercatconfig.c
* - Fixed bug in segmented SDO transfers in ethercatcoe.c
*
* Version 1.1.4
* - Changed FMMU algorithm of allocation during configuration. EL4732 supported now.
* - Changed the ec_slave structure around SM en FMMU storage.
* - Fixed bug in FoE write in ethercatfoe.c
*
* Version 1.2.0
* - Fixed bug in type definition of int32 and uint32 for 64bit OS.
* - Fixed bug in maximum dataframe size calculation.
*
* Version 1.2.2
* - Fixed bugs in ec_adddatagram.
* - Fixed several bugs in CoE object dictionary read functions.
* - Fixed bug in PDO mapping read function.
* - Changed ec_slave structure around topology and delay variables.
* - Added several constants in ethercattype.c
*
* Version 1.2.3
* - Clear SM enable if size is 0, even if enable is set in SII.
* - Fixed bug in DC propagation delay calculation. Branches with only non DC slaves
* now correctly close root port.
* - Fixed bug in ec_receive_processdata(), wkc now checks for EC_NOFRAME instead of 0.
* - Fixed bug in makefile.
*
* Version 1.2.5
* - Fixed bugs in ec_config_map().
* - Added EC_STATE_BOOT constant.
* - Fixed mailbox size bug, In and Out mailbox can now be of different size.
* - Fixed SM type bug.
* - Fixed FoE bugs.
* - Fixed siigetbyte() unaligned copy.
* - Fixed bug in nicdrv.c, socket handles are 0 included.
* - Fixed bug in ethercatconfig.c causing memory corruption.
* \section legal Legal notice
* Copyright© 2005-2011 Speciaal Machinefabriek Ketels v.o.f. \n
* Copyright© 2005-2011 Arthur Ketels \n
* Copyright© 2008-2010 TU/e Technische Universiteit Eindhoven \n
*
* SOEM is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* SOEM is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* As a special exception, if other files instantiate templates or use macros
* or inline functions from this file, or you compile this file and link it
* with other works to produce a work based on this file, this file does not
* by itself cause the resulting work to be covered by the GNU General Public
* License. However the source code for this file must still be made available
* in accordance with section (3) of the GNU General Public License.
*
* This exception does not invalidate any other reasons why a work based on
* this file might be covered by the GNU General Public License.
*
* The EtherCAT Technology, the trade name and logo "EtherCAT" are the intellectual
* property of, and protected by Beckhoff Automation GmbH. You can use SOEM for
* the sole purpose of creating, using and/or selling or otherwise distributing
* an EtherCAT network master provided that an EtherCAT Master License is obtained
* from Beckhoff Automation GmbH.
*
* In case you did not receive a copy of the EtherCAT Master License along with
* SOEM write to Beckhoff Automation GmbH, Eiserstrasse 5, D-33415 Verl, Germany
* (www.beckhoff.com).
*/