why spindle speed is dropping?

More
28 Dec 2012 00:36 - 28 Dec 2012 00:38 #28095 by PCW
Replied by PCW on topic why spindle speed is dropping?
you can only have one source driving a net
so you would have to remove the sum2.out

Note that the sum component is not needed AFAICT because it just seems to be adding the velocity command to the output of the PID and using the result to drive the PWM. The PID components FF0 parameter accomplishes the same thing.

Also if the drive can reverse dynamically, to get this absolutely right I think you want to use signed number everywhere (velocity and command) and then just run the output of the PID component though the abs function, with the output of the ABS function driving the PWM, and use the abs.sign signal to determine the DIR or CW/CCW signal that controls the spindle direction. This also require using quadrature (count mode 0) so you have a signed velocity.
Last edit: 28 Dec 2012 00:38 by PCW.

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

More
28 Dec 2012 18:59 #28115 by cmorley
I will work on 0 - 10 volt spindle control with PNCconf when i return from holidays.

Chris M
The following user(s) said Thank You: viski

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

More
28 Dec 2012 20:34 #28118 by viski
I removed sum2 comp and it works !

#net s-enable => pid.s.enable
net s-output => pid.s.output
net s-pos-cmd => pid.s.command <= motion.spindle-speed-out
net s-vel-fb => pid.s.command-deriv
#net s-pos-fb => pid.s.feedback

# ---PWM Generator signals/setup---


setp hm2_5i20.0.pwmgen.03.output-type 3
setp hm2_5i20.0.pwmgen.03.scale [SPINDLE_9]OUTPUT_SCALE


net s-output => hm2_5i20.0.pwmgen.03.value

net machine-is-enabled => hm2_5i20.0.pwmgen.03.enable pid.s.enable

But i am unable to ad abs comp? Where to put abs0.in and abs.0.out

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

More
28 Dec 2012 21:49 - 28 Dec 2012 21:55 #28121 by PCW
Replied by PCW on topic why spindle speed is dropping?
Its somewhat tricky and depending on spindle and encoder characteristics you may need multiple ABS components

As I mentioned earlier, one option is this:

Put the absolute function between the output of the PID component and the PWM generator. This requires using the encoder in mode 0, a spindle that works ok with dynamic reversals, and using the abs components sign to control the spindle direction. (that is the sign of the PID output controls the spindle direction)

Be careful, if the spindle direction is _not_ controlled by the PID loop sign here, the spindle will runaway if the PID output ever reverses.

If the Spindle drive does not support dynamic reversals, things are more complicated and may require two or more abs components for PID spindle control (open loop is easier)

Note that you can change from open loop to closed loop even with the PID component wired-in (PID with all tuning params 0 except FF0 = 1.00 just copies the command-in to the PID output = open loop)
Last edit: 28 Dec 2012 21:55 by PCW.

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

More
29 Dec 2012 00:24 #28126 by viski
I have tryed and put abs between PID output and PWM value but i didn't get anything out- spindle wasn't rotate!

Maybe i i don't need closed loop spindle. As you could see in hal file i only change FF0= 5.0 and i get commanded RPM.
If it wouldn't be closed loop then i would probably have to use sum or scale comp to get desired RPM out. Problem become if you have gearchanges like i do.

How to do things in open loop :

0 - 10 Volt output in low gear change 1:4 ( 0- 250 RPM )
0 - 10 Volt output in high gear change 1:1 ( 250 - 1000 RPM )

How should things work automaticaly :)

For example i have pice in machine with outer diameter 400 mm and inner diameter 50mm . feed is 120mm/min

At outer diameter speed is 95RPM, at inner 763 RPM

When i cut from out to in , when speed comes to 250 RPM ,movements should stop , spindle stop, turn on low gear reduction ( and psihicaly output signal to activate electronic coupling ) turn spindle on at speed 250 rpm and starts movements.

This has sinumerik , haidenhain and others and i know this is posible with EMC, that 's why i chose it. :)

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

More
29 Dec 2012 02:07 #28133 by PCW
Replied by PCW on topic why spindle speed is dropping?
If the output after the inserting the abs in series with the PID output does not work, I would check polarities
some daughtercards may need the output polarity reversed (check the output voltage with a voltmeter)

With gearchanging things are complicated enough that you will probably need someones help with the gearchange component.

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

More
29 Dec 2012 23:24 #28154 by viski
Thanks. Now i get allways positive output but encoder stoped counting RPM. :)

Do you maybe know reason for that?

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

More
30 Dec 2012 00:37 #28158 by PCW
Replied by PCW on topic why spindle speed is dropping?
No, but it should be fairly easy to trace the problem with halmeter

(run the spindle at a constant speed and trace the encoder velocity from the encoder pin onwards)

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

More
31 Dec 2012 01:28 #28192 by viski
I think i have to use and set par encoder.03.vel-timeout :)

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

More
31 Dec 2012 02:31 #28197 by PCW
Replied by PCW on topic why spindle speed is dropping?
This should not make much difference, unless you have a low resolution encoder

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

Moderators: cmorley
Time to create page: 0.077 seconds
Powered by Kunena Forum