×
Forum Header
Configuring a stepper as spindle motor
29 Jul 2010 16:28 #3518
by Tim.G
Configuring a stepper as spindle motor was created by Tim.G
How does one configure a stepper motor as spindle? Does Stepconf cater for this at all?
Please Log in or Create an account to join the conversation.
02 Aug 2010 13:21 #3558
by andypugh
Replied by andypugh on topic Re:Configuring a stepper as spindle motor
I doubt that stepconf can deal with a stepper as a spindle. However, I don't know for sure.
It is worth learning to work directly in HAL anyway, using only Stepconf-generated configs deprives you of much of the power of HAL, which can almost anything if configured correctly.
I suggest that you should create a configuration with an A rotary axis and a spindle in stepconf and then edit the HAL to link the spindle speed request to the stepgen.3 input pin instead of to the pwmgen input. You will also need to edit the stepgen "loadrt" line to configure the stepgen as velocity mode rather than position mode.
see ctrl_type here: www.linuxcnc.org/docview/html//man/man9/stepgen.9.html
It is worth learning to work directly in HAL anyway, using only Stepconf-generated configs deprives you of much of the power of HAL, which can almost anything if configured correctly.
I suggest that you should create a configuration with an A rotary axis and a spindle in stepconf and then edit the HAL to link the spindle speed request to the stepgen.3 input pin instead of to the pwmgen input. You will also need to edit the stepgen "loadrt" line to configure the stepgen as velocity mode rather than position mode.
see ctrl_type here: www.linuxcnc.org/docview/html//man/man9/stepgen.9.html
Please Log in or Create an account to join the conversation.
06 Sep 2010 09:57 #3995
by Tim.G
Replied by Tim.G on topic Re:Configuring a stepper as spindle motor
Thanks for the advice.
I mounted a stepper motor horizontally on the table, driving it as a spindle, removed the original spindle motor from the Z-axis and attached a lathe tool to the z-axis.
I now have a lathe for making my own collets -- working vey well indeed (just dont try to cut too deep in a single pass or the stepper motor will stall).
Having done all that, I now have a new question:
When I configure the A axis in the normal way with StepConf (not driving the spindle), all the controls become irratic and slow.
Jogging becomes almost impossible, the control takes long to respond and then the axis keeps moving long after the key has been released.
Does anyone else experience this ?
I mounted a stepper motor horizontally on the table, driving it as a spindle, removed the original spindle motor from the Z-axis and attached a lathe tool to the z-axis.
I now have a lathe for making my own collets -- working vey well indeed (just dont try to cut too deep in a single pass or the stepper motor will stall).
Having done all that, I now have a new question:
When I configure the A axis in the normal way with StepConf (not driving the spindle), all the controls become irratic and slow.
Jogging becomes almost impossible, the control takes long to respond and then the axis keeps moving long after the key has been released.
Does anyone else experience this ?
Please Log in or Create an account to join the conversation.
06 Sep 2010 10:39 #3998
by andypugh
Replied by andypugh on topic Re:Configuring a stepper as spindle motor
That seems very strange.
What accelleration values do you have for the A axis in the INI file? Perhaps it is too low, so the axis takes a long tim to get to speed, and a long time to stop? I can't get to my machine from here, but I would expect numbers in the 100s or even 1000s for a roatary axis.
What accelleration values do you have for the A axis in the INI file? Perhaps it is too low, so the axis takes a long tim to get to speed, and a long time to stop? I can't get to my machine from here, but I would expect numbers in the 100s or even 1000s for a roatary axis.
Please Log in or Create an account to join the conversation.
06 Sep 2010 11:27 #4001
by Tim.G
Replied by Tim.G on topic Re:Configuring a stepper as spindle motor
Note that the slow response happens on all the axis, this is what the config looks like:
INI File entries:
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 2880.0
MAX_ACCELERATION = 14400.0
STEPGEN_MAXACCEL = 18000.0
SCALE = 1.11111111111
FERROR = 25
MIN_FERROR = .25
MIN_LIMIT = -3600.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 200.000000
HOME_LATCH_VEL = -200.000000
HOME_SEQUENCE = 3
Hal File entries:
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 1
setp stepgen.3.dirhold 55000
setp stepgen.3.dirsetup 55000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable
net all-home => axis.3.home-sw-in
INI File entries:
[AXIS_3]
TYPE = ANGULAR
HOME = 0.0
MAX_VELOCITY = 2880.0
MAX_ACCELERATION = 14400.0
STEPGEN_MAXACCEL = 18000.0
SCALE = 1.11111111111
FERROR = 25
MIN_FERROR = .25
MIN_LIMIT = -3600.0
MAX_LIMIT = 0.001
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 200.000000
HOME_LATCH_VEL = -200.000000
HOME_SEQUENCE = 3
Hal File entries:
setp stepgen.3.position-scale [AXIS_3]SCALE
setp stepgen.3.steplen 1
setp stepgen.3.stepspace 1
setp stepgen.3.dirhold 55000
setp stepgen.3.dirsetup 55000
setp stepgen.3.maxaccel [AXIS_3]STEPGEN_MAXACCEL
net apos-cmd axis.3.motor-pos-cmd => stepgen.3.position-cmd
net apos-fb stepgen.3.position-fb => axis.3.motor-pos-fb
net astep <= stepgen.3.step
net adir <= stepgen.3.dir
net aenable axis.3.amp-enable-out => stepgen.3.enable
net all-home => axis.3.home-sw-in
Please Log in or Create an account to join the conversation.
06 Sep 2010 11:45 #4003
by Tim.G
Replied by Tim.G on topic Re:Configuring a stepper as spindle motor
Notice these two lines:
MIN_LIMIT = -3600.0
MAX_LIMIT = 0.001
I found that if I change that to:
MIN_LIMIT = -360.0
MAX_LIMIT = 0.001
the respones return to normal, could problem be the crunching of large numbers perhaps?
MIN_LIMIT = -3600.0
MAX_LIMIT = 0.001
I found that if I change that to:
MIN_LIMIT = -360.0
MAX_LIMIT = 0.001
the respones return to normal, could problem be the crunching of large numbers perhaps?
Please Log in or Create an account to join the conversation.
06 Sep 2010 19:23 #4016
by Tim.G
Replied by Tim.G on topic Re:Configuring a stepper as spindle motor
Problem solved by re-installation.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
Time to create page: 0.268 seconds