So whats different about Linux for CNC?

Linux CNC - Plasmac related questions, tips and topics can be posted here
Post Reply
Rodw
Posts: 620
Joined: Sun Aug 21, 2016 1:49 am

So whats different about Linux for CNC?

Post by Rodw » Thu Sep 17, 2020 7:56 am

I thought now there is a new section, I better add some content. I'll add a few topics from time to time that hopefully make a case for using Linuxcnc. I might add, that I don't really care what OS I use, but do like to choose the right one for the given application. In fact, I even have a Windows based NC control on a press brake which is pretty awesome. I have to say I have never used Mach, so I might get some details wrong, and this might become more of a history lesson but here goes.

Believe it or not Mach and Linuxcnc came out of the same US government department called NIST. They came up with NML,
"The Real-Time Control System (RCS) library is a C++ class library intended for multi-platform real-time distributed applications."

You eyes may glaze over, but you can read the nitty gritty here https://www.nist.gov/el/intelligent-sys ... rs-guide-c

NIST passed on their work to industry and Mach picked it up and ran with it (it did say multi-platform right?). Then the Linux EMC project (Enhanced Machine Controller - now Linuxcnc) became an open source project under the GPL2 license.

The key here is that NML is a real time system which is what CNC requires. Things must happen on time every time without fail. Linuxcnc chose a more complex path and worked with a Linux real time operating system kernel called RTAI. This real time OS kernel meant that Linuxcnc could be THE_MOTION _CONTROLLER

But then Mach ran into problems with Windows becasue as Windows matured into a multi tasking OS, it was impossible to guarantee real time performance as another task could interrupt a time critical process (like CNC). So to solve this problem, Mach moved their motion controller to an external board so the Smooth Stepper et al became THE_MOTION_CONTROLLER. The capability of these microprocessor controlled boards is fairly limited and they cannot offer anywhere near the power available from a modern PC CPU. (Thats why they call them a microprocessor right?)

Linuxcnc on the other hand did not have these problems as all the core activity remained on the PC. But there is a cost. That cost is that to use Linuxcnc, you needed to install a Real time OS kernel (Like RTAI). Few people other than CNC integrators and the music industry so RTAI languished.

Then a funny thing happened. Industry required a real time kernel and an alternative to RTAI emerged called PREEMPT_RT. Suddenly big players with money put their development team on the project and paid their wages. BMW and other automotive manufacturers became involved becasue they needed a real time OS. When you need an airbag to be deployed, you don't want it to go off late right?

Then with the slow demise of parallel ports, a company called Mesa developed a series of ethernet boards that Linuxcnc (THE_MOTION_CONTROLLER) could command. Ethernet is not exactly a real time environment so using these boards required the PREEMPT_RT kernel.

Back when I first became involved with CNC about 1995 or so, I ended up having to patch the Kernel source code with the PREEMPT_RT patch and then compile the Linux kernel which took 5-8 hours. I did not know about this when I bought my Mesa 7i76e so I did what I had to do to use my new hardware.

PREEMPT_RT has gathered a head of steam and from all accounts, it will eventually become the default Linux kernel so eventually, every Linuxcnc distro will be running this kernel by default. As a result, the Debian software repositories now include a PREEMPT_RT upgrade that can be applied to any Debian system and its derivatives like (Linux Mint) by typing a single line at the terminal n about 10 minutes.

Phew, thats enough history. In my next post I'll try and summarise some of the great benefits available by using Linuxcnc as your motion controller.

Rodw
Posts: 620
Joined: Sun Aug 21, 2016 1:49 am

Re: So whats different about Linux for CNC?

Post by Rodw » Thu Sep 17, 2020 7:58 am

This post reserved for Linuxcnc features.

Buckmaster1967
Posts: 63
Joined: Wed Oct 05, 2016 8:52 am

Re: So whats different about Linux for CNC?

Post by Buckmaster1967 » Wed May 12, 2021 7:36 pm

Fantastic info. In the progress of switching form Masso controller to Linuxcnc. Thanks you for the write up.

RDA
Posts: 1
Joined: Fri May 21, 2021 4:59 am

Re: So whats different about Linux for CNC?

Post by RDA » Fri May 21, 2021 6:58 am

Rodw wrote:
Thu Sep 17, 2020 7:56 am
I thought now there is a new section, I better add some content. I'll add a few topics from time to time that hopefully make a case for using Linuxcnc. I might add, that I don't really care what OS I use, but do like to choose the right one for the given application. In fact, I even have a Windows based NC control on a press brake which is pretty awesome. I have to say I have never used Mach, so I might get some details wrong, and this might become more of a history lesson but here goes.

Believe it or not Mach and Linuxcnc came out of the same US government department called NIST. They came up with NML,
"The Real-Time Control System (RCS) library is a C++ class library intended for multi-platform real-time distributed applications."

You eyes may glaze over, but you can read the nitty gritty here https://www.nist.gov/el/intelligent-sys ... rs-guide-c

NIST passed on their work to industry and Mach picked it up and ran with it (it did say multi-platform right?). Then the Linux EMC project (Enhanced Machine Controller - now Linuxcnc) became an open source project under the GPL2 license.

The key here is that NML is a real time system which is what CNC requires. Things must happen on time every time without fail. Linuxcnc chose a more complex path and worked with a Linux real time operating system kernel called RTAI. This real time OS kernel meant that Linuxcnc could be THE_MOTION _CONTROLLER

But then Mach ran into problems with Windows becasue as Windows matured into a multi tasking OS, it was impossible to guarantee real time performance as another task could interrupt a time critical process (like CNC). So to solve this problem, Mach moved their motion controller to an external board so the Smooth Stepper et al became THE_MOTION_CONTROLLER. The capability of these microprocessor controlled boards is fairly limited and they cannot offer anywhere near the power available from a modern PC CPU. (Thats why they call them a microprocessor right?)

Linuxcnc on the other hand did not have these problems as all the core activity remained on the PC. But there is a cost. That cost is that to use Linuxcnc, you needed to install a Real time OS kernel (Like RTAI). Few people other than CNC integrators and the music industry so RTAI languished.

Then a funny thing happened. Industry required a real time kernel and an alternative to RTAI emerged called PREEMPT_RT. Suddenly big players with money put their development team on the project and paid their wages. BMW and other automotive manufacturers became involved becasue they needed a real time OS. When you need an airbag to be deployed, you don't want it to go off late right?

Then with the slow demise of parallel ports, a company called Mesa developed a series of ethernet boards that Linuxcnc (THE_MOTION_CONTROLLER) could command. Ethernet is not exactly a real time environment so using these boards required the PREEMPT_RT kernel.

Back when I first became involved with CNC about 1995 or so, I ended up having to patch the Kernel source code with the PREEMPT_RT patch and then compile the Linux kernel which took 5-8 hours. I did not know about this when I bought my Mesa 7i76e so I did what I had to do to use my new hardware.

PREEMPT_RT has gathered a head of steam and from all accounts, it will eventually become the default Linux kernel so eventually, every Linuxcnc distro will be running this kernel by default. As a result, the Debian software repositories now include a PREEMPT_RT upgrade that can be applied to any Debian system and its derivatives like (Linux Mint) by typing a single line at the terminal n about 10 minutes.

Phew, thats enough history. In my next post I'll try and summarise some of the great benefits available by using Linuxcnc as your motion controller.
Hello Rod,

I would be interested in maybe contributing to the project in some way. Would you please PM me somesort of contact as I am unable to PM you in here and the linuxcnc forum doesnt have PM option at all? Im a bit sceptic in putting my email here in public.

User avatar
acourtjester
Elite Contributing Member
Elite Contributing Member
Posts: 5490
Joined: Sat Jun 02, 2012 6:04 pm
Location: Pensacola, Fla

Re: So whats different about Linux for CNC?

Post by acourtjester » Fri May 21, 2021 11:37 am

You can PM any member by going to the right side where their icon is click on the contact bubble icon as shown in this attachment it will take you to the PM section. you can remove the info in the PM page as it will be a copy of the post you have been in to get the members PM connection. enter your message and hit send. I will stay in your outbox until the member picks it up, some never do :Sad :HaHa
You can enter you email or ask for theirs this PM is not show to anybody then the member you PM to. You can attach files that have been ZIPed to the PM for the member to download from the PM. :Yay:
pm icon.jpg

You do not have access to view or download this file.
Become a Contributing Member to gain access to this feature. Click Here

DIY 4X4 Plasma/Router Table
Hypertherm PM65 Machine Torch
Drag Knife and Scribe
Miller Mig welder
13" metal lathe
Small Mill
Everlast PowerTig 255 EXT

Rodw
Posts: 620
Joined: Sun Aug 21, 2016 1:49 am

Re: So whats different about Linux for CNC?

Post by Rodw » Fri May 21, 2021 4:59 pm

RDA wrote:
Fri May 21, 2021 6:58 am

Hello Rod,

I would be interested in maybe contributing to the project in some way. Would you please PM me somesort of contact as I am unable to PM you in here and the linuxcnc forum doesnt have PM option at all? Im a bit sceptic in putting my email here in public.
PM sent on this forum

BTA Plasma
Elite Contributing Member
Elite Contributing Member
Posts: 546
Joined: Thu May 12, 2011 4:28 pm

Re: So whats different about Linux for CNC?

Post by BTA Plasma » Thu Jun 24, 2021 1:13 pm

There is a ton of back story to Mach and Linux. A LinuxCNC interface was developed by Apple computer for Brother industries in their new Speedio CNC. LinuxCNC was also implemented by Mazak, Haas and others. Linux was recently used by SpaceX in its last 5 launches and os systems. Its biggest advantage is its real time control. For Haas it allowed them to monitor more encoder counts per unit time and adjustment algorhithms for trajectory planning and real time positional values. This allows Haas to go from analog to fully digital in 2013. We have several Linux CNCs in our facility.

Post Reply

Return to “Linux CNC - Plasmac”

Industry Pros use FastCut CNC