Ethercat HAL driver

More
11 Aug 2023 05:21 #277601 by gueee78
Replied by gueee78 on topic Ethercat HAL driver
hello foxington!

Did you get anywhere with your setup?

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

More
11 Aug 2023 11:33 #277630 by endian
Replied by endian on topic Ethercat HAL driver
hello,

yes I have done working core component for kollmorgen and pilz stuff with older incremental format for DC in 1 ms with my benchtop hardware setup - 3 axis. It is little bit more to setup but not complicated at all.

If you are interested check this stuff before. 

have a great time

Slav

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

More
05 Nov 2025 06:44 #337867 by auric
Replied by auric on topic Ethercat HAL driver
I apologize for posting here; I couldn't find a more suitable topic, and I was afraid to start a new one. I've become interested in EtherCAT, and I think I've even figured it out at some level. I often work with CNC, but I haven't worked with LinuxCNC yet. I've become intrigued by how users connect the hardware and the CNC itself (after all, EtherCAT has already made significant inroads into drives and other areas). A simple search for "LinuxCNC EtherCAT" yields several interesting topics. First, I wanted to understand the HAL: am I correct in assuming it's a set of specific instructions that configure the CNC itself so that a task is sent to another process that handles EtherCAT? Or is it not just settings, but also a process or driver of some sort?
What is most often used to connect the CNC and the servo drives themselves?
I found this page while searching: eci.intel.com/docs/3.3/development/tutor...enable-linuxcnc.html. If I understand correctly, it suggests using the IgH EtherCAT Master Stack and the LinuxCNC EtherCAT Driver. I'm confused, because the IgH EtherCAT Master is an open-source development from etherlab.org. What does Intel have to do with it, and why is it sometimes referred to as the ECI EtherCAT Master Stack? What does the LinuxCNC EtherCAT Driver (github.com/sittner/linuxcnc-ethercat.git) do in the bundle? And what does Intel Edge Control do then?

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

More
05 Nov 2025 07:32 #337868 by rodw
Replied by rodw on topic Ethercat HAL driver
@auric, Don't be afraid to ask on your own thread. Sometimes thats best so we can follow your journey.
Some of the Intel stuff is a bit dated now as we worked to make ethercat easier for you. The simplest way to get linuxcnc and ethercat right now is to download the 2.94 ISO from Linuxcnc's download page and install it on a PC from a thumb drive
Then follow the steps in this thread to get linuxcnc and ethercat going. This will give you Debian Bookworm and linuxcnc 2.9.4 which is only missing a couple of minor bug fixes in the latest 2.9.7 
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
Today, the linuxcnc ethercat hal driver is hosted on the iGh ethercat repository. There are some licensing reasons preventing us to install the ethercat master on our ISO so we do the next best thing and est up the system files so you can install their ethercat master with a single command..

Anyway, back to hal, Linuxcnc's hardware abstraction layer. Linuxcnc is always the motion controller so it has the full power of your PC st its disposal instead of on an emasculated embedded PC like some other CNC systems on Windows use. This requires using the PREMPT_RT real time kernel. Linuxcnc runs a real time servo thread synced to ethercat which fires 1000 times a second. The hal file  (a text file) defines how all of the parts of a CNC machine are connected together. eg where are estops, home and limit switches connected etc.  The Hal file also loads the ethercat hal driver with  an XML file for ethercat to define your ethercat slaves, PIDs. MIDs etc.  The linuxcnc ini file defines the actual physical hardware. eg how many axes, is it metric or imperial, what gui is opened, encoder resolution per rev, max velocitiy and accelleration per axis, the kinematics model etc.

To see what hal can do, go to our documents  linuxcnc.org/docs/stable/html/ and click on the expand man pages button and review the hal components that can be loaded in your hal file. If that's not enough, you can write your own custom components in a C like environment that can be compiled and installed into linuxcnc with halcompile. Once your custom components is installed it is treated as if its part of the linuxcnc core! 

Oh and Sitner's original ethercat hal  driver has been taken over by Scott Laird, modernized and extended including automated build processes that publishes any changes in the code to the iGh repository. Since then, the uptake of ethercat has exploded as its no longer necessary to modify and build anything from source.
 
The following user(s) said Thank You: auric

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

More
05 Nov 2025 09:21 #337875 by Hakan
Replied by Hakan on topic Ethercat HAL driver
Regarding Intel ECI, it seems Intel offers the IgH Ethercat master under their ECI umbrella.
We have nothing to do with that.

There is not one linuxcnc system. The linuxcnc system is always tailor-made to fit the machine.
You piece together a number of components for kinematics, drive control, io, gui etc
and connect them together into a working linuxcnc system.
This is done in the hal file. Components are loaded, pins are connected or given values.
Pins are the basic connection points in and out of a component.

lcec (linuxcnc ethercat component) is the component that connects pins to ethercat pdos.
lcec reads and writes data from the ethercat device every servo cycle (like every 1 ms)
and exchanges the data with the connected components.

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

More
07 Nov 2025 06:26 #338016 by rodw
Replied by rodw on topic Ethercat HAL driver
I think Intel is now promoting PREEMPT_RT and have their own optimized RT kernel so the linuxcnc/ethercat stuff is just a tutorial for their users...

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

More
10 Nov 2025 11:59 #338141 by lorenzing
Replied by lorenzing on topic Ethercat HAL driver
Hi all, can someone help me with "setp cia402.x.pos-scale xxxx" value?
I've this type of motor with the same encoder: EMMB-ST-87-M-SM (X), EMMB-ST-87-M-SMB (Z1,Z2,Y1,Y2).
Z1, Z2 5mm/rev; X, Y1, Y2 180mm/rev but I don't know the correct pos-scale value.

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

More
10 Nov 2025 19:05 - 10 Nov 2025 19:37 #338150 by Hakan
Replied by Hakan on topic Ethercat HAL driver
The unit of pos-scale is increments/distance unit, like steps/mm or steps/inch.
If you motor's encoder has 500 pulses/rev, then it is 2000 increments/rev.
With a axis movement of 5 mm/motor revolution you should set pos-scale = 2000/5 and 2000/180 respectively.
400 and 11.111

It may be possible to set the increments/rev separately from the encoders value, check the drive manual if the above doesn't match.

 
Last edit: 10 Nov 2025 19:37 by Hakan. Reason: Math

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

More
11 Nov 2025 18:01 #338199 by ruediger123
Replied by ruediger123 on topic Ethercat HAL driver
Hello,
I try to integrate the security plc from Sick Flexi Soft via ethercat but I get the message that bitLen only allows 32 bits.
Are the restrictions limited to Linuxcnc-ethercat or do they also apply to the IGH ethercat-master.
   
Attachments:

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

More
11 Nov 2025 18:30 #338205 by Hakan
Replied by Hakan on topic Ethercat HAL driver
The array data types are not implemented in linuxcnc-ethercat.
Not 100% sure about IgH Ethercat master.
 

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

Time to create page: 0.288 seconds
Powered by Kunena Forum