Linux PRE-EMPT & EtherCAT

More
08 Mar 2023 12:19 #266111 by muhosevo
Hi everyone. I'm very very new to the forum. I have a question about EtherCAT. I have a Linux Pre-emt RT patch. Is it possible to control a servo motor using ethercat with c++ with exact precision? Do I need anything else? I wish, my question is clear. Also, I want to explain my project.

I want to make my own 5 axis cnc software for a commercial purpose. I have a program that extracts the G-Codes of any DXF file. And I want to control servo motors w.r.t gcode. I will use Linux Pre-empt, and soem to control servos. Is it possible to make such thing? Do i need anything else?
Finally one more question. Is it possible to LinuxCNC instead of SOEM? 

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

More
08 Mar 2023 20:34 #266147 by rodw
Replied by rodw on topic Linux PRE-EMPT & EtherCAT
Linuxcnc uses the etherlabmaster master from iGh. To install ethercat with linuxcnc, follow the steps in the sticky in this section
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
PREEMPT_RT is a prerequisite for linuxcnc.
If you use Linuxcnc V 2.9 and above, a number of 5 axis simulations and kinematics modules are included. The switchkins simulations include a 3D model of the machine so you can experiment without hardware. They are called switchkins becasue they allow switcing between conventional 5 axis milling and Tool Cetnre point control.

Finally for a shortcut, you can install Debian Bookworm (Debian 12) as it includes linuxcnc in the Debian repositories. The PREEMPT_RT image is a dependency of linuxcnc so it will get installed with linuxcnc if you type:
sudo apt install linuxcnc-uspace linuxcnc-uspace-dev
The following user(s) said Thank You: besriworld

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

More
15 Mar 2023 15:58 #266757 by muhosevo
Replied by muhosevo on topic Linux PRE-EMPT & EtherCAT
Thanks for reply.

Can Linuxcnc + ethercat use for time-critical operations? What is the cycle time of one ethercat frame? Also, is Linux-Preemt enough? Because, i heard from someone that linux had the worst real-time kernel. Is it right? How can we measure cycle time of a motion?

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

More
15 Mar 2023 20:34 #266785 by rodw
Replied by rodw on topic Linux PRE-EMPT & EtherCAT

Thanks for reply.Can Linuxcnc ethercat use for time-critical operations? What is the cycle time of one ethercat frame? Also, is Linux-Preemt enough? Because, i heard from someone that linux had the worst real-time kernel. Is it right? How can we measure cycle time of a motion?

OF course they can. Here is a recent paper presented by Marten Rosten head of the Ethercat Technology Group at a recent event I attended
drive.google.com/file/d/19VggxoJGlKLrIm4...H2M/view?usp=sharing
Page 51:  1000 distrubuted I/O in 30 usec.

Linuxcnc reads the ethercat master every 1 millisecond.
PREEMPT_RT is a hard real time OS but it is affected by jitter, (the amount by which a process runs late or early)
As long as Linuxcnc has enough time left in that 1 ms after allowing for jitter, there is not a problem
ETHERCAT is the most efficient industrial control protocol, Refer P40 which shows it has stack delays orders of magnitude lower than other methods.
 

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

More
15 Mar 2023 20:36 #266786 by rodw
Replied by rodw on topic Linux PRE-EMPT & EtherCAT
And to explore linux real time jitter,   you could use cyclictest
sudo apt install rt-tests
man cyclictest

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

More
15 Mar 2023 20:43 #266787 by tommylight

I want to make my own 5 axis cnc software for a commercial purpose. 

You should read the License before jumping in like that, a short snippet:
-LinuxCNC is free software with open source code. Current versions of LinuxCNC are entirely licensed under the GNU General Public License and Lesser GNU General Public License (GPL and LGPL).

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

More
16 Mar 2023 07:27 #266806 by muhosevo
Replied by muhosevo on topic Linux PRE-EMPT & EtherCAT
does it mean can not I use it for commercial purposes?

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

More
16 Mar 2023 09:29 #266815 by rodw
Replied by rodw on topic Linux PRE-EMPT & EtherCAT
You can use linuxcnc for commercial purposes but you need to respect the GPL license and make the source code available. Tormach is an example of a commercial cnc company who uses linuxcnc and respects the licence (and has contributed to the core code). I am sure many other companies use linuxcnc too.

You will also be using the iGH etherlabmaster ethercat master. It is also open source so there will be other similar  GPL requirements there.

Also your company needs to become a member of the Ethercat Technology Group (which is free) to sell ethercat based machines...
 
The following user(s) said Thank You: tommylight

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

More
16 Mar 2023 11:15 #266823 by tommylight

does it mean can not I use it for commercial purposes?

You can use it, but any changes you make you must make awailable.
It is as simple as that.
Best way would be to fork it on github and post changes there, makes things very easy.

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

More
16 Mar 2023 11:26 #266825 by rodw
Replied by rodw on topic Linux PRE-EMPT & EtherCAT

does it mean can not I use it for commercial purposes?
You can use it, but any changes you make you must make awailable.
It is as simple as that.
Best way would be to fork it on github and post changes there, makes things very easy.

There is no need to do this. Tormach don't. They make their source available via a USB stick which they sell for $10 or so which is well within the licence conditions. Note that your application is a derived work so any changes you make or code you write must also be made available.

You need to treat the licensing seriously becaue it will be the free software foundation that prosecutes you and they are well resourced.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.084 seconds
Powered by Kunena Forum