Need Help! KFlop to step/dir spindle


Results 1 to 16 of 16

Thread: KFlop to step/dir spindle

  1. #1
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default KFlop to step/dir spindle

    So, after 2 years of having a kflop and konnect setting on the shelf I finally installed the thing this week. Got XYZ working but I am not sure what to do on the spindle. I am using a 3.5kw mitsubishi servo which is set up for step/dir inputs. Currently 750 pulses per rev at a max of 5000 rpm. I also plan on using the encoder output from the drive to feed back for rigid tap later on, I still have to run the encoder wiring. Servo is connected to channel 3.

    so, how do I set this up?

    Similar Threads:


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

    Default Re: KFlop to step/dir spindle

    Hi macona,

    First configure an unused KFLOP axis as Step/Dir and verify you can Jog that axis at wherever speed and direction you wish.

    I assume you are running KMotionCNC?

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    The spindle is on Channel 3 and I set up Velocity and Acceleration and tested it through the KMotion app and it does respond. I am just not sure where to go from here. I am initially setting up with KMotionCNC but want to move back to Mach3 with he plugin because of my pendant which talks to mach3 by modbus.

    Last edited by macona; 01-11-2017 at 09:43 PM.


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

    Default Re: KFlop to step/dir spindle

    Hi macona,

    For KMotionCNC you can configure the Examples in SpindleUsingJogs\CSS (OnCWJog.c, OnCCWJog.c OffJog.c, and SpindleJog.c) for M3,M4,M5,S Actions respectively in KMotionCNC Tool Setup. Modify SpindleUsingJogs\CSS\MySpindleDefs.h as appropriate for your system.

    You might also read this:
    KMotionCNC Spindle Control

    Regards

    Regards
    TK http://dynomotion.com


  5. #5
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    Thanks, I will give that a try.



  6. #6
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    OK, it spins. but in the same direction for M3 and M4. What do i need to change to activate the dir bit?



  7. #7
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    So I tried manually doing a SetBit and ClearBit on 15 where the dir line to the servo connects and it does not change state, is this because it is tied to the step generator? Do I have to use an output from one the outs on the Konnect to reverse it?



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

    Default Re: KFlop to step/dir spindle

    Hi macona,

    Did you define USE_POS_NEG_VOLTAGE as 1 ?

    Regards

    Regards
    TK http://dynomotion.com


  9. #9
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    I did try that and it did not make a difference.



  10. #10
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    Ok, I tried it again and it does work now. I must not have reinitialized when I edited it before.

    While I have you here... So I use bit 63 to turn on the main contactors for all the servos and main power. I can turn that on easy on init but how do I turn it off again after I quit the program? Is there anything that will allow me to turn a bit off on exit?



  11. #11
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    Quote Originally Posted by macona View Post
    Ok, I tried it again and it does work now. I must not have reinitialized when I edited it before.

    While I have you here... So I use bit 63 to turn on the main contactors for all the servos and main power. I can turn that on easy on init but how do I turn it off again after I quit the program? Is there anything that will allow me to turn a bit off on exit?
    Set an action for Prog Exit to turn the bit off, however if KMotionCNC fails to exit cleanly i.e. the computer crashes for some reason, the bit won't be cleared.



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

    Default Re: KFlop to step/dir spindle

    Hi macona,

    There is a "Prog Exit" Action that you might configure in KMotionCNC Tool Setup.


    Another option is that KFLOP keeps a count of each time any application polls main status. So it is possible to monitor that count and if no status requests are made for several seconds then it can be assumed that no PC Apps are running. The advantage would be it would work regardless of how the PC App quits (Loss of Power, Killed with task Manager, crashes, etc) The count is:

    extern int StatusRequestCounter; // increments each time host requests status


    Regards
    TK

    Regards
    TK http://dynomotion.com


  13. #13
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    I like option 2. Thanks



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

    Default Re: KFlop to step/dir spindle

    Hi macona,

    You might look at the example:
    \C Programs\FlashNonVolatile\FlashAxisDestinations.c

    Which does something similar. It detects no host requests for 10 seconds, then no axis movement, then Flashes Destinations. You could copy the code that detects no host requests then simply clear your bit.

    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    158
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    Got it, it works. It shuts the machine down 10 seconds after I leave either Mach3 or KMotionCNC.

    So, I am trying to get Mach3 configured. All the axis are moving, estop works, coolant works. But back to no-go on the spindle. I tried both the SpindleMach3Jog programs setting the axis and factor like the CSS programs that worked for me before. It just does not budge. Watching the direction bit in the digital IO it does not change for a M3 or M4. Any ideas where to start with this?



  16. #16
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    Downloads
    0
    Uploads
    0

    Default Re: KFlop to step/dir spindle

    You'll need to do a little bit diagnostic work, by using printf statements to check the correct C programs are being called, and to check where the required values are going.
    I can remember having a couple issues getting my lathe spindle to work via Mach, but I can't remember what they were.



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 to step/dir spindle

KFlop to step/dir spindle