Spindle set up and tapping


Results 1 to 18 of 18

Thread: Spindle set up and tapping

  1. #1
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Spindle set up and tapping

    Hi Tom
    It's been a while since I have posted anything. I finally got around to a mill retrofit using k-flop and kanalog. The machine is using all the original parts. I have successfully gotten the servos, coolant, axis lube, etc... going. The homing to limits and index and all my io are working with the exception of the tool changer which will come later. I have run into a few issues now.

    Kmotion 434 final version is being used. When I use the tool setup screen or flip between the kmotion.exe and kmotion cnc several of the buttons and features I setup for my custom screen will disappear causing me to need to reload the screen. Is there anything you can think of that would cause this problem.

    I setup the spindle the simple way by turning on bits and outputting to a day. This works ok but I need more functionality. I am going to try again using the c programs in the css folder. The big issue I have to start is my spindle has a low speed winding pin that needs to be turned on from 0-1200rpm and turned off for the rest of the 1200-8000rpm range. I have the bit 155 working manually with no issue. Can you suggest a way to have it come on below 1200 and go off above that in the spindle jog program?

    I am not sure what to do exactly with setting up a axis channel to output to a dac. Does this channel get put in my init program and does it get added to the coordinated motion axis?

    Last for now I have the threading section on the tool setup screen set to read my spindle encoder for rpm feedback. It does read the rpm but above about 110rpm the readout disappears. The encoder is 4096 CPR. Do you know what I may be doing wrong?

    Any help is appreciated and I will try to get some videos once I work out my remaining issues. Tapping will be next.


    Thank you
    Ben

    Sent from my E6910 using Tapatalk

    Similar Threads:


  2. #2
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I have successfully gotten the spindle css programs to work. I am still not sure if I need to add the channel to my init program? I do know if I don't enable the spindle axis it does not work until I do. I am still hoping to get some advice on how to turn on the chw pin during a specific rpm range and clear it at the proper time? I have also run into no longer being able to read the encoder because if I add it to the axis the dac is on the spindle does not work correctly. What I really need is to be able to run the spindle semi closed loop. I would like to be able to use the encoder to drive the dac voltage to make the rpm of the spindle match the commanded rpm but not drive the axis like a servo if that makes any sense.

    Thank you
    Ben

    Sent from my E6910 using Tapatalk



  3. #3
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I think for the chw bit I need to add a few lines in the spindle jog program that state

    If speedvar is less than or = 1200 then set bit () else clear bit ().

    I have no idea how that would be written in c but I will keep trying until I get a solution that works or someone else presents a better idea.

    Thank you
    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    Sorry somehow I missed this Thread.

    What I really need is to be able to run the spindle semi closed loop. I would like to be able to use the encoder to drive the dac voltage to make the rpm of the spindle match the commanded rpm but not drive the axis like a servo if that makes any sense.
    I'm not sure why you don't want to operate the Spindle like a Servo. That would make things simpler and more accurate and facilitate tapping.

    Yes you should add any Spindle Configuration and possibly Enable to your Init C Program.

    The commanded Speed can be obtained with ch->last_vel. So you might code this in a forever loop:

    SetStateBit(155, fast_fabs(ch0->last_vel) > 1200.0 * (4096.0 / 60.0));

    Regards
    TK http://dynomotion.com


  5. #5
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    Thank you for the reply Tom. I am not against setting it up like a servo if that will make things easier. Is there a example of how that's done? I set things up according to the last example on the spindle setup page so the factor is 1/8000. When I added the encoder and hit move the spindle turned forward and reverse like a normal move but kept going back and forth continuously until I hit disable. Not sure what caused that reaction or how to fix it. If I set it up like a servo would I still use the same c programs for me,ccw,off,jog and tap?

    Thank you
    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    H Ben,

    I am not against setting it up like a servo if that will make things easier. Is there a example of how that's done?
    Same as a Servo. Except gains might be low and response much slower. Test with Step Response Screen.

    Remove the Feed Forward and try only small P Gain.



    When I added the encoder and hit move the spindle turned forward and reverse like a normal move but kept going back and forth continuously until I hit disable. Not sure what caused that reaction or how to fix it.
    Reduce gains until stable.

    Regards
    TK http://dynomotion.com


  7. #7
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I have been experimenting with the spindle tuning. I have had I believe decent results. I had to treat it similar to my servo drive tuning to stay stable. That required low pid gains and feed forward to get me stable and good results. The problem with the spindle is any i gain at all caused instability. I ended up with p=.0015 I=0 d=.015 vff=.004 and aff=.0004. l am wondering if I can have 2 axis channels setup for the spindle. 3 and 4. I would use 3 for tuning to the 8000 rpm max to get good stability for cutting. I would then use 4 to tune to 2000 rpm and use it for tapping. I would be able to tune the spindle for more stiffness at lower rpm for tapping. Do you see any issues this may cause?

    I fixed the issue with seeing the correct rpm display in kmotion cnc. I had changed the font and I believe maybe that caused a problem with the refresh rate of the display. Changing it back fixed it.

    Thank you
    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    The problem with the spindle is any i gain at all caused instability.
    There should always be some stable value if you make it small enough.

    Your gains all seem very small. Maybe you have a large factor somewhere? Please post all your settings Config, Step Response, and IIR Filters. Also post a plot of movement.

    I would tune without Feed Forward first.

    Its not clear why you would need two types of tuning. If you have stiffness at low rpm it should still work at high rpm.


    I fixed the issue with seeing the correct rpm display in kmotion cnc. I had changed the font and I believe maybe that caused a problem with the refresh rate of the display. Changing it back fixed it.
    Maybe the Control just needed to be made bigger? It could be when the number became more digits it no longer fit.

    Regards
    TK http://dynomotion.com


  9. #9
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I think I have gotten almost everything ready to go. I am now trying tapping. I configured m119 for exec/wait/sync using variable 50. When I run the tapping program from the wiki the spindle starts at the commanded speed then drops to almost 0. My spindle floats slowly when the on bit is set but the dac is 0. The z keeps following even at the slow float. Does the fact that my spindle uses only one bit for on and reverses using a negative voltage possibly cause some of my issues. It appears the code wants a ccw bit to reverse but I don't know if that matters. I'm sorry but this is hard to explain so if there is something I'm not saying please let me know.

    Thank you
    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    I think your Spindle can be Jogged and Moved like a Servo Axis, so just trying to switch direction bits wont work for you.

    Attached is a program that uses Moves to drive the Spindle. Here is a related discussion.

    HTH

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  11. #11
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I have tried the program and it partially works. The spindle doesn't turn on unless I use m3 to turn on the spindle enable bit. I think this may be why the spindle goes forward but never reverses. The same bit is used for m3 and m4. I can command a instant spindle reversal by just typing m4 in the mdi screen while the spindle is running.

    Thank you
    Bem

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    That program assumes the Spindle axis is configured, enabled, and can be commanded to move in either direction like a servo axis.

    Please post your m3, m4, m5, S spindle programs.

    Regards
    TK http://dynomotion.com


  13. #13
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I hope these will tell you what you need to know.

    Thanks again
    BenOnCWJog.TXTMySpindleDefs.TXTSpindleJog.TXTOnCCWJog.TXTOffJog.TXT

    Sent from my E6910 using Tapatalk



  14. #14
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    I forget to mention I also have a orient bit that will lock the spindle in place while active.

    Ben

    Sent from my E6910 using Tapatalk



  15. #15
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    When you say configured and enabled do I also need to add axis 3 to the coordinated motion axis. (0,1,2,3)?

    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    I would try removing all SetBit/ClearBits from all the Spindle programs. Set the enable bit in your Initialization program when you enable the Spindle Axis. This will leave the Spindle always enabled and ready to move.

    No don't put the Spindle in the coordinated motion system.

    Regards
    TK http://dynomotion.com


  17. #17
    Member
    Join Date
    Jun 2013
    Location
    USA
    Posts
    1011
    Downloads
    0
    Uploads
    0

    Default Re: Spindle set up and tapping

    If I do not use the enable bit the spindle floats slowly when not being commanded. I don't think that would be good. The enable bit was also used in the previous system to turn the spindle on and off. +And- 10v do control speed and direction but the enable bit is listed as being needed in the manual. Orient is controlled by the vfd and holds stiff but is done by turning on a bit and the vfd does the rest. I did tune the spindle with the step response screen but it would not stop spinning slowly after a move unless I turned off the enable bit.

    Ben

    Sent from my E6910 using Tapatalk



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

    Default Re: Spindle set up and tapping

    Hi Ben,

    If I do not use the enable bit the spindle floats slowly when not being commanded.
    That shouldn't be the case as I believe you have a closed loop servo. If it starts to drift the servo should make a correction to drive it back or at a minimum stop it. So you might go back and re-test that. Use the Step Response Screen with Move Size set to zero to observe any drift and to see why it isn't being stopped.

    Otherwise if you still want to disable/enable the Spindle Drive then you will need to re-enable the Spindle Drive at the beginning of the Rigid Tap Program.

    Note that it usually isn't a good idea to disable the Spindle Drive and leave the KFLOP Axis Enabled. The Axis may try harder and harder to correct any error without any results because the Amplifier is disabled. If the Amplifier is enabled there may be a violent response. So before enabling the amplifier the axis should be disabled, current position measured, then re-enabled setting the destination to the current position, then enabling the amplifier.

    Let us know how much of this makes sense.

    Regards
    TK http://dynomotion.com


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

Spindle set up and tapping

Spindle set up and tapping

Spindle set up and tapping