Installing linuxcnc on Raspberry Pi with EtherCAT

More
17 Jan 2024 10:47 #290939 by govind@89
Hello, I am new to this field and am seeking guidance. My goal is to develop a CNC machine using an FPGA with EtherCAT Using Linuxcnc. I have come across various types of EtherCAT modules, but I am confused about which EtherCAT module to prefer.

My master is raspberry pi and slave is FPGA board  i want to communication between them using EtherCAT

I have outlined my questions below:
  1. Is it necessary to program the EtherCAT module using any programming language such as C/C++? 
  2. I watched a video explaining the installation process of EtherCAT on Raspberry Pi, but I am unsure about what to do on the slave side. Could you provide guidance on that? 
  3. In the scenario where my slave is an FPGA board, how can I install EtherCAT?


Are EtherCAT modules available in the market? Here are some options I found:
  1.  MICROCHIP : in.element14.com/microchip/evb-lan9252-a.../2819865?st=ethercat 
  2.  AB&T technology: www.bausano.net/en/hardware/easycat.html 
  3.  Esmacat :https://www.crowdsupply.com/harmonic-bionics/ease 
  4. Infineon : in.rsdelivers.com/product/infineon/kitxm...ED49fQEC5Rrm4x77Jazw

I prefer installing LinuxCNC using this video link:

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

More
17 Jan 2024 11:53 - 17 Jan 2024 11:55 #290944 by Hakan
Hi govind@89, that's my video right there.. Things have progressed since then and EtherCAT is now mainstream, at least almost, and rodw has written guides on how to install EtherCAT. Better to follow them.

As for your questions.
1. An ethercat module such as LAN9252 or AX58100 is not programmed with C/C++. They need a configuration, which is stored in an external eeprom. Once connected to a EtherCAT master, the eeprom can be programmed from for example TwinCAT. The esi file is needed for that.
The EtherCAT module communicate with an MCU, or FPGA in your case, typically using SPI, and for synchronization there are three lines/pins/signals that can be watched by the MCU.To manage the communication one would need a EtherCAT Slave Library on the MCU (or FPGA) and on top of that add some user code to do what it is supposed to do.

2. When you buy an EtherCAT slave unit like an EtherCAT stepper driver or EtherCAT servo driver, they are ready to use of course. But to make one from scratch - I am in the process of making my own EtherCAT device and have started a video series of that. It's not a tutorial, it is my struggles. There are many things to learn and many things to get together to make an EtherCAT slave.
Here is a link to that play list



3. I am not familiar with how FPGA works, but it must be some code to handle the EtherCAT peculiarities, state changes, sending receiving data, synchronization and all such things, SPI communication. The FPGA equivalent to an EtherCAT Slave library. Plus your own application code.
 
Last edit: 17 Jan 2024 11:55 by Hakan.

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

More
17 Jan 2024 12:23 #290947 by govind@89
Thank you for your valuable response. I watched your video, and it's truly informative and motivational in this field.
  1. Slave MCU should the EtherCAT Slave Library be attached to?
  2. No requried On the master side EtherCAT Slave Library, only follow the steps outlined in the video link for implementing EtherCAT on LinuxCNC with Raspberry Pi. 
  3. Where can I obtain the Beckhoff Slave Stack Code? Is it available for free?

    I am a beginner, so I would like to gather information before starting the development process.

    If I use the Beckhoff ready-made EtherCAT module(slave)  with  master(EtherCAT + LinuxCNC + Raspberry Pi), as demonstrated in the provided video, will it function? If not, how can I develop the master ( EtherCAT + LinuxCNC + Raspberry Pi) setup using the  slave (Beckhoff EtherCAT module)?"
Attachments:

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

More
17 Jan 2024 12:34 - 17 Jan 2024 12:35 #290948 by govind@89
Last edit: 17 Jan 2024 12:35 by govind@89.

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

Time to create page: 0.352 seconds
Powered by Kunena Forum