Rigid Tap Ramp?
24 Oct 2017 16:17 #100749
by Nitram
Rigid Tap Ramp? was created by Nitram
Hi there.
I have a belt driven spindle, the encoder is on the motor side. When I test rigid tap (when cutting air), sometimes at the point of reversal (bottom of the hole), the belt gives a small squeal as it goes from fwd to reverse (at 400 rpm).
I have two questions:
1. Is there a parameter to set a ramp down/up of the spindle motor for those times when a reversal of rpm is made relatively quickly, say in a rigid tap situation such as this? and
2. When tapping in metal (rather than in air), with the tap in the material, the spindle will be naturally loaded. Thus, rather than the spindle slipping on the belt during the direction reversal because the tool wants to continue with its own momentum rather than change direction, is it possible or probable that this effect will be reduced, as the tap has drag in the material and thus has lower momentum to want to continue in the same direction during the reversal? i.e. will the slight squeal go away when not just cutting air?
Thanks for the insight.
Cheers,
Marty.
I have a belt driven spindle, the encoder is on the motor side. When I test rigid tap (when cutting air), sometimes at the point of reversal (bottom of the hole), the belt gives a small squeal as it goes from fwd to reverse (at 400 rpm).
I have two questions:
1. Is there a parameter to set a ramp down/up of the spindle motor for those times when a reversal of rpm is made relatively quickly, say in a rigid tap situation such as this? and
2. When tapping in metal (rather than in air), with the tap in the material, the spindle will be naturally loaded. Thus, rather than the spindle slipping on the belt during the direction reversal because the tool wants to continue with its own momentum rather than change direction, is it possible or probable that this effect will be reduced, as the tap has drag in the material and thus has lower momentum to want to continue in the same direction during the reversal? i.e. will the slight squeal go away when not just cutting air?
Thanks for the insight.
Cheers,
Marty.
Please Log in or Create an account to join the conversation.
24 Oct 2017 16:24 #100750
by PCW
Replied by PCW on topic Rigid Tap Ramp?
If you have control of the spindle speed, you can use a limit2 component
on the spindle velocity command to limit the spindle acceleration
on the spindle velocity command to limit the spindle acceleration
Please Log in or Create an account to join the conversation.
24 Oct 2017 16:30 #100751
by Nitram
Replied by Nitram on topic Rigid Tap Ramp?
Thanks Peter, I will look into that.
This very moment I'm looking at the VFD for the spindle and there seem to be parameters to control time taken for acceleration from 0 to max RPM, so there may be options there too.
Regarding limit2, is the extract below what you had in mind and with the correct syntax?
Thanks,
Regards,
Marty.
component limit2 "Limit the output signal to fall between min and max and limit its slew rate to less than maxv per second. When the signal is a position, this means that position and velocity are limited.";
pin in float in;
pin out float out;
pin in bit load "When TRUE, immediately set \\fBout\\fB to \\fBin\\fR, ignoring maxv";
pin in float min_=-1e20;
pin in float max_=1e20;
pin in float maxv=1e20;
option data limit2_data;
This very moment I'm looking at the VFD for the spindle and there seem to be parameters to control time taken for acceleration from 0 to max RPM, so there may be options there too.
Regarding limit2, is the extract below what you had in mind and with the correct syntax?
Thanks,
Regards,
Marty.
component limit2 "Limit the output signal to fall between min and max and limit its slew rate to less than maxv per second. When the signal is a position, this means that position and velocity are limited.";
pin in float in;
pin out float out;
pin in bit load "When TRUE, immediately set \\fBout\\fB to \\fBin\\fR, ignoring maxv";
pin in float min_=-1e20;
pin in float max_=1e20;
pin in float maxv=1e20;
option data limit2_data;
Please Log in or Create an account to join the conversation.
24 Oct 2017 17:05 - 24 Oct 2017 17:08 #100755
by PCW
Replied by PCW on topic Rigid Tap Ramp?
Yes the VFD can do this also
I think ideally the VFD should be setup with limits that are safe and wont trip faults
( like over voltage fault on deccel ), and linuxCNC should have lower limits that are easily changed
and may be even dynamically changed based on what operation is being performed.
I think ideally the VFD should be setup with limits that are safe and wont trip faults
( like over voltage fault on deccel ), and linuxCNC should have lower limits that are easily changed
and may be even dynamically changed based on what operation is being performed.
Last edit: 24 Oct 2017 17:08 by PCW.
Please Log in or Create an account to join the conversation.
26 Oct 2017 04:02 #100826
by Nitram
Replied by Nitram on topic Rigid Tap Ramp?
Thanks Peter.
Given what you've said:
"and linuxCNC should have lower limits that are easily changed
and may be even dynamically changed based on what operation is being performed"
I thought I would try a user M code (M103), such that via my post-processor, whenever I call a G33.1 I can also input an M103 which is the limit2 function. In this way, the spindle is controlled dynamically appropriate to the operation (in this case the G33.1) and otherwise left alone as its PID settings are fine for other operations.
As a trial, I did some simple user M codes (M101 and M102) which turn on and off my drawbar. I did these simply to confirm that I am setting them up in the correct way before moving further. I have them within the Macro folder and the ini files points to that folder (USER_M_PATH= ../../configs/Fadal_1/macros), in short, these user M codes work fine (as long as I temporarily comment out the existing reference to the drawbar pin out in hal).
I have tried various things, and in contrast to the other user M codes, when I input S2000 M3 M103 I cannot get the spindle to ramp up slowly with the limit2 user M code I have. I have the contents of the user M code files below.
Clearly I'm missing something, possibly I have reference to the same pin out in hal, I've looked but probably missed the obvious...
I wonder if you might cast an eye over the attached user M code (M103) below. I've attached ini and hal files given their interrelationship to one another and the user M codes.
Lastly, I wonder if you can confirm that once the G33.1 M103 line is completed and the G code moves to the next line, will the M103 (i.e. the slowed spindle ramp) be removed, or will it require another M code to stop the action of the M103? (i.e. do user M codes have persistence/are modal?), in which case what is needed to turn off the effect of the M103 (limit2) parameter?
Many thanks for your assistance.
Kind regards,
Marty.
THE M101 below which works as a user M code (when the pin is # ed out in the hal file):
#!/bin/bash
# file to turn on pin to open the collet closer
# Note that the pin CANNOT be used in the hal file already
# I need to disable this pin to make this M code work
halcmd setp hm2_5i24.0.7i84.0.2.output-01 True
exit 0
THE PROPOSED M103:
#!/bin/bash
# load real time a limit2 and a near with names so it is easier to follow
loadrt limit2 names=spindle-ramp
loadrt near names=spindle-at-speed-local
loadrt scale
# add the functions to a thread
addf spindle-ramp servo-thread
addf spindle-at-speed-local servo-thread
addf scale servo-thread
# set the parameter for max rate-of-change
# (max spindle accel/decel in units per second)
setp spindle-ramp.maxv 0.1
# hijack the spindle speed out and send it to spindle ramp in
net spindle-cmd <= motion.spindle-speed-out => spindle-ramp.in
# the output of spindle ramp is sent to the scale in
net spindle-ramped <= spindle-ramp.out => scale.0.in
# to know when to start the motion we send the near component
# (named spindle-at-speed-local) to the spindle commanded speed from
# the signal spindle-cmd and the actual spindle speed
# provided your spindle can accelerate at the maxv setting.
net spindle-cmd => spindle-at-speed-local.in1
net spindle-ramped => spindle-at-speed-local.in2
# the output from spindle-at-speed-local is sent to motion.spindle-at-speed
# and when this is true motion will start
net spindle-ready <= spindle-at-speed-local.out => motion.spindle-at-speed
# my current spindle output feedback
#spindle-vel-fb-rps
exit 0
Given what you've said:
"and linuxCNC should have lower limits that are easily changed
and may be even dynamically changed based on what operation is being performed"
I thought I would try a user M code (M103), such that via my post-processor, whenever I call a G33.1 I can also input an M103 which is the limit2 function. In this way, the spindle is controlled dynamically appropriate to the operation (in this case the G33.1) and otherwise left alone as its PID settings are fine for other operations.
As a trial, I did some simple user M codes (M101 and M102) which turn on and off my drawbar. I did these simply to confirm that I am setting them up in the correct way before moving further. I have them within the Macro folder and the ini files points to that folder (USER_M_PATH= ../../configs/Fadal_1/macros), in short, these user M codes work fine (as long as I temporarily comment out the existing reference to the drawbar pin out in hal).
I have tried various things, and in contrast to the other user M codes, when I input S2000 M3 M103 I cannot get the spindle to ramp up slowly with the limit2 user M code I have. I have the contents of the user M code files below.
Clearly I'm missing something, possibly I have reference to the same pin out in hal, I've looked but probably missed the obvious...
I wonder if you might cast an eye over the attached user M code (M103) below. I've attached ini and hal files given their interrelationship to one another and the user M codes.
Lastly, I wonder if you can confirm that once the G33.1 M103 line is completed and the G code moves to the next line, will the M103 (i.e. the slowed spindle ramp) be removed, or will it require another M code to stop the action of the M103? (i.e. do user M codes have persistence/are modal?), in which case what is needed to turn off the effect of the M103 (limit2) parameter?
Many thanks for your assistance.
Kind regards,
Marty.
THE M101 below which works as a user M code (when the pin is # ed out in the hal file):
#!/bin/bash
# file to turn on pin to open the collet closer
# Note that the pin CANNOT be used in the hal file already
# I need to disable this pin to make this M code work
halcmd setp hm2_5i24.0.7i84.0.2.output-01 True
exit 0
THE PROPOSED M103:
#!/bin/bash
# load real time a limit2 and a near with names so it is easier to follow
loadrt limit2 names=spindle-ramp
loadrt near names=spindle-at-speed-local
loadrt scale
# add the functions to a thread
addf spindle-ramp servo-thread
addf spindle-at-speed-local servo-thread
addf scale servo-thread
# set the parameter for max rate-of-change
# (max spindle accel/decel in units per second)
setp spindle-ramp.maxv 0.1
# hijack the spindle speed out and send it to spindle ramp in
net spindle-cmd <= motion.spindle-speed-out => spindle-ramp.in
# the output of spindle ramp is sent to the scale in
net spindle-ramped <= spindle-ramp.out => scale.0.in
# to know when to start the motion we send the near component
# (named spindle-at-speed-local) to the spindle commanded speed from
# the signal spindle-cmd and the actual spindle speed
# provided your spindle can accelerate at the maxv setting.
net spindle-cmd => spindle-at-speed-local.in1
net spindle-ramped => spindle-at-speed-local.in2
# the output from spindle-at-speed-local is sent to motion.spindle-at-speed
# and when this is true motion will start
net spindle-ready <= spindle-at-speed-local.out => motion.spindle-at-speed
# my current spindle output feedback
#spindle-vel-fb-rps
exit 0
Please Log in or Create an account to join the conversation.
Time to create page: 0.141 seconds