Similated tacho feedback

More
11 Jul 2016 21:09 #77315 by Diederik
I am integrating a fanuc dc velocity control servo system, which has velocity control command (analog into CN1pin 20-7 of drive) and tacho feedback (analog into cn1 pin 19-6 = 6v/1000rpm) . this tacho feedback used to be generated by the old 6t control by converting the encoder feedback to analog reference. (Some had tacho's, with separate encoders, but others had signals converted from encoder feedback) . My method currently is to apply 24vdc current to the motor, then I measure rpm with contactless tachometer, then I play with my scaling factor untill i achieve 6v/1000rpm. This is a time consuming exercise, and I am sure that there's some easier method using maths.


on the encoder there's 2000 lpr(lines per rev) through the mesa 7i77=8000 counts per revolution .

At 1000rpm, = 8000000 pulses per minute= 133333.34pulses per second. I want that to output 6v. Has anyone else done this before.

(I never remember the value, but there must be some definite answer to scaling here.

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

More
11 Jul 2016 22:27 #77321 by PCW
Replied by PCW on topic Similated tacho feedback
The encoder velocity output will be scaled in machine units per second (since its being used for position feedback)
so you dont change that

To determine the velocity analog output scale you need to know how fast the machine moves at 1000 RPM

What is the screw pitch (and is it direct drive)

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

More
12 Jul 2016 04:38 #77331 by Diederik
Replied by Diederik on topic Similated tacho feedback
Okay.
One revolution gives me 8000 counts, and 5mm, therefor 1mm=1600 counts.
So, 1000rpm, =8000000 counts per minute, /60= 133334 counts per second, /1600,= 83.33mm/second, = approximately 5000mm/minute. Now when I feed at 5000mm/minute, how do I output 6v? There must be a formula.

I am on my way to the machine now, then I'll copy that section in hal file, to show what the results was, but I did it the long way by applying a dc voltage to motor, measuring the speed, and played with the scale value untill I got the right output, which is fine, and will do for today, but in future, I want to apply a formula to automatically calculate the value. To have a definite value in stead of punching in the air until I hit it... :)

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

More
12 Jul 2016 14:43 #77341 by PCW
Replied by PCW on topic Similated tacho feedback
83mm/sec *10/6 = ~138.9 so the velocity out analog scale should be 138.9 (or possibly-138.9)
The following user(s) said Thank You: Diederik

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

More
12 Jul 2016 21:17 #77358 by fixer
Replied by fixer on topic Similated tacho feedback
I did a similar retrofit with the same servos. I went the "time consuming way". I can send you the values for PID and a tach constant that I used, it will get you something to start with.
What you basically want is to have the speed (tach) loop so good, that you cannot move motor rotor by hand - motor should resist to be moved very hard, but if you succeed and move it, it should stay in moved position. After that you are good to start PID parameters tuning (you only really need PI and FF1 whit those servos)
The following user(s) said Thank You: Diederik

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

More
13 Jul 2016 06:16 #77370 by Diederik
Replied by Diederik on topic Similated tacho feedback
Thanks for feedback above.
Here is what I've done: In .ini file, my encoder scale is 1600(1600/mm),

In .hal file:
loadrt lowpass names=xtachofb
loadrt scale names=xtachoscale
addf xtachofb servo-thread
addf xtachoscale servo-thread
net tacho-fb => hm2_[HOSTMOT2](BOARD).0.7i77.0.1.analogout1
net tacho-fb <= xtachoscale.out
setp xtachoscale.gain 0.072
net smooth-tacho => xtachoscale.in
net smooth-tacho <= tachofb.out
setp xtachofb.gain 2
net motor.00.vel-fb => xtachofb.in
net motor.00.vel-fb <= hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity

This takes care of my tacho feedback. It gives me exactly 6v/1000rpm.

Now... I'm still struggling to get rid of a vibration. I have played around with my servo pid settings, and improved a lot, but still can't get completely rid of the vibration. I'm considering to make the servo-thread a bit faster, as it is currently set to 1100000.

Any other suggestions?

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

More
13 Jul 2016 16:28 #77407 by PCW
Replied by PCW on topic Similated tacho feedback
Only that you don't actually need the scale component, all the scaling can be done in the analog output maxscale value

(10 / .072 = ~138.9)
The following user(s) said Thank You: Diederik

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

More
13 Jul 2016 17:07 #77409 by fixer
Replied by fixer on topic Similated tacho feedback
And lowpass is also not needed.

First, set all your PID params to 0 zero. Then tune your velocity loop (with this tacho scale value) so you get a steady motor (try and turn your offset pot on servo drive so you get a few revolutions of motor per minute at 0v input).
all this without the load on the motor.

only then reconnect the load (put belt back on) and start tuning your PID (P and FF should be enough).

I have a 1ms cycle time, and it works without any problem. You need to allow some following error, else you won't get stable response.
The following user(s) said Thank You: Diederik

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

Time to create page: 0.167 seconds
Powered by Kunena Forum