585,975 active members*
4,612 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Mar 2015
    Posts
    20

    New to KFlop, need training.

    I have purchased Kflop a week ago and I was expecting to see a great deal of tutorials. However, I haven't found anything that teaches what KFLOP is, how it works, how can we program and use it first. The only source is the company FAQ page which doesn't teach stuff from scratch.
    Now here is what I am going to do :
    I have 5 stepper motors, I haven't bought Kstep, I have 5 polulu stepper driver so in total. now my questions are :
    1. How can I initialize my stepper motor with Kflop ?
    2. How can I initialize the limit switches and other I/O flags. Where should I connect my switches and how can I tell KFlop with I/O is X-Axis end stop for exmaple.

    and now the software part .
    I have been working on my own software on C#, I am not willing to use KmotionCNC. but I don't know how communication with KFLOP works? is it only Gcode? or there are libraries that do the job in C# or C++.
    Please give me some good source to start.
    I have been working with Delta Tau controllers for quite a few years, The company provides an in depth training. Although it is expensive, but you learn everything so quickly to start your own projects. I wish dynomotionwould have done the same.

    thank you

  2. #2
    Join Date
    Dec 2004
    Posts
    132

    Re: New to KFlop, need training.

    Jimmy,

    The answer to every single one of your questions is located here: http://dynomotion.com/Help/KFlopManual.pdf

    It requires that you read the contents, or at least search for what you are looking for. Setting up a Kflop to run steppers is VERY easy to do, and in fact, on the Dynomotion website, between the aforementioned link, videos that are posted there and the information archived in this forum as well as the Yahoo forum it's impossible to claim that there is nothing but an FAQ page. Tom, who runs Dynomotion goes above and beyond in the customer service department as evidenced in this forum and the Yahoo forum. Try reading the manual first, and then ask questions based on what you my not understand or problems that develop.

  3. #3
    Join Date
    Jun 2013
    Posts
    1041

    Re: New to KFlop, need training.

    Exactly why are you not willing to use k-motion cnc?

    Ben

  4. #4
    Join Date
    Mar 2015
    Posts
    3

    Re: New to KFlop, need training.

    I haven't purchased a KFlop yet, but I did download their software, and had motors moving in emulated mode in about an hour in my own test program. I would say, at least for software, the manual and example programs are very good. The KMotion software includes a C# example.

  5. #5
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Thank you guys,
    I have 5 axis that is going to do a custom application. KMotionCNC seems to be working only with Kstep which I don't plan to get at this point.
    can you guys tell me how to initialize one stepper motor in either C# or C++ in a coordinated motion ?
    All get all sort of errors when I am using the examples

  6. #6
    Join Date
    Mar 2003
    Posts
    35538

    Re: New to KFlop, need training.

    Kstep is just a stepper driver.
    Kmotion and Kflop will work with ANY stepper driver.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #7
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by ger21 View Post
    Kstep is just a stepper driver.
    Kmotion and Kflop will work with ANY stepper driver.
    can you please tell me how to initilaze the pin of my stepper driver ? I have 3 pin per stepper ( Enable, dir, step)
    I couldn't a single instruction how to initialize the pins for stepper driver and how to work with the driver later.

  8. #8
    Join Date
    Dec 2004
    Posts
    132

    Re: New to KFlop, need training.

    Jimmy,
    You haven't given any information about what kind of stepper drivers you're using. I suspect reading the manual for the drivers and reading the extensive manual for KFlop and the rest of the Dynomotion products would point you in the right direction very quickly. Without knowing what stepper drives you are using, I would generalize and say that most stepper drives that take Step/Dir signals from a control will simply have terminals for those signals, which would be coming from the Kflop. The information regarding how you would go about connecting Kflop to a Stepper drive is easily found here: KFLOP Connectors In the event that you try reading the connector schematic, you'll see that there are options with regards to how you send step and dir signals to a drive. You can do this by using either pins 15-22 on JP7 or pins 1-8 on JP5 or both if you so choose. The issue with your stepper driver enable pin is something that you need to address by reading the manual specific to your drive. Most drives, once you supply a 5vdc power supply for step and dir signals, and a motor power supply (anything from 12v- 80 or 90vdc), along with the actual step and direction signals from a controller such as Kflop, will function with little fuss.

  9. #9
    Join Date
    May 2006
    Posts
    4045

    Re: New to KFlop, need training.

    Hi Jimmy,

    As spank describes you need to know the input requirements of your drive's Step/Dir inputs. Usually they are Opto Isolator LEDs with a common GND or Common Anode where you would either sink or source current to turn on the LED. Others are TTL type inputs that need to be both driven high and low. There are also timing considerations. See also:
    Step and Direction Setup

    HTH
    Regards
    TK
    http://dynomotion.com

  10. #10
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by spank View Post
    Jimmy,
    You haven't given any information about what kind of stepper drivers you're using. I suspect reading the manual for the drivers and reading the extensive manual for KFlop and the rest of the Dynomotion products would point you in the right direction very quickly. Without knowing what stepper drives you are using, I would generalize and say that most stepper drives that take Step/Dir signals from a control will simply have terminals for those signals, which would be coming from the Kflop. The information regarding how you would go about connecting Kflop to a Stepper drive is easily found here: KFLOP Connectors In the event that you try reading the connector schematic, you'll see that there are options with regards to how you send step and dir signals to a drive. You can do this by using either pins 15-22 on JP7 or pins 1-8 on JP5 or both if you so choose. The issue with your stepper driver enable pin is something that you need to address by reading the manual specific to your drive. Most drives, once you supply a 5vdc power supply for step and dir signals, and a motor power supply (anything from 12v- 80 or 90vdc), along with the actual step and direction signals from a controller such as Kflop, will function with little fuss.
    Thank you spank, It's a stepper driver a4988. It has a direction pin, enable pin and step pin. I just have to give pulses to the step pin to run it and the frequency of the pulse define the speed

  11. #11
    Join Date
    May 2006
    Posts
    4045

    Re: New to KFlop, need training.

    Hi Jimmy,

    If it is an Allegro A4988 chip without Opto Couplers added then you would want to select KFLOP's LVTTL output mode by adding 8 to the OutputChan0 number. See the previously sent link.

    Regards
    TK
    http://dynomotion.com

  12. #12
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by TomKerekes View Post
    Hi Jimmy,

    If it is an Allegro A4988 chip without Opto Couplers added then you would want to select KFLOP's LVTTL output mode by adding 8 to the OutputChan0 number. See the previously sent link.

    Regards

    Thank you

    Perfect. I think I am making progress.
    I have connected the step and direction pins to Pin15 and 16 of JP7.
    in the Config of the Kmotion, I put the zero channel to Step dir,
    I still don't know where the enable pin of my driver should be connected to.

    One more question about the power. I am powering my driver separately. The Kflop is powered by USB. The J3 jumper is placed as well. Does this seem fine ?

  13. #13
    Join Date
    May 2006
    Posts
    4045

    Re: New to KFlop, need training.

    Hi Jimmy,

    I have connected the step and direction pins to Pin15 and 16 of JP7.
    That sounds correct

    in the Config of the Kmotion, I put the zero channel to Step dir
    You aren't being clear with your responses. I assume you mean you are configuring KFLOP Axis Channel #0 to have Output Mode Step Dir. You should also set OutputChan0 = 8 in order to drive Step/Dir Generator #0 in TTL Output mode (which is normally connected to JP7 Pins 15 and 16).

    I still don't know where the enable pin of my driver should be connected to.
    If your enable signal is also TTL compatible you can connect it to any of the other (46) spare KFLOP outputs. For example KFLOP I/O Bit0 (JP7 Pin 7). There isn't any special support for Drive Enables in KFLOP. You will need to handle that in any manner that you wish. Whichever I/O bit you choose will need to be configured as an output. Typically a monitor loop might be used to watch for no motion for a certain period of time and then disable the drive. See the \<>\C Programs\KStep\KStep3Axis.c program for an example of how to do this. Or if your application knows when the drive needs to be disabled and enable it can do so at those times. Another option is to wire it permanently enabled. Does it need to be driven high or low to enable the drive?

    One more question about the power. I am powering my driver separately. The Kflop is powered by USB. The J3 jumper is placed as well. Does this seem fine ?
    This is ok but of course there needs to be a GND connection between KFLOP and your drives for the Step/Dir voltage levels to be referenced and meaningful. This is the disadvantage of having drives that are not opto isolated. The common GND connection between the Stepper Motor Power Supply and KFLOP can couple motor noise into the rest of the system. However in many cases this works fine.

    HTH
    Regards
    TK
    http://dynomotion.com

  14. #14
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by TomKerekes View Post
    Hi Jimmy,

    That sounds correct

    You aren't being clear with your responses. I assume you mean you are configuring KFLOP Axis Channel #0 to have Output Mode Step Dir. You should also set OutputChan0 = 8 in order to drive Step/Dir Generator #0 in TTL Output mode (which is normally connected to JP7 Pins 15 and 16).

    If your enable signal is also TTL compatible you can connect it to any of the other (46) spare KFLOP outputs. For example KFLOP I/O Bit0 (JP7 Pin 7). There isn't any special support for Drive Enables in KFLOP. You will need to handle that in any manner that you wish. Whichever I/O bit you choose will need to be configured as an output. Typically a monitor loop might be used to watch for no motion for a certain period of time and then disable the drive. See the \<>\C Programs\KStep\KStep3Axis.c program for an example of how to do this. Or if your application knows when the drive needs to be disabled and enable it can do so at those times. Another option is to wire it permanently enabled. Does it need to be driven high or low to enable the drive?

    This is ok but of course there needs to be a GND connection between KFLOP and your drives for the Step/Dir voltage levels to be referenced and meaningful. This is the disadvantage of having drives that are not opto isolated. The common GND connection between the Stepper Motor Power Supply and KFLOP can couple motor noise into the rest of the system. However in many cases this works fine.

    HTH
    Regards

    thank you Tom,
    I got it to work. How can I switch to microstepping. My driver has up to 1/32 microstepping.

  15. #15
    Join Date
    May 2006
    Posts
    4045

    Re: New to KFlop, need training.

    Hi Jimmy,

    That would have nothing to do with KFLOP. KFLOP only generates "Step" pulses. KFLOP has no control over how your driver interprets steps. How much your system moves for each step is dependent on how you set up your driver and the rest of the components in your system.

    Regards
    TK
    http://dynomotion.com

  16. #16
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by TomKerekes View Post
    Hi Jimmy,

    That would have nothing to do with KFLOP. KFLOP only generates "Step" pulses. KFLOP has no control over how your driver interprets steps. How much your system moves for each step is dependent on how you set up your driver and the rest of the components in your system.

    Regards
    Well the motor doesn't drive smooth specially in lower speeds. But there should a way to tell KFLOP that I am driving the motor under 1/16th of step so 3200 steps is one full revolution of the motor instead of 200 ! This seems an essential concern when it comes to open loop control. I need to move the one axis 1 inch for example

  17. #17
    Join Date
    Dec 2004
    Posts
    132

    Re: New to KFlop, need training.

    Jimmy,
    As Tom said, you set the level microstepping at the drive, not at Kflop. In other words, if you are just tuning and setting up your motors within Kmotion, number of steps per revolution is not part of the equation. Once you start using a CNC control program, you would set your number of steps per revolution there. In KmotionCNC you do that in your Tool Setup Trajectory motion parameters. Since you have no interest in using Kmotion CNC, you would probably be doing this within Mach 3. As far as setting up your motors is concerned though, all you're doing in Kmotion is finding a set of parameters that works for your setup. Kflop will send step pulses, and your drives are going to behave according to the amount of microstepping you have set at the drives. Your goal within Kmotion is to try to adjust for the best performance given the setup of your drives and motors.

  18. #18
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by spank View Post
    Jimmy,
    As Tom said, you set the level microstepping at the drive, not at Kflop. In other words, if you are just tuning and setting up your motors within Kmotion, number of steps per revolution is not part of the equation. Once you start using a CNC control program, you would set your number of steps per revolution there. In KmotionCNC you do that in your Tool Setup Trajectory motion parameters. Since you have no interest in using Kmotion CNC, you would probably be doing this within Mach 3. As far as setting up your motors is concerned though, all you're doing in Kmotion is finding a set of parameters that works for your setup. Kflop will send step pulses, and your drives are going to behave according to the amount of microstepping you have set at the drives. Your goal within Kmotion is to try to adjust for the best performance given the setup of your drives and motors.


    Thank you guys for helping me. Such an amazing community.

    I am trying to make my own custom GUI in c++.
    My motor moves pretty well in KMotionCNC
    now I wanna drive it manually.
    All the libraries are included and compiles successfully. I was able to manually blink a LED

    here is my code
    Code:
    KM = new CKMotionDLL(0);  // create as board 0
    	char response[MAX_LINE];
    
    	// Setup Axis for a simple stepper motor
    
            if (KM->WriteLine( "SetBitDirection0=1")) MyError(); 
    	if (KM->WriteLine( "ClearBit0")) MyError(); 
    
    	if (KM->WriteLine( "DisableAxis0=0"))	MyError(); // Set board 0, Axis 1 to OFF while changing parameters
    	if (KM->WriteLine( "Zero0=0"))			MyError(); 
    	if (KM->WriteLine( "StepperAmplitude0=80"))MyError(); 
    	if (KM->WriteLine( "Vel0=100"))			MyError();
    	if (KM->WriteLine( "Accel0=50"))			MyError(); 
    	if (KM->WriteLine( "Jerk0=2000"))		MyError();
    	if (KM->WriteLine( "Lead0=10"))			MyError(); 
    	if (KM->WriteLine( "OutputMode0=1"))		MyError();
    	if (KM->WriteLine( "EnableAxisDest0 100"))	MyError();
    	if (KM->WriteLine( "Echo Setup Complete")) MyError(); 
    	
    if (KM->WriteLine( "MoveRel0=100"))  MyError();


    Can you tell me what's wrong ?

  19. #19
    Join Date
    May 2006
    Posts
    4045

    Re: New to KFlop, need training.

    Hi Jimmy,

    In your case for Step/Dir drives OutputMode should be 6 (STEP_DIR_MODE). See PC-DSP.h definitions. Mode 1 (MICROSTEP_MODE) is for amplifier types (SnapAmp) that can directly control coil currents in a sinusoidal manner without requiring Step Pulses to create a very high level of "microstepping". "Stepper Amplitude" and "Lead" are related to that mode and will have no effect in your configuration as those functions are controlled within your drive. Sorry for the confusing terms.

    You would also want to configure which Step/Dir Generator to be used, and what mode it uses to drive its pins for your drive. In some modes a KFLOP Axis Channel can output to two different devices (ie MICROS_STEP_MODE needs two full bridge drivers for two stepper coils). So KFLOP Axis Channels have two output channel settings - OutputChan0 and OutputChan1. This diagram may help:



    In your case only one Step/Dir Generator device needs to be specified by OutputChan0. OutputChan1 is not used. To use Step/Dir Generator #0 in TTL mode specify a value of 8. So to specify this for KFLOP Axis #0 include the script command:

    OutputChan00=8

    HTH
    Regards
    TK
    http://dynomotion.com

  20. #20
    Join Date
    Mar 2015
    Posts
    20

    Re: New to KFlop, need training.

    Quote Originally Posted by TomKerekes View Post
    Hi Jimmy,

    In your case for Step/Dir drives OutputMode should be 6 (STEP_DIR_MODE). See PC-DSP.h definitions. Mode 1 (MICROSTEP_MODE) is for amplifier types (SnapAmp) that can directly control coil currents in a sinusoidal manner without requiring Step Pulses to create a very high level of "microstepping". "Stepper Amplitude" and "Lead" are related to that mode and will have no effect in your configuration as those functions are controlled within your drive. Sorry for the confusing terms.

    You would also want to configure which Step/Dir Generator to be used, and what mode it uses to drive its pins for your drive. In some modes a KFLOP Axis Channel can output to two different devices (ie MICROS_STEP_MODE needs two full bridge drivers for two stepper coils). So KFLOP Axis Channels have two output channel settings - OutputChan0 and OutputChan1. This diagram may help:



    In your case only one Step/Dir Generator device needs to be specified by OutputChan0. OutputChan1 is not used. To use Step/Dir Generator #0 in TTL mode specify a value of 8. So to specify this for KFLOP Axis #0 include the script command:

    OutputChan00=8

    HTH
    Regards


    Thank you Tom.
    I received my KSTEP today. I hooked up everything and I decided to use KmotionCNC for now till I learn more about it.
    I have a question about my application. I have a 3 axis gantry. then i have two tools that both of them should work at the same time with different speed and timing.
    can I do this by manually modifying the G-Code script ?

Page 1 of 2 12

Similar Threads

  1. Huanyang VFD & KFLOP
    By Fish4Fun in forum Dynomotion/Kflop/Kanalog
    Replies: 5
    Last Post: 01-13-2015, 02:41 PM
  2. kflop by itself?
    By markymark1 in forum Dynomotion/Kflop/Kanalog
    Replies: 4
    Last Post: 04-20-2014, 07:19 PM
  3. Kflop e programming
    By RimappaGCode in forum Dynomotion/Kflop/Kanalog
    Replies: 7
    Last Post: 12-06-2013, 08:04 PM
  4. KFlop 4.3
    By John Coloccia in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 05-03-2013, 07:57 PM

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
  •