Adding a 4th axis and have a few questions... - Page 2


Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 49

Thread: Adding a 4th axis and have a few questions...

  1. #21
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    m_c, sounds like a great setup. Ill let you know if i need one. Thanks for the offer again.

    Made some progress tonight. Got it wired up with analog control and got it moving in Kmotion! Started off in speed mode and couldnt get any good results at all. Tried switching to torque mode and things got better. Starting getting better results but had to use very high D numbers. Not sure if this is ok or not. At first glance the graphs look good, but error is still very high, over 1000 counts. Servo is 8192 counts per turn so this is not that great. Considering its a rotary axis with 180:1 reduction it might actually be usable as it is but Id like to try and do better. I tried adding I gain but it didnt help error at all before going unstable. Tried less P and more I, but no improvement.

    Here are my results. What filters should i be using? I added a 500hz low pass simply because my other axes have it. Any suggestions?

    Attached Thumbnails Attached Thumbnails Adding a 4th axis and have a few questions...-move-jpg   Adding a 4th axis and have a few questions...-moveerror-jpg   Adding a 4th axis and have a few questions...-rapid-jpg   Adding a 4th axis and have a few questions...-rapiderror-jpg  



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray,

    Looks like a good start.

    You might try adding Velocity Feed Forward to compensate for drag caused by the high D gain. Start at D x 90us = 40 x 90us = 0.0036

    I would have thought I Gain would have helped also. But you have it limited to Max 200 DAC counts. That would prevent it from doing much.

    2nd order Low pass filter at 500Hz and Q=1.4 is probably helpful.

    I'm guessing the oscillation might be due to some once per rev friction, wobble, unbalance of something such as the worm screw? You might try different speeds and see if it follows a period of time or distance.

    3662RPM is pretty high. Would you be cutting while moving? If so what speed?

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  3. #23
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Spent some more time tuning today and have it working very nice now. I played around with the PID numbers a little more and also tried second order low pass filter without much improvement. And out of curiosity I tried using a pole zero filter like my other axes use. I dont really know what numbers are best so i just copied my other axes exactly, used 45 and 180 hz. This seems to work much better. Im down to around 50 counts of error now and not much more even on rapid at over 5000 rpm. I rounded off encoder count output to 8000 counts/rev so this is like 0.01 of a degree which is awesome! I also doubled max integrator, and the I gain did help in this configuration with the pole zero filter.

    I think the oscillation i had before was as least partly due to tuning since you could see the oscillating error fading while at constant speed in the 4th pic from last night, and also fading in reverse direction. But your right, I do have some once per turn friction. I adjusted the gear mesh tighter when i bought this and the worm shaft does go a shade tighter once per turn, which is actually once per 2 servo turns (gear driven). If you look at the slower move from today, the servo makes 31 revoloutions, which is 15.5 worm gear rotations, and thats approximately how many oscillating cycles are in each move so Id say your exactly right again Tom.

    I might not need to go quite that fast. Honestly, 90% of the time this wont be doing any cutting at all. Will just be indexing and then clamped with brake. But occasionally it will be used for cutting as jobs come up that require it. And when you do cut with a 4th axis the servo speed does tend to go through the roof. If I were trying to cut 100 IPM for example on top of a piece of 2" stock that would be 15.9 RPM or 2866 RPM at the servo in my case. Occasionally at my old shop we would do 4 axis surfacing and rotary axis speed was the limiting factor.

    So everything look good here? Not missing anything am I? Also take a look at the step move, seems to settle out pretty quick. Im guessing this should be stable enough right?

    Attached Thumbnails Attached Thumbnails Adding a 4th axis and have a few questions...-rapid3-jpg   Adding a 4th axis and have a few questions...-rapid2-jpg   Adding a 4th axis and have a few questions...-filters-jpg   Adding a 4th axis and have a few questions...-step-jpg  

    Adding a 4th axis and have a few questions...-move2-jpg  


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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    That looks reasonable to me. Except the Integrator limit might be still set low at 400 DAC counts when sometimes 1200 DAC counts is required to do the motion.

    I normally use a 2nd order low pass filter with Q=1.4

    Nice. Waiting for the Video

    Regards

    Regards
    TK http://dynomotion.com


  5. #25
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi Tom, I switched to 2nd order low pass and doubled I gain and I max limit and got maybe 25% less error. I tried even higher gain and limit but was getting more oscillation when doing a step movement and got nervous. Decided this was a good balance. I think the tuning is plenty accurate for my needs now.

    Got some good news and bad news about the brake solenoid and switches. The solenoid works great with Konnect controlling it without any extra relays. This 4th axis has two pressure switches to confirm brake is fully on or fully off, and also a home switch. I fed all the switches 5v and then sent the other ends into konnect inputs. All the inputs work when on, but when off they are floating on and off. I guess they are picking up voltage from being inside the same conduit as the servo power wires. What should I do here? Can I use resistors to ground to hold them low until they are switched high? If so what resistance should i use?

    Ill post a video of it making a part when i get it all done



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

    Default Re: Adding a 4th axis and have a few questions...

    I fed all the switches 5v and then sent the other ends into konnect inputs. All the inputs work when on, but when off they are floating on and off. I guess they are picking up voltage from being inside the same conduit as the servo power wires. What should I do here? Can I use resistors to ground to hold them low until they are switched high? If so what resistance should i use?
    I'm surprised there is enough noise to turn on the Konnect Optos. But the input impedance is pretty high at 4K ohms. Resistors in parallel with the optos should help. A 220 Ohm resistor should attenuate the noise by a factor of more than 20X and at 5V would draw:

    I = V/R = 5/220 = 23ma

    I assume this should be no problem for your switches. The resistor would dissipate power of:

    P = V x I = 5V x 23ma = 114mw (1/8th Watt resistor should work).

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  7. #27
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Tom the conduit is like 25 feet long and wires are not shielded so not a good situation for noise. I found some 300 ohm resistors and added them in and its working great. My home signal isnt working but i can troubleshoot that later, probably something simple.

    So im back to the issue now of clamping again like we were discussing in the beginning of this thread. My motor doesnt seem to drift at all with axis disabled. So im wondering if Ill be ok to just limit the DAC output when clamped. So I could use a code something like this:

    To clamp:

    ch3->MaxOutput=1; // disable 4th axis output
    SetBit(53); // Turn on brake
    while (!ReadBit(1052)) WaitNextTimeSlice(); // wait for conformation signal

    To unclamp:

    ClearBit(53); // Turn off brake
    while (!ReadBit(1053)) WaitNextTimeSlice(); // wait for conformation signal
    ch3->MaxOutput=2000; // enable 4th axis output

    Can i get by with something as easy as this or does the axis or drive or both really need to be disabled? Ill set it up with M codes for now and maybe try and get it to detect motion automatically in the future when i get more time.



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    I don't know if you are lucky something simple may work. The risk is that either the servo and brake overlap in time and they fight, or they don't overlap and there is some drift in the meantime.

    I think you would be better off disabling and enabling the axis rather than playing with the MaxOutput. Setting the MaxOutput to 0 or 1 would force the DAC to zero, but with it being enabled the desired output might go to a large value so that as soon the MaxOutput is set to a large value the output instantly goes to the large value and the axis jumps.

    Here are some thoughts:

    While clamping you might set the I Gain to zero. This should basically freeze the Output at whatever offset is required to hold still. And any small induced error shouldn't cause the Output to ramp to a large value.

    Because the Brake takes some time to engage, after turning on the brake you might delay some fixed time or wait for the confirmation signal before disabling the axis. My guess would be that it might take 50ms for the brake to engage.

    I think unclamping might be simpler and less critical. I would think it would be ok to unclamp, possibly drift, then enable/resync to wherever the axis is, then move to wherever you need to go from there.

    You might write a C Program to record the Destination + Position while clamping and unclamping to observe any issues.

    HTH,
    Regards

    Regards
    TK http://dynomotion.com


  9. #29
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    I decided to try the simple code above, but also set I gain to zero as you recommended. I set it up as M codes and it works perfectly! Ran a little test program with an X move and back, unclamp, A axis move and back, clamp and repeat and it ran great! I monitored torque output with the DMM software and its at like +-1% when clamped.

    I just spent the last couple hours trying to get it to unclamp automatically from my forever loop but not much luck. Any suggestion how I might detect the start of an A axis move and then stop it right away, before it really gets anywhere? I tried using checkdone(3) and also lastfollowingerror to detect movement then did a stopcoordinatedmotion but it seems to get too far ahead of itself before stopping to get it to work well. I did get it work a little but its not very smooth. Jumps and sometimes gives following limit error.



  10. #30
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Forget about trying to unclamp it automatically. I have my post setup now to add in the M codes and its working really well.

    I did notice one little issue in Kmotioncnc, seems like if the position is very high, like over 4000 degrees it wont allow you to zero the axis sometimes. And occasionally when zeroing, it jumped to another large number instead of going to zero. Anybody else every notice this? Any idea what could cause it Tom?



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    What exactly do you mean by: "zero the axis" ?

    I haven't heard of any such issue.

    Regards

    Regards
    TK http://dynomotion.com


  12. #32
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Im talking about the the zero button next to the DRO in kmotioncnc. When you push it sometimes it will not set the dro to 0.000



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    Are your DROs displaying encoder position or commanded positions? What color are the DROs?

    Regards

    Regards
    TK http://dynomotion.com


  14. #34
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Dros display commanded position, they are green. I figured out exactly what conditions cause it. If the axis position is greater than 2147 degrees it does not save the right value in the fixture table to zero the DRO.

    For example, if I move to G53 A1800 and hit zero it works perfectly and sets the right fixture offset to zero the DRO.

    If I move to G53 A2200 or greater it stores an offset of -2147 for some reason. Making my DRO read 4347.

    If i move even higher like G53 A4000 it still sets -2147 in the fixture offset which is not right. If i move back inside 2147 it works properly again.

    Hopefully its an easy fix. No hurry as I can use everything as it is anyway. Also its the same problem in the negative direction.

    Attached Thumbnails Attached Thumbnails Adding a 4th axis and have a few questions...-error-jpg  


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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    Thanks for figuring that out. You are correct it is a bug having to do with rounding large value offsets to 6 decimals causing an integer overflow.

    Here is a patch compatible with V4.34k that should fix that issue:
    http://dynomotion.com/Software/Patch...KMotionCNC.exe

    Please let us know if it works for you when you get a chance.

    Regards

    Regards
    TK http://dynomotion.com


  16. #36
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi Tom, I tried the new patch and it works great now. Thanks again!

    I had a hard time downloading 4.34K. Its not on the download page. I copied an old link and changed the letter to K and it worked.



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    Thanks for posting back. Sorry about that, We should have included a link. Version 4.34k introduced a bug with the screen editor when buttons invoke actions so we are reluctant to advertise it for general use. There is a patch if it effects you:
    http://dynomotion.com/Software/Patch...nterpreter.dll

    Regards

    Regards
    TK http://dynomotion.com


  18. #38
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Tom, i noticed another issue with 4.34k. When i press F9 to start spindle it does not start? Seems to be executing my init file instead for some reason? Any ideas?



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

    Default Re: Adding a 4th axis and have a few questions...

    Hi mmurray70,

    I suspect the Hot Key for your Init User button is probably configured as F9 (Keycode 120). Our bad for configuring that as a default example. Change User Button Hotkey to -1 or some other Hotkey to restore F9 for the Spindle On. See:
    Tool Setup Screen User Buttons


    Adding a 4th axis and have a few questions...-customactions-jpg

    Regards

    Regards
    TK http://dynomotion.com


  20. #40
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    537
    Downloads
    0
    Uploads
    0

    Default Re: Adding a 4th axis and have a few questions...

    Hi Tom,

    I just checked and hotkey is already set to -1. Any other ideas?.



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

Adding a 4th axis and have a few questions...

Adding a 4th axis and have a few questions...