servo madness


Page 1 of 3 123 LastLast
Results 1 to 20 of 50

Thread: servo madness

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

    Default servo madness

    Hello friendsservo madness-6-jpg
    I purchase the power supply drivers and servos as a complete setup from a military simulator


    power up and able to control the motors with consol and dac 1000 and dac 0

    I was following along the thread frankenstein from a couple years back and then worked the kanalog instructions but am going in circles

    anyone with an idea for setup that could give predictable solutions

    pictures to follow in a minuteservo madness-81-jpg

    Similar Threads:
    Last edited by jensenjim; 02-11-2019 at 01:57 PM. Reason: add pix


  2. #2
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Hi jensenjim,

    Please post screen shots of a Move on the KMotion Step Response Screen and we can likely help. Also include your IIR Filters and Config/Flash Screens so we can see all your settings. You can make a screen shot by Alt - Print Screen then paste to Paint.exe and save as a .png file. It helps to also post the raw data as a text file so we can view plots as other plot types and zoom in to see details. Work on one axis at a time.

    You might clean KFLOP/Kanalog

    Regards
    TK http://dynomotion.com


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

    Default Re: servo madness

    servo madness-screenshot-7-jpgservo madness-screenshot-10-jpgservo madness-screenshot-11-jpg


    the encoders have z wires, i orignally had them connected to jp2 but disconnected them, my reading left me to believe they were not needed. I have a install quide for the amc driver i studied , there is some info on voliciry integerator mode may need tach input. this just leaves me confused on the wiring. is there somewhere to hook up and enable the z wires? also reading about the driver modes is a bit confusing, most says put the driver in velocity mode

    servo madness-screenshot-12-jpg


    when i started i copied another post setup and it looked like things were moving in the right direction. then after acouple days reading and experimenting it all went south
    right now it looks like things are stable but no movement with move or step but can control drives from console i will need to run two drives on x axis also i still have another driver and servo to hook up. I was not sure if this setup was goin g to work, they are stout servos, I had prevously bought steppers and the stepper driver from dynomotion, i also got geko drivers , 5 yrs later i am banking on the servos, I lost the kstep board so kanalog is my option

    Last edited by jensenjim; 02-11-2019 at 05:52 PM. Reason: text


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

    Default Re: servo madness

    servo madness-screenshot-13-jpg


    i adjusted the driver ref in gain and was able to move the red line. at this point all step commands did not move the servo
    I was coping the lanalog webpage settings

    Last edited by jensenjim; 02-11-2019 at 11:22 PM.


  5. #5
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Hi jensenjim,

    I think the main issue now is the Input and Output Gains are 0. That is like turning off the encoder input and the DAC output. Nothing will move and even if it did nothing would be observed to move. Set both to 1. If the motor runs away the wrong direction try one set to -1.

    As I asked in the last email please work on one axis at a time. Once you learn how to tune one axis you should be able to tune all your axes the same way later. Showing only partial information from multiple axes only adds confusion.

    Your screen shots are too blurry to read. Please improve your screen captures. As I mentioned Alt-PrintScreen will capture a single screen rather than the whole desktop,

    You didn't save and attach the raw data as a text file.

    Use the "Move" button not the "Step" button.

    Never enter 0 for Velocity, Acceleration, or Jerk. Its impossible to move without some of each. That like saying drive your car but you are not allowed to move at any speed (Velocity), you are never allowed to depress the gas pedal (Acceleration), or you are never allowed to change the gas pedal's position (Jerk).

    there is some info on voliciry integerator mode may need tach input. this just leaves me confused on the wiring.
    It doesn't look like there are tachometers and the tachometer input seems to be wired to GND. So the amplifier will probably be operating in torque mode regardless.


    is there somewhere to hook up and enable the z wires?
    I wouldn't be concerned with Z signals for now. (I assume those are encoder index pulses).

    Regards
    TK http://dynomotion.com


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

    Default Re: servo madness

    servo madness-1kflop1-jpg


    I am having issues with computers and cameras , keyboards etc. This is a image to get an idea of whats happening.
    tomorrow I will read some more on the kanalog help and get a better imageing system so I can post better quality



  7. #7
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    Downloads
    0
    Uploads
    0

    Default Re: servo madness

    Hi jensenjim,

    Please don't take photos of the screen with cameras. Instead capture the window by:

    #1 select the window of interest
    #2 hold down the ALT key
    #3 push the Print Screen Key
    #4 open Paint.exe
    #5 click Paste
    #6 click Crop
    #7 File | SaveAs
    #8 Image.png

    I think you have classic positive feedback runaway. See here.

    HTH

    Regards
    TK http://dynomotion.com


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

    Default Re: servo madness

    servo madness-2-pngservo madness-1-jpg

    ok I tried - gain is this moving in the right direction


    servo madness-3-png

    Last edited by jensenjim; 02-12-2019 at 11:31 AM.


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

    Default Re: servo madness

    Hi jensenjim,

    Yes, congratulations, that looks to be now working like a servo!

    It would be helpful if you put more effort into your responses so we could tell what parts of the process you are understanding.

    Can you see that your amplifier is operating in Torque mode because the Output (green) corresponds to acceleration (curvature) in the Position (red) plot?

    Torque servos require some Derivative Gain to be stable. Please read this wiki article and add some D Gain.

    Regards
    TK http://dynomotion.com


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

    Default Re: servo madness

    ok , my caution is to expose my ignorance. I am a motor head with half a brain but I get there. My head has been swimming reading both the dynomotion help, the amc servo driver info I have and forums.
    so what you are saying is the green line powers up the move then powers down. Part of my problem is the intial settings on the servo driver, i think that is settling down, for a while i encountered growling and bucking from the servo
    so I will read more and put some D gain, so glad you didn't instruct me again on screen capture. My computer setup is a mixed bag of crap, some military throw away with a mac keyboard. my intent is to determine if I can use this servo setup befor I
    throw any more dollars at it. I thought building the table was hard but this is extreme brain torsion. I love this sruff but it can be frustrating, crazy hours spent learning, guess its better than css and php

    d gain max

    servo madness-4-jpg



    is it a goal to smooth out the red line?

    reading wiki (Make sure when testing the size of move is long enough for full acceleration and velocity are achieved. A common mistake is to have Acceleration or Velocity Settings set to too high for your system but when testing a short move there is no indication of a problem. The plot mode of Velocity Output vs Time can be helpful to verify full Velocity is being achieved.

    The idea is that a motor axis has torque and speed limitations and you should determine and understand what they both are for your system. Available motor torque drops off with higher speed. At some speed the motor will not even be able to generate any torque at all. Motor torque is required to accelerate the axis. We need to make sure that no combination of velocity and acceleration will ever cause the axis to fault/stall/fail. So there is often a complex set of speeds and accelerations that will work ok that form an envelope of workable speed and acceleration)
    I conclude I need to have the servos under the operating load to get the tune right

    am I ok to proceed with this or is more tuning needed befor that

    Last edited by jensenjim; 02-12-2019 at 06:02 PM.


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

    Default Re: servo madness

    Hi jensenjim,

    Sorry for the delay. I don't get notified if you edit posts only if you make a new post.

    d gain max
    I don't understand what you mean by this. The image shows the D Gain still at zero. I don't see any change from previous plot. Did you change anything?

    is it a goal to smooth out the red line?
    Basically yes. The red line should follow the blue line perfectly. On a well tuned system you can not typically see any difference on this plot type and scale. You would need to zoom in (left mouse click drag), or change the plot type to plot error (which is the difference between the red and blue lines). That is why I asked you to save and post the raw data so w can re-plot it ourselves. But at this point it isn't necessary to see the error.

    I conclude I need to have the servos under the operating load to get the tune right
    Not really no. If it is already performing this poorly without load it will likely be worse under loads.

    am I ok to proceed with this or is more tuning needed befor that
    The system is still poorly tuned with no D Gain or Filters.

    HTH

    Regards
    TK http://dynomotion.com


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

    Default Re: servo madness

    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



  13. #13
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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.



  14. #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.


  15. #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



  16. #16
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4045
    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


  17. #17
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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.



  18. #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



  19. #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



  20. #20
    Member
    Join Date
    Feb 2008
    Location
    USA
    Posts
    644
    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?



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

servo madness

servo madness