documentation/ethercat_doc.tex
changeset 1917 6129a5f715fb
parent 1772 b4c85bedd68f
child 2076 1baafcd263cc
child 2141 64f03f19124b
equal deleted inserted replaced
1916:6327ce8c4274 1917:6129a5f715fb
    83 
    83 
    84 \begin{titlepage}
    84 \begin{titlepage}
    85   \begin{center}
    85   \begin{center}
    86     \rule{\textwidth}{1.5mm}
    86     \rule{\textwidth}{1.5mm}
    87 
    87 
    88     {\Huge\bf IgH \includegraphics[height=2.4ex]{images/ethercat}
    88     {\Huge\sf\textbf{IgH \includegraphics[height=2.4ex]{images/ethercat}
    89       Master \masterversion\\[1ex]
    89       Master \masterversion}\\[1ex]
    90       Documentation}
    90       \textbf{Documentation}}
    91 
    91 
    92     \vspace{1ex}
    92     \vspace{1ex}
    93     \rule{\textwidth}{1.5mm}
    93     \rule{\textwidth}{1.5mm}
    94 
    94 
    95     \vspace{\fill} {\Large Dipl.-Ing. (FH) Florian Pose,
    95     \vspace{\fill} {\Large Dipl.-Ing. (FH) Florian Pose,
   288   \begin{itemize}
   288   \begin{itemize}
   289 
   289 
   290   \item Loading and storing files via the command-line tool.
   290   \item Loading and storing files via the command-line tool.
   291 
   291 
   292   \item Updating a slave's firmware can be done easily.
   292   \item Updating a slave's firmware can be done easily.
       
   293 
       
   294   \end{itemize}
       
   295 
       
   296 \item Servo Profile over EtherCAT (SoE)
       
   297 
       
   298   \begin{itemize}
       
   299 
       
   300   \item Implemented according to IEC 61800-7 \cite{soespec}.
       
   301 
       
   302   \item Storing IDN configurations, that are written to the slave during
       
   303   startup.
       
   304 
       
   305   \item Accessing IDNs via the command-line tool.
       
   306 
       
   307   \item Accessing IDNs at runtime via the the user-space library.
   293 
   308 
   294   \end{itemize}
   309   \end{itemize}
   295 
   310 
   296 \item Userspace command-line-tool ``ethercat'' (see sec.~\ref{sec:tool})
   311 \item Userspace command-line-tool ``ethercat'' (see sec.~\ref{sec:tool})
   297 
   312 
   303   \item Reading/Writing alias addresses.
   318   \item Reading/Writing alias addresses.
   304   \item Listing slave configurations.
   319   \item Listing slave configurations.
   305   \item Viewing process data.
   320   \item Viewing process data.
   306   \item SDO download/upload; listing SDO dictionaries.
   321   \item SDO download/upload; listing SDO dictionaries.
   307   \item Loading and storing files via FoE.
   322   \item Loading and storing files via FoE.
       
   323   \item SoE IDN access.
   308   \item Access to slave registers.
   324   \item Access to slave registers.
   309   \item Slave SII (EEPROM) access.
   325   \item Slave SII (EEPROM) access.
   310   \item Controlling application-layer states.
   326   \item Controlling application-layer states.
   311   \item Generation of slave description XML and C-code from existing slaves.
   327   \item Generation of slave description XML and C-code from existing slaves.
   312 
   328 
   612 % Configuring PDO assignment and mapping
   628 % Configuring PDO assignment and mapping
   613 % Domains (memory)
   629 % Domains (memory)
   614 % PDO entry registration
   630 % PDO entry registration
   615 % SDO configuration
   631 % SDO configuration
   616 % SDO access
   632 % SDO access
       
   633 % IDN configurations
       
   634 % IDN access
   617 
   635 
   618 The application interface provides functions and data structures for
   636 The application interface provides functions and data structures for
   619 applications to access an EtherCAT master. The complete documentation of the
   637 applications to access an EtherCAT master. The complete documentation of the
   620 interface is included as Doxygen~\cite{doxygen} comments in the header file
   638 interface is included as Doxygen~\cite{doxygen} comments in the header file
   621 \textit{include/ecrt.h}. It can either be read directly from the file
   639 \textit{include/ecrt.h}. It can either be read directly from the file
   917 upper approximation}. To check for bus synchrony, the system time difference
   935 upper approximation}. To check for bus synchrony, the system time difference
   918 registers can also be cyclically read via the command-line-tool (see
   936 registers can also be cyclically read via the command-line-tool (see
   919 sec.~\ref{sec:regaccess}):
   937 sec.~\ref{sec:regaccess}):
   920 
   938 
   921 \begin{lstlisting}
   939 \begin{lstlisting}
   922 $ `\textbf{watch -n0 "ethercat reg\_read -p4 -tint32 0x92c"}`
   940 $ `\textbf{watch -n0 "ethercat reg\_read -p4 -tsm32 0x92c"}`
   923 \end{lstlisting}
   941 \end{lstlisting}
   924 
   942 
   925 \paragraph{Sync Signals} Synchronous clocks are only the prerequisite for
   943 \paragraph{Sync Signals} Synchronous clocks are only the prerequisite for
   926 synchronous events on the bus. Each slave with DC support provides two ``sync
   944 synchronous events on the bus. Each slave with DC support provides two ``sync
   927 signals'', that can be programmed to create events, that will for example
   945 signals'', that can be programmed to create events, that will for example
  1957 %------------------------------------------------------------------------------
  1975 %------------------------------------------------------------------------------
  1958 
  1976 
  1959 \chapter{Mailbox Protocol Implementations}
  1977 \chapter{Mailbox Protocol Implementations}
  1960 \index{Mailbox}
  1978 \index{Mailbox}
  1961 
  1979 
  1962 The EtherCAT master implements the EoE and the CoE mailbox
  1980 The EtherCAT master implements the CANopen over EtherCAT (CoE), Ethernet over
  1963 protocols. See the below section for details.
  1981 EtherCAT (EoE), File-access over EtherCAT (FoE), Vendor-specific over EtherCAT
       
  1982 (VoE) and Servo Profile over EtherCAT (SoE) mailbox protocols. See the below
       
  1983 sections for details.
  1964 
  1984 
  1965 %------------------------------------------------------------------------------
  1985 %------------------------------------------------------------------------------
  1966 
  1986 
  1967 \section{Ethernet over EtherCAT (EoE)}
  1987 \section{Ethernet over EtherCAT (EoE)}
  1968 \label{sec:eoe}
  1988 \label{sec:eoe}
  2137 % Expedited / Normal
  2157 % Expedited / Normal
  2138 % Segmenting
  2158 % Segmenting
  2139 % SDO Info Services
  2159 % SDO Info Services
  2140 %
  2160 %
  2141 
  2161 
  2142 \ldots
       
  2143 
       
  2144 \paragraph{SDO Download State Machine}
  2162 \paragraph{SDO Download State Machine}
  2145 
  2163 
  2146 The best time to apply SDO configurations is during the slave's PREOP state,
  2164 The best time to apply SDO configurations is during the slave's PREOP state,
  2147 because mailbox communication is already possible and slave's application will
  2165 because mailbox communication is already possible and slave's application will
  2148 start with updating input data in the succeeding SAFEOP state. Therefore the
  2166 start with updating input data in the succeeding SAFEOP state. Therefore the
  2216 For more information about using VoE handlers, see sec.~\ref{sec:api-voe} or
  2234 For more information about using VoE handlers, see sec.~\ref{sec:api-voe} or
  2217 the example applications provided in the \textit{examples/} subdirectory.
  2235 the example applications provided in the \textit{examples/} subdirectory.
  2218 
  2236 
  2219 %------------------------------------------------------------------------------
  2237 %------------------------------------------------------------------------------
  2220 
  2238 
       
  2239 \section{Servo Profile over EtherCAT (SoE)}
       
  2240 \label{sec:soe}
       
  2241 \index{SoE}
       
  2242 
       
  2243 The SoE protocol implements the Service Channel layer, specified in IEC
       
  2244 61800-7 \cite{soespec} via EtherCAT mailboxes.
       
  2245 
       
  2246 The SoE protocol is quite similar to the CoE protocol (see
       
  2247 sec.~\ref{sec:coe}). Instead of SDO indices and subindices, so-called
       
  2248 identification numbers (IDNs) identify parameters.
       
  2249 
       
  2250 The implementation covers the ``SCC Read'' and ``SCC Write'' primitives, each
       
  2251 with the ability to fragment data.
       
  2252 
       
  2253 There are several ways to use the SoE implementation:
       
  2254 
       
  2255 \begin{itemize}
       
  2256 
       
  2257 \item Reading and writing IDNs via the command-line tool (see
       
  2258 sec.~\ref{sec:soeaccess}).
       
  2259 
       
  2260 \item Storing configurations for arbitrary IDNs via the application interface
       
  2261 (see chap.~\ref{chap:api}, i.\,e.~\lstinline+ecrt_slave_config_idn()+). These
       
  2262 configurations are written to the slave during configuration in PREOP state,
       
  2263 before going to SAFEOP.
       
  2264 
       
  2265 \item The user-space library (see sec.~\ref{sec:userlib}), offers functions to
       
  2266 read/write IDNs in blocking mode (\lstinline+ecrt_master_read_idn()+,
       
  2267 \lstinline+ecrt_master_write_idn()+).
       
  2268 
       
  2269 \end{itemize}
       
  2270 
       
  2271 %------------------------------------------------------------------------------
       
  2272 
  2221 \chapter{Userspace Interfaces}
  2273 \chapter{Userspace Interfaces}
  2222 \label{sec:user}
  2274 \label{sec:user}
  2223 \index{Userspace}
  2275 \index{Userspace}
  2224 
  2276 
  2225 For the master runs as a kernel module, accessing it is natively limited to
  2277 For the master runs as a kernel module, accessing it is natively limited to
  2431 0     0:0  PREOP  +  EK1100 Ethernet Kopplerklemme (2A E-Bus)
  2483 0     0:0  PREOP  +  EK1100 Ethernet Kopplerklemme (2A E-Bus)
  2432 1  5555:0  PREOP  +  EL3162 2K. Ana. Eingang 0-10V
  2484 1  5555:0  PREOP  +  EL3162 2K. Ana. Eingang 0-10V
  2433 2  5555:1  PREOP  +  EL4102 2K. Ana. Ausgang 0-10V
  2485 2  5555:1  PREOP  +  EL4102 2K. Ana. Ausgang 0-10V
  2434 3  5555:2  PREOP  +  EL2004 4K. Dig. Ausgang 24V, 0,5A
  2486 3  5555:2  PREOP  +  EL2004 4K. Dig. Ausgang 24V, 0,5A
  2435 \end{lstlisting}
  2487 \end{lstlisting}
       
  2488 
       
  2489 %------------------------------------------------------------------------------
       
  2490 
       
  2491 \subsection{SoE IDN Access}
       
  2492 \label{sec:soeaccess}
       
  2493 
       
  2494 \lstinputlisting[basicstyle=\ttfamily\footnotesize]{external/ethercat_soe_read}
       
  2495 
       
  2496 \lstinputlisting[basicstyle=\ttfamily\footnotesize]{external/ethercat_soe_write}
  2436 
  2497 
  2437 %------------------------------------------------------------------------------
  2498 %------------------------------------------------------------------------------
  2438 
  2499 
  2439 \subsection{Requesting Application-Layer States}
  2500 \subsection{Requesting Application-Layer States}
  2440 
  2501 
  3182 \bibitem{mercurial} Mercurial SCM. \url{http://mercurial.selenic.com}, 2010.
  3243 \bibitem{mercurial} Mercurial SCM. \url{http://mercurial.selenic.com}, 2010.
  3183 
  3244 
  3184 \bibitem{autoconf} Autoconf -- GNU Project -- Free Software Foundation (FSF).
  3245 \bibitem{autoconf} Autoconf -- GNU Project -- Free Software Foundation (FSF).
  3185 \url{http://www.gnu.org/software/autoconf}, 2010.
  3246 \url{http://www.gnu.org/software/autoconf}, 2010.
  3186 
  3247 
       
  3248 \bibitem{soespec} IEC 61800-7-304: Adjustable speed electrical power drive
       
  3249 systems - Part 7-300: Generic interface and use of profiles for power drive
       
  3250 systems - Mapping of profiles to network technologies. International
       
  3251 Electrotechnical Commission (IEC), 2007.
       
  3252 
  3187 \end{thebibliography}
  3253 \end{thebibliography}
  3188 
  3254 
  3189 \printnomenclature
  3255 \printnomenclature
  3190 \addcontentsline{toc}{chapter}{\nomname}
  3256 \addcontentsline{toc}{chapter}{\nomname}
  3191 \markleft{\nomname}
  3257 \markleft{\nomname}