Problems with Lichuan Ethercat servo drive
Please Log in or Create an account to join the conversation.
- ihavenofish
- Offline
- Platinum Member
- Posts: 686
- Thank you received: 124
Very nice. now I have questions on the spindle though, hahaha.
Please Log in or Create an account to join the conversation.
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.
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.
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.
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.
Please Log in or Create an account to join the conversation.
Many thanks
Please Log in or Create an account to join the conversation.
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.
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.
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.