Leadshine CS3E-D1008 not running smoothly [SOLVED]

More
06 Dec 2022 19:32 #258729 by petervg
I'm using a fresh install of debian 11, RT kernel running (5.10.0-19-rt-amd64) compiled all from source and ethercat seems to work as it should (with an officially supported network card). I only have 1 drive and motor to test, so I took the sim_axis example and modified the X axis configuration to test the motor. When I try to jog the motor, the ramp up and first milliseconds of the coasting work great, but then the motor starts making funny noises and the rpm drops.




This is a graph from the motion control studio software where I can graph the internals of the drive, and you can clearly see the speed starts to fluctuate as in the video.
 

I've taken a look at the ethercat communications, but I have no TX errors and only 2 lost frames.

Could this be a ethercat configuration issue? If I run the motor using motion control studio (usb), the motor runs perfectly.
Attachments:

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

More
06 Dec 2022 19:46 #258732 by mwc
Looks like it's needing a bit D added to the PID to dampen the oscillations, but I probably wouldn't add too much until the motor is installed with some load on it.

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

More
06 Dec 2022 21:02 - 06 Dec 2022 21:02 #258743 by petervg
My distributor said the same thing. but that wasn't it. We've tried disabling the PID in the drive by running the steppers in open loop and the same problem persists. And when running in closed loop, I can make the motors run from withing the leadshine software (usb) perfectly well, and that way they run great.

So far I think there is an issue with the ethercat interface, but this might very well be a bug in the leadshine drive...

 
Last edit: 06 Dec 2022 21:02 by petervg. Reason: typo

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

More
06 Dec 2022 21:14 #258744 by mwc
There are PID settings in LinuxCNC.
It's probably an issue with the ethercat loop fighting with the driver loop, so some tuning will likely be needed.
The following user(s) said Thank You: petervg

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

More
06 Dec 2022 21:43 #258751 by petervg
That's indeed something I didn't take a look at yet. My gut says it won't be related to PID because the problem is too consistent and repeatable but I hope I'm wrong :-). I'm going to need to catch up to some documentation reading and tinker a bit with these settings.

Thanks for the tip!!

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

More
06 Dec 2022 22:31 #258763 by db1981
Is this position or velocity control by linuxcnc?

Is the command value from linuxcnc fluctuation too or stays it at constant level while the actual motor velocity is fluctuating ?

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

More
08 Dec 2022 21:31 #258913 by petervg
I'm using position control by linuxcnc (CSP). Looking at the screenshot below, you can see the screenshots I took in leadshine motion studio for the target position (CH1 - 0x607A, in the XML file and commanded by linuxcnc) is set properly, and the actual motor position (CH2 - 0x6064) is following this relatively accurate even though the speed (CH3 - 0x606C) is quite erratic after approx 200mS being stable.
 

I took the same plot including the target velocity, and this stays at 0 because linuxcnc is set to use CSP.
 

In linuxcnc I can see exactly the same in the HAL scope...
 

So what I think (and please do correct me if I'm wrong) is that this has to be a problem
 
Attachments:

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

More
08 Dec 2022 21:41 #258914 by petervg
Ok, just made an important discovery!

During the tests below, I was using the arrow keys to jog the motor. I now tested exactly the same using MDI commands, and with the MDI commands the motor runs as expected! I also tried running the axis demo file (the one "not intended for actual milling":-) and the motor behaved as expected.

I also notice the time it takes for the motor to start behaving weird is always the same when I press the arrow keys. It doesn't matter if I set the speed to 45mm/min or 3000mm/min.

On to finding what makes the jog keys behave differently from MDI commands...

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

More
08 Dec 2022 21:43 #258915 by mwc
What happens if you try a different speed?

Personally, I probably wouldn't be too concerned with the motor not attached to anything.
It could be some of the internal tuning causing an issue, or the speed you're commanding just so happens to be one of the resonant ones for that drive/motor/voltage selection (even although they're closed loop, they'll still have speeds where resonance needs handled, which digital drivers normally do quite well).
Having an actual load on the motor will act as a damper, so there's a good chance everything will run fine once installed on a machine.

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

More
08 Dec 2022 21:57 #258917 by tommylight
Keyboard fluctuating issue discussed here with solution:
www.forum.linuxcnc.org/38-general-linuxc...fluctuations?start=0

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

Time to create page: 0.251 seconds
Powered by Kunena Forum