What are the implications of linuxcnc's dependency on a real-time kernel (RTK)?

More
25 Sep 2018 15:10 - 25 Sep 2018 15:26 #117960 by clunc
I'm a long-time Ubuntu LTS (long-term support I imagine) user, and a long-time LinuxCNC user.

From the first (the LinuxCNC first, not the other one), I have been uneasy about the requirement LinuxCNC has to be run in a version which has a real-time kernel (e.g., RTAI or Pre-emptRT) because I could sense right away that the Linux/LinuxCNC install which ran my machine would ("necessarily" I thought) lag behind the LTS versions of all my other machines.

"In the worst case" (my fears told me), my controlling machine could crumble into dust when the hardware failed and the ancient Linux version was no longer supported on newer hardware available. And that newer Linux versions didn't have real-time support.

It seems nightmarish, but perhaps it only seems dire because I don't understand the development landscape.

I see in another thread that there may in fact be an RTK for the lastest Ubuntu LTS (18.04 at this writing), but in my shocked state of mind, it only feels like another stay of execution.

For a time it looked to me like the real-time dependency was going to, somehow, magically, be offloaded/downstreamed to another hardware box--which is to confess that this was how I viewed the machinekit venture.

What's involved in modifying a kernel for real-time performance? Does it require intimate knowledge of LinuxCNC internals? Is it a routine administrative procedure? What slows, or prevents, the appearance of a new RTK when OS versions change?

I would appreciate a view from 30,000 feet, if someone well-placed to give a general picture of how support for LinuxCNC advances with OS upgrades were willing to provide one.

And I thank you.
Last edit: 25 Sep 2018 15:26 by clunc. Reason: added some specific questions

Please Log in or Create an account to join the conversation.

More
25 Sep 2018 15:51 #117965 by mozmck
Real-time kernels are here to stay. Even if you offload the real-time stuff to another hardware box, that box has to run a real-time "something" - whether that is a linux kernel or some other real-time OS or bare-metal.

Back to the linux kernel, the PREEMPT-RT patches are actively maintained and improved by linux kernel devs. They are well on the road to being mainlined in the kernel which means that there eventually will not be separate patches for them, but they will be a part of every linux kernel. More information available here:
wiki.linuxfoundation.org/realtime/start

Building a realtime kernel requires NO knowledge of linuxcnc internals, and can be done easily by anyone who can follow some basic instructions to apply the preempt-rt patch, make a few config changes and build the kernel.
The following user(s) said Thank You: clunc

Please Log in or Create an account to join the conversation.

More
25 Sep 2018 16:15 - 25 Sep 2018 16:18 #117966 by clunc
Outstanding! That is welcome reassurance.

I have in the past been able to follow some basic instructions. However, I have not so far ever managed to follow all of them to completion. ;^)

I would add that an advantage I see to offloading the real-time to a, presumably simpler, hardware box is that the OS of the machine running LinuxCNC could be upgraded independently of the former.
Last edit: 25 Sep 2018 16:18 by clunc. Reason: add a thought

Please Log in or Create an account to join the conversation.

More
25 Sep 2018 20:03 #117970 by clunc
It also occurs to me that, for a production shop, it would be smart to have a dual-boot system (well, triple-boot if one of them is a backup to the currrent version) with the "extra" one always devoted to sandboxing the newest version.

Please Log in or Create an account to join the conversation.

More
26 Sep 2018 02:19 #117982 by curtisa
The thing that interests more is not the reliance on a realtime kernel, which has applications beyond just LCNC (audio and video production for example), but what happens when the hardware eventually becomes too ancient to be supported any more. I'm under no illusion that the PC I have at the moment to run LCNC will last forever (it's already a 10+ year old system), and getting my hands on something with PCi slots and/or a parallel port when this machine eventually dies will only become increasingly more difficult. Hopefully the devs are looking towards the future and exploring other options for integrating LCNC with the outside world, especially for those users who want to get into CNC on the ground floor.

Please Log in or Create an account to join the conversation.

More
26 Sep 2018 04:09 #117987 by cmorley
I think you are making more of this then there really is.
Assuming linuxcnc and linux continue as a projects - there will be advances for changing hardware trends.
In fact that is one of linuxcnc's major strong points - it doesn't rely on any particular special hardware.
At the moment it can use a parallel, pci, pcie and ethernet port.

The linuxcnc project is a conservative slow moving deal.
Machinekit is the faster/edge pushing development project - they have done much work on ARM machines and distributed realtime.

There is no particular reason to use the most up to date version of linuxcnc or hardware unless you wish to. Some people still use Ubuntu 10.04....

Still certainly better then if your old Fanuc or Okuma system breaks.... :)

Chris M

Please Log in or Create an account to join the conversation.

More
26 Sep 2018 04:53 #117990 by curtisa
I'm thinking more in terms of some of the quirks that seem to be attached to entry-level LCNC. Oftentimes the requirement for acceptable latencies for onboard step generation will lead to recommendations for very specific PCs, mobo's, CPUs, graphics cards, BIOS settings etc. I guess it's probably inevitable that these will eventually become unservicable for many people.

On the other hand, I completely understand why software stepping was implemented as the low-cost way to do it. The unfortunate byproduct is that the only port that allowed the generation of step/dir is well and truly obsolete now, and there appears to be nothing else out there at the consumer-level that will permit direct manipulation of pins to the outside world.

Assuming linuxcnc and linux continue as a projects - there will be advances for changing hardware trends.


That's pretty much what I'm hoping, and all that I was really getting at. My hope is that LinuxCNC remains an attainable solution for users who don't want to, or can't afford to splash the cash for the more advanced hardware, while at the same time continuing to push forward with its 'connect anything' philosophy.

Please Log in or Create an account to join the conversation.

More
26 Sep 2018 19:36 #118018 by tommylight

On the other hand, I completely understand why software stepping was implemented as the low-cost way to do it. The unfortunate byproduct is that the only port that allowed the generation of step/dir is well and truly obsolete now, and there appears to be nothing else out there at the consumer-level that will permit direct manipulation of pins to the outside world.


Obsolete it is not, yet.
There are plenty of PCI or PCIe cards with parallel port and there are Mesa cards that are even better, and for what they are capable of they are really cheap compared to ...well anything else.
As far as i can tell, those add on cards will continue to be manufactured and sold by a lot of OEM's, based on many of them touting them as " supports Linuxcnc ", this was some 2 years ago, i have not check recently as i found plenty of PCI ones with NetMos chipset on them ( for free i might add, have some 3 or 4 still left) that works flawlessly with Linuxcnc.
On the other side you can get any of the Dell Optiplex series desktops and it is a safe bet that it will work perfectly with Linuxcnc and have built in parallel ports. Yesterday i got a delivery of 4 Optiplex 780 SFF and they do work nicely with the 64 bit Userspace version of Linuxcnc, might work even better with RTAI but will have to check tomorrow, built in paraport and all.
Back on topic, i do not see the real time kernel going anywhere soon, seeing as way to many people use it for audio editing and other things mentioned earlier in this thread.

Please Log in or Create an account to join the conversation.

More
27 Sep 2018 13:03 - 27 Sep 2018 13:04 #118048 by andypugh

On the other hand, I completely understand why software stepping was implemented as the low-cost way to do it. The unfortunate byproduct is that the only port that allowed the generation of step/dir is well and truly obsolete now,


It's only partially obsolete.

Scroll to the bottom of the options on the left in this board-finder and you will find 6 current-production boards with a parallel port on the back panel and 7 with an internal header. (And that is just mini-ITX format boards on one specific web shop)

I don't think anyone uses it for printers any more, but it has morphed into a GPIO port and still seems to be in demand enough to be included in new boards.

Not that I am a fan of using it for CNC.
Last edit: 27 Sep 2018 13:04 by andypugh.

Please Log in or Create an account to join the conversation.

More
08 Oct 2018 16:51 #118546 by irakandjii
"Building a realtime kernel requires NO knowledge of linuxcnc internals, and can be done easily by anyone who can follow some basic instructions to apply the preempt-rt patch, make a few config changes and build the kernel."

Hi I have been searching everywhere for simple instructions on how to patch "preempt-rt" to Ubuntu Bionic would you please provide some guidance on where to find this information.

So far I have tried:
Threads on this site, but most are outdated or a different distro.
www.osadl.org/Realtime-Linux.projects-realtime-linux.0.html
rt.wiki.kernel.org/index.php/Main_Page
kernel-team.pages.debian.net/kernel-hand...ml#s-common-official

plus many more, over 22 hours invested so far I suspect I just don't know enough to get this right.

Thanks in advance

Please Log in or Create an account to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum