[Etherlab-users] "Master0 dead" and unable to check fro masters/slaves

Andreas Stewering-Bone andreas.stewering-bone at gmx.de
Thu Sep 29 08:04:27 CEST 2022


Dear Henrik,

First goal is to get a clean system setup.

IgH supports OpenSuse system from the official side (Packages are
available
under https://build.opensuse.org/project/show/science:EtherLab)

I, a member of the IgH, supports Debian privatly.

Ubuntu is known to run, but it maybe it is more complicate than the
other system.

I have created some Raspberry images with Etherlab preinstalled on the
standard kernel

Have a look at

https://www.stewering-bone.de/index.php/s/R7MME7b5Yf7B83x

That are images like the official raspberry images, please read the
official documentation how to install it.


I have created a Debian live CD for x86 system with RT-Kernel, rt-test
tools and EtherLab preinstalled. It can be used with or without
installation.

Have a look at

https://www.stewering-bone.de/index.php/s/R7MME7b5Yf7B83x

It is based on the debian live projekt, for further informations see

https://debian-live-config.readthedocs.io/en/latest/

To get the EtherCAT master running:
- Get the MAC of your interface via ip a
- You only have to modify /etc/ethercat.conf, Add MAC and select
generic driver
- Start the master via sudo systemctl start ethercat
- Check bus via sudo ethercat ma and sudo ethercat sl

Second step should be write and run a minimal c example to access the
bus, see the ethercat master examples

Third step is to get matlab running, but this is a little bit more
complicated.


Any ideas, fixes or comments on  the created boot images are welcome.
The software to create the images is hosted under
Raspberry: https://gitlab.com/igh-ab/pi-gen
Debian-Live: https://gitlab.com/igh-ab/debian-live-config

Best regards

Andreas

Am Dienstag, dem 27.09.2022 um 17:38 +0200 schrieb Henrik Barie:
> Hello Andreas,
> 
> when using "dmesg" I dont get any EtherCat-related messages.
> Usually the last messages are something with EtherCat but this time
> there are none.
> I dont know how to run the Master with the standard kernel.
> Im using Ubuntu 22.04 with a Realtime Kernel in a Beta-Version. The
> header file is called linux-headers-5.15.0-1020-realtime, if that is
> any help.
> I couldnt get Realtime Kernel Patches for Ubuntu 18.4 or 20.4 to
> work, like they were recommended to use in some installation guides I
> found, so I hoped with using this Realtime Kernel it would finally
> work.
> 
> The Main-Goal of my Project is to get Etherlab + Etherlabmaster
> running on a Linux PC like a Labtop or Desktop-PC and to be able to
> control a Beckhoff Unit with it. But if I cant get this to work, I
> guess I have to convince my Professor to buy a Raspberry Pi 4 :)
> 
> "You can generate the code on any other system you like (Windows
> included), transfer the code to the control system and compile it."
> How can I install the etherlab-blockset in Matlab on a Windows PC/
> what files do I need for this?
> 
> Also so thank you very much for your help so far, I know Im asking a
> lot of "simple" questions since Im a complete beginner at Linux.
> 
> Regards
> Henrik
> 
> 
> Am 2022-09-26 08:50, schrieb Andreas Stewering-Bone:
> > Dear Henrik,
> >  
> > There is something wrong on kernel module level.
> > The master module does not fit to your running kernel.
> > Please have a look at "dmesg".
> >  
> > You can run the master with the standard distribution kernel to get
> > in touch with ethercat.
> > But note: actually it is not possible to tun ethercat on a strict
> > uefi safe boot enviroment with signed modules, because the ethercat
> > master is a out of tree module. 
> >  
> > I do not know the actually state of your system, so it is difficult
> > to decide for the next step.
> >  
> > To start take a Raspberry Pi 4 with raspbian, follow the package
> > instruction and you will get a running ethercat with the default
> > kernel.
> > For many control systems this will be a good starting point for a
> > project.
> >  
> > Matlab installations on Linux is getting more difficult on each new
> >  matlab release, but 
> > there is no need to for a matlab installation an the control
> > system.
> > You can generate the code on any other system you like (Windows
> > included), transfer the code to the control system and compile it.
> > You only need to install the etherlab blockset on both systems.
> > Please have a look at
> > https://gitlab.com/etherlab.org/etherlab/-/blob/master/README
> > Section Power user
> >  
> > Best regards
> >  
> > Am Dienstag, dem 20.09.2022 um 13:32 +0200 schrieb Henrik Barie:
> > > Hello Andreas,
> > >  
> > >  
> > > I installed DKMS for Ubuntu 22.04 with
> > > "sudo apt-get update" and "sudo apt-get -y install dkms".
> > > I can now find several dkms directorys and files.
> > >  
> > > After I rebooted the system I tried to start ethercat-master with
> > > "sudo 
> > > systemctl start ethercat", but I got an errormessage:
> > >  
> > > Job for ethercat.service failed because the control process
> > > exited with 
> > > error code.
> > > See "systemctl status ethercat.service" and "journalctl -xeu 
> > > ethercat.service" for details.
> > >  
> > > "journalctl -xeu ethercat.service" gave out this:
> > >  
> > > Sep 20 12:34:15 ec-Lenovo-V15-G2-ITL ethercatctl[5838]: modprobe:
> > > ERROR: 
> > > could not insert 'ec_master': Unknown symbol in mod>
> > > Sep 20 12:34:15 ec-Lenovo-V15-G2-ITL systemd[1]:
> > > ethercat.service: Main 
> > > process exited, code=exited, status=1/FAILURE
> > > ░░ Subject: Unit process exited
> > > ░░ Defined-By: systemd
> > > ░░ Support: http://www.ubuntu.com/support
> > > ░░
> > > ░░ An ExecStart= process belonging to unit ethercat.service has
> > > exited.
> > > ░░
> > > ░░ The process' exit code is 'exited' and its exit status is 1.
> > > Sep 20 12:34:15 ec-Lenovo-V15-G2-ITL systemd[1]:
> > > ethercat.service: 
> > > Failed with result 'exit-code'.
> > > ░░ Subject: Unit failed
> > > ░░ Defined-By: systemd
> > > ░░ Support: http://www.ubuntu.com/support
> > > ░░
> > > ░░ The unit ethercat.service has entered the 'failed' state with
> > > result 
> > > 'exit-code'.
> > > Sep 20 12:34:15 ec-Lenovo-V15-G2-ITL systemd[1]: Failed to start 
> > > EtherCAT Master Kernel Modules.
> > > ░░ Subject: A start job for unit ethercat.service has failed
> > > ░░ Defined-By: systemd
> > > ░░ Support: http://www.ubuntu.com/support
> > > ░░
> > > ░░ A start job for unit ethercat.service has finished with a
> > > failure.
> > > ░░
> > > ░░ The job identifier is 2704 and the job result is failed.
> > >  
> > >  
> > > and status showed this:
> > >  
> > > × ethercat.service - EtherCAT Master Kernel Modules
> > >       Loaded: loaded (/lib/systemd/system/ethercat.service;
> > > disabled; 
> > > vendor preset: enabled)
> > >       Active: failed (Result: exit-code) since Tue 2022-09-20
> > > 12:29:47 
> > > CEST; 12s ago
> > >      Process: 4970
> > > ExecStart=/usr/local/share/etherlab/sbin/ethercatctl 
> > > start (code=exited, status=1/FAILURE)
> > >     Main PID: 4970 (code=exited, status=1/FAILURE)
> > >          CPU: 4ms
> > >  
> > > Sep 20 12:29:47 ec-Lenovo-V15-G2-ITL systemd[1]: Starting
> > > EtherCAT 
> > > Master Kernel Modules...
> > > Sep 20 12:29:47 ec-Lenovo-V15-G2-ITL ethercatctl[4977]: modprobe:
> > > ERROR: 
> > > could not insert 'ec_master': Unknown symbol in module, or
> > > unknown>
> > > Sep 20 12:29:47 ec-Lenovo-V15-G2-ITL systemd[1]:
> > > ethercat.service: Main 
> > > process exited, code=exited, status=1/FAILURE
> > > Sep 20 12:29:47 ec-Lenovo-V15-G2-ITL systemd[1]:
> > > ethercat.service: 
> > > Failed with result 'exit-code'.
> > > Sep 20 12:29:47 ec-Lenovo-V15-G2-ITL systemd[1]: Failed to start 
> > > EtherCAT Master Kernel Modules.
> > > ~
> > >  
> > >  
> > > I checked if the ethercat.conf file in /etc is not modified but
> > > it is, 
> > > and all other ethercat -files that could be modifed are modified
> > > too.
> > > I dont know why it wont start anymore now.
> > >  
> > > I deleted the old files EtherCAT and PDServ at /home/user, but
> > > that was 
> > > after the error occurred.
> > >  
> > > "please do not use the local path, they are the rest of your
> > > manual 
> > > installation"
> > >  
> > > How can I be sure im not using the /local- Path?
> > >  
> > >  
> > > I didnt know how to generate the code for my Simulink Model so I
> > > had to 
> > > search it. I found out that my Matlab 2014b with Student Licence
> > > is 
> > > missing the "Code Generation"-Tab in the Configuration Parameters
> > > of the 
> > > model and that if you are using a Student version liense, MATLAB
> > > Coder 
> > > and Simulink Coder can only be running MATLAB R2016a or later.
> > >  
> > > Is there any other way to generate the code for the model besides
> > > installing a later Matlab-Version?
> > >  
> > >  
> > > Regards
> > > Henrik
> > >  
> > >  
> > >  
> > >  
> > 
> >  
> >  
> > 
> >  
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20220929/deb4a7f7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: This is a digitally signed message part
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20220929/deb4a7f7/attachment.sig>


More information about the Etherlab-users mailing list