587,129 active members*
3,037 visitors online*
Register for free
Login
Results 1 to 15 of 15
  1. #1
    Join Date
    Apr 2006
    Posts
    158

    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?

  2. #2
    Join Date
    May 2006
    Posts
    4047

    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
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Apr 2006
    Posts
    158

    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.

  4. #4
    Join Date
    May 2006
    Posts
    4047

    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
    TK
    http://dynomotion.com

  5. #5
    Join Date
    Apr 2006
    Posts
    158

    Re: KFlop to step/dir spindle

    Thanks, I will give that a try.

  6. #6
    Join Date
    Apr 2006
    Posts
    158

    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
    Join Date
    Apr 2006
    Posts
    158

    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
    Join Date
    May 2006
    Posts
    4047

    Re: KFlop to step/dir spindle

    Hi macona,

    Did you define USE_POS_NEG_VOLTAGE as 1 ?

    Regards
    TK
    http://dynomotion.com

  9. #9
    Join Date
    Apr 2006
    Posts
    158

    Re: KFlop to step/dir spindle

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

  10. #10
    Join Date
    Apr 2006
    Posts
    158

    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
    Join Date
    Jun 2004
    Posts
    355

    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
    Join Date
    May 2006
    Posts
    4047

    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
    TK
    http://dynomotion.com

  13. #13
    Join Date
    Apr 2006
    Posts
    158

    Re: KFlop to step/dir spindle

    I like option 2. Thanks

  14. #14
    Join Date
    May 2006
    Posts
    4047

    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
    TK
    http://dynomotion.com

  15. #15
    Join Date
    Apr 2006
    Posts
    158

    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?

Similar Threads

  1. Spindle Interference on Kanalog DAC ground causing Kflop Step issues?
    By slimneill in forum Dynomotion/Kflop/Kanalog
    Replies: 8
    Last Post: 01-06-2016, 01:41 AM
  2. KFlop how to configure spindle as Step and Dir No output for DIR
    By vetsen in forum Dynomotion/Kflop/Kanalog
    Replies: 6
    Last Post: 10-08-2015, 07:08 PM
  3. Step by step guide settings Kflop (Russian language)
    By ukr_sasha in forum Dynomotion/Kflop/Kanalog
    Replies: 2
    Last Post: 04-29-2015, 05:23 PM
  4. Does Kflop have a built in Step Multiplier?
    By slimneill in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 03-04-2014, 02:41 AM
  5. Kflop Dir / Step setup time
    By BobKinsman in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 11-16-2012, 12:10 AM

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
  •