documentation/ethercat_doc.tex
changeset 1308 c8b82c27b6df
parent 1307 45a82ad140f8
child 1309 d9f775cbbc1e
equal deleted inserted replaced
1307:45a82ad140f8 1308:c8b82c27b6df
  2407 EtherCAT buses can always be monitored by inserting a switch between master
  2407 EtherCAT buses can always be monitored by inserting a switch between master
  2408 and slaves. This allows to connect another PC with a network monitor like
  2408 and slaves. This allows to connect another PC with a network monitor like
  2409 Wireshark~\cite{wireshark}, for example.
  2409 Wireshark~\cite{wireshark}, for example.
  2410 
  2410 
  2411 For convenience, so-called ``debug interfaces'' are supported. Debug
  2411 For convenience, so-called ``debug interfaces'' are supported. Debug
  2412 interfaces allow to monitor EtherCAT traffic with a network monitor (like
  2412 interfaces are virtual network interfaces allowing to capture EtherCAT traffic
  2413 Wireshark or tcpdump) running on the master machine without using external
  2413 with a network monitor (like Wireshark or tcpdump) running on the master
  2414 hardware. To use this functionality, the master sources have to be configured
  2414 machine without using external hardware. To use this functionality, the master
  2415 with the \lstinline+--enable-debug-if+ switch (see
  2415 sources have to be configured with the \lstinline+--enable-debug-if+ switch
  2416 sec.~\ref{sec:installation}).
  2416 (see sec.~\ref{sec:installation}).
  2417 
  2417 
  2418 Every EtherCAT master registers a read-only network interface per attached
  2418 Every EtherCAT master registers a read-only network interface per attached
  2419 device. The interfaces are named \textit{ecdbgmX} for the main device, and
  2419 physical Ethernet device. The network interfaces are named \textit{ecdbgmX}
  2420 \textit{ecdbgbX} for the backup device (for future use), where X is the master
  2420 for the main device, and \textit{ecdbgbX} for the backup device (for future
  2421 index. The below listing shows one debug interface among some standard
  2421 use), where X is the master index. The below listing shows a debug interface
  2422 interfaces:
  2422 among some standard network interfaces:
  2423 
  2423 
  2424 \begin{lstlisting}
  2424 \begin{lstlisting}
  2425 # `\textbf{ip link}`
  2425 # `\textbf{ip link}`
  2426 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
  2426 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
  2427     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2427     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2428 4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
  2428 4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
  2429     link/ether 00:13:46:3b:ad:d7 brd ff:ff:ff:ff:ff:ff
  2429     link/ether 00:13:46:3b:ad:d7 brd ff:ff:ff:ff:ff:ff
  2430 8: ecdbgm0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
  2430 8: ecdbgm0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast
       
  2431                                                  qlen 1000
  2431     link/ether 00:04:61:03:d1:01 brd ff:ff:ff:ff:ff:ff
  2432     link/ether 00:04:61:03:d1:01 brd ff:ff:ff:ff:ff:ff
  2432 \end{lstlisting}
  2433 \end{lstlisting}
  2433 
  2434 
  2434 While a debug interface is enabled, all frames sent or received to or from the
  2435 While a debug interface is enabled, all frames sent or received to or from the
  2435 physical device are additionally forwarded to the debug interface by the
  2436 physical device are additionally forwarded to the debug interface by the
  2436 corresponding master. Interfaces can be enabled with the below command:
  2437 corresponding master. Network interfaces can be enabled with the below
       
  2438 command:
  2437 
  2439 
  2438 \begin{lstlisting}
  2440 \begin{lstlisting}
  2439 # `\textbf{ip link set dev ecdbgm0 up}`
  2441 # `\textbf{ip link set dev ecdbgm0 up}`
  2440 \end{lstlisting}
  2442 \end{lstlisting}
  2441 
  2443 
  2442 Please note, that the frame rate can be very high. With an application
  2444 Please note, that the frame rate can be very high. With an application
  2443 connected, the debug interface can produce thousands of frames per second.
  2445 connected, the debug interface can produce thousands of frames per second.
  2444 
  2446 
  2445 \paragraph{Attention} The socket buffers needed for the operation of the
  2447 \paragraph{Attention} The socket buffers needed for the operation of the debug
  2446 debugging interface have to be allocated dynamically. Some Linux realtime
  2448 interface have to be allocated dynamically. Some Linux realtime extensions do
  2447 extensions do not allow this in realtime context!
  2449 not allow this in realtime context!
  2448 
  2450 
  2449 %------------------------------------------------------------------------------
  2451 %------------------------------------------------------------------------------
  2450 
  2452 
  2451 \chapter{Timing Aspects}
  2453 \chapter{Timing Aspects}
  2452 \label{sec:timing}
  2454 \label{sec:timing}