- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Anyone looking at CS3E-D1008 drivers from Leadshine?
Anyone looking at CS3E-D1008 drivers from Leadshine?
- ewax
- Offline
- New Member
- Posts: 3
- Thank you received: 1
I'm in the planning phase of a machine and just saw Marco Reps' video(sounds like I'm not the only one). I had somewhat of a traditional plan involving a 7i76e but am now looking strongly at ethercat. The leadshine CS3E-D1008 drives seem reasonably priced but I haven't really heard anything about them outside of the marketing materials. Is anyone else looking at these or already using them?
Please Log in or Create an account to join the conversation.
- petervg
- Offline
- Junior Member
- Posts: 26
- Thank you received: 8
Hardware itself seems very well built, but I still need to take a look at motion studio from leadshine. They have a history of providing really crappy softyware but Kevin told me they stepped up their game. Still need to look at that though, but I want to get ethercat working first.
At this time I'm a little stuck however compiling etherlabmaster using ec-debianize. You happen to have experience there? I'll be more than happy to share the experience on my CNC when I get this one working...
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10747
- Thank you received: 3543
Its all changed. Forget ec-debanize, I wrote up a how to using etherlabmaster's onofficial repos which is stickyed hereAt this time I'm a little stuck however compiling etherlabmaster using ec-debianize. You happen to have experience there? I'll be more than happy to share the experience on my CNC when I get this one working...
forum.linuxcnc.org/ethercat/45336-etherc...-how-to-step-by-step
Please Log in or Create an account to join the conversation.
- petervg
- Offline
- Junior Member
- Posts: 26
- Thank you received: 8
- halcompile could not be run as root (using sudo)
- rtapi.h could not be found
I tried solving these issues like this:
1. halcompile could not be run as root (using sudo)sudo nano /etc/sudoers
look for the line
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
and change this to
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/petervg/git/linuxcnc/bin:/home/petervg/git/linuxcnc/src/rtapi
-> This might be something to add to your post?
2. rtapi.h could not be found
in "lcec_main.c" the file "rtapi_app.h" is included, but not located in the linuxcnc-ethercat repository. And because the syntax was #include "rtapi_app.h" and not #include <rtapi_app.main> I assumed the sourcecode from linuxcnc needed to be copied to the same location (cp -r ~/git/linuxcnc/src/* ~/dev/linuxcnc-ethercat/src/). But that didn't work out. Neither adding the linuxcnc source code folder to the path variable, neither changing #include "rtapi_app.h" to #include <rtapi_app.main> helped me to compile the code.
So I went looking on the forum for answers and I came up with ec-debianize until I realised that wasn't possible either due to the kernel changes.)
I'm taking a look at your (very very very helpful) post, and I don't know where I went wrong in the past. I just recloned github.com/sittner/linuxcnc-ethercat.git and could make/install it on the firs try.
Thank you very much for the quick reply! I see you are very active on the forum. Wish I had more time to invest and help this community, but 24h days seem to be too short .
Please Log in or Create an account to join the conversation.
- petervg
- Offline
- Junior Member
- Posts: 26
- Thank you received: 8
Please Log in or Create an account to join the conversation.
- petervg
- Offline
- Junior Member
- Posts: 26
- Thank you received: 8
But Leadshine motion studio is buggy as hell and some items have not even been translated from chinese. You can't resize any windows to suit the text displayed and connecting to the drive is a hit or miss (but stable once it is connected). It's not an usb connection as you would think, but the drive has an internal usb-serial convertor and the software needs to connect as if it is a serial port.
In the background of motion studio (I have the latest version) it says "Ver 1.3.10 Alpha - for internal user only"...
So far the pc software is really rough but performs the basic tasks of setting up ethercat doable. Not a cheerfull experience, but besides setting the current to 6amps I didn't have to actually change anything so far. Standard settings allow you to use the drive over ethercat. I haven't tried tuning the motors yet, but since thy are closed loop steppers this should be a lot easier than servos.
I have cobbled together a working XML file for the drive, and the next thing is to figure out how to wire it up in the HAL file. I have attached my XML file for the C3SE-D1008 in this post.
One sidenote: I was able to testrun the steppers, and using a 48V powersupply I was able to reach 2000rpm without a load. So for a stepper that's nice, certainly because I'm only using half the allowed voltage on the drive.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10747
- Thank you received: 3543
On bullseye (5.10 kernel), I was at a total roadblock. I could not use Buster as I needed hardware drivers in Bullseye. Grotius kindly made a deb for me that worked but I still had issues getting it all to auto start
So then I started to work with Bookworm that has linuxcnc packaged in it. Combined with their repo, I was in business again so documented it on the forum here. The only issue I have had with that approach is that when you end up with a few kernels, debian can choose the wrong one to install linux-headers into. Thats why I say to use $(uname -r) in the installation and it just seems to work.
the changes to the .mak file were good until just recently so I made that bit optional and hid it under a spoiler.
ec-debainize is well and truly redundant as etherlabmaster migrated to gitlab so the repos used in the old approach are no longer maintained but the debs are built daily. Thats why I prefer their repos.
Please Log in or Create an account to join the conversation.
- petervg
- Offline
- Junior Member
- Posts: 26
- Thank you received: 8
Yes, absolutely! Your sticky post at forum.linuxcnc.org/ethercat/45336-etherc...-step-by-step#237098 was exactly how I was able to do it.Awesome you got it going. Did you use my method in the end?
I did see that post, but I was a little reluctant to use that same .deb as that seemed to be specifiic for your machine. The names of my NIC are also different. That could be a potential blocking issue for me. I wanted to do as much from source as I could, mainly to learn.On bullseye (5.10 kernel), I was at a total roadblock. I could not use Buster as I needed hardware drivers in Bullseye. Grotius kindly made a deb for me that worked but I still had issues getting it all to auto start
I also always do it that way to install the kernel headers. Keeps me from making dumb mistakesThe only issue I have had with that approach is that when you end up with a few kernels, debian can choose the wrong one to install linux-headers into. Thats why I say to use $(uname -r) in the installation and it just seems to work
Well, that's where I may have gone wrong. I didn't replace the contents of the .mk file and all compiled without errors (I doublechecked the terminal logs to be sure). But when running linuxcnc, I still got an error "lcec: dlopen: /usr/lib/linuxcnc/modules/lcec.so: undefined symbol: ecrt_slave_config_sdo" (forum.linuxcnc.org/ethercat/47555-lcec-s...ve-config-sdo#258429). This was solved by replacing the content of the .mk file. So this may not be optional?the changes to the .mak file were good until just recently so I made that bit optional and hid it under a spoiler.
yeah, that's what makes a little hard to get started. The forum is a really really great help, but it's sometimes a little unclear as to what will still work and what not without knowing the history. I understand this now, but last week wasn't easy to get started. Anyway... I evolved from a user downloading an ISO to slightly tinker with to compiling everything from scratch. I also tested out bookworm a while ago (but dropped because there where some issues I did'nt know how to get around) and the I even learned what it was like to patch and compile the kernel. Glad I did this as I learned soooo much, but also afraid it's just the tip of the iceberg .ec-debainize is well and truly redundant as etherlabmaster migrated to gitlab so the repos used in the old approach are no longer maintained but the debs are built daily. Thats why I prefer their repos.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
- Posts: 10747
- Thank you received: 3543
A user recently reported that he had to use the default .mk file to get it to compile
I tried again and found the same thing. But I did not have any ethercat hardware to test on.
So its optional for some and mandatory for others!
Please Log in or Create an account to join the conversation.
- Markgonz
- Offline
- New Member
- Posts: 19
- Thank you received: 2
Thanks a lot in advance!
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- EtherCAT
- Anyone looking at CS3E-D1008 drivers from Leadshine?