Need Help! KFlop/Kanalog Spindle Control Troubleshooting


Results 1 to 9 of 9

Thread: KFlop/Kanalog Spindle Control Troubleshooting

  1. #1
    Member EvanR's Avatar
    Join Date
    Sep 2020
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default KFlop/Kanalog Spindle Control Troubleshooting

    Hi There,

    am having some issues with controlling my spindle. I have a 3 axis (servo) knee mill with a VFD on the spindle. After getting the mill running properly and making parts I decided to figure out how to get rigid tapping working. My spindle works fine when it is set up via bit control for CW, CCW, and OFF with an DAC conversion (on the S command) for speed control. So I read multiple threads on this forum (and dynomotion's forum) and came to the conclusion that I would follow Tom's advice to set it up like a servo since I now have an encoder on it. Now I cant get my spindle to run at all. It works fine using the step response tool and the I can jog CW and CCW using + and - jog values on the console utility. I am guessing I have something incorrectly set up in my C programs for jog and spindle control. I don't seem to be passing a speed value from my "S" command in the g-code to the Speed variable in my C program. I will post my programs below, and any help would be greatly appreciated!! Thanks!!

    Similar Threads:
    Attached Thumbnails Attached Thumbnails KFlop/Kanalog Spindle Control Troubleshooting-spindle-setup-snapshot-jpg  
    Attached Files Attached Files


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

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hi Evan,

    I think the S VAR should be set to 113. You might set the M3,M4, M5 VARs to -1 as no data is passed for those.

    HTH

    Regards
    TK http://dynomotion.com


  3. #3
    Member EvanR's Avatar
    Join Date
    Sep 2020
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hey Tom, That did the trick, thank you. Would you be willing to explain the purpose of the VAR entry on the tool setup screen? And why it is needed in this application? I think I understand WHAT is happening, but not WHY we need to define it on the tool setup screen. Correct me if I'm wrong, when the g-code runs an "S" command, the g-code compiler is passing its value to VAR 113 (as pictured below) then runs the program in whatever manor you have selected (i.e. Exec, Exec/Wait, Exec/Wait/Sync, Ect...) What I don't fully understand is why we cant do that in the .c program. Similar to the M3 and M4 commands where we are not passing any data. I just want to fully understand what is happening here because I am doing Kflop retrofits in another mill, a lathe, and an EDM machine in the very near future and i will be using more .c programming on those. Thanks for your time Tom.

    -Evan

    Attached Thumbnails Attached Thumbnails KFlop/Kanalog Spindle Control Troubleshooting-tool-setup-jpg  


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

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hi Evan,

    The diagram of the KMotion Architecture below may help. The GCode and the GCode Interpreter run on the PC. C Programs run in KFLOP. So for example C Programs don't have direct access to the GCode S word. So the GCode interpreter "puts" the S value into a KFLOP persist variable before executing the C Program. The GCode Interpreter and the C Program must be in sync so any data is placed into the variables that the C Program expects to find the data. M3,M4,M5 don't need any data. Each program inherently knows what it is supposed to do.



    HTH

    Regards
    TK http://dynomotion.com


  5. #5
    Member EvanR's Avatar
    Join Date
    Sep 2020
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hey Tom,

    Shortly after I posted my last reply, I tore the spindle drive system apart and changed from an AC induction motor with a VFD over to an Allen Bradley AC servo driven system. The only issue is, the spindle only runs in 1 direction. The CW and CCW buttons both spin my motor in a CW direction. I am using the same programs I posted in the start of this thread, I just made the changes you recommended (S VAR is set to 113, and M3,M4, M5 VAR is -1). Thinking back on it, I am not positive I ever had my direction control working properly because my original problem was that I couldn't get my spindle to run at all. Once that was solved, I decided to make the change because I had terrible loop control with the original setup. Would you be willing to take a quick look at my .c programs to verify they are correct and i am not missing something? They are all posted at the top of this thread and the tool setup screen is identical to what's pictured above. Thanks for your time!



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

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hi Enan,

    Well you need to know what needs to be done to your Spindle Drive to reverse the direction.

    You might try changing

    #define USE_POS_NEG_VOLTAGE

    In MySpindleDefs.h

    Regards
    TK http://dynomotion.com


  7. #7
    Member EvanR's Avatar
    Join Date
    Sep 2020
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hi Tom,

    Thanks for the quick response. The only thing that needs to be done to reverse the direction is apply negative voltage. I just did a step response and it rotates the appropriate # of counts, then rotates back without issue. I did notice that no matter what button I push (CW or CCW) the analog channel is outputting a positive voltage (negative count value).

    - - - Updated - - -

    I went back and looked at the MySpindleDefs.h, changed the USE_POS_NEG_VOLTAGE var to a 1 as you suggested and VOILA!

    Works perfectly now. Thanks Tom, I knew it was something stupid I had overlooked and you would see it immediately. Now the only thing left to tackle is the rigid tapping function and i will be ready to start the next mill's retrofit.

    Have a good Holiday!



  8. #8
    Member EvanR's Avatar
    Join Date
    Sep 2020
    Posts
    16
    Downloads
    0
    Uploads
    0

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hey Tom,

    I am having a weird issue now that I have the spindle set up like a servo. After running in either direction, the spindle is commanded to stop. Then is slows at the specified decel rate until stopped, but once it is stopped, it starts rotating in the opposite direction for a few seconds before coming to a stop for good. Have you ever heard of this issue? Any suggestions on how to correct it?


    Thanks.

    -Evan



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

    Default Re: KFlop/Kanalog Spindle Control Troubleshooting

    Hi Evan,

    If the KFLOP Acceleration/Deceleration is set to a rate faster than what the Spindle is capable of then the Spindle will overshoot and then the servo will reverse the Spindle back to where it was supposed to have stopped. How do you know the Spindle is actually stopping at the specified rate? You might be able to observe what is going on in the Step Response Screen if the Spindle is able to start and stop within the 3.5sec max capture period. Otherwise maybe you can just observe the Destination and Position on the Axis Screen.

    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

KFlop/Kanalog Spindle Control Troubleshooting

KFlop/Kanalog Spindle Control Troubleshooting

KFlop/Kanalog Spindle Control Troubleshooting