SOEM/doc/html/index.html
2015-03-24 18:19:27 +01:00

253 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SOEM: Simple Open EtherCAT Master or SOEM</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">SOEM&#160;<span id="projectnumber">v1.3.1</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<div class="title">Simple Open EtherCAT Master or SOEM </div> </div>
</div>
<div class="contents">
<div class="textblock"><h2><a class="anchor" id="start"></a>
Tutorial</h2>
<p>For a tutorial on SOEM See <a class="el" href="tutorial_8txt.html">tutorial.txt</a></p>
<h2><a class="anchor" id="overview"></a>
Overview</h2>
<p>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.</p>
<p>As all applications are different SOEM tries to not impose any design architecture. Under Linux it can be used in generic user mode, PREEMPT_RT or Xenomai. under Windows it can be used as user mode program.</p>
<p>Preconditions Linux:</p>
<ul>
<li>Linux 2.6 kernel.</li>
<li>GCC compiler (others might work, just not tested).</li>
<li>One (or two if in redundant mode) 100Mb/s NIC that can connect to a RAW socket.</li>
<li>Application must run as root / kernel.</li>
</ul>
<p>Preconditions Windows:</p>
<ul>
<li>Windows2000 - Windows 7 (8 not tested, might work).</li>
<li>VC compiler (others might work, just not tested).</li>
<li>One (or two if in redundant mode) 100Mb/s NIC that can connect to a RAW socket.</li>
<li>WinPcap installed.</li>
</ul>
<p>Features as of 1.1.2 :</p>
<ul>
<li>Connects to a standard RAW socket.</li>
<li>Full redundancy support.</li>
<li>Recovery of "out-of-order" frames.</li>
<li>Low level functions, BRD, BWR, APRMW, FPRD, LRW....</li>
<li>Blocking or non blocking transfers.</li>
<li>Automatic configuration of slaves.</li>
<li>Use of internal configuration table (quick).</li>
<li>Use of slave internal data in EEprom and/or CoE.</li>
<li>Setting and reading of slave state.</li>
<li>Automatic generation of processdata mapping.</li>
<li>Mailbox link layer support with resend toggle.</li>
<li>CoE, SDO read / write.</li>
<li>CoE, Complete Access support.</li>
<li>CoE, Segmented transfer support.</li>
<li>CoE, Object Description list</li>
<li>CoE, Emergency and abort SDO support.</li>
<li>Distributed Clock (DC) support.</li>
<li>Automatic configuration of DC slaves.</li>
<li>Automatic sync of clocks with process data exchange.</li>
<li>Flexible settting of sync0 and sync1 firing per slave.</li>
<li>Access to slave functions through one slave structure.</li>
<li>EEPROM read / write.</li>
<li>Local cache for EEPROM access with automatic 4/8 byte reading.</li>
<li>SII parsing.</li>
<li>Portable code, only standard c, usable for embedded applications.</li>
<li>All buffers are static so can be memory locked.</li>
<li>Support for Little and Big endian targets.</li>
</ul>
<p>Features as of 1.1.3 :</p>
<ul>
<li>CoE, TxPDO and RxPDO, master is client (beta).</li>
<li>FoE, Read and Write file (beta).</li>
</ul>
<p>Features as of 1.1.4 :</p>
<ul>
<li>FMMU allocation is floating instead of fixed. If needed more than 2 FMMUs are used.</li>
<li>SYNC1 generation supported.</li>
</ul>
<p>Features as of 1.2.0 :</p>
<ul>
<li>Changed license to GPLv2 only. Adresses leagal concerns about master licensing.</li>
<li>Slave init and process data mapping is split in two functions. This allows dynamic user reconfiguration of PDO mapping.</li>
<li>Eeprom transfer to and from PDI</li>
<li>Eeprom is released to PDI when going to SAFEOP.</li>
</ul>
<p>Features as of 1.2.2 :</p>
<ul>
<li>Redesign of topology and delay measurement. 4 port slaves are fully supported now.</li>
<li>Delay measurement of slaves that are reverse connected work too.</li>
<li>New ethercatprint unit to display errors in readable text.</li>
</ul>
<p>Features as of 1.2.4 :</p>
<ul>
<li>SoE, servo over EtherCAT support.</li>
<li>SoE read request and write request.</li>
<li>SoE segmented transfers.</li>
<li>SoE error response.</li>
<li>Added SoE errors to print module.</li>
<li>Auto config of SoE process data.</li>
</ul>
<p>Features as of 1.2.5 :</p>
<ul>
<li>Added eepromtool, it can read and write the ESC eeprom of a designated slave.</li>
<li>Rewrite of eeprom read/write functions.</li>
<li>Added infrastructure change to allow slave groups.</li>
<li>Added recovery and reconfiguration of slaves after connection loss.</li>
<li>Improved CoE PDO assignment read from slaves, no longer assume assign indexes as functionally fixed.</li>
</ul>
<p>Features as of 1.2.8 :</p>
<ul>
<li>Changed directory structure.</li>
<li>Changed make file.</li>
<li>Moved hardware / OS dependend part in separate directories.</li>
<li>Added firm_update tool to upload firmware to slaves in Boot state, use with care.</li>
<li>Added DC for LRD/LWR case.</li>
<li>Separated expectedWKC to inputsWKC and outputsWKC.</li>
<li>Added PreOP-&gt;SafeOP hooks in configuration functions.</li>
<li>With CoE use expedited download if mailbox size is very small and object &lt;= 4 bytes.</li>
<li>Added mailbox error handling.</li>
<li>Rewrite of <a class="el" href="ethercatconfig_8c.html#aa31ccd813ba490a3c0e6d57315e42606">ec_recover_slave()</a> and ec_reconfigure_slave()</li>
<li>Added -map option in slaveinfo, shows SOEM IO mapping of all slaves found.</li>
</ul>
<p>Features as of 1.3.0 :</p>
<ul>
<li>Added win32 target.</li>
<li>Added rtk target.</li>
<li>Compiles under gcc / visual-c / borland-c.</li>
<li>Multiple port support. One master can run concurrent stacks on multiple network ports.</li>
<li>All global vars are encapsulated in context struct.</li>
<li>All timing abstracted in osal.c.</li>
<li>Linux timing converted to get_clock(CLOCK_MONOTONIC).</li>
<li>Error messages updated to latest ETG1020 document.</li>
<li>FoE transfers now support busy response.</li>
</ul>
<h2><a class="anchor" id="start"></a>
Tutorial</h2>
<p>For Linux</p>
<ul>
<li>go to project directory</li>
<li>source ./setup.sh linux</li>
<li>make all</li>
</ul>
<p>For examples see <a class="el" href="simple__test_8c.html" title="Example code for Simple Open EtherCAT master.">simple_test.c</a> in ~/test/linux/simple_test. First try (assume EtherCAT on eth0): sudo ./simple_test eth0 As SOEM uses RAW sockets it will need to run as root.</p>
<p>For Windows</p>
<ul>
<li>have winpcap installed (included with WireShark)</li>
<li>go to project directory</li>
<li>for VC, run vcvarsall.bat f.e. : C: Files (x86) Visual Studio 10.0.bat x86</li>
<li>run make_test_win32_all.bat</li>
</ul>
<h2><a class="anchor" id="bugs"></a>
Squashed bugs</h2>
<p>Version 1.1.3</p>
<ul>
<li>Added missing Big-Endian conversion in <a class="el" href="ethercatconfig_8c.html" title="Configuration module for EtherCAT master.">ethercatconfig.c</a></li>
<li>Fixed bug in segmented SDO transfers in <a class="el" href="ethercatcoe_8c.html" title="CAN over EtherCAT (CoE) module.">ethercatcoe.c</a></li>
</ul>
<p>Version 1.1.4</p>
<ul>
<li>Changed FMMU algorithm of allocation during configuration. EL4732 supported now.</li>
<li>Changed the ec_slave structure around SM en FMMU storage.</li>
<li>Fixed bug in FoE write in <a class="el" href="ethercatfoe_8c.html" title="File over EtherCAT (FoE) module.">ethercatfoe.c</a></li>
</ul>
<p>Version 1.2.0</p>
<ul>
<li>Fixed bug in type definition of int32 and uint32 for 64bit OS.</li>
<li>Fixed bug in maximum dataframe size calculation.</li>
</ul>
<p>Version 1.2.2</p>
<ul>
<li>Fixed bugs in ec_adddatagram.</li>
<li>Fixed several bugs in CoE object dictionary read functions.</li>
<li>Fixed bug in PDO mapping read function.</li>
<li>Changed ec_slave structure around topology and delay variables.</li>
<li>Added several constants in ethercattype.c</li>
</ul>
<p>Version 1.2.3</p>
<ul>
<li>Clear SM enable if size is 0, even if enable is set in SII.</li>
<li>Fixed bug in DC propagation delay calculation. Branches with only non DC slaves now correctly close root port.</li>
<li>Fixed bug in <a class="el" href="ethercatmain_8c.html#a14280050ace4427d196acd17e6d79e55">ec_receive_processdata()</a>, wkc now checks for EC_NOFRAME instead of 0.</li>
<li>Fixed bug in makefile.</li>
</ul>
<p>Version 1.2.5</p>
<ul>
<li>Fixed bugs in <a class="el" href="ethercatconfig_8c.html#aa740a2ba948117670c4f9741bc31cc38">ec_config_map()</a>.</li>
<li>Added EC_STATE_BOOT constant.</li>
<li>Fixed mailbox size bug, In and Out mailbox can now be of different size.</li>
<li>Fixed SM type bug.</li>
<li>Fixed FoE bugs.</li>
<li>Fixed siigetbyte() unaligned copy.</li>
<li>Fixed bug in nicdrv.c, socket handles are 0 included.</li>
<li>Fixed bug in <a class="el" href="ethercatconfig_8c.html" title="Configuration module for EtherCAT master.">ethercatconfig.c</a> causing memory corruption.</li>
</ul>
<p>Version 1.2.8</p>
<ul>
<li>Fixed NetX mailbox configuration behaviour.</li>
<li>Fixed FoE write bug.</li>
<li>Fixed SII string read bug.</li>
<li>Fixed bug in table lookup for printing</li>
</ul>
<p>Version 1.3.0</p>
<ul>
<li>Fixed NetX100 configuration behaviour.</li>
<li>Fixed linux gettimeofday() to get_clock().</li>
<li>Fixed eeprom cache flush on reinit.</li>
<li>Fixed make for new gcc linker version.</li>
</ul>
<p>Version 1.3.1</p>
<ul>
<li>Added intime target.</li>
<li>Added rtk target.</li>
<li>Compiles under gcc / visual-c / intime / borland-c .</li>
<li>Added multi-threaded configuration for parallel configurations of slaves</li>
</ul>
<h2><a class="anchor" id="legal"></a>
Legal notice</h2>
<p>Copyright© 2005-2015 Speciaal Machinefabriek Ketels v.o.f. <br/>
Copyright© 2005-2015 Arthur Ketels <br/>
Copyright© 2008-2010 TU/e Technische Universiteit Eindhoven <br/>
Copyright© 2012-2015 RT-labs AB <br/>
</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>This exception does not invalidate any other reasons why a work based on this file might be covered by the GNU General Public License.</p>
<p>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.</p>
<p>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). </p>
</div></div>
<hr class="footer"/><address class="footer"><small>Generated on Wed Mar 11 2015 20:44:23 for SOEM by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>