Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
etherlabmaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ICS Control System Infrastructure
etherlabmaster
Commits
7c2bd32a
Commit
7c2bd32a
authored
16 years ago
by
Florian Pose
Browse files
Options
Downloads
Patches
Plain Diff
*space without whitespace; licensing; userspace interfaces.
parent
3cfea6b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
documentation/ethercat_doc.tex
+63
-41
63 additions, 41 deletions
documentation/ethercat_doc.tex
with
63 additions
and
41 deletions
documentation/ethercat_doc.tex
+
63
−
41
View file @
7c2bd32a
...
@@ -20,7 +20,10 @@
...
@@ -20,7 +20,10 @@
\usepackage
{
textcomp
}
\usepackage
{
textcomp
}
\usepackage
{
url
}
\usepackage
{
url
}
\usepackage
{
SIunits
}
\usepackage
{
SIunits
}
\usepackage
[pdfpagelabels,plainpages=false]
{
hyperref
}
\usepackage
{
hyperref
}
\hypersetup
{
pdfpagelabels,plainpages=false
}
\hypersetup
{
linkcolor=blue,colorlinks=true,urlcolor=blue
}
\setlength
{
\parskip
}{
0.8ex plus 0.8ex minus 0.5ex
}
\setlength
{
\parskip
}{
0.8ex plus 0.8ex minus 0.5ex
}
\setlength
{
\parindent
}{
0mm
}
\setlength
{
\parindent
}{
0mm
}
...
@@ -234,7 +237,7 @@ EtherCAT functionality (see chap.~\ref{sec:ecrt}).
...
@@ -234,7 +237,7 @@ EtherCAT functionality (see chap.~\ref{sec:ecrt}).
\item
Slave configuration via Sdos.
\item
Slave configuration via Sdos.
\item
Sdo access from user
-
space and from the application.
\item
Sdo access from userspace and from the application.
\end
{
itemize
}
\end
{
itemize
}
...
@@ -249,7 +252,7 @@ EtherCAT functionality (see chap.~\ref{sec:ecrt}).
...
@@ -249,7 +252,7 @@ EtherCAT functionality (see chap.~\ref{sec:ecrt}).
\end
{
itemize
}
\end
{
itemize
}
\item
User
space command
-
line
-
tool ``ethercat``
(
see
\item
Userspace command
-
line
-
tool ``ethercat``
(
see
section~
\ref
{
sec:ethercat
}
)
section~
\ref
{
sec:ethercat
}
)
\begin
{
itemize
}
\begin
{
itemize
}
...
@@ -287,10 +290,15 @@ section~\ref{sec:ethercat})
...
@@ -287,10 +290,15 @@ section~\ref{sec:ethercat})
\section
{
License
}
\section
{
License
}
\label
{
sec:license
}
\label
{
sec:license
}
The master code is released under the terms and conditions of the GNU
The master code is released under the terms and conditions of the GNU General
General Public License
\index
{
GPL
}
\cite
{
gpl
}
(
version
2
)
. Other
Public License
(
GPL
\cite
{
gpl
}
)
\index
{
GPL
}
, version
2
. Other developers, that
developers, that want to use EtherCAT with Linux systems, are invited
want to use EtherCAT with Linux systems, are invited to use the master code or
to use the master code or even participate on development.
even participate on development.
To allow static linking of userspace application against the master's
application interface
(
see chap.~
\ref
{
sec:ecrt
}
)
, the userspace library
(
see
sec.~
\ref
{
sec:userlib
}
)
is licensed under the terms and conditions of the GNU
Lesser General Public License
(
LGPL
\cite
{
lgpl
}
)
\index
{
LGPL
}
, version
2
.
1
.
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
...
@@ -303,17 +311,17 @@ an early design decision, which has been made for several reasons:
...
@@ -303,17 +311,17 @@ an early design decision, which has been made for several reasons:
\begin
{
itemize
}
\begin
{
itemize
}
\item
Kernel code has significantly better realtime characteristics,
i.~e.
\item
Kernel code has significantly better realtime characteristics,
less latency than user
space code. It was foreseeable, that a fieldbus
master
i.
\,
e.~
less latency than userspace code. It was foreseeable, that a fieldbus
has a lot of cyclic work to do. Cyclic work is usually triggered by
timer
master
has a lot of cyclic work to do. Cyclic work is usually triggered by
interrupts inside the kernel. The execution delay of a function that
processes
timer
interrupts inside the kernel. The execution delay of a function that
timer interrupts is less, when it resides in kernel
space, because
there is no
processes
timer interrupts is less, when it resides in kernelspace, because
need of time
-
consuming context switches to a user
space process.
there is no
need of time
-
consuming context switches to a userspace process.
\item
It was also foreseeable, that the master code has to directly
\item
It was also foreseeable, that the master code has to directly
communicate with the Ethernet hardware. This has to be done in the kernel
communicate with the Ethernet hardware. This has to be done in the kernel
anyway
(
through network device drivers
)
, which is one more reason for the
anyway
(
through network device drivers
)
, which is one more reason for the
master code being in kernel
space.
master code being in kernelspace.
\end
{
itemize
}
\end
{
itemize
}
...
@@ -379,10 +387,10 @@ possible until then.
...
@@ -379,10 +387,10 @@ possible until then.
\item
[
Idle phase
]
\index
{
Idle phase
}
takes effect when the master has accepted
\item
[
Idle phase
]
\index
{
Idle phase
}
takes effect when the master has accepted
an Ethernet device, but is not requested by any application yet. The master
an Ethernet device, but is not requested by any application yet. The master
runs its state machine
(
see section~
\ref
{
sec:fsm
-
master
}
)
, that automatically
runs its state machine
(
see section~
\ref
{
sec:fsm
-
master
}
)
, that automatically
scans the bus for slaves and executes pending operations from the user
space
scans the bus for slaves and executes pending operations from the userspace
interface
(
for example Sdo access
)
. The command
-
line tool can be used to
access
interface
(
for example Sdo access
)
. The command
-
line tool can be used to
the bus, but there is no process data exchange because of the missing
bus
access
the bus, but there is no process data exchange because of the missing
configuration.
bus
configuration.
\item
[
Operation phase
]
\index
{
Operation phase
}
The master is requested by an
\item
[
Operation phase
]
\index
{
Operation phase
}
The master is requested by an
application that can provide a bus configuration and exchange process data.
application that can provide a bus configuration and exchange process data.
...
@@ -722,9 +730,9 @@ to kernel memory and passed to the network stack.
...
@@ -722,9 +730,9 @@ to kernel memory and passed to the network stack.
The driver registers a
\lstinline
+
net
_
device
+
structure for each device to
The driver registers a
\lstinline
+
net
_
device
+
structure for each device to
communicate with the network stack and to create a ``network interface''. In
communicate with the network stack and to create a ``network interface''. In
case of an Ethernet driver, this interface appears as
\textit
{
ethX
}
, where X
is
case of an Ethernet driver, this interface appears as
\textit
{
ethX
}
, where X
a number assigned by the kernel on registration. The
\lstinline
+
net
_
device
+
is
a number assigned by the kernel on registration. The
\lstinline
+
net
_
device
+
structure receives events
(
either from user
space or from the network stack
)
structure receives events
(
either from userspace or from the network stack
)
via several callbacks, which have to be set before registration. Not every
via several callbacks, which have to be set before registration. Not every
callback is mandatory, but for reasonable operation the ones below are needed
callback is mandatory, but for reasonable operation the ones below are needed
in any case:
in any case:
...
@@ -741,8 +749,8 @@ in any case:
...
@@ -741,8 +749,8 @@ in any case:
\begin
{
description
}
\begin
{
description
}
\item
[
\usebox\boxopen
]
This function is called when network communication has
\item
[
\usebox\boxopen
]
This function is called when network communication has
to be started, for example after a command
\lstinline
+
ip link set ethX up
+
from
to be started, for example after a command
\lstinline
+
ip link set ethX up
+
user
space. Frame reception has to be enabled by the driver.
from
userspace. Frame reception has to be enabled by the driver.
\item
[
\usebox\boxstop
]
The purpose of this callback is to ``close'' the device,
\item
[
\usebox\boxstop
]
The purpose of this callback is to ``close'' the device,
i.~e. make the hardware stop receiving frames.
i.~e. make the hardware stop receiving frames.
...
@@ -1898,32 +1906,35 @@ the \textit{examples/} subdirectory.
...
@@ -1898,32 +1906,35 @@ the \textit{examples/} subdirectory.
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
\chapter
{
User
S
pace
}
\chapter
{
User
s
pace
Interfaces
}
\label
{
sec:user
}
\label
{
sec:user
}
\index
{
User space
}
\index
{
Userspace
}
% FIXME
For the master runs as a kernel module, accessing it is natively limited to
For the master runs as a kernel module, accessing it is natively limited to
analyzing Syslog messages and controlling using modutils.
analyzing Syslog messages and controlling using
\textit
{
modutils
}
.
It
i
s necessary to implement further interfaces, that make it easier to access
It
wa
s necessary to implement further interfaces, that make it easier to access
the master from user
space and allow a finer influence. It should be possible
the master from userspace and allow a finer influence. It should be possible
to view and to change special parameters at runtime.
to view and to change special parameters at runtime.
Bus visualization is a second point: For development and debugging purposes it
Bus visualization is another point: For development and debugging purposes it
would be nice, if one could show the connected slaves with a single command.
is necessary to show the connected slaves with a single command, for instance
(
see sec.~
\ref
{
sec:ethercat
}
)
.
The application interface has to be available in userspace, to allow userspace
programs to use EtherCAT master functionality. This was implemented via a
character interface and a userspace library
(
see sec.~
\ref
{
sec:userlib
}
)
.
Another aspect is automatic startup and configuration.
If t
he master
is to b
e
Another aspect is automatic startup and configuration.
T
he master
must be abl
e
integrated into a running system, it must be able
to automatically start with
to automatically start
up
with
a persistent configuration
(
see
a persistent configuration
.
sec.~
\ref
{
sec:system
}
)
.
A last thing is monitoring EtherCAT communication. For debugging purposes,
A last thing is monitoring EtherCAT communication. For debugging purposes,
there had to be a way to analyze EtherCAT datagrams. The best way would be
there had to be a way to analyze EtherCAT datagrams. The best way would be
with a popular network analyzer, like Wireshark
\cite
{
wireshark
}
(
the former
with a popular network analyzer, like Wireshark
\cite
{
wireshark
}
(
the former
Ethereal
)
or others.
Ethereal
)
or others
(
see sec.~
\ref
{
sec:debug
}
)
.
This
section
covers all th
o
se points and introduces the interfaces and tools
This
chapter
covers all th
e
se points and introduces the interfaces and tools
to make all that possible.
to make all that possible.
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
...
@@ -2037,8 +2048,8 @@ can be easily backed up and restored.
...
@@ -2037,8 +2048,8 @@ can be easily backed up and restored.
\item
Some SII data fields have to be altered (like the alias address). A quick
\item
Some SII data fields have to be altered (like the alias address). A quick
writing must be possible for that.
writing must be possible for that.
\item
Through reading access, analyzing category data is possible from
user
\item
Through reading access, analyzing category data is possible from
space.
user
space.
\end{itemize}
\end{itemize}
...
@@ -2087,6 +2098,13 @@ write operation may take a few seconds.
...
@@ -2087,6 +2098,13 @@ write operation may take a few seconds.
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
\section
{
Userspace Library
}
\label
{
sec:userlib
}
\ldots
%------------------------------------------------------------------------------
\section
{
System Integration
}
\section
{
System Integration
}
\label
{
sec:system
}
\label
{
sec:system
}
...
@@ -2411,7 +2429,7 @@ The interface documentation can be viewed by pointing a browser to the file
...
@@ -2411,7 +2429,7 @@ The interface documentation can be viewed by pointing a browser to the file
\section
{
Installing the Software
}
\section
{
Installing the Software
}
The below commands have to be entered as
\textit
{
root
}
: The first one will
The below commands have to be entered as
\textit
{
root
}
: The first one will
install the EtherCAT header, init script, sysconfig file and the user
space
install the EtherCAT header, init script, sysconfig file and the userspace
tool to the prefix path. The second one will install the kernel modules to the
tool to the prefix path. The second one will install the kernel modules to the
kernel's modules directory. The final
\lstinline
+depmod+ call is necessary to
kernel's modules directory. The final
\lstinline
+depmod+ call is necessary to
include the kernel modules into the
\textit
{
modules.dep
}
file to make it
include the kernel modules into the
\textit
{
modules.dep
}
file to make it
...
@@ -2548,7 +2566,11 @@ International Electrotechnical Commission (IEC), 2005.
...
@@ -2548,7 +2566,11 @@ International Electrotechnical Commission (IEC), 2005.
International Electrotechnical Commission (IEC), 2005.
International Electrotechnical Commission (IEC), 2005.
\bibitem
{
gpl
}
GNU General Public License, Version 2.
\bibitem
{
gpl
}
GNU General Public License, Version 2.
\url
{
http://www.gnu.org/licenses/gpl.txt
}
. August~9, 2006.
\url
{
http://www.gnu.org/licenses/gpl-2.0.html
}
. October~15, 2008.
\bibitem
{
lgpl
}
GNU Lesser General Public License, Version 2.1.
\url
{
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
}
. October~15,
2008.
\bibitem
{
lsb
}
Linux Standard Base.
\bibitem
{
lsb
}
Linux Standard Base.
\url
{
http://www.linuxfoundation.org/en/LSB
}
. August~9, 2006.
\url
{
http://www.linuxfoundation.org/en/LSB
}
. August~9, 2006.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment