- Posts: 36
- Thank you received: 0
Servo Tuning
- Roland2161
- Topic Author
- Offline
- Junior Member
-
PCW wrote: This looks like it was done with a quite old version of pncconf
At the minimum, in the ini file I would:
1. Change the servo period to 1000000
2. Set all P terms to 1000
3. Set all step times to 5000
4 Set all dir setup and hold times to 20000
then in the hal file
1. Delete all pid maxerror lines
In the .ini file is this the section I am concerned with for each axis?
What are the step times?
#********************
# Axis X
#********************
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
FERROR = 0.5
MIN_FERROR = 0.05
MAX_VELOCITY = 0.6
MAX_ACCELERATION = 30
# The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION
# If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger.
STEPGEN_MAXVEL = 1.25
STEPGEN_MAXACCEL = 37.5
P = 1000.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 1.25
# these are in nanoseconds
DIRSETUP = 1000
DIRHOLD = 1000
STEPLEN = 1000
STEPSPACE = 1000
STEP_SCALE = -20360
MIN_LIMIT = -4.0
MAX_LIMIT = 0.5
#MAX_LIMIT = 0.001
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = 0.150000
HOME_LATCH_VEL = 0.016667
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_SEQUENCE = 1
Please Log in or Create an account to join the conversation.
step time = STEPLEN
so something like
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 5000
STEPSPACE = 5000
is a much better place to start...
Please Log in or Create an account to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
PCW wrote: Yes thats the correct section
step time = STEPLEN
so something like
DIRSETUP = 20000
DIRHOLD = 20000
STEPLEN = 5000
STEPSPACE = 5000
is a much better place to start...
So I have made all the changes you have suggested, including the servo period and the hal file deletion. And I am now .004" off over an inch at .100 per move. I had to turn the acceleration back up to 37.5, because if I didn't the machine would jitter like crazy every move. Video shows the stepscale at -20160, but I changed it back to -20320 with the same results. If i put the scale at -20000, then it will be off in the OTHER direction about .007" so I am pretty sure -20320 would be the correct number. I feel like I am getting closer.
video
Please Log in or Create an account to join the conversation.
- tommylight
-
- Offline
- Moderator
-
If you have metric ball screws with 5mm per turn, try 20480.
Just a thought. Did a lot of calculations and all points to it being correct at 20320.
Please Log in or Create an account to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
www.ebay.com/i/113693882984?chn=ps
The motor is directly connected to the ball screw.
Please Log in or Create an account to join the conversation.
- Roland2161
- Topic Author
- Offline
- Junior Member
-
- Posts: 36
- Thank you received: 0
tommylight wrote: 20320 implies that you have 1000CPR encoders and 5 turns per inch ball screws, or 5.08mm per turn.
If you have metric ball screws with 5mm per turn, try 20480.
Just a thought. Did a lot of calculations and all points to it being correct at 20320.
So this is where I'm at currently.
-20220 is what this is set to currently and it's close. Maybe some backlash compensation? How would I insert that into the .ini file?
Please Log in or Create an account to join the conversation.