Vertical Machining Centre Retrofit with Chinese Servo Drives Build Thread (NZ)

More
14 May 2020 13:04 #167737 by Becksvill
Hey Todd. It's late here so I'll Make a proper reply tomorrow..

I am controlling my X axis servo with step and direction control.

Step scale is currently set as
0.001mm per step. Eg scale is 1000
Encoder scale after ballscrew pitch and x4 multiplication is 6250 ppr.

I am only using mesa 7i76 spindle encoder input for testing. I will use a 7i89 later on

The manual doesn't have any servo tuning methods. But these drives are very similar to yaskawa Sigma 1 and 2 servo drives. I am using the tuning methods from there. All the tuning parameters even have the same numbering lol. And in the manual there is a typo where yuhai forgot to change yaskawa to yuhai.

I will upload the screenshot of relevant Sigma 2 manual tomorrow plus a link to the manual.

It looks like they use a PIV controller not PID.

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

More
14 May 2020 13:06 #167738 by tommylight
If i understood correctly, he is using 7i76 to drive the servo, and using encoder feedback just to check how the servo is responding to commands, loop not closed in Linuxcnc.

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

More
14 May 2020 13:14 #167741 by Becksvill
Yep you got that perfect Tommy.

But my encoder does have final say on machine (dro display) position. I think I needed to connect the joint 0 fb position pin to encoder position pin so that I could graph the joint 0 ferror.

The x axis ballscrew is noisy and might be causing problems. I'll play with the y axis tomorrow and see how I go.

Just a reality check though. For a nice relatively new VMC what are reasonable following error values?

I know the two different fagor mills at different companies I have used have like 2 mm following error when at 8m/min. And that was just normal. They made perfect circles when doing interpolation of holes.

Regards

Andrew
The following user(s) said Thank You: tommylight

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

More
17 May 2020 23:40 - 17 May 2020 23:48 #168096 by Becksvill
got some updates here guys

I finally got a hang of tuning. this post is showing tuning the Y axis. I had it tuned in 1.5 hrs.

the first axis I did took me 4 days haha.

I will try to update this thread with usefull info in the hope that the next person that gets stuck finds this and has a easier time of it than me haha.

connecting the encoder into linuxcnc and using halscope just to graph the following error and then change the tuning values in the servo drive worked awesome. took me 4 days full time to work it out lol.

Now as I said earlier my servo drives are a chinese copy of a yaskawa sigma 2 servo drive.
they have a PIV controller. I don't have a D tuning parameter. at all.

also the servo drives have 3 nested tuning loops inside the servo drive.

so they work like this position loop > velocity loop > torque loop.

the the adjustment procedure I followed was this. I had to set feedforward to 100 percent first while the gains were low.


this is the original tuning I started with

the max following error at 8m/min rapid speed was 2mm!
and I was using the cnc all week on jobs... oops. good thing they were not that precise


here is the final tuning after I played with the values a bit
first photo is at 8m/min rapid speed


and this is at 4m/min


this is a 337mm/min


I could have made the tuning much tighter but I was getting a ballscrew shaft resonance issue at lot travel speeds. at 17mm/min the noise was clearly audible and really annoying. But there was a setting for torque filter time constant which was supposed to remove it. this is at a expense of a little bit of accuracy. So I decided to reduce the noise and lose a bit of accuracy. the following error is still down around 0.01 at normal cutting speeds which is good enough. I had it down to .004 mm but the noise was annoying. increasing the torque filter time constant stopped the noise but increased the error as the movement was very slightly delayed.

anyway that is enough for now.

I am planning on making a in depth video showing how this all works for the next person as this would be a good solution for everyone that is running open loop step and direction servos that wants to actually know what the following error is. Not just hope. as you can see my open loop following error was appalling.

also this way You can do it with the standard 7i76 that so many people are using without any extra cards. though as soon as I can get the cards I will be using this type of setup permanently.

But next step once I get a 7i89 will be to run a PID loop in linuxcnc also and use a bit of Intergral to reduce the following error just that little bit more. this will also allow me to home to the encoder index pulse which will be nice.

and it will be so good to not loose position every time I disable the servo drives with the E stop for whatever reason.


Ps the thing that caught me out is the tuning process was substantially different to how people normally tune with linuxcnc PID loops

Tommy's awesome tuning tutorial was all completely different and had no relevance to this sort of PIV tuning in the servo drive.

I was stuck until I found the yaskawa sigma 2 servo drive manual which worked perfect.

also 90 percent of the tuning work in these sort of drives is down by the feed forward parameter.
Attachments:
Last edit: 17 May 2020 23:48 by Becksvill. Reason: missed something
The following user(s) said Thank You: tommylight, Clive S

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

More
18 May 2020 06:56 #168128 by Clive S

I am planning on making a in depth video showing how this all works for the next person as this would be a good solution for everyone that is running open loop step and direction servos that wants to actually know what the following error is. Not just hope. as you can see my open loop following error was appalling.


Thanks for a nice write up. My problem is that I don't understand what is wrong in the graphs and how to interpret them.

So a vid would be brill. :)
The following user(s) said Thank You: Becksvill

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

More
18 May 2020 10:04 #168134 by Becksvill
Clive I can make a video. But I'm not a expert myself. 2 weeks ago I had never tuned a servo drive before lol. But I have it pretty good now.

All I am going for is low following error and minimal overshoot.
The Z axis was actually giving me some issues. It has a lot more friction and I'm getting ballscrew twisting causing issues. Also I can't find a parameter for dead band so it's hunting or something.


What is your setup? Eg 7i77 or 7i76 etc
I'm happy to help if I can

Regards

Andrew

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

More
18 May 2020 12:11 - 18 May 2020 12:12 #168143 by Clive S

Clive I can make a video. But I'm not a expert myself. 2 weeks ago I had never tuned a servo drive before lol. But I have it pretty good now.

All I am going for is low following error and minimal overshoot.
The Z axis was actually giving me some issues. It has a lot more friction and I'm getting ballscrew twisting causing issues. Also I can't find a parameter for dead band so it's hunting or something.


What is your setup? Eg 7i77 or 7i76 etc
I'm happy to help if I can

Regards

Andrew


Yes this is the thread I started
forum.linuxcnc.org/24-hal-components/381...al-mesa-7i76?start=0

I have the manual for the drive. The motor is just on the bench with the encoder and step/dir on a 7i85s connected to a 7i76e

Peter and others have been very helpful . But I gave up I still have it at the moment I was trying to learn how to close the loop without a following error. If I remember Peter said that it might not be a good candidate because the manual is a bit vague.

I don't know what I should be looking for the the plots.
Last edit: 18 May 2020 12:12 by Clive S.

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

More
18 May 2020 20:47 #168188 by Becksvill
Clive can you email me.
Find my email at
Carbidecutters.co.nz
I'll have a look at your manual

Regards

Andrew
The following user(s) said Thank You: Clive S

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

More
02 Jun 2020 23:46 #169888 by Becksvill
hey guys

I have made heaps of progress on the cnc lately.

and will make some decent updates showing how to setup several things later on
here is a partial list of what has been done recently
1 fixed my grounding issues I was having I think after lots of help on the email list
2 have connected up my new chinese MPG from aliexpress up to the mesa 7i76 card mpg counters.
3 increased the acceleration on spindle vfd
4 tuned servo drives I think pretty well now. still doing accuracy tests to check how good it actually is but initial tests are pretty good and Halscope is showing about .01mm following error at normal feed speeds



anyway as I know everyone loves videos and photos here are some from this morning.



here is the toolpath on the controller



and here is the roughing part finished



and the broken endmill I just broke while cutting them out! (happened 5 mins ago lol better get another one from my stocks)



regards

Andrew
Attachments:
The following user(s) said Thank You: tommylight

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

More
03 Jun 2020 01:58 - 03 Jun 2020 02:06 #169903 by Becksvill
here are some more photos of the finished parts

they are definitely not perfect and I would change how I did it next time but the mill worked without a fault. pretty happy with it.







and here is a screen shot of the fusion 360 cam




I will try upload heaps more photos as time goes on just to show what linuxcnc can actually do on a decent sized cnc mill. I think it will be pretty cool

regards

Andrew
Attachments:
Last edit: 03 Jun 2020 02:06 by Becksvill. Reason: adding another photo
The following user(s) said Thank You: tommylight

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

Time to create page: 0.299 seconds
Powered by Kunena Forum