Ethercat installation from repositories - how to step by step

More
15 Jan 2023 12:07 - 15 Jan 2023 12:13 #262034 by BaxEDM
after I installed linuxcnc_buster_2.8.4_arm64.img I executed the following:

cd /tmp
wget github.com/kdoren/linux/releases/downloa..._5.15.65-1_arm64.deb
sudo apt install ./linux-headers-5.15.65-rt49-v8+_5.15.65-1_arm64.deb

Then I started your ethercat installation steps.

lsb_release -a returns:

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

My goal is to get LinuxCNC + EtherCat running on a raspberry pi 4b. A detailed forum post for this exists, but apparently the raspberry pi 4B boards come in different versions and my newly purchased board won't run the image provided in that post. After searching linuxcnc_buster_2.8.4_arm64.img was the only image I could find that would actually boot on my pi.
Last edit: 15 Jan 2023 12:13 by BaxEDM. Reason: ammendment

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

More
15 Jan 2023 12:24 #262037 by rodw
this indicates there is a conflict or mismatch between the kerel and source.

The following NEW packages will be installed:
dkms ethercat-dkms ethercat-master libethercat libethercat-dev
raspberrypi-kernel-headers

Non standaerd stuff is hard to advise on I wold not run such a recent kernel on buster... so much changed from 5.10 and on
I would
Install bookworm on the pi
raspi.debian.net/ 
and then install
apt-get install linuxcnc-uspace linux-image-rt-arm64
this is reported as working and latency is ok
then follow this guide but make sure the sources etc are adjusted
 

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

More
15 Jan 2023 12:27 #262038 by rodw
in bookworm you can install linuxcnc as follows:
sudo apt install linuxcnc-uspace inuxcnc-uspace-dev

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

More
15 Jan 2023 17:07 - 15 Jan 2023 17:09 #262048 by BaxEDM
I followed the exact instructions on raspi.debian.net, but my new pi won't boot. At least the monitor remains dark and the green led flashes.
I got LinuxCNC and ethercat up and running on my laptop in 15 minutes, this install on a raspberry pi is already taking me days without success. I'm hoping someone can make an image that will actuallly boot and will allow me to install ethercat without problems.

Your suggestion to use bookworm seems a bit odd to me. If I would get bookworm to boot then that would be a very bare bones debian installation, one that does not have a real time kernel or a desktop interface, nor would wifi work. Would it not make more sense to use an image that is already tailored for a raspberry pi, like raspian or something and get that to work with linuxcnc. I'm a total beginner here, don't have a clue.

Anyways, for a beginner after having been at this for a few days, maybe its best to ditch the pi and just use a pc with a ready made image. Bummer, I actually purchased the pi just because there was a detailed forum post on how to set everything up for it, which did not work for my newer version of the pi 4B.
Last edit: 15 Jan 2023 17:09 by BaxEDM.

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

More
15 Jan 2023 21:42 #262069 by rodw
Bullseye and Bookworm do install on the Pi 4 as I have done it.
Etherlabmaster will run on a Pi as I have installed it from their repos.
PREMPT_RT was hard to install back then but I gave you the command to install it from one of the linuxcnc developers
The reason I say to use Bookworm is that it  has Linuxcnc packaged in its repositories so its easy to install.
Yes, the Debian OS only gives a command prompt. you can install the desktop of your choice (please use XFCE) by typing
sudo apt install tasksel
sudo tasksel

I know there has been a lot of work to get linuxcnc to run on buster with V 2.8 but to me this makes no sense as Raspberian is now based on Bullseye and the 5.15 kernel.

Just because  you can make something to run linuxcnc does not mean it will run etherlabmaster. Its easy to have it installed in a kernel other than the one you are using...

You still have to get the Linuxcnc GUI's opening

Many before you have tried and given up. Some suceeed. There are other similarly sized x86 PC's such as the Odroid H3 that  better candidate but they may bring their own problems. I run my Ethercat machine on an earlier H2+ on Bullseye. It was almost impossible to get going but someone helped. Then I put to gether this guide.

Put your Pi in a cupboard and let it run Home Assistant. Its ideal for that  and where mine is doing service...

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

More
28 Jan 2023 12:04 - 28 Jan 2023 12:08 #263074 by akg1904
Hi Rodw,

I already have my ethercat working(what I think) as I got:
halcmd show pin lcecComponent Pins:Owner   Type  Dir         Value  Name
     4  u32   OUT    0x00000001  lcec.conf.master-count
     4  u32   OUT    0x00000004  lcec.conf.slave-count

And I made my Ethercat module similar to yours and tried to run the .ini file but I keep getting an error such as:

Found file(REL): ./pre-gui.hal
Note: Using POSIX realtime
./pre-gui.hal:57: Pin 'lcec.0.0.cia-statusword' does not exist


and I don't know what it represent as I am completely clueless about that .hal file as I used same as your .hal file.

Can you please point me in right direction.

Regards
Abhishek

 

File Attachment:

File Name: post-gui.hal
File Size:0 KB

File Attachment:

File Name: pre-gui.hal
File Size:6 KB

File Attachment:

File Name: EC-6.xml
File Size:1 KB

File Attachment:

File Name: ethercat-conf.xml
File Size:9 KB

Attachment not found

Attachments:
Last edit: 28 Jan 2023 12:08 by akg1904.

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

More
28 Jan 2023 12:41 #263077 by rodw
The statusword is for cia402 drives and you have not added any drives to your ethercat-conf.xml yet so the pins can't exist.
If you just want to work with your IO card for now, delete all of the cia402 code and the joints from your hal file.
If you want to add drives, I have an example ethercat_conf.xml here
github.com/rodw-au/linuxcnc-cia402

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

More
30 Jan 2023 06:18 #263211 by akg1904
Hi Rodw,

Thank you for your replies.
I went through your ethercat_conf.xml and modified my " ethercat_conf.xml " and checked with my drive manual.

Now it is showing new error:

lcec_conf: ERROR: Parse error at line 66: not well-formed (invalid token)
./pre-gui.hal:14: waitpid failed lcec_conf lcec_conf
./pre-gui.hal:14: lcec_conf exited without becoming ready


I don't know where I have made mistake now..
Can please help me out with this.

Regards
Abhishek

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

More
30 Jan 2023 06:59 #263213 by rodw
Please read the error. It says to Look at line 66 in your xml...

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

More
30 Jan 2023 08:03 #263218 by akg1904
Hi Rodw,

Thank you..
I figure it out.

Regards
Abhishek

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

Time to create page: 0.115 seconds
Powered by Kunena Forum