KFLOP SETUP, CHANNELS AND PINS


Page 1 of 2 12 LastLast
Results 1 to 20 of 32

Thread: KFLOP SETUP, CHANNELS AND PINS

  1. #1
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    4043
    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

    Regards
    TK http://dynomotion.com


  4. #4
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    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
    42
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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
    42
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    355
    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.



  13. #13
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hey Thanks All for you replies,
    I've got an initial problem powering up my Servo, clearpath tecnics motor.

    I get an error "automatic disconnect" when I plug in my ribbon cable to my single test motor. I looked up this error and it might have something to do with my kflop, J7 5+ v out to my motors pin to initalize. The motor needs 5+ volts to active it's onboard electronics and I have the digital ground pin going to the Motor's 5- v, the other pins. I'm not sure what Digital Ground means actually.

    So the other pins from the J7 Kflop are to (STEP) 15,17,19,21 and (DIR) to 16,18,20,22 going to (motor direction) pin 3 and (motor Step) pin 4.

    Kflop J7 23 +5volts out is dasiy chained to all motors pin 4, the ENABLE + and

    Kflop pin 25 DIGITAL GROUND daisy chained to to all motors ENABLE -.

    Somethings wrong...

    KFLOP SETUP, CHANNELS AND PINS-capture-jpg



  14. #14
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by toolbag33 View Post
    Hey Thanks All for you replies,
    I've got an initial problem powering up my Servo, clearpath tecnics motor.

    I get an error "automatic disconnect" when I plug in my ribbon cable to my single test motor. I looked up this error and it might have something to do with my kflop, J7 5+ v out to my motors pin to initalize. The motor needs 5+ volts to active it's onboard electronics and I have the digital ground pin going to the Motor's 5- v, the other pins. I'm not sure what Digital Ground means actually.

    So the other pins from the J7 Kflop are to (STEP) 15,17,19,21 and (DIR) to 16,18,20,22 going to (motor direction) pin 3 and (motor Step) pin 4.

    Kflop J7 23 +5volts out is dasiy chained to all motors pin 4, the ENABLE + and

    Kflop pin 25 DIGITAL GROUND daisy chained to to all motors ENABLE -.

    Somethings wrong...

    KFLOP SETUP, CHANNELS AND PINS-capture-jpg


    Looks like one of the voltage supply pins was getting grounded out... oops.



  15. #15
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Okay Some progress...

    Channel 0, x axis, copied to c program and uploaded to Kflop,

    Watch Limit, and stop when low checked. bit 8 and 9 for x axis. limit switches, Normally closed limit switches are plugged in and working.
    DIGITAL I/O SCREEN shows bit 8 and 9 floating on and off. will move commands work if my limits are triggered low? When I plug in one of my limits, it sends (in Digital/IO Screen) the 0 and bit high.


    Channel 0, output channel 0, step/dir are pins 15,16.

    My motor is enable 5v is good, motor is active.

    configured and copied 4 axis, 0,1,2,3 to original "3axisint.c" file, renamed and uploaded...kflop power cycle.

    console:
    MOVE0=500

    gives motor no response,
    Please Help.
    Thanks,
    Chris



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

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Just to clarify your wiring for one motor from your previous post -
    KFlop JP7 -> Motor
    15 (Step) -> 3 (Input A+)
    16 (Dir) -> 4 (Enable +)
    23 (5V) -> 4 (Enable +)
    25(GND) -> (Enable -)

    I'm guessing Dir going to Enable is a typo, and should be 2 (Input B+)?
    In that case you need to connect 6 (Input B-) and 7 (Input A-) to Gnd. That's unless these drives have some additional circuitry where you don't need to connect the - terminals when not running differential signals.

    Digital Ground, is a way of describing ground for low power circuits. Any grounds going to your drives control circuitry can be described as a digital ground, whereas the ground/0V for providing the main power for the drive, would typically be described as a power ground.

    However, having just found a manual for the drives - https://www.teknic.com/files/downloa...ser_manual.pdf
    I think you may need to wire them a bit differently. Connect 5V to 3 (Input A+) and 2 (Input B+), then connect 7 (Input A-) to 16 (dir), and 6 (Input B-) to 15 (step), and choose the correct number to run channel/axis0 using Open Collector mode. (Going by the step/dir mode info on page 101, you have your inputs mixed up)
    If you look at page 38 of the manual, and the NPN/Sinking *Open Collector* diagram, that's how you should be connecting things up, as that will give a higher voltage at the drive inputs, than the current LVTTL method you're using.



    Regarding homing, are there any messages appearing in the console?
    Personally, I'd disable all the limit switches until you have motion, as it removes one potential problem.



  17. #17
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by m_c View Post
    Just to clarify your wiring for one motor from your previous post -
    KFlop JP7 -> Motor
    15 (Step) -> 3 (Input A+)
    16 (Dir) -> 4 (Enable +)
    23 (5V) -> 4 (Enable +)
    25(GND) -> (Enable -)

    I'm guessing Dir going to Enable is a typo, and should be 2 (Input B+)?
    In that case you need to connect 6 (Input B-) and 7 (Input A-) to Gnd. That's unless these drives have some additional circuitry where you don't need to connect the - terminals when not running differential signals.

    Digital Ground, is a way of describing ground for low power circuits. Any grounds going to your drives control circuitry can be described as a digital ground, whereas the ground/0V for providing the main power for the drive, would typically be described as a power ground.

    However, having just found a manual for the drives - https://www.teknic.com/files/downloa...ser_manual.pdf
    I think you may need to wire them a bit differently. Connect 5V to 3 (Input A+) and 2 (Input B+), then connect 7 (Input A-) to 16 (dir), and 6 (Input B-) to 15 (step), and choose the correct number to run channel/axis0 using Open Collector mode. (Going by the step/dir mode info on page 101, you have your inputs mixed up)
    If you look at page 38 of the manual, and the NPN/Sinking *Open Collector* diagram, that's how you should be connecting things up, as that will give a higher voltage at the drive inputs, than the current LVTTL method you're using.



    Regarding homing, are there any messages appearing in the console?
    Personally, I'd disable all the limit switches until you have motion, as it removes one potential problem.
    Roger that on omitting the limit switches.
    No I meant 15/16 as step/dir respectively. These motors are designed to use Step and Direction specifically, I don't know what llttv or open collector means, but the kflop's step/dir tells me to use the 0-7 channels for open collector, which I'm using. I think I'm close, just missing one hidden thing.

    to recap about my pins to the motor,

    8, enable - > kflop pin Digital Ground 25. I called tecnics about this and yes the ground completes the 5v circuit, to enable the motor. With power the motor shaft fixes, and it's led blinks green as it should.
    4, enable + > 23
    3, direction > 16
    2, step > 15

    I check and all my pins are correct. the limit switches are floating or doing something weird. I must be missing something on the Kflop side, I think my motor is connected correctly.

    Thanks M_C



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

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    By Step/Dir pins being wrong, I meant on the Clearpath side.
    I've just double checked, and Input A (3&7) is Direction, and Input B (2&6) is Step.

    LVTTL (Low Voltage Transistor Transistor Logic in case you're wondering what it means) is best thought of like a single pole double throw switch. One contact is connected to 3.3V, the other to 0V, and depending on the switch position, you either get 3.3V or 0V at the common/moving contact.

    Open Collector, can be thought of like a single pole single throw switch, that either connects the output to 0V, or doesn't I.e. opens/breaks the circuit.


    Now the inputs on the clearpath drives are optoisolated. You basically have a LED connected to the terminals for each input, and you need to get those LEDs to light up, so you have to connect both terminals. If you only connect one terminal, it's just like connecting only the positive or negative wire up to any bulb, it won't light up.
    Using LVTTL mode, you would need to connect the negative terminals to 0V, and the KFlop pins to the positive terminals, however the KFlop can only source 3.3V which is below the specified voltage for the Clearpath servos.
    Using Open Collector mode, you would connect the positive terminals to 5V, then connect the negative terminals to the KFlop, as then the clearpath inputs will get near the full 5V.



  19. #19
    Registered
    Join Date
    Mar 2010
    Location
    USA
    Posts
    42
    Downloads
    0
    Uploads
    0

    Cool Re: KFLOP SETUP, CHANNELS AND PINS

    Quote Originally Posted by m_c View Post
    By Step/Dir pins being wrong, I meant on the Clearpath side.
    I've just double checked, and Input A (3&7) is Direction, and Input B (2&6) is Step.

    LVTTL (Low Voltage Transistor Transistor Logic in case you're wondering what it means) is best thought of like a single pole double throw switch. One contact is connected to 3.3V, the other to 0V, and depending on the switch position, you either get 3.3V or 0V at the common/moving contact.

    Open Collector, can be thought of like a single pole single throw switch, that either connects the output to 0V, or doesn't I.e. opens/breaks the circuit.


    Now the inputs on the clearpath drives are optoisolated. You basically have a LED connected to the terminals for each input, and you need to get those LEDs to light up, so you have to connect both terminals. If you only connect one terminal, it's just like connecting only the positive or negative wire up to any bulb, it won't light up.
    Using LVTTL mode, you would need to connect the negative terminals to 0V, and the KFlop pins to the positive terminals, however the KFlop can only source 3.3V which is below the specified voltage for the Clearpath servos.
    Using Open Collector mode, you would connect the positive terminals to 5V, then connect the negative terminals to the KFlop, as then the clearpath inputs will get near the full 5V.
    M_C,
    That makes perfect sense. I did know that these motors are optoisolated, I assumed it would use the ground, or enable- as the ground back. Guess I spend some more quality time with my molex crimper.
    I'll make one up and give it a try, and thanks very much for that explanation about the modes.

    I believe I read open collector mode is best for opto circuits in the Kflop manual, and I already have those pins pinned out on my interconnect board.
    So the kflop sends a pulse by putting that step or direction pin high? And it completes the circuit for the LEDs?

    Thanks!!



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

    Default Re: KFLOP SETUP, CHANNELS AND PINS

    Hi Chris,

    So the kflop sends a pulse by putting that step or direction pin high? And it completes the circuit for the LEDs?
    No. It sounds like you still don't get the concept. An "Open Collector" is like a switch that shorts a pin to GND. See this diagram in the manual you sent

    KFLOP SETUP, CHANNELS AND PINS-opencollector-jpg

    The V+ is the KFLOP +5V. Current flows from +5V through the ClearPath back to the KFLOP Step (or Dir) Open collector Pin which then opens/closes the current path to GND.

    You probably won't need to add the resistor they recommend if your wiring is reasonably short.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


Page 1 of 2 12 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