Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions debian/control.main-pkg.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Recommends:
librsvg2-dev,
x11-xserver-utils,
python3-paho-mqtt,
ethtool,
@EXTRA_RECOMMENDS@,
@PYTHON_IMAGING@,
@PYTHON_IMAGING_TK@
Expand Down
3 changes: 3 additions & 0 deletions debian/linuxcnc.install.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ usr/bin/kinslimits
usr/bin/latency-histogram
usr/bin/latency-plot
usr/bin/latency-test
usr/bin/latency-ping
usr/bin/lineardelta
usr/bin/linuxcnc
usr/bin/linuxcnc_check_ini
Expand Down Expand Up @@ -84,6 +85,8 @@ usr/bin/qtvcp
usr/bin/rotarydelta
usr/bin/rs274
usr/bin/rtapi_app
usr/bin/realtime-config-kernel
usr/sbin/realtime-config-ethernet
usr/bin/scaragui
usr/bin/schedrmt
usr/bin/scorbot-er-3
Expand Down
1 change: 1 addition & 0 deletions docs/po4a.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
[type: AsciiDoc_def] src/hal/tutorial.adoc $lang:build/adoc/$lang/hal/tutorial.adoc
[type: AsciiDoc_def] src/hal/twopass.adoc $lang:build/adoc/$lang/hal/twopass.adoc
[type: AsciiDoc_def] src/install/latency-test.adoc $lang:build/adoc/$lang/install/latency-test.adoc
[type: AsciiDoc_def] src/install/latency-tuning.adoc $lang:build/adoc/$lang/install/latency-tuning.adoc
[type: AsciiDoc_def] src/integrator/steppers.adoc $lang:build/adoc/$lang/integrator/steppers.adoc
[type: AsciiDoc_def] src/integrator/stepper-timing.adoc $lang:build/adoc/$lang/integrator/stepper-timing.adoc
[type: AsciiDoc_def] src/integrator/wiring.adoc $lang:build/adoc/$lang/integrator/wiring.adoc
Expand Down
2 changes: 2 additions & 0 deletions docs/src/Master_Documentation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ include::config/integrator-concepts.adoc[]

include::install/latency-test.adoc[]

include::install/latency-tuning.adoc[]

include::motion/tweaking-steppers.adoc[]

include::config/ini-config.adoc[]
Expand Down
1 change: 1 addition & 0 deletions docs/src/Submakefile
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ DOC_SRCS_EN := \
hal/tutorial.adoc \
hal/twopass.adoc \
install/latency-test.adoc \
install/latency-tuning.adoc \
integrator/steppers.adoc \
integrator/stepper-timing.adoc \
integrator/wiring.adoc \
Expand Down
10 changes: 5 additions & 5 deletions docs/src/code/building-linuxcnc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ RTAI::
Xenomai::
From https://xenomai.org. You will have to compile or obtain a Xenomai kernel yourself.

Preempt-RT::
PREEMPT_RT::
From https://rt.wiki.kernel.org.
A Linux kernel with the Preempt-RT patch is occasionally available from the Debian archive at https://www.debian.org, and from the wayback machine at https://snapshot.debian.org.
A Linux kernel with the PREEMPT_RT patch is occasionally available from the Debian archive at https://www.debian.org, and from the wayback machine at https://snapshot.debian.org.

Non-realtime::
LinuxCNC can also be built and run on non-realtime platforms,
Expand Down Expand Up @@ -178,7 +178,7 @@ The most commonly used arguments are:

`--with-realtime=uspace`::
Build for any realtime platform, or for non-realtime.
The resulting LinuxCNC executables will run on both a Linux kernel with Preempt-RT patches (providing realtime machine control) and
The resulting LinuxCNC executables will run on both a Linux kernel with PREEMPT_RT patches (providing realtime machine control) and
on a vanilla (un-patched) Linux kernel (providing G-code simulation but no realtime machine control).

If development files are installed for Xenomai (typically from package libxenomai-dev) or RTAI (typically from a package with a name starting "rtai-modules"),
Expand Down Expand Up @@ -383,7 +383,7 @@ The regular values for this argument are:
Skip building documentation.

`uspace`::
Configure the Debian package for Preempt-RT realtime or for non-realtime (these two are compatible).
Configure the Debian package for PREEMPT_RT realtime or for non-realtime (these two are compatible).

`noauto`::
`rtai`::
Expand Down Expand Up @@ -549,7 +549,7 @@ LinuxCNC tries to improve its realtime latency by locking the memory it uses int
It does this in order to prevent the operating system from swapping LinuxCNC out to disk, which would have bad effects on latency.
Normally, locking memory into RAM is frowned upon, and the operating system places a strict limit on how much memory a user is allowed to have locked.

When using the Preempt-RT realtime platform LinuxCNC runs with enough privilege to raise its memory lock limit itself.
When using the PREEMPT_RT realtime platform LinuxCNC runs with enough privilege to raise its memory lock limit itself.
When using the RTAI realtime platform it does not have enough privilege, and the user must raise the memory lock limit.

If LinuxCNC displays the following message on startup, the problem is your system's configured limit on locked memory:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/code/code-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ chapter, we only use the HAL API as defined in include/hal.h.

=== Motion Controller Modules

The realtime functions of the motion controller are implemented with realtime modules -- userspace shared objects for Preempt-RT systems or kernel modules for some kernel-mode realtime implementations such as RTAI:
The realtime functions of the motion controller are implemented with realtime modules -- userspace shared objects for PREEMPT_RT systems or kernel modules for some kernel-mode realtime implementations such as RTAI:

* 'tpmod' - trajectory planning
* 'homemod' - homing functions
Expand Down
11 changes: 9 additions & 2 deletions docs/src/common/glossary.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ Jog::
jog speed can be set from the graphical interface.

kernel-space::
Code running inside the kernel, as opposed to code running in userspace. Some realtime systems (like RTAI) run realtime code in the kernel and non-realtime code in userspace, while other realtime systems (like Preempt-RT) run both realtime and non-realtime code in userspace.
Code running inside the kernel, as opposed to code running in userspace.
Some realtime systems (like RTAI) run realtime code in the kernel and
non-realtime code in userspace, while other realtime systems (like PREEMPT_RT)
run both realtime and non-realtime code in userspace.

Kinematics::
(((kinematics))) The position relationship between world
Expand Down Expand Up @@ -288,7 +291,11 @@ Rapid rate::
testing a G-code program for the first time.

Real-time::
(((real-time))) Software that is intended to meet very strict timing deadlines. On Linux, in order to meet these requirements it is necessary to install a realtime kernel such as RTAI or Preempt-RT, and build the LinuxCNC software to run in the special real-time environment. Realtime software can run in the kernel or in userspace, depending on the facilities offered by the system.
(((real-time))) Software that is intended to meet very strict timing deadlines.
On Linux, in order to meet these requirements it is necessary to install a realtime
kernel such as RTAI or PREEMPT_RT, and build the LinuxCNC software to run in the
special real-time environment. Realtime software can run in the kernel or in
userspace, depending on the facilities offered by the system.

RTAI::
(((RTAI))) Real Time Application Interface, see
Expand Down
Binary file added docs/src/config/images/latency-ping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions docs/src/getting-started/getting-linuxcnc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If you have an existing install that you want to upgrade,
go to the <<cha:updating-linuxcnc,Updating LinuxCNC>> section instead.

NOTE: To operate machinery LinuxCNC requires a special kernel with real-time extensions. There
are three possibilities here: preempt-rt, RTAI or Xenomai. In addition there are two versions
are three possibilities here: PREEMPT_RT, RTAI or Xenomai. In addition there are two versions
of LinuxCNC which work with these kernels. See the table below for details. However for code
testing and simulation it is possible to run the `linuxcnc-uspace` application on a stock kernel
of the distribution.
Expand Down Expand Up @@ -218,7 +218,7 @@ To see if your computer is suitable for software step pulse generation
run the Latency Test as shown <<sec:latency-test,here>>.

At the time of writing the Live Image is only available with the
preempt-rt kernel and a matching LinuxCNC. On some hardware this might
PREEMPT_RT kernel and a matching LinuxCNC. On some hardware this might
not offer good enough latency. There is an experimental version available
using the RTAI realtime kernel which will often give better latency.

Expand Down Expand Up @@ -258,19 +258,19 @@ In addition, for experienced users who are familiar with Debian system administr
[options="header"]
|===
| Distribution | Architecture | Kernel | Package name | Typical use
| Debian Trixie | amd64 & arm64 | preempt-rt | linuxcnc-uspace | machine control & simulation
| Debian Trixie | amd64 & arm64 | PREEMPT_RT | linuxcnc-uspace | machine control & simulation
| Debian Trixie | amd64 | RTAI | linuxcnc | machine control
| Debian Bookworm | amd64 & arm64 | preempt-rt | linuxcnc-uspace | machine control & simulation
| Debian Bookworm | amd64 & arm64 | PREEMPT_RT | linuxcnc-uspace | machine control & simulation
| Debian Bookworm | amd64 | RTAI | linuxcnc | machine control
| Debian Bullseye | amd64 | preempt-rt | linuxcnc-uspace | machine control & simulation
| Debian Bullseye | amd64 | PREEMPT_RT | linuxcnc-uspace | machine control & simulation
| Any | Any | Stock | linuxcnc-uspace | simulation ONLY
|===

NOTE: LinuxCNC v2.9 is not supported on Debian 9 or older.

.Preempt-RT kernels
.PREEMPT_RT kernels

The Preempt-rt kernels are available for Debian from the regular debian.org archive.
The PREEMPT_RT kernels are available for Debian from the regular debian.org archive.
The package is called `linux-image-rt-*`.
Simply install the package in the same way as any other package from the
Synaptic Package manager or with apt-get at the command-line.
Expand All @@ -288,7 +288,7 @@ The apt source is:
LinuxCNC and the RTAI kernel are now only available for 64-bit OSes but
there are very few surviving systems that can not run a 64-bit OS.

=== Installing on Debian Trixie (with Preempt-RT kernel)
=== Installing on Debian Trixie (with PREEMPT_RT kernel)

. Install Debian Trixie (Debian 13), amd64 version.
You can download the installer here:
Expand All @@ -313,7 +313,7 @@ NOTE: It is possible to download a version of LinuxCNC directly from Debian
(currently version 2.9.4) but a more up-to-date version (2.9.8) can
be installed from the LinuxCNC repository.

. Install the Preempt-RT kernel and modules
. Install the PREEMPT_RT kernel and modules
+
----
sudo apt-get install linux-image-rt-amd64
Expand Down
44 changes: 31 additions & 13 deletions docs/src/getting-started/system-requirements.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ such as checking G-code, testing config files and learning the system.
To work with these kernel versions there are two versions of LinuxCNC distributed.
The package names are "linuxcnc" and "linuxcnc-uspace".

The realtime kernel options are preempt-rt, RTAI and Xenomai.
The realtime kernel options are PREEMPT_RT, RTAI, Xenomai3 and Xenomai4 EVL.

For most cases, PREEMPT_RT is the simplest option. For better latency, Xenomai4 EVL can help.

RTAI is not maintained any more but still works on some systems.

You can discover the kernel version of your system with the command:

Expand All @@ -63,41 +67,55 @@ uname -a
----

If you see (as above) `-rt-` in the kernel name then you are running the
preempt-rt kernel and should install the "uspace" version of LinuxCNC.
PREEMPT_RT kernel and should install the "uspace" version of LinuxCNC.
You should also install uspace for "sim" configs on non-realtime kernels.

If you see `-rtai-` in the kernel name then you are running RTAI
realtime. See below for the LinuxCNC version to install.

=== Preempt-RT with 'linuxcnc-uspace' package
=== PREEMPT_RT with 'linuxcnc-uspace' package

Preempt-RT is the newest of the realtime systems, and is also the version
that is closest to a mainline kernel. Preempt-RT kernels are available
PREEMPT_RT is the version
that is closest to a mainline kernel. PREEMPT_RT kernels are available
as precompiled packages from the main repositories. The search term
"PREEMPT_RT" will find them, and one can be downloaded and installed
just like any other package.
Preempt-RT will generally have the best driver support and is the only
option for systems using the Mesa ethernet-connected hardware driver
cards. In general preempt-rt has the worst latency of the available
PREEMPT_RT will generally have the best support.
In general PREEMPT_RT has the worst latency of the available
systems, but there are exceptions.

=== Xenomai3 with 'linuxcnc-uspace' package

Xenomai3 is supported, but you will have to find or build the kernel
and compile LinuxCNC from source to utilise it.

Prebuilt experimental kernels can be found here: https://github.com/hdiethelm/xenomai3-linuxcnc

=== Xenomai4 EVL with 'linuxcnc-uspace' package

Xenomai4 is supported, but you will have to find or build the kernel
and compile LinuxCNC from source to utilise it. It has support for
Mesa ethernet-connected hardware with out of band realtime ethernet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Mesa ethernet-connected hardware with out of band realtime ethernet.
Mesa ethernet-connected hardware with out-of-band realtime ethernet.


Prebuilt experimental kernels can be found here: https://github.com/hdiethelm/xenomai4-linuxcnc

=== RTAI with 'linuxcnc' package

RTAI has been the mainstay of LinuxCNC distributions for many years. It
will generally give the best realtime performance in terms of low
latency, but might have poorer peripheral support and not as many screen
resolutions. An RTAI kernel is available from the LinuxCNC package
repository. If you installed from the Live/Install image then switching
kernel and LinuxCNC flavour is described in [Installing-RTAI].
kernel and LinuxCNC flavour is described in <<cha:Installing-RTAI>>.

=== Xenomai with 'linuxcnc-uspace' package
Because the RTAI kernel is no longer actively maintained, it can
be unreliable on certain systems.

Xenomai is also supported, but you will have to find or build the kernel
and compile LinuxCNC from source to utilise it.
Prebuilt experimental kernels can be found here: https://github.com/NTULINUX/RTAI

=== RTAI with 'linuxcnc-uspace' package

It is also possible to run LinuxCNC with RTAI in user-space mode.
It is possible to run LinuxCNC with RTAI in user-space mode.
As with Xenomai you will need to compile from source to do this.

== Problematic Hardware
Expand Down
6 changes: 3 additions & 3 deletions docs/src/getting-started/updating-linuxcnc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ uname -r
----

If you see (as above) `-rt-` in the kernel name then you are running the
preempt-rt kernel and should install the "uspace" version of LinuxCNC.
PREEMPT_RT kernel and should install the "uspace" version of LinuxCNC.
You should also install uspace for "sim" configs on non-realtime kernels.

If you see `-rtai-` in the kernel name then you are running RTAI realtime.
Expand Down Expand Up @@ -115,7 +115,7 @@ Debian uses the Synaptic Package Manager.
* Open Synaptic using the instructions in <<_setting_apt_sources,Setting apt sources>> above.
* Click the `Reload` button.
* Use the Search function to search for `linuxcnc`.
* The package is called "linuxcnc" for RTAI kernels and "linuxcnc-uspace" for preempt-rt.
* The package is called "linuxcnc" for RTAI kernels and "linuxcnc-uspace" for PREEMPT_RT.
* Click the check box to mark the new linuxcnc and linuxcnc-doc-* packages for upgrade.
The package manager may select a number of additional packages to be installed,
to satisfy dependencies that the new linuxcnc package has.
Expand Down Expand Up @@ -145,7 +145,7 @@ Codename: trixie
----

Pick the OS from the list then pick the major version you want like
2.9-rt for RTAI or 2.9-uspace for preempt-rt.
2.9-rt for RTAI or 2.9-uspace for PREEMPT_RT.

Next pick the type of computer you have: binary-amd64 for 64-bit PC or
binary-arm64 (64bit) for Raspberry Pi.
Expand Down
1 change: 1 addition & 0 deletions docs/src/index.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<ul>
<li><a href="config/integrator-concepts.html">Integrator Concepts</a></li>
<li><a href="install/latency-test.html">Latency Test</a></li>
<li><a href="install/latency-tuning.html">Latency Tuning</a></li>
<li><a href="motion/tweaking-steppers.html">Stepper Tuning</a></li>
<li><a href="config/ini-config.html">INI Configuration</a></li>
<li><a href="config/ini-homing.html">Homing Configuration</a></li>
Expand Down
Loading