KFLOP SETUP, CHANNELS AND PINS


Page 1 of 3 123 LastLast
Results 1 to 12 of 32

Thread: KFLOP SETUP, CHANNELS AND PINS

  1. #1
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default KFLOP SETUP, CHANNELS AND PINS

    So I've almost built my whole machine, and now I'm trying to wrap my head around how to get Mach3 to my Kflop Board, to control by servos, setup and Dir. I don't know C, much at all. and I'm just not seeing how to configure what motors go to what pins, and limit switches, estop...
    ect.

    I need help help setting up my motors on the software side.

    Thanks,
    Chris

    Similar Threads:


  2. #2
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    The very brief version is, you need to create an init.c file (it doesn't have to be this exact name, but for easy reference that's what it's commonly referred to), which gets loaded when you press the Init button within Mach. Within Mach, the only thing you need to configure are the steps per unit, max speed, acceleration, and the KMotion Plugin. The ports/pins for each axis can be ignored, as that is handled directly by the KMotion/KFlop plugin.

    Within in that file, you need as a very minimum the configuration for each channel you'll be using (one per motor), enable them, then using the DefineCoordSystem() function, associate those channels to the relative axis (this has to be in the order of XYZA)

    If you look in the C Program folder which contains various example files, have a look at the InitStepDir3Axis.c example file. That is the very minimum you need within your init.c file.
    It's probably worth having a watch of this slideshow to get a basic understanding of how things work together - http://dynomotion.com/Help/FlashHelp...ers/index.html

    To assist with creating the channel info, you use the config&flash screen within KMotion, along with the Step Response screen (although that may be a bit limited/not needed if you've got no encoder feedback to the KFlop).

    Where things get a bit more involved, is your init.c file will typically contain a loop for handling limit switches/E-stops, however start with the basics and expand.


    If you're not sure about anything, provide us with some details of how you've got things wired up, and we'll get you going.



  3. #3
    Gold Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    2380
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hi Chris,

    What kind of drives do you have? I assume you meant to say "Step and Direction"?

    You might read this article:
    Channels Channels Channels - Dynomotion

    Also this regarding Step and Direction:
    Step and Direction Setup

    Don't run or concern your self with Mach3 until after you have all your axes working and configured using the KMotion.exe screens.

    Limit switches can be configure din KMotion.exe to use any inputs:
    Configuration Screen

    EStop notification to Mach3 can also be connected to any input. See Step #6 here:
    Configuration Screen

    HTH
    Regards

    TK
    http://dynomotion.com


  4. #4
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Yes, I have 4 tecnics clearpath servos, they are glorified stepper motors, that have their own drivers built in. They just need enable and step/dir. I guess I'll have to learn more C to understand how to utilize my kflop.

    So my setup is Jp7, pins 7-14 are +/- limit switches, 15-22 are step and Dir for my servos, and 5+ to logic ground to enable the motors.

    I'm calling my axes A,B Z and X, this is a non conventional cnc, but I guess I can reference them xyza, and deal with it later. I just want to see something move...

    Thanks All



  5. #5
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    So I've read through the InitStepDir3Axis.c file, I just don't know enough about how everything is going together here, or the sytax.... where the heck are the actual pins called out? Bit, means Pin...Right? Sorry I'm such a FNG. I've been all over the manual and I'm still not clear.

    So the InitStepDir3Axis.c defines all 3/4 axes?
    The threads 1-7 run all at the same time?



  6. #6
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    We'll ignore limit switches for now. They can be associated to the relative axis, but we'll concentrate on getting things moving first.

    15-22 means you are using step/dir output channels 0-3. Do you know what kind of signal the servos are expecting? Open collector (i.e. something else is providing a 5V source, and the KFlop simply has to connect the pin to ground), or TTL (the Kflop needs to supply power to the input).
    If you're unsure, do you have a link to the manual?

    Do you have the enable connected to a pin?
    It may require the use of relay, depending on whether the KFlop can handle the required voltage/current.
    For setup, If you've not already got a functioning E-stop button, you may wish to connect it to a big e-stop button, just in case.

    Upto 8 axes can be configured, so you can use the correct axis naming (XYZABCUW are all possible), however that will require mach to be able to handle the correct naming.
    Are any of the axis slaved?
    Slaved axis get handled slightly differently, but I don't want to complicate things



  7. #7
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    32
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    So no slave, each axis operate independently, just 5v daisy chained from J7 to enable all 4 of the motor's onboard electronics. The clearpath servos all have a on board control features on the motors themselves, they just need the step pulse and direction, 3-5v from the controller.

    https://www.teknic.com/products/clea.../clearpath-sd/

    I see the place to call out the pins for the limit switches on the channel setup, I just don't understand how the threads, code, and the programs are organized.



  8. #8
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by toolbag33 View Post
    So I've read through the InitStepDir3Axis.c file, I just don't know enough about how everything is going together here, or the sytax.... where the heck are the actual pins called out? Bit, means Pin...Right? Sorry I'm such a FNG. I've been all over the manual and I'm still not clear.

    So the InitStepDir3Axis.c defines all 3/4 axes?
    The threads 1-7 run all at the same time?
    That file is an example. If you use the Config & Flash screen, once you have the correct settings, use the copy to clipboard button, and then paste them into your own init.c file (I'd recommend using that example one, rename it, and paste over each axis in turn). That way you don't have to manually alter the settings for each channel.

    This is probably the hardest part of the system to explain/understand.
    Each axis has it's own configuration.
    When you first open the relative screens within KMotion, the values shown are default values.
    When the KFlop is first booted up, it also has no configuration info. What your init.c file does, is configure the KFlop with the information required to run your machine.
    Using the screens within KMotion, you can configure the KFlop, but that information is lost as soon as the KFlop is rebooted, so it gets copied to you init.c file.

    The Config&Flash screen is where you can configure the basic features for each channel, such as input/output types. It also allows you to download that information to the KFlop for testing. Once you are happy the settings are correct, you can then use the Copy to Clipboard button, and paste those settings into your init.c.
    If you are wanting to alter existing settings once you have a basic init.c file, you need to ensure that file has been run on the KFlop, by either using the C Program screen, or pressing Init within Mach. Then click the Upload button within the Config&Flash, so KMotion loads the currently active settings from the KFlop.

    It sounds a bit complicated, but hopefully it'll become clearer once we've got a channel going.


    For selecting the correct output channels for step/dir, you need to know what type of output you require, and what pins are for the selected channels.
    This page lists all the info - Step and Direction Setup
    You are using Output channel/generators 0-4. You just need to select the correct kind of output, and that gives you the required output for each Axis.

    Once you have that, go to the Config&Flash screen, select the first channel you want to test. Select Step/Dir as the output mode, then select the required output channel 0, using the chart on the link above. So using channel 0 as an example and output pins 15&16 on JP7, is Generator Channel 0, and you want LVTTL mode, so you need to select 8.
    Once you've done that, click the Download button.
    Open the Axis screen within KMotion, and the #0 should now have a tick in it's Enable box.
    Provided your drive is physically powered/enabled, open the Console window within KMotion, and type the command Move0=500. Whatever Axis you have connected to channel 0, should now move 500 steps.

    If you're happy with that, copy to the clipboard using the Config&Flash screen, open up your init.c in C Program, select the existing Channel0 parameters, delete them, and paste in the new ones.
    Repeat that for your other 3 axes, and you should have a very basic init.c file that can now provide the basic axis configuration.



  9. #9
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by toolbag33 View Post
    So I've read through the InitStepDir3Axis.c file, I just don't know enough about how everything is going together here, or the sytax.... where the heck are the actual pins called out? Bit, means Pin...Right? Sorry I'm such a FNG. I've been all over the manual and I'm still not clear.
    It should become clearer once you've got your first axis working.
    So the InitStepDir3Axis.c defines all 3/4 axes?
    The threads 1-7 run all at the same time?
    That example only define 3 axes, but can be expanded to 4. If you need to use more than 4, you have to change the DefinCoordSystem function, to either the 6 or 8 axis version. Any axis you won't be using, you simply set to -1.

    Threads only run when a file is downloaded to the KFlop, and the KFlop is told to run it.
    You can use as many, or as few threads as you like, but they only run when required.
    If you were to have something being monitored continuously within a C Program, then that thread would run until told to stop, a new program gets downloaded, or the KFlop is powered off/rebooted.
    If it's a program to carry out a simple task, like say home an axis, it would run until homing is complete, then terminate.



  10. #10
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by toolbag33 View Post
    So no slave, each axis operate independently, just 5v daisy chained from J7 to enable all 4 of the motor's onboard electronics. The clearpath servos all have a on board control features on the motors themselves, they just need the step pulse and direction, 3-5v from the controller.

    https://www.teknic.com/products/clea.../clearpath-sd/

    I see the place to call out the pins for the limit switches on the channel setup, I just don't understand how the threads, code, and the programs are organized.
    My big post above, should hopefully explain the config.
    By looped from J7, do you mean they're permanently enabled, or do they require an output to activated on the KFlop?



  11. #11
    Registered
    Join Date
    Mar 2017
    Location
    United States
    Posts
    23
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    sorry if I seem a bit off topic, or threadjacky, but I came to this thread because of the word KFLOP. I am building a cnc router myself and had settled on the kflop as my motion controller, with the help of another forum member, much more knowledgeable than me. . I was under the impression that the board is a full fledged motion controller with it's own motion control software and ability to read and perform g-code? If that is the case, it begs me to ask why you would want to go from dynomotion's own software on their board and use mach3. If I am wrong, what did I miss? In other words, what has me believing the kflop was capable of running on it's own and with it's own software instead of running through mach3. Is there some sort of file/function compatability that you are looking for that's specific to mach?



  12. #12
    Registered
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    254
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Clackneil, the big reason would be for the access to Mach's wizards, and there are some other plugins/add-ons that can be very useful.
    The former is not an issue if what you want to machine involves generating G-code via CAM, but for simple stuff the wizards can be quite useful.
    The latter will depend on what you want to do.

    I've got a dedicated KFlop based digitiser/probing machine that I run via Mach3, for the sole reason of being able to use the Probe-It plugin. Everything else I've got (lathe and milling machine) run KMotionCNC, although I did run the lathe on Mach3 originally as KMotionCNC lathe functionality wasn't great at the time. I finally bit the bullet and converted it to KMotionCNC after one crash too many, and the only crashes since have been self inflicted.



Page 1 of 3 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

KFLOP SETUP, CHANNELS AND PINS
KFLOP SETUP, CHANNELS AND PINS