servo madness - Page 2


Page 2 of 5 FirstFirst 12345 LastLast
Results 13 to 24 of 50

Thread: servo madness

  1. #13
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    335
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    I wouldn't give up just yet, especially since you were making progress. The reason there's not really a guide to follow, is the KFlop has that many options, the guide would never cover all options.

    By the looks of it, you have managed to get the servos working, they just need tuned. Some controllers do offer auto-tuning, but they still often need some manual adjusting to get the best performance.
    In a nutshell, you increase P until things start to go unstable, you then add some D to stabilise things. Repeat until you've got P and D as high as they can go while remaining stable. Then introduce some I, which again will destabilise things, so you then need to reduce P and D to bring back stability. As has been mentioned, for an initial tune, you can do it with the servos unloaded, and that tune may be good enough once loaded, but you may find that once loaded, the tuning will need a bit refinement, as the load can dampen things.

    If you have any questions, don't be afraid to ask. The biggest problem is often understanding the very basics, and how the key bits fit together.



  2. #14
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    well I took your advise and took another swing. i went through the setup and put all the components into the proper places. I realized I needed to figure out the mode the amc servo driver should run in by trial and error. Advance motion controls
    the AMc website doesnt help much, I would't purchase their products in the future. The referance material talks about the some concept and use several different words for their discription. my driver has current integrator dip swithch and in their available referance materials they never mention integrator. my final driver setup

    all pots ccw 14 turns
    test and offset dip switch on to center drive then off dip 4 moved pot till drive finds center not fwd not bck
    pots
    234 6 turns clockwise


    start kmotion and get the drive humming and respnding to dac1=2000 command ad dac1=0

    setup configuration till drive moves then step response till i get some positive resultss.

    copied this process for all 4 servos and now they all look the same on the step response scale

    I started kmotion cnc and was able to command all axis

    at this point I am going to try to combine channel 0 and 1 and make a c prog to down load. I have not had any success with this, I want to conferm I can understand it before i waist any more time tuning the servos

    thanks again for the encouragment to continue m_c

    Last edited by jensenjim; 02-24-2019 at 08:10 PM.


  3. #15
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    servo madness-s1a-png
    servo madness-s1-png
    0a.txt
    1a.txt


    I am trying to learn how to adjust this system, it moves as commanded , here is where I believe i am having my bigggest issue
    the x axis has duel servos and they are master slave
    it appears one servo is stronger than the other when I do a simple move in kmotion
    the kmotion program is not seeing the 2 servos as one yet, it only shows 3 axis and they do not correspond to the actual servos
    x does master y does slave of the x channel

    I provided a couple shots of the ch 0 and ch 1 move commands if there is any experience user that can identify some issues a little direction would be appreciated



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

    Default Re: servo madness

    Hi jensenjim,

    I think you might be correct that the two X axes are not slaved properly. You didn't include the configuration screens so we don't know what you have configured. It might be that you have the two axes configured to drive opposite directions and/or the encoders to count in opposite directions. Back to basics. With motor power off, the KFLOP axis configuration parameters for both axes downloaded, if you manually push both the Master and Slave in the + direction do the encoder positions both count up?

    It is somewhat difficult to tune slaved axes. It is kind of a catch 22. In order to tune one axis the other axis must be tuned well enough to follow and vice versa. But it isn't usually that difficult to incrementally tune each axis, at first moving slowly, then later at higher speeds, acceleration and gains.

    You can only test or move the Master Axis. This is because the Slave will follow the Master, but the Master will not follow the Slave. So if the Master Axis is moved all is well as both axes will move together, but if you try to move the Slave axis the two axes will fight. The Master fighting to stay where it is and the Slave fighting to move. To tune the Slave axis temporarily reverse the Master/Slave roles.

    Its necessary for you to understand what is going on in the plots. So it would be helpful if you were to describe what you see in the plots in your own words. It is hard to help someone learn something if they don't provide any feedback. For example can you see that in Axis #1 plot the motor/encoder initially moves in the direction it is supposed to to a small extent (red tries to follow blue), but in Axis #0 the motor encoder moves the opposite/wrong direction?

    Did you realize PID gains are all zero? Only Feed Forward is used to move.

    Regards
    TK http://dynomotion.com


  5. #17
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    335
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Quote Originally Posted by jensenjim View Post
    at this point I am going to try to combine channel 0 and 1 and make a c prog to down load. I have not had any success with this, I want to conferm I can understand it before i waist any more time tuning the servos
    I'll leave the tuning discussions up to Tom, as he is the one who actually understands it. I can manage the basics, but Tom actually knows the theory/maths behind it.

    However, regarding the C program, it's what gets referred to as your init.c. It can be called whatever you want, but it's what does the key initialisation of your system.

    To get you started, have a look at the Init3Analog.c file in the examples folder.
    You'll need to delete the SetBit() calls at the top, unless you need to enable certain bits to enable your amps, in which case change them to enable whatever bits you need to enable your drives.

    Below that you have your channel (aka axis) configurations.
    To get the required code for the channel configurations, once you've configured/tuned a channel in KMotion, select that channel on the Config & Flash screen, click the C Code -> Clipboard button. This copies all the channel configuration to your clipboard, so within you init.c file, you can select the existing channel data, and replace it. Just make sure you replace all the existing channel configuration lines, as any duplicate lines, the last value will be used.
    If during tuning, you only need to change one or two values, you can just directly edit those values in the init.c, rather than copy/paste the entire channel config.

    After the channel config, you enable the axis, using EnableAxis() calls for each channel.

    Then finally you need the DefineCoordSystem() call that defines what channel gets assigned to each axis. The axes have are defined in XYZA. For slaved systems, you only define the master axis, and for unused axes, you define them as -1. So if you're just trying to get one axis working, you could start with DefineCoordSystem(0,-1,-1,-1).

    Once you've done all that, you can then run/compile/download the init.c, and your system should initialise.


    One key point to be aware of, is when KMotion is loaded, all the channel values within KMotion are set to default, regardless of what values are active in the KFlop. To get your initialisation values into KMotion, you need to run your init.c (either via KMotion or KMotionCNC), then in KMotion Config & Flash screen, click the Upload channel.



  6. #18
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    type for 15 minmutes then refer to the posted image and lose all the information. I'll try again
    servo madness-ch0-1-jpg
    servo madness-ch1-1-jpg

    i uncoupled the drives and ran the move



  7. #19
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Moving the carrage in one direction moves the encoders in the same direction
    so the first image is ch1
    i can see the ential movement direction and ch 0 has none.
    do I still need to work with the servo drivers or can this be corrected with the kmotion

    so basicall if the configs are the same , if the cong is master/slave and ch1 is master this would jerk the table case the mismatch in setup
    do I still need to work with the servo drivers
    the two moves neet to be the same before coupling
    q1 what determines the blue line
    q2 is the green line the actual voltage
    q3 the move command is a preset command that moves the servo fwd then back

    why is the blue line different from ch0 and ch1 , I disable the servo, reset the zero, and then enable the servo before I hit move
    the servo driver has pots for
    1 loop gain
    2 current limit
    3 ref in gain
    4 test/offset

    setup dip switches
    1 voltage feedback
    2 current integrator
    3vel integrator
    4 test/offset

    i have dip 1 on my thought is this allows to control the servo by the current to the drive and adjustments to this by the #3 pot I have has some success with this
    as far as the driver AMC (R04)25A8M the company referance material does not provide any information on this specific unit



    or can this be corrected with the kmotion



  8. #20
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    538
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Quote Originally Posted by jensenjim View Post
    hello and thanks for the help
    I have come to the conclusion that there is no practical guide to follow that explains how this system works.
    I had high hopes I could get these servos working, I have them installed completely now, 4 axis, channel 0 and 1 to follow 0.
    at this point I give up. I have tried to copy other posts to make any scense of kflop and there is nothing available that i can understand.
    I will trash this setup and try to install stepper motors and a controller that i can configure
    There are lots of guides (and guidance here from experienced people) for tuning PID loops

    Note that PID tuning is not really a Kflop specific issue, but rather a general closed loop control setup proceedure

    You look like you are pretty close, your display looks like a classic underdamped (ringing) response
    and pretty much exactly what you would expect with torque mode servos with D term=0 (as your screen shot shows)
    I would not give up when you are so close

    Did you try increasing the D term as suggested?



  9. #21
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    servo madness-ch1-2-png
    current limiter pot increase



  10. #22
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    servo madness-ch2-1-jpg
    servo madness-ch3-1-jpg



  11. #23
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    I am going to wait for some help before I continue, these are the current moves.
    I need to know if I have to work with the servo drivers or work with the software setup



  12. #24
    Registered
    Join Date
    May 2008
    Location
    usa
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    servo madness-ch3-2-jpg
    so minus gain on input flipped the motion direction



Page 2 of 5 FirstFirst 12345 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

servo madness

servo madness