Ethercat installation summary

More
4 years 10 months ago #230455 by tommylight

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

More
4 years 10 months ago #230473 by rodw
Replied by rodw on topic Ethercat installation summary

thanks for that...

i've solved it by getting the ecrt.h file from the git, and the driver was able to build...

so on we go to get some cia402 hal goodness working...

wish me luck
Great. 
It does not look like I mentioned your XML should use the Vendor ID an Product ID from slaves -v

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

  • New Member
  • New Member
More
4 years 9 months ago #230559 by
Replied by on topic Ethercat installation summary
ok, ok... so now I'm starting to feel like all i really know is that I'm not aware of what i dont know... this is mostly because i never seem to do anything that matches anyone else's setup...

so... here we go... let me give you details.. (this is purely so i can get a bit more help, as i'm failing fast.. and chewing through ideas and manuals but with only slow progress)

ive got a HP desktop (2 gb of ram, some spinning rust for storage)

ive got some beckhoff ethercat IO devices... some EL1008's and some EL2004's (oh and the EK1100)
and then the real fly in the ointment is the Servo is a Savch SDA2-e (ive got a few of them .. and i'd like to use them to all of there ability as i've used them before in PLC projects and they are perfectly good servos.. they are cia402 compliant.. they have a product id of 0x000007e6

now for now i'm trying to get a single axis setup up for a bit of jogging.. and some IO testing.. (and to help me write a bit of a manual for the savch drive.. )

but as you can only imagen i've not got a hal that will load..

ive been youtubin and have been trying to test a very minimal hal (see below)

# this is the hal that i've started for the ethercat
loadusr -W lcec_conf ethercat-conf.xml

loadrt lcec
addf lcec.read-all servo-thread
addf lcec.write-all servo-thread


and i get an error about the servo thread not being found..

and that's what I'm currently looking into ...

Pb

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

More
4 years 9 months ago #230565 by Hakan
Replied by Hakan on topic Ethercat installation summary
I just set up ethercat here and there were those problems with ecrt.h and -lethercat not found.

What I did in linuxcnc-ethercat was to add -I/opt/etherlab/include to RTFLAGS in /usr/share/linuxcnc/Makefile.modinc. ecrt.h belongs to etherlab but need help to find it. The other one is to add -L/opt/etherlab/lib to LDFLAGS in linuxcnc-ethercat/src/realtime.mk. Same there, need help to find the library.
One absolutely must do "make clean" after that to update the local make files. Then "make install"
This is with linuxcnc-uspace-dev from the apt. etherlabmaster and linuxcnc-ethercat from git.



 

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

More
4 years 9 months ago #230574 by rodw
Replied by rodw on topic Ethercat installation summary
Hakan, thanks for helping out. Your forum post and video was very helpful when I put this together.
Padstar should refer to your xml file to see how to install his Beckhoff hardware.
forum.linuxcnc.org/ethercat/42048-notes-...aspberry-pi-4#206936

Padstar, you need to create the servo thread in your minimal config. The example in my repo shows how it is done.
Code:
loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadusr -W ./lcec_conf ethercat-conf.xml loadrt lcec loadrt cia402 count=3

github.com/rodw-au/linuxcnc-cia402/blob/main/cia402.hal
cia402 is a standard so it should work for you. Haken used an ETC60 drive and I used its functionally identical but larger ETC86 drive from Rtelligent.
If you do not have documentation, rtelligent have a Google Drive folder containing it and a Windows Program that queries the ethercat devices on the bus.  drive.google.com/drive/folders/1qOJOkts4...tsHrmLaM?usp=sharing
You may glean enough info from it to get going.

Its funny, I've installed it twice now both on a clean install of Debian 11 and never had the missing header file bite. I've yet to test the second one with hardware.

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

More
4 years 9 months ago - 4 years 9 months ago #230576 by 3radfahrer
Hi rodw, thanks for your initative and efforts on this documentation

last year, I got my machine, runnung with LinuxCNC 2.8, successfully configured to run on EtherCat.
The EK1100 with some IOs are read/writeable and one axis attached to a Servo/Stepper Amplifier from "Technosoft Motion" was controllable from LinuxCNC.
Although I temporalily switched back to "parallel Port only with steppers" - I first have to tune my drive-Amps for smooth stepper-operation - I like to share my (presumably personal) obstacles I had to go File Attachment:
On my own ToDo-List is still a „clean“ documentation of my steps: my notes are containing several deadlock steps. Therefor I plan to set up an EtherCat config again on a clean machine and document my neccessary steps… Since I don‘t know which struggles were my own fault and which are actually important for your documentation, I just discribe them all.
Suggestions and improvements and further hints are welcome File Attachment:


Etherlab
after installing Etherlab, I changed the „DEVICE_MODULES“ in the /etc/default/ethercat file to „e1000e“ which resulted in a kernel-panic after reboot.The correct file that had to be changed was in /opt/etherlab/etc/ethercat.confAdditionally, the file „/opt/etherlab/etc/init.d/ethercat“ has to be modified to point on the ethercat.conf from above

Network Card
the Etherlab master didn‘t work with my onboard network adapter. I got a Intel PCI Network card (82571EB GigE Controller) that works. Supported hardware is listed on the etherlab site www.etherlab.org/en/ethercat/hardware.php

lcec Error on LinuxCNC
startupsince both the Beckhoff EK1100 and my ServoAmps were now visible after „# ethercat slaves“, I also got a lcec-error when starting LinuxCNC. As db1981 already mentioned, after a „make clean“ and „make install“ of the linuxcnc-ethercat driver, this error was solved EtherCat

Statemachine
in order to switch the drives on, I had to go to the defined transitions from the beckhoff statemachine. The solution for me was here deep in the forum: forum.linuxcnc.org/ethercat/22346-etherc...ver?start=850#159273

Generic EC Driver
After that, it was „just“ the configuration of the generic EC-driver with the correct initial-commands for my ServoAmps, since the Technosoft Amplifiers were not natively supported yet. As far as I remember, I got them all out of TwinCAT and the esi-file from the manufacturer of the Amps.

As I said above, any hints or improvements are heartily welcome
Last edit: 4 years 9 months ago by 3radfahrer. Reason: formatting
The following user(s) said Thank You: rodw

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

Time to create page: 0.291 seconds
Powered by Kunena Forum