About Spindle Acceleration Deceleration Ramp

More
01 May 2019 14:28 #132439 by marq_torque
Hello Everyone,

I am configuring C axis in lathe with Servo Spindle, i have used high power 3KW servo motor for main drive which will run Speed and Position mode

By default it will stay in position mode, as soon as it receives M3/M4 output it switches to Speed mode and works as normal lathe spindle and when M5 is issued that output will be off, so servo will locking immediately without any smooth deceleration, so that is the problem it will obviously jerk and trigger over load error.

I am looking for smooth ramp for spindle start up and slow down, i have setup similar in Mach3 it was having those spindle on off delay so it was working normal.


Any workout on this available ?? i looked into but found no parameters for Spindle acceleration/deceleration.


Thanks,
Ankit

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

More
01 May 2019 14:33 #132440 by marq_torque
I am currently using 0-10V PWM to analog output via on board par port.

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

More
01 May 2019 16:27 - 01 May 2019 18:19 #132448 by PCW
This is often done by using the limit3 component to bound the acceleration of the commanded spindle speed

loadrt limit3
addf limit3.0 servo-thread

setp limit3.0.maxv 250 # 250 RPM/second
setp limit3.0.enable true
net your_commanded_spindle_speed_signal => limit3.0.in
net your_analog_spindle_command <= limit3.0.out
Last edit: 01 May 2019 18:19 by PCW. Reason: fix pin name
The following user(s) said Thank You: marq_torque

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

More
03 May 2019 04:53 #132599 by marq_torque
Much Thanks for input,

Does this works for deceleration also ??

Regards,
Ankit

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

More
03 May 2019 06:26 #132603 by pl7i92
if you are not in safty concern or tool Change need just let it run out the 10seconds it needs
it will give you a very long live

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

More
07 Dec 2023 19:08 #287474 by COFHAL
I have a test configuration with two spindles commanded with PWM, on a MESA 7i96s card.
I'm having this problem using Soft Start with the limit3 component with the spindle. Without using Soft Start the spindle output is connected to spindle-output <= pid.s.output, but if I activate Soft Start using limit3, I necessarily have to comment pindle-output <= pid.s.output or else it doesn't give me a mistake. How could I continue pid.s.output without getting the error? When commenting spindle-output <= pid.s.output, the Soft Start works but not very well in the sense that when I stop the spindle com M5 and activate the spindle again, the Soft Start does not work and the spindle starts all at once the commanded speed. This does not happen when I do not use limit3 and the output of spindle is connected to pid.s.output, I think the problem is that the output of the splitdle does not go through pid.s.output, but I don't know how to solve it.
And a final question, the Soft Start works very well when starting the spindle but when the order is given to stop it does not do so in a Soft End way, but rather it stops abruptly.
Is there a way to make the stop also be in the form of a ramp?
I attach my HAL files. and INI

File Attachment:

File Name: BG65X50SI.ini
File Size:4 KB

File Attachment:

File Name: BG65X50SI.hal
File Size:13 KB
Attachments:

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

More
07 Dec 2023 21:23 #287483 by PCW
If you wish to use the output of the PID to run the spindle,
you would need a bit of rewiring (changes with **** in comment)

Also you cannot use spindle enable to enable the PWMgen
as it is forced to false whenever the spindle speed is set to 0
bypassing the limit3 decceleration.


#*******************
#  SPINDLE 0
#*******************

setp   pid.s.Pgain     [SPINDLE_0]P
setp   pid.s.Igain     [SPINDLE_0]I
setp   pid.s.Dgain     [SPINDLE_0]D
setp   pid.s.bias      [SPINDLE_0]BIAS
setp   pid.s.FF0       [SPINDLE_0]FF0
setp   pid.s.FF1       [SPINDLE_0]FF1
setp   pid.s.FF2       [SPINDLE_0]FF2
setp   pid.s.deadband  [SPINDLE_0]DEADBAND
setp   pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  => pid.s.index-enable
net spindle-enable        => pid.s.enable
net spindle-vel-cmd-rpm   => pid.s.command
net spindle-vel-fb-rpm    => pid.s.feedback
net raw-spindle-output    <= pid.s.output # **** before limit3

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

setp  hm2_7i96s.0.pwmgen.00.output-type 1
setp  hm2_7i96s.0.pwmgen.00.scale  [SPINDLE_0]OUTPUT_SCALE

#setp  hm2_7i96s.0.gpio.033.invert_output true

net spindle-output  => hm2_7i96s.0.pwmgen.00.value
net machine-on      => hm2_7i96s.0.pwmgen.00.enable  # **** must not turn off at 0 speed or limit3 will not work

# ARRANQUE SUAVE DEL SPINDLE 0 CON RAMPA

setp limit3.spindle0.maxv   100 # 100 RPM/second VARIANDO ESTE VALOR LA RAMPA SE HACE MAS PLANA O MAS PRONUNCIADA PARA ALCANZAR LA VELOCIDAD COMANDADA
setp limit3.spindle0.maxa   1000
setp limit3.spindle0.enable true
net raw-spindle-output      => limit3.spindle0.in  # **** from PID
net spindle-output          <= limit3.spindle0.out
     
# ---Encoder feedback signals/setup---

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

More
07 Dec 2023 22:24 #287489 by tommylight
This topic is over 4 years old.

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

More
07 Dec 2023 23:06 #287497 by PCW
Last post was today and same subject...
The following user(s) said Thank You: tommylight

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

Time to create page: 0.240 seconds
Powered by Kunena Forum