Problems with Lichuan Ethercat servo drive

More
29 Sep 2024 12:44 - 29 Sep 2024 12:45 #311023 by Sandro
Replied by Sandro on topic Problems with Lichuan Ethercat servo drive
Alright here is a short video of these servos running.

Last edit: 29 Sep 2024 12:45 by Sandro.
The following user(s) said Thank You: tommylight

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

More
29 Sep 2024 16:36 #311033 by ihavenofish
Replied by ihavenofish on topic Problems with Lichuan Ethercat servo drive
faaaasteeer!

:P
Very nice. now I have questions on the spindle though, hahaha. :)

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

More
30 Sep 2024 16:21 #311076 by Sandro
Replied by Sandro on topic Problems with Lichuan Ethercat servo drive
It is this DVS servo motor from Aliexpress. It works with the same XML configuration like the Lichuans. I've just changed the product and vendor ID and removed the IO section. It has a 23-bit absolute encoder but I have configured it as 17-bit incremental atm:

de.aliexpress.com/item/1005005929510135....gatewayAdapt=glo2deu

And the spindle:

de.aliexpress.com/i/1005006232728097.html?gatewayAdapt=glo2deu


 

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

More
30 Sep 2024 16:29 #311077 by Sandro
Replied by Sandro on topic Problems with Lichuan Ethercat servo drive

Hello, thanks for sharing your configuration. I took a quick look and there is one thing I don't quite understand
net x-output <= cia402.2.velocity-cmd
net x-output <= pid.x.output
Is the direction above reversed? It should be
net x-output => cia402.2.velocity-cmd


Yes ths is a mistake on my end. But as mentioned it is for readability only.

This is given by:pitch of your ballsrews / Number of Encoder pulses per revolution.
In this case I would guess:
2^23 / 5   = 1677721.6
i.e. this tells you how many encoder pulses you get per physical movement of your machine.
This would foe example be for an sfu2005 ball screw with a 23bit encoder (23bit = 2^23 = 8388608)
(I'm pretty new to all of this so please correct me if I'm wrong)


Correct. And additionally for the velocity scale I have used 2^23 / 60 (as in 60 seconds) for the Lichuans and 2^17 / 60 for the spindle.
 

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

More
30 Sep 2024 16:49 #311079 by Sandro
Replied by Sandro on topic Problems with Lichuan Ethercat servo drive

you can do it like thisloadrt flipflop names=flip-is-on
addf flip-is-on servo-thread

net is-on       halui.machine.is-on  =>  flip-is-on.set
net is-on-reset motion.is-all-homed  =>  flip-is-on.reset
net go-home     flip-is-on.out       =>  halui.home-all


Thank you! This works like a charm. Machine is homed after enabling and ready to go.

I wanna see this actually moving a machine. Interesting about the CSV/CSP, but I think it makes sense in relation to what someone else said in another thread, that you are getting the reported position one frame late, so it always appears to lag, even though it "isn't".
 


I think I saw this post as well. But the following error was really high so I thought it can't just be that. But maybe I am wrong here. If anyone figures out how to properly run these in csp mode I would be very interested - no need for PID-Tuning in LCNC.

Sorry for the multiple posts, but editing in this forum is horrible.
 

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

More
13 Oct 2024 07:39 - 13 Oct 2024 14:22 #311937 by burnie
Replied by burnie on topic Problems with Lichuan Ethercat servo drive
Thank you all. I finally got my servos working, but I'm stuck at implementing homing. I have read through the LCNC documentation on homing and more or less understand that part, but I don't get how to link that to the EtherCAT system, if I use the drive's internal homing mode, how do I select which mode to use? Or how do I configure external homing mode, I see that Rodw has made a cia402 home comp, how do I set that up?

My machine is a moving gantry machine with 2 y servos, all the servos have abs encoder. How should I implement homing on this machine? 

Ideally, I want the machine to be in a homed state and ready to use when LCNC starts and only need homing when the batter on the drives runs out by homing against a limit switch and then searching for the index signal (does that even work with 2 Y servo?). 

Edit: With Rodw cia402 home comp I was able to get the drive into a homing mode (showing 86ry) on the screen, but it does nothing.
Last edit: 13 Oct 2024 14:22 by burnie.

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

More
25 Oct 2024 16:40 #313223 by Macwolf
Replied by Macwolf on topic Problems with Lichuan Ethercat servo drive
Hello, I use a different servo, but I also get Ethercat warnings. Can you briefly explain how to transfer the manufacturer XML to the servo?

Many thanks

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

More
31 Oct 2024 19:33 #313551 by GDTH
He, so far the stuff made here is super great!
i had a quick question about the cia402.comp. Maybe i am doing something wrong.
I have a servo on the z axis which needs to engage a brake, to make sure it doesn't destroy my table.
In the end i want this to be done by the driver itself (not sure yet how to do that)
But for now i wanted to be controlled through LCNC with :

net z-brake   cia402.0.stat_switched_on =>lcec.0.4.dout-5

However i am getting this error. All of the pins are non excisting. however when i look in the hallshow they do excist.
twopass: Error in file ./hallib/ethercat.hal:
    Pin 'cia402.0.stat_switched_on' does not exist

Does anyone have an idea?
Kind regards.
Andries

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

More
01 Nov 2024 20:23 #313622 by GDTH
sorry for this silly questions.
in the comp it is written as 'stat_switched_on' but in hal it becomes 'stat-switched-on'.
I did not know this yet. the same with spaces:
net z-brake cia402.0.stat-switched-on =>lcec.0.4.dout-2 #lcnc freaks out because there is not space after '=>'

Tomorrow i will try to connect the brake to the driver instead of LCNC. as i will get following error when the brake is a bit late. I could maybe fix this with comps however i think the driver should handle this.

Also i need to find a way to reset this driver error through lcnc when it happens.
I hope i will be able to show you a video next week of the ethercat bridgeport :)

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

More
02 Nov 2024 19:54 #313676 by GDTH
So i got the brake working. Not difficult if you understand the documentation.
i wrote a little how i set the driver up. Maybe it is useful for an other :)

To setup a brake on the driver, ex for the z axis.
You must change the function of the DO.
Lets say we change DO2.
DO2A is VCC (ex +24v)
DO2B is connected to a relay or brake (max 200mA)
Relay is also conected to GND in this case

The default function of DO2 is zero-speed. (do not use the brake before changing this)
Go into parameter P04.04 and change it from 3 to 9. This will make it a brake output.
Parameter P04.03 can be used to invert the signal. (Default low to disable brake)
parameter P02.09 till P02.12 can be used the set the timing of the brake enabling and such.

Next i want to do the homing with the driver itself, has anyone done this yet?
i have set DI2 as home switch and DI4 as end switches, i am able to read them.
However i am currently stuck on how this would work in HAL.

Kind regards,
Andries :)
 

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

Time to create page: 0.087 seconds
Powered by Kunena Forum