Stuck at the start on servo tuning w/ Youtube video.
Moderators: TomKerekes, dynomotion
Stuck at the start on servo tuning w/ Youtube video.
Getting somewhere with this mill now but I'm pretty lost on the servo tuning. I read the wiki but it doesn't really give me enough direction to know what knob to switch first. I made a video to outline where I'm at. Big thanks for help getting going -Dave
https://youtu.be/dqNxaktEq-M
https://youtu.be/dqNxaktEq-M
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Stuck at the start on servo tuning w/ Youtube video.
Hi,
Your X axis has positive instead of negative feedback. See here.
On the Step Response Screen use the Move not Step button.
Follow the tuning methods in the wiki.
Your X axis has positive instead of negative feedback. See here.
On the Step Response Screen use the Move not Step button.
Follow the tuning methods in the wiki.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Stuck at the start on servo tuning w/ Youtube video.
Ok I think I've made it as far as I can with your previous input. I have a second video outlining the results.
https://youtu.be/HjohDkEwL6g
Thank You for your help! -Dave
https://youtu.be/HjohDkEwL6g
Thank You for your help! -Dave
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Stuck at the start on servo tuning w/ Youtube video.
Hi Dave,
Regarding Positive feedback: There are probably a dozen ways something can be reversed mechanically, electrically, or in configurations. It seems you have that sorted. Some of your problems might have been that there are various ways to change settings. ie C Programs and Screen Settings. If you change one without updating the other it can be confusing. You might read this.
Its not clear what type of system you have or amplifiers you have or the resolution of the axes. So some information there might be helpful.
Here are some thoughts:
I'd work on one axis at a time.
For each axis there are 3 screens with axis configuration: Step Response, Configuration/Flash, and IIR Filters. You aren't showing all of them to us.
I'd set the FF parameters to Zero until the axis is better tuned for feedback.
Generally your understanding of the goals are correct (minimal error between commanded and actual position).
You might Zero the Axes before testing on the Step Response Screen. If the starting position is huge it can cause some errors with the plotting.
For the Z axis about 450 DAC Counts are required to hold position. With an Integrator Max Limit of 200 the Integrator can not help reduce error. So position error and P gain is needed.
Bode Plots are complicated. I'd suggest you don't use it at all.
Lead compensation is complicated also so I'd suggest you use simpler D gain. So Clear IIR Filters #0 and #1. Set IIR Filter #2 to a 2nd Order Low Pass filter at Freq=500Hz and Q=1.4 to reduce spikes on the output caused by D gain. Then see how much D gain can be used to help stabilize the system.
HTH
Regarding Positive feedback: There are probably a dozen ways something can be reversed mechanically, electrically, or in configurations. It seems you have that sorted. Some of your problems might have been that there are various ways to change settings. ie C Programs and Screen Settings. If you change one without updating the other it can be confusing. You might read this.
Its not clear what type of system you have or amplifiers you have or the resolution of the axes. So some information there might be helpful.
Here are some thoughts:
I'd work on one axis at a time.
For each axis there are 3 screens with axis configuration: Step Response, Configuration/Flash, and IIR Filters. You aren't showing all of them to us.
I'd set the FF parameters to Zero until the axis is better tuned for feedback.
Generally your understanding of the goals are correct (minimal error between commanded and actual position).
You might Zero the Axes before testing on the Step Response Screen. If the starting position is huge it can cause some errors with the plotting.
For the Z axis about 450 DAC Counts are required to hold position. With an Integrator Max Limit of 200 the Integrator can not help reduce error. So position error and P gain is needed.
Bode Plots are complicated. I'd suggest you don't use it at all.
Lead compensation is complicated also so I'd suggest you use simpler D gain. So Clear IIR Filters #0 and #1. Set IIR Filter #2 to a 2nd Order Low Pass filter at Freq=500Hz and Q=1.4 to reduce spikes on the output caused by D gain. Then see how much D gain can be used to help stabilize the system.
HTH
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Stuck at the start on servo tuning w/ Youtube video
OK, finally able to get back on this project.
So regarding system type/amps/resolution. & hopefully those attachments worked
If not, the short version is this is a techno cnc lc 3024
The motors are 4.5 amp 48 volt dc brushed servos with 1000 line square wave 2 channel quadrature output with index
drives are copley controls set to torque mode in a techno isel enclosure that I assume came with the machine originally.
Here is a video of the screens that you asked for https://youtu.be/3hMBl25lQ_M
I am assuming that the necessary system stability you are referring to is the output or (green line) on the step response screen that is really far from the command and position plots?
So regarding system type/amps/resolution. & hopefully those attachments worked
If not, the short version is this is a techno cnc lc 3024
The motors are 4.5 amp 48 volt dc brushed servos with 1000 line square wave 2 channel quadrature output with index
drives are copley controls set to torque mode in a techno isel enclosure that I assume came with the machine originally.
Here is a video of the screens that you asked for https://youtu.be/3hMBl25lQ_M
I am assuming that the necessary system stability you are referring to is the output or (green line) on the step response screen that is really far from the command and position plots?
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Stuck at the start on servo tuning w/ Youtube video.
Hi,
I'd work on one axis at a time.
Info on the motor is insufficient to determine resolution we also nee to know the mechanics. Lead screw pitch, gearing, etc. Or the simplest method is to move large distance and check how many encoder counts this is.
In the video I saw a step response plot that was reasonable. I'm not sure what the conditions were when obtained.
It seems you are at the point of optimizing the tuning. See here.
I'd work on one axis at a time.
Info on the motor is insufficient to determine resolution we also nee to know the mechanics. Lead screw pitch, gearing, etc. Or the simplest method is to move large distance and check how many encoder counts this is.
In the video I saw a step response plot that was reasonable. I'm not sure what the conditions were when obtained.
It seems you are at the point of optimizing the tuning. See here.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Stuck at the start on servo tuning w/ Youtube video.
Ok so I have a have couple more issues to resolve before going deeper on tuning. The first is a couple errors I get on bootup.
My X boots up saying neg limit disabled and won't allow me to enable it on the axis screen, but for some reason it's the only axis that reads correctly as a DAC Servo on startup. I checked my limit switch readings on the digital I/O tab and they respond normally so I don't know why I start up with a limit error. As with the other axis I can enable it without issue on the step response screen and then afterward it acts normally on the axis screen as well.
My other issue is my lead screws are 5mm pitch with 1 to 1 belt drives so my 1000 count encoders break down to 200 counts per mm, however when I tested a 100000 count move I only moved 125mm. Or 1/4 of my expected movement. I can only guess it has something to do with being quadrature encoders with 4 pairs going to the kanalog? Is there a setting for this or do I only feed the kanalog one pair?
Thanks as always - Dave
My Z always starts up with a position of -1 so it gets disabled and the mode reads no output. I can enable it on the axis screen but it doesn't update to DAC Servo until I enable it via the step response screen.My X boots up saying neg limit disabled and won't allow me to enable it on the axis screen, but for some reason it's the only axis that reads correctly as a DAC Servo on startup. I checked my limit switch readings on the digital I/O tab and they respond normally so I don't know why I start up with a limit error. As with the other axis I can enable it without issue on the step response screen and then afterward it acts normally on the axis screen as well.
My other issue is my lead screws are 5mm pitch with 1 to 1 belt drives so my 1000 count encoders break down to 200 counts per mm, however when I tested a 100000 count move I only moved 125mm. Or 1/4 of my expected movement. I can only guess it has something to do with being quadrature encoders with 4 pairs going to the kanalog? Is there a setting for this or do I only feed the kanalog one pair?
Thanks as always - Dave
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Stuck at the start on servo tuning w/ Youtube video.
Hi Dave,
I'm not sure what you mean by "bootup". Nothing should happen at bootup as nothing should be enabled or configured unless you have flashed things to KFLOP which we do not recommend. If you have then you might remove everything by re-Flashing New Version to KFLOP.The first is a couple errors I get on bootup.
There are multiple ways to configure KFLOP. The Enable Button on the Step Response Screen downloads all the screen settings to KFLOP then enables the axis. You might read this.My X boots up saying neg limit disabled and won't allow me to enable it on the axis screen, but for some reason it's the only axis that reads correctly as a DAC Servo on startup. I checked my limit switch readings on the digital I/O tab and they respond normally so I don't know why I start up with a limit error. As with the other axis I can enable it without issue on the step response screen and then afterward it acts normally on the axis screen as well.
The encoders count quadrature transitions which there are 4 for each "line" or "pulse" which is good to have higher resolution. You can configure KMotionCNC to what works for your machine. It seems you have 800 * 25.4 = 20,320 counts/inch.My other issue is my lead screws are 5mm pitch with 1 to 1 belt drives so my 1000 count encoders break down to 200 counts per mm, however when I tested a 100000 count move I only moved 125mm. Or 1/4 of my expected movement. I can only guess it has something to do with being quadrature encoders with 4 pairs going to the kanalog? Is there a setting for this or do I only feed the kanalog one pair?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Stuck at the start on servo tuning w/ Youtube video.
Breakthrough! So I think finally rooted out why I was having so many issues with the machine retaining my settings. My understanding based on the wording was that the save, compile, download, and run button on the C program page was a "do-all" button that updated the C-program on the K-flop that gets referenced when the board powers on. This is what I meant by boots up btw. NOW I realize that button is not how to update the board. I have to hit the flash user memory button on the config and flash screen to update the c program on the board, hit reboot on the console screen and then hit download channel on the config and flash screen to have a faithful representation of my settings after a power cycle of the board. Now I can power down and back on without wondering what the machine will actually do.
All that said I also now realize that the sticker on the side of the machine is still pertinent even after changing control systems. this partially explains why the X or axis 0 in my kflop needs to be inverted since Y and Z are opposite signal polarity and the scale is just as you calculated at 20320. I will have to convert this at some stage because I work in metric but that shouldn't be difficult.
Now I just need to figure out what to do next. Do I finally get to move over to Kmotioncnc? I can move the machine around and the limit switches read correctly in digital I/O.
All that said I also now realize that the sticker on the side of the machine is still pertinent even after changing control systems. this partially explains why the X or axis 0 in my kflop needs to be inverted since Y and Z are opposite signal polarity and the scale is just as you calculated at 20320. I will have to convert this at some stage because I work in metric but that shouldn't be difficult.
Now I just need to figure out what to do next. Do I finally get to move over to Kmotioncnc? I can move the machine around and the limit switches read correctly in digital I/O.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Stuck at the start on servo tuning w/ Youtube video.
Hi Dave,
That is all correct but not recommended as it can be confusing and necessary. Once you have a C Program to configure the board and initialize your system this can be used when necessary. No need to flash anything to the board. The problem with flashing things to the board is that there is no way to recover what changes have been made to the board. Its up to you to keep track of everything you did. You can remove all the changes made to KFLOP by re-flashing New Version. See also here.Breakthrough! So I think finally rooted out why I was having so many issues with the machine retaining my settings. My understanding based on the wording was that the save, compile, download, and run button on the C program page was a "do-all" button that updated the C-program on the K-flop that gets referenced when the board powers on. This is what I meant by boots up btw. NOW I realize that button is not how to update the board. I have to hit the flash user memory button on the config and flash screen to update the c program on the board, hit reboot on the console screen and then hit download channel on the config and flash screen to have a faithful representation of my settings after a power cycle of the board. Now I can power down and back on without wondering what the machine will actually do.
Once you have a C Program that fully configures and initializes all the axes, all the axes working and tuned, and you have determined all the maximum velocities, accelerations, and Jerks for all the axes then it would be time to configure KMotionCNC.Now I just need to figure out what to do next. Do I finally get to move over to Kmotioncnc? I can move the machine around and the limit switches read correctly in digital I/O.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.