Image
To close this announcement click the X in the top right corner.
Industry Pros use FastCut CNC

So whats different about Linux for CNC?

Linux CNC - Plasmac related questions, tips and topics can be posted here
Post Reply
Rodw
3.5 Star Member
3.5 Star Member
Posts: 680
Joined: Sun Aug 21, 2016 1:49 am
Location: Brisbane, Australia
Contact:

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
3.5 Star Member
3.5 Star Member
Posts: 680
Joined: Sun Aug 21, 2016 1:49 am
Location: Brisbane, Australia
Contact:

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
2 Star Member
2 Star Member
Posts: 72
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
1/2 Star Member
1/2 Star Member
Posts: 3
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
6 Star Elite Contributing Member
6 Star Elite Contributing Member
Posts: 6202
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
3.5 Star Member
3.5 Star Member
Posts: 680
Joined: Sun Aug 21, 2016 1:49 am
Location: Brisbane, Australia
Contact:

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
3.5 Star Elite Contributing Member
3.5 Star Elite Contributing Member
Posts: 559
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.

CarterKraft
1/2 Star Member
1/2 Star Member
Posts: 1
Joined: Mon May 23, 2022 8:55 am

Re: So whats different about Linux for CNC?

Post by CarterKraft » Wed May 25, 2022 2:14 pm

Cool info

robertspark
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1566
Joined: Mon Jun 12, 2017 6:43 pm

Re: So whats different about Linux for CNC?

Post by robertspark » Thu May 26, 2022 1:29 am

BTA Plasma wrote:
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.
think this is a bit confused between Linux and linuxcnc and Linux using a real time kernel.

I do not believe that Apple used linuxcnc or mazak and has have ever used linuxcnc.

they may have used Linux with a real time kernel and a software application of their own creation to use Linux + the real time kernel in a CNC application but it was not LinuxCNC

if they had.... they would have to make available their source code as that is a condition of using linuxCNC.

one manufacturer that has used linuxcnc is Tormach.... they did do some development work with the planner and that has since been back ported into linuxcnc.

other users of linuxcnc that I am aware of is CandCNC although I believe it is now using a 2.7 version of linuxcnc along with one of the Ubuntu distros that may be past or near end of LTS (long term support).

linuxcnc is presently on stable release 2.8.2, with the current master (development branch) being 2.9 and I believe highly likely to be a full major release (2.9) as it is fairly stable and is being tweaked pending the next stable release from Debian (bookworm) in about August / September next year,

2.9 has a lot of things within it and available different to 2.8 (qtplasmac for one, as well as a departure from python 2.7 (a major change) with knock on implications for gtk and glade etc etc that had newer versions for python 3

the flexibility of linuxcnc is quite amazing once you get you head into it and what it can do and the availability of the Mesa source code to reconfigure all 26 pin output ports (or 50 pin IDC) to ANY input and output function is really phenomenal!

yes it can be confusing if you are like me and used to plug and play and click desktop icons but STICK with it.

I came from a background of USB smooth stepper with mach3 then in to ethernet smooth stepper and was highly supportive of warp9 and the smooth stepper but wow could those guys drag their heels with getting that board to FULLY work properly and do everything it was capable of ..... I tried to "upgrade" to mach4 + ess .... man was that painfull .... nearly every time a new release of mach4 came out the ess plugin broke..... hence the pluggin was only compatible with a specific version or range of bug fix / development releases of mach4..... kind of like trying to fix a formal 1 car and provide it with upgrades during the race with guys running along side it IN THE RACE!!!!

(I am well aware that the ESS has come on leaps and bounds since I last used it.... this is just my story and perspective at the time, I am aware to the THC integration that has since happened too).... same applies to mach4!

needless to say I got fed up with promises of the next missing features of the ESS that were to be released in 6m.... that went by and were never released.

I looked around for a board.... considered acorn and many others ..... and settled on cncdrive + uccnc ... because it had its own software and their boards had plugins for mach4 and mach3 ... just in case I wanted or needed to go back.

their boards and uccnc were great..... did almost everything I needed up until I wanted to get my lathe sorted using uccnc..... and they at that time had no interest in developing features..... vivid hit and all development stopped ... what was monthly bug fix and development releases went to nothing for 6-9 months and even then it was the minor of changes....

so I again looked at linuxcnc as I had a Mesa board it had been configured for plasma it was ok ... but not brilliant at that time..... then I decided it was either all in or shut up !!! so I've converted everything to linuxcnc
plasma
mill
router
lathe
and it's finally clicked and I'm starting to see how it all works plus the flexibility of Mesa boards to be able to be configured for ANY input or output function on any pin with the freely available source code for their FPGA boards ( very fast .... up to 10 MHZ step and encoder feedback rates! )..... the ability to run closed loop servos or steppers if you have encoders on your stepper drives (I don't)

there has been a lot of development with graphical user interfaces and the eye candy of looking modern.... and whilst I use qtplasmac for plasma (very clean and neat interface) I have switched back to axis for the mill, router and lathe as it JUST works ... and it's SO simple and clean. it CAN be modified and very simply to look and feel differently (I use a 24" touchscreen so have changed the icon buttons to be larger etc).

anyone starting out in CNC should REALLY consider linuxCNC ... but you need to stick it out.... it won't be easy especially if you are either from a click-click + plug and play background of windows but the rewards will be great and the costs won't be that high.

trust me as I bought:
usb smooth stepper
ethernet smooth stepper
mach3
mach4
proma 150thc
CM126 break out board
CM201 break out board X 2
minthc
uc400eth
uc300eth
uccnc X 2 licences as they are hard coded to the hardware
CNC room UB1 break out board for uc300eth
CNC room UD1 breakout board for uc300eth
pokeys 57E for mach4 lathe
CNC room pobob for pokeys to be used on mach4 lathe
neuron lite THC
____________

scrapped the lot^^^^

now running
Mesa 7i76e for mill, router and plasma
Mesa 7i92 + 7i76 for lathe
+ Mesa 7i98 for bench testing and development (3x 17pin input / outputs using 3x 26pin idc connectors... same cost as a 7i92 with 2x 26 pin IDC connectors

using a superpid for the router
mill uses a VFD
lathe uses a servo spindle drive with 1000ppr spindle emcoder
plasma uses a thcad5 for THC via internal linuxcnc+plasmac control.

fully configurable via hal and Mesa firmware.

I also have a creality cr10s 3d printer and an atomstack S7 M50 (10w laser diode cutter / engraver that are not using linuxcnc)

my advice to myself ~2006/8 when I bought the usb smooth stepper and started on my journey to convert a pmx350 to CNC.... ignore everything else try linuxcnc and stick with it the rest you are dependent on others on developing and bug fixing .... with linuxcnc you are the maker of your own destiny and you have way more chance of fixing whatever the bug is and developing whatever the way YOU want. the rest is just full of pipe dreams and missed promises and dates of stringing you a long when you find an issue or have a really good idea of find that it doesn't quite do what you want now you have learnt or heard about something as you learn what CNC is all about and what all the g and m codes do when you get past the basics.

PS >> {shameless plug} I can now offer pre configured pcs all set up for linuxcnc + plasmac or whatever you want in a plug and play box.

to get it truly plug and play I will need info from you as my crystal ball works overtime already..... but I'm happy to work with anyone for a plug and play solution to convert from whatever to linuxcnc in whatever flavour (plasma mill lathe router etc mach3 mach4 printer port whatever!!!!)

yes there will be a lot of questions ..... but then again how plug and play do you want it..... only you know the hardware sat in front of you and can advise me what it is and how it is configured.

you can buy your own cards direct from Mesa and I will provide custom firmware for you to load onto the cards that just works. some cards are proving difficult to obtain due to chip shortages..... no problem I can advise hardware and breakout board options or just an plug and play hardware card.

I am able to offer custom PCBs or breakout boards too... if you have something quirky.... or require something custom.

no I am not a programming expert just the tip of the linuxcnc iceberg..... and beginning to see the picture and it's potential.

no I cannot get linuxcnc to work on some oddball arm SBC, or to get it to run on some poor latency pc or laptop .... but if you want Linuxcnc in a plug and play box, not a problem happy to help with your build or conversion

Rodw
3.5 Star Member
3.5 Star Member
Posts: 680
Joined: Sun Aug 21, 2016 1:49 am
Location: Brisbane, Australia
Contact:

Re: So whats different about Linux for CNC?

Post by Rodw » Thu May 26, 2022 4:55 am

I have to say I've watched Robert transition from somebody who resisted Linuxcnc because of the effort that can be involved in getting it going through to a power user. My journey started in about 2015 with a mesa card and a desire to build a plasma machine. Little did I know plasma was not well supported but the efforts of a number of us to use new features set the way forward for the development of Plasmac and the later QTPlasmac.

Linuxcnc today is much easier to get going now then it was when I started. But one of the most exciting thing is that Linuxcnc is now a standard package included in Debian. It started in their unstable branch and is now part of testing branch (also known as Bookworm). This branch will become the next official Debian release in about 12 months.

The other interesting thing is that Linuxcnc also supports Ethercat devices and I've been working with them for a while now. This is a big deal and I'm told its a a AUD $1400 addon to Mach4. But I'm sure Mach4 would not support the 6 axis Ethercat robot that David in the UK got moving with linuxcnc today. It shows as a single ethercat slave device.

I just added 42 wires to 5 x stepper drives in a control box this week. With Ethercat, all I would have had to do is plug in some daisy chained ethernet cables! Plus some Ethercat drives can be homed internally and some even allow homing by stalling! So it may be feasible to build a gantry machine with no home or limit switches at all. This would further reduce the wiring required.

But don't give up hope on SBC's (single board computers) just yet Robert! David is controlling his robot with a Raspberry PI 4 and is just finalising the build process of a raspberry Pi image that can be just burnt to a SD card that contains everything. I've been on the sidelines with this project and its very exciting as it will include ethercat, and the dependencies of both QTPYVCP and QTVCP which are used for various GUI's. The reason we can do this is because the Debian buildbots are building Linuxcnc across a number of platforms including ARM64. So we start with cross compiling the Bookworm kernel for the Pi on a AMD64 PC. And install Linucnc from the Bookworm packages.

So as Robert says, give linuxcnc seroius consideration for your next CNC project!

robertspark
4.5 Star Elite Contributing Member
4.5 Star Elite Contributing Member
Posts: 1566
Joined: Mon Jun 12, 2017 6:43 pm

Re: So whats different about Linux for CNC?

Post by robertspark » Thu May 26, 2022 7:05 am

not given up on SBC's + linuxcnc or the Rpi4 + linuxcnc. Just in my opinion it's not where a new user of linuxcnc should be aiming to understand how it works. {destination yes, but not the first install}

I'd go so far as to say that you could probably get linuxcnc to run on anything.... subject to a real-time kernel being available to able to be built.... but that is really niche {non amd64 {64bit pc} or rpi4}

I've seen the development of EtherCAT going on and understand the principle (ethernet daisy chain transmission + very high speed)
I looked at EtherCAT drives and baulked at the cost. {don't think I'll be using them soon.... hey but everything get cheaper over time.... like cnc 20 years ago being niche.... now every many + his dog has a cnc machine of some sort)

never done anything with analog drives, or resolvers etc.... but linuxcnc does it ALL when you have a look under the bonnet, and the key is the mesa cards and their sourcecode and firmware.... just buy an ethernet one and you can plug it into many more machines especially if your PC dies, just swap it over and set up your backup

Nope it does not do stuff like plasmacam (designedge) {draw + cut} ..... there are only widgets / conversational scripts of various types (qtplasmac, ngcgui, nativecam, qtpyvcp_conversational) .... but you can draw in something else for FREE (inkscape / librecam / freecad) and in some cases just save as an svg and load them into linuxcnc and cut.... in other cases .... use something like sheetcam to do the post processing (or an inkscape pluging >> gcode )... there is always a way. Sometimes it can be convoluted but there is always the option for you to imoprove your workflow as sourcecode and many other users tips are available.

Post Reply

Return to “Linux CNC - Plasmac”

Industry Pros use FastCut CNC