Flexicam ATC router retrofit with Kflop/Kanalog


Page 1 of 3 123 LastLast
Results 1 to 12 of 34

Thread: Flexicam ATC router retrofit with Kflop/Kanalog

  1. #1
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Flexicam ATC router retrofit with Kflop/Kanalog

    I have a Flexicam router that stopped working. It appeared that one of the I/O boards had failed and it would get part way through the boot sequence, then just hang.

    Although the router was less than 10yrs old, the PC and hardware looked to be considerably older, so rather than try to repair it, I decided to replace the old PC and I/O boards with a Kflop/Kanalog.

    I have built plenty of CNC tables running Mach3 using steppers with a G540 or any of the Chinese drivers and BOB's, but this is my first time dealing with AC servo motors and a dedicated controller. Nevertheless, while it wasn't an easy task tracing all the existing wiring, I managed to install the Kflop/Kanalog and wire it all up. I even left room for a 5th driver for a future rotary axis. Pic attached.

    With KMotion running, I turned it on and was able to verify all my inputs and outputs are working. I was able to set up my axis channels, test my encoders and with the Step Response screen, get motor movement.

    I assume the next step is to tune the motors (which are still installed in the machine, coupled to 10:1 gearboxes and racks). The problem is, I have no experience with servo tuning and have absolutely no experience with C programming, but I have gone to far to turn back now.

    Pics of the 3 plots attached. The Panasonic servos are operating in Velocity Mode, and I increased the P Gain a little to the point where the Position appeared to follow the Command quite close. Increasing the P Gain any more would cause the Output to oscillate. Increasing D didn't appear to make a huge difference and increasing I (even a little, ie 0.001) would cause more oscillation.

    I'm really happy to have made it this far without releasing any magic smoke, but still have a very long way to go and have plenty of questions. I'm hoping I can get some guidance from those who know exactly what they are doing. How do the plots look and what's my next step?

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Flexicam ATC router retrofit with Kflop/Kanalog-z-axis-png   Flexicam ATC router retrofit with Kflop/Kanalog-enclosure-jpg   Flexicam ATC router retrofit with Kflop/Kanalog-y-axis-png   Flexicam ATC router retrofit with Kflop/Kanalog-x-axis-png  

    Eug


  2. #2
    Registered
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    644
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Looks like you have done really well so far....



  3. #3
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Thank you, but looks can be deceiving

    Truth is up until now, I have had some idea of what I'm doing. From here on in, I'm venturing into the unknown....

    Eug


  4. #4
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2987
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Eug,

    That looks very good. Everything is working properly to the point where you can begin tuning.

    You might read through these related Threads:

    https://www.cnczone.com/forums/dynom...ml#post2128818
    https://www.cnczone.com/forums/dynom...15344-cnc.html

    Here are some comments:

    #1 try adding D gain with also a 2nd order low pass filter. It should make a difference. Increase to the point of oscillation. Then back off. See:
    Dynomotion

    #2 add I gain. If 0.001 causes instability use a smaller value. See:
    Dynomotion

    #3 output is only going to about 5% of full output due to low gains and max limits, See:
    Dynomotion

    Let us know how much you understand and how far you get.

    HTH
    Regards



  5. #5
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Tom

    Thank you for confirming that tuning is my next step.

    I had come across those both of those threads during my searches, but hadn't read them thoroughly.

    The first one still appears too big, so I just quickly flicked through it. I'll dedicate some hours to it if I need to, but the 2nd one has a lot of useful step-by-step information that makes a lot of sense. I love your analogies, they make it very easy to understand what is really happening

    Regarding your comments, would I be correct in saying that my next step is to increase the max limits and the motion profile numbers to real figures, and then begin to adjust the PID gains?

    Also, I think I understand what I'm aiming for, but just to spell it out, any chance you might be able to post a pic of a step response screen with an "ideal" output?

    Eug


  6. #6
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2987
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Eug,

    I had come across those both of those threads during my searches, but hadn't read them thoroughly. The first one still appears too big, so I just quickly flicked through it
    I tried to link into the long Thread where PeterTheWolf does the servo tuning.

    would I be correct in saying that my next step is to increase the max limits and the motion profile numbers to real figures, and then begin to adjust the PID gains?
    Probably not. It is probably better to tune things up better before trying to go faster even though they are somewhat separate issues. I just wanted to point out what was happening for you to be aware of it. Right now it takes ~ 200 counts of error x PGain 0.5 to produce 100 counts of output. Because error over 200 counts is ignored there is no way to generate any more output to go any faster. You could increase max error to have larger errors produce more output. But when things are properly tuned with Integrator and Feed forward included I would expect to get full output with errors only on the order of 10 counts.

    Also, I think I understand what I'm aiming for, but just to spell it out, any chance you might be able to post a pic of a step response screen with an "ideal" output?
    Every system is different based on accuracy and speed requirements. Routers tend to be higher speed, less accurate systems. I'm assuming your encoder feedback is coming from the motor position and not from linear scales? In your plots you can see a difference (~200 counts) between the Command (blue) and the Actual Position (red). A fully tuned system will usually have small enough errors that the red plot will seem to perfectly overlay and hide the blue plot. You will then need to zoom way in (left click drag), or plot error instead. Plotting error will usually look nasty, spiky, noisy, but you must consider the scale to understand how bad it actually is. Convert the counts to distance in inches to understand this. Here are some plots rbickle added on that thread of his tuned system with only several counts of error.
    https://www.cnczone.com/forums/dynom...ml#post2147660

    HTH
    Regards



  7. #7
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Tom

    Quote Originally Posted by TomKerekes View Post

    I tried to link into the long Thread where PeterTheWolf does the servo tuning.

    Regards
    The link goes to the part where he is tuning his spindle. Maybe it's the same principle, but I couldn't see any plots there and reading down the page nothing seemed relevant.

    Quote Originally Posted by TomKerekes View Post

    Probably not. It is probably better to tune things up better before trying to go faster even though they are somewhat separate issues. I just wanted to point out what was happening for you to be aware of it. Right now it takes ~ 200 counts of error x PGain 0.5 to produce 100 counts of output. Because error over 200 counts is ignored there is no way to generate any more output to go any faster. You could increase max error to have larger errors produce more output. But when things are properly tuned with Integrator and Feed forward included I would expect to get full output with errors only on the order of 10 counts.
    Regards
    Thank you for trying to steer me in the right direction, but I guess I'm still confused. Before I read your reply, I already had a go at increasing the max limits and motion profile numbers, and ended up with the plot Y1.1 below (and what appeared to be nice smooth motion). After reading your reply, I tried to reduce the error and I managed to get it down to 223 before oscillations became quite severe. The whole time, the output was limited to ~160, regardless if the error max limit was set to 10000, 2000 or 250, which makes sense if error over 200 counts is ignored. However the link you provided in your first post that goes to Max Limits - Error, shows that on the 2nd plot the output went to 900 after the max error was increased, but mine wasn't changing at all. Am I doing something wrong?

    I did wonder if the Panasonic amplifiers had something to do with it. They were obviously set up to work with the old controller and maybe needed to be reset to work with Flop?

    If you can suggest some numbers I'm happy to start again, working only on the Y axis for now. Just want to really understand what's going on rather than simply changing numbers in boxes....

    Quote Originally Posted by TomKerekes View Post

    Every system is different based on accuracy and speed requirements. Routers tend to be higher speed, less accurate systems. I'm assuming your encoder feedback is coming from the motor position and not from linear scales? In your plots you can see a difference (~200 counts) between the Command (blue) and the Actual Position (red). A fully tuned system will usually have small enough errors that the red plot will seem to perfectly overlay and hide the blue plot. You will then need to zoom way in (left click drag), or plot error instead. Plotting error will usually look nasty, spiky, noisy, but you must consider the scale to understand how bad it actually is. Convert the counts to distance in inches to understand this. Here are some plots rbickle added on that thread of his tuned system with only several counts of error.
    https://www.cnczone.com/forums/dynom...ml#post2147660
    Regards
    Your assumption is correct, the motors have encoders with a Resolution of 10000, going through 10:1 gearboxes to 20 tooth 6.28mm pitch gears, so 20222.93 counts per inch or 796.178 per mm.

    I understand that the Command (blue) and the Actual Position (red) should be as close as possible. I'm just not sure what the ideal Output (green) should look like? Am I aiming for 2 clean spikes with an output of ~2000?

    That link above is exactly the same as the one in your first post. Maybe you could refer to the post number you would like me to start reading at?

    Attached Thumbnails Attached Thumbnails Flexicam ATC router retrofit with Kflop/Kanalog-y-axis-test-1-2-reduced-error   Flexicam ATC router retrofit with Kflop/Kanalog-y-axis-test-1-1-png  
    Eug


  8. #8
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hey Tom

    Don't worry about the links, I just began on page 2 and am reading from there. Lots of useful info already, and I haven't even reached the motor tuning stage yet.

    Eug


  9. #9
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2987
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Eug,

    Not sure why the links aren't going to specific posts. But the tuning starts at about post 109 and rbickles tuned plots at post 164.

    Thank you for trying to steer me in the right direction, but I guess I'm still confused. Before I read your reply, I already had a go at increasing the max limits and motion profile numbers, and ended up with the plot Y1.1 below (and what appeared to be nice smooth motion). After reading your reply, I tried to reduce the error and I managed to get it down to 223 before oscillations became quite severe. The whole time, the output was limited to ~160, regardless if the error max limit was set to 10000, 2000 or 250, which makes sense if error over 200 counts is ignored. However the link you provided in your first post that goes to Max Limits - Error, shows that on the 2nd plot the output went to 900 after the max error was increased, but mine wasn't changing at all. Am I doing something wrong?
    We don't have direct control of the Output, the Servo attempts to control the Output to provide whatever Output is necessary to do what the axis is asked to do. So testing higher Velocities should result in higher Output.

    Think of the Output as the gas pedal position in a car. If you set the cruise control to 50MPH the pedal might be half way down. Set at 100MPH the pedal might go nearly all the way down. The max limits is like putting a brick under the gas pedal to limit it to half travel. If commanded to 100MPH with the brick the pedal will "peg" against the brick, the car will run at 50MPH, and there will be a huge following error of the car behind the desired trajectory of 100MPH.

    Your test move is moving at ~63000 counts/second. It doesn't reach the setting of 100000 counts/sec because the test move is too short to reach that speed at your specified Acceleration and Jerk.

    Which is 63000 / 20222.93 counts/inch ~ 3ips. A longer test move, or higher acceleration and Jerk, will move faster and require more output.

    Since the max Output of Kanalog is 2047. You might be able to go as fast as 2047/163 x 3ips = 37ips ! (assuming the Amplifiers and Motors can do this)

    Regarding the plots. Notice with the higher gain errors are less but the system becomes unstable. The next step might be to add D Gain (and 2nd order low pass filter) to try to make the system more stable and allow you to increase P Gain and still remain stable.

    HTH
    Regards



  10. #10
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Tom

    Thank you for the clarification re Output. Every one of your explanations and analogies help a lot.

    I read through the few pages and there is definitely good info there. It was very late and I was really tired, so I'm going to re-read it again before I go any further, but a couple of questions for now.

    Quote Originally Posted by TomKerekes View Post
    Regarding the plots. Notice with the higher gain errors are less but the system becomes unstable. The next step might be to add D Gain (and 2nd order low pass filter) to try to make the system more stable and allow you to increase P Gain and still remain stable.
    The system became unstable because I was reducing the error value in Max limits. Obviously I still don't understand the error setting in Max Limits, can you please clarify it further? I thought we needed to reduce the error but it appears that's not necessary...

    Aside, while I have been tuning my Y axis, I have found that my Xa and Xb (slave) will slowly drift towards X- if left disabled in software (the amplifiers are enabled). They are moving extremely slow, maybe .5mm per sec. Any idea why that may be the case?

    Eug


  11. #11
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2987
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Eug,

    The system became unstable because I was reducing the error value in Max limits. Obviously I still don't understand the error setting in Max Limits, can you please clarify it further? I thought we needed to reduce the error but it appears that's not necessary...
    Max Error is often confused as a parameter to tell the system what the error should be. But the purpose of it is to treat errors larger than the specified value as if they were only the specified value. The purpose is to reduce/limit reactions to large abnormal errors. In normal operation, with a well tuned system, errors should always be small (ie a few counts or a few milli-inches). But let's say for whatever reason something pushes the axis away from it's destination by a foot and releases. This huge error might invoke a huge correction and result in a violent motion. Setting the Max Error to say 0.1 inches would cause the servo to treat the 1 foot error as if it were only 0.1 inches and make a more measured reaction.

    Actually Max Error is often not needed because most systems are configured with a small Max Following Error so if for whatever reason a large error occurs the system faults and disables anyway. Which brings up a point. Now that your system is functional you might consider setting a moderately small Max Following Error. During tuning if you create an unstable system the Max Following Error limit should trip and disable the axis preventing violent shaking and such.

    You can probably set the Max Error to a huge value to effectively disable it.

    I'm not really sure why your system went unstable with a small max error. But it doesn't surprise me. Saturation and Limits are non-linear effects and often complicated to understand. With the max following error set at 0.1 inches the servo has no idea if the error is 0.1 inches or 1 foot as the servo only "sees" 0.1 inches in both cases. Furthermore the servo receives no information on the velocity of the axis until the true error becomes less than 0.1 inches (which might be too late to stop).

    Aside, while I have been tuning my Y axis, I have found that my Xa and Xb (slave) will slowly drift towards X- if left disabled in software (the amplifiers are enabled). They are moving extremely slow, maybe .5mm per sec. Any idea why that may be the case?
    That is normal. See this wiki article.

    HTH
    Regards



  12. #12
    Registered xyz-cnc's Avatar
    Join Date
    Jun 2011
    Location
    Australia
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default Re: Flexicam ATC router retrofit with Kflop/Kanalog

    Hi Tom

    Now that your system is functional you might consider setting a moderately small Max Following Error
    How small, like 0.1 inch or 2000 counts?

    Getting back to the tuning, I found that it's not possible to increase the P over .8 and both D & I seem to have little positive effect on improving the position, but adversely effect the output. Even small amounts like D of up to 1 and I up to 0.00001 had negative effects, however the 2nd order low pass filter did help.

    I found that the servo sounded and appeared to perform better as I increased the motion profile. I got to the settings on the attached plot but things were starting to move very quickly, so I wasn't sure if there was any point increasing further. How far should I push it? I did read the article on Velocity, Acceleration and Jerk in the Wiki and wanted to work my way through it but I wasn't sure how to command my axis to move to a good starting point in order to do the tests.

    Also, I found that when doing these tests with a step size of 10000 (approx 1/2" of movement) I would get certain performance but increasing the step size to 100000 (about 5" of movement) would give different results. What distance should I be testing at?

    I did something foolish. I was doing the testing and then ran out of time and turned things off. Came back to it the following day and thought I would continue where I left of and tried a move of the X axis. Something didn't go right and the gantry ended up slightly racked (and disintegrated one of the linear bearing blocks - this thing has too much power), so I decided to remove the motors from my gantry as I wanted to see that they were performing together in sync - and saw that they weren't.....

    Thinking it through, after I turned the PC back on, I should have loaded up the config profile and gone through the channel settings before doing anything else, correct?

    In the situation where I have channel 1 slaved to channel 0 (with a gain of -1), is there any need to change any of the settings in channel 1 or are they all ignored?

    Attached Thumbnails Attached Thumbnails Flexicam ATC router retrofit with Kflop/Kanalog-x-axis-test-1-2-png  
    Attached Files Attached Files
    Eug


Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Flexicam ATC router retrofit with Kflop/Kanalog

Flexicam ATC router retrofit with Kflop/Kanalog