586,655 active members*
2,303 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > need help to get kflop and and Kmotion up and running
Page 5 of 6 3456
Results 81 to 100 of 106
  1. #81
    Join Date
    Feb 2015
    Posts
    7

    Re: need help to get kflop and and Kmotion up and running

    Tom - you are a damned Rock Star... Added 0.1uF capacitors inline from I/O input to GND as you said, everything works like a champion.

    I would say for an ME my EE skills are pretty competent for basic things in the areas I work with, and I understand the filter concept through the capacitor as you suggested, but for me to come up with that on my own would've taken a very long time - if ever - ha.

    I very much appreciate the help and quick response!

  2. #82
    Join Date
    Feb 2015
    Posts
    7

    Re: need help to get kflop and and Kmotion up and running

    Hey Jossa,

    I've attached 2 documents that hopefully can help you out. The first one shows my current setup, and how I wired the DRO PROs system to the KFLOP. It also explains things for why I did as I did and what I plan to do when I get more familiar with everything. Again, I'm no EE so take it as you will - but it seems to be working for what I need at the moment.

    The second one is something I found somewhere online (can't remember where) that helped me to at least figure out the basics of Incremental Encoders and their signals. From all that I can tell - the single ended explanation in that document is exactly what the DRO PROs is - except DRO PROs labels their 3rd signal as 'R' as opposed to this document's 'Z'. And when I contacted DRO PROs to confirm, they were super friendly and responsive but didn't seem to know themselves... I am assuming that they are more of an OEM model where they spec what they want in the product, but leave both the design and manufacturing up to their CM.

    Anyway - hopefully this helps you in some way.
    -Andrew

  3. #83
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    thanks for the documents! i will try and do this at a later stage i think..




    also, one more question for you tom.. if i have one stepper motor going the opposite way, X plus is X minus and vise versa..
    it is only one stepper that is doing this.. but they are all wired the same way..
    do you have any idea? move around some wires maybe?

  4. #84
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    if i have one stepper motor going the opposite way, X plus is X minus and vise versa..
    it is only one stepper that is doing this.. but they are all wired the same way..
    do you have any idea? move around some wires maybe?
    See:
    Dynomotion Motion Control Boards for CNC Manufacturing and Robotics Applications


    Regards
    TK
    http://dynomotion.com

  5. #85
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    thanks Tom! :-)


    why do you think it is this way? could it be that the motor windings are different? or is it just a matter of witch way the stepper is mounted maybe?

  6. #86
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    Yes it could be a mechanical issue - motor orientation, gearing, linkage, etc...

    Swapping the Stepper motor coils will also reverse the direction, or swapping the wires of either coil.

    The software configuration might be different also (ie the OutputGain).

    You could determine if it is a mechanical issue or not by observing the motors. When commanding all the motors in the positive direction do they all rotate the same direction? (ie CCW or CW when looking into the motor shaft from the "front")

    Regards
    TK
    http://dynomotion.com

  7. #87
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    yes i will check that.. but now that i think about it, it could be that the stepper is on the "wrong" side of the work table.. therefore running it in inverse mode






    i have one more question for you Tom..

    what is the procedure for backup of programs and settings?


    i just switched to a dedicated laptop, and i found out i had no good backup of my settings and program.
    I.E my motor parameters and such..

    so if i were to make a backup that could be used in case my laptop dies.. how would i go about that?

  8. #88
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    what is the procedure for backup of programs and settings?
    The <Install dir>\KMotion\Data directory is where the Apps store setting and parameters. Also of course any files you have created and stored somewhere.

    Regards
    TK
    http://dynomotion.com

  9. #89
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    so the contens of <Install dir>\KMotion\Data and any C programs i have created..

    copy and paste to the new system with a fresh install of kmotion on it?

  10. #90
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Yes
    TK
    http://dynomotion.com

  11. #91
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    hi.

    we are working on soft limits.. and have added the code to the loop in the init file.

    but i have a question..

    Code:
    	
    
    // Limits
    	#define XMINUS -100.0
    	#define XPLUS 100000.0
    	#define YMINUS -100.0
    	#define YPLUS 100000.0
    	#define ZMINUS -1000.0
    	#define ZPLUS 100000.0

    what unit is the numbers in? steps?







    also, is this representation of the axis correct with what kflop (and maby what the rest of the world) use?

    Attachment 275744


    my ball screw kit had an engraving on it with the following diagram (mounted in the same perspective as the first drawing):
    the x and y axis is opposite. and i think the z was inverted from the first drawing
    Attachment 275746


    so what i am asking about is what i should chose, it would be nice to use the engraved system, but if that complicates my programming i would switch to the "standard" system..

  12. #92
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi Jossa,

    You didn't show how or where those defines are used. But yes, all the units in KFLOP should be in steps or counts.

    I think your first diagram is the world standard for axes directions. A common source of confusion in most systems is that the work piece moves in x and y rather than the Spindle. Think of drawing on a piece of paper by moving the paper rather than the pen. To draw a line on the paper to the right (+X direction) you would need to move the paper to the left.

    HTH
    Regards
    TK
    http://dynomotion.com

  13. #93
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    - i will get you a copy of the code soon. i really would like to show you the code and get your opinion on it.





    -if i understand what you have tried to tell me earlier, i have 200 steps in one rotation of my stepper motor, and my ball screw is 5 mm pitch (moves 5 mm in one rotation of the shaft)
    by that logic 200 steps divided by 5 mm gives me 40 steps/mm?

    so if i wanted to set the soft limit to IE. 500 mm from machine zero, i would need to set the limit at 20 000 steps to get 500 mm?




    - is this soft limit always taken from where ever machine zero is? (if i run initialization and no home sequence, then the point i did the init on will be machine zero, and the soft limits will be from that point?)





    -regarding the interpretation of the axis.

    i see, maybe the engraved diagram on my mill is showing the "papers" movement in your example?

    x+ is shown as to the left, but that is indicating the direction the table needs to move in order to get a x+ direction in relation to the spindle (witch is left as on the engraving)

    but what is the table axis then? if i test with KmotionCNC.exe.. and i push X+ jog, should the table then move to the left? (as on my engraved part)

  14. #94
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    -if i understand what you have tried to tell me earlier, i have 200 steps in one rotation of my stepper motor, and my ball screw is 5 mm pitch (moves 5 mm in one rotation of the shaft)
    by that logic 200 steps divided by 5 mm gives me 40 steps/mm?

    so if i wanted to set the soft limit to IE. 500 mm from machine zero, i would need to set the limit at 20 000 steps to get 500 mm?
    I think you forgot to take into consideration the microstepping. KSTEP uses 16X microstepping so 200x16=3200 steps per revolution and therefore 3200/5=640 steps/mm

    You don't need to ask anyone if your calculations are correct. Just do a test. For example command the axis 20000 steps and measure if the axis moved 500mm.

    is this soft limit always taken from where ever machine zero is? (if i run initialization and no home sequence, then the point i did the init on will be machine zero, and the soft limits will be from that point?)
    Yes. It often doesn't make sense to enable soft limits until after you have homed and defined a machine zero to a known point in your travel. So you might define soft limits as huge values in your init program and then reduce them to valid values at the end of your Home program.

    -regarding the interpretation of the axis.

    i see, maybe the engraved diagram on my mill is showing the "papers" movement in your example?

    x+ is shown as to the left, but that is indicating the direction the table needs to move in order to get a x+ direction in relation to the spindle (witch is left as on the engraving)
    I believe that is correct

    but what is the table axis then?
    Don't really understand what you are asking. But moving the table to the left would cut the part the same as if you could actually move the Spindle to the right.

    if i test with KmotionCNC.exe.. and i push X+ jog, should the table then move to the left? (as on my engraved part)
    Correct. The GCode Viewer should show the tool moving to the right.


    HTH
    Regards
    TK
    http://dynomotion.com

  15. #95
    Join Date
    Feb 2015
    Posts
    7

    Re: need help to get kflop and and Kmotion up and running

    Quick question here:

    Does anybody know of a way to have the KMotionCNC STOP button trigger either a C code script and/or disable a PWM Output and Bit Output?

    I have my spindle control running off of PWM0, and two relays triggering spindle Start/Stop and Forward/Reverse. These outputs are controlled via C Program and set by M3,M4,M5 M codes. The problem that I have is that when the KMotionCNC STOP button is pressed, it also stops the execution of the running C Codes - which in turn means that the Watch Dog loop I have setup to disable the PWM and Relay bits does not work... i.e. if I hit the stop button, axis motion stops but the spindle is left continuing to spin... I am trying to figure out if there is a way to have the Stop Button trigger the Relay Bits to set to 0V output and disable the PWM output; but currently when I hit stop the bits remain set and the PWM continues to pulse.

    If you do know, the input would be appreciated.

    Thanks,
    -Andrew

  16. #96
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    Quote Originally Posted by TomKerekes View Post
    Hi jossa,


    I think you forgot to take into consideration the microstepping. KSTEP uses 16X microstepping so 200x16=3200 steps per revolution and therefore 3200/5=640 steps/mm

    You don't need to ask anyone if your calculations are correct. Just do a test. For example command the axis 20000 steps and measure if the axis moved 500mm.


    HTH
    Regards
    the problem it that i did not connect this information, and believe me i have tried to move the axis and measure and make sense of this.. but everything cnc is new to me.. and that is why i ask.. now i have learnt something new..



    regarding the code:

    We took the limit code from the SoftLimits3Axes.c example file and put it in an infinite loop in our init program.

    This is the limit part:

    Code:
    // Limits
    #define XMINUS -100.0
    #define XPLUS 100000.0
    #define YMINUS -100.0
    #define YPLUS 100000.0
    #define ZMINUS -1000.0
    #define ZPLUS 100000.0
    
    
    // Running this in an infinite loop:
    
    // Check for limits
    if (checkLimits) {
        if (InLimit())  // check for any limit
        {
            DisableAxis(0);
            DisableAxis(1);
            DisableAxis(2);
            
            while (InLimit()) ;  //wait until back within limits
        }
    }
    
    // Limit function definition
    int InLimit()
    {
    //WaitNextTimeSlice();
    return     ch0->Dest < XMINUS || ch0->Dest > XPLUS ||
            ch1->Dest < YMINUS || ch1->Dest > YPLUS ||
            ch2->Dest < ZMINUS || ch2->Dest > ZPLUS;
    }



    regarding a_j_p's post:


    i am wondering about the same thing..
    and when i am using the pause button it seams the steppers stay energized, and if you forget to stop it with the emergency stop in KmotionCNC.exe they get pretty hot.
    it is like the drivers are stuck in a step?

  17. #97
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi a_j_p,

    Does anybody know of a way to have the KMotionCNC STOP button trigger either a C code script and/or disable a PWM Output and Bit Output?

    I have my spindle control running off of PWM0, and two relays triggering spindle Start/Stop and Forward/Reverse. These outputs are controlled via C Program and set by M3,M4,M5 M codes. The problem that I have is that when the KMotionCNC STOP button is pressed, it also stops the execution of the running C Codes - which in turn means that the Watch Dog loop I have setup to disable the PWM and Relay bits does not work... i.e. if I hit the stop button, axis motion stops but the spindle is left continuing to spin... I am trying to figure out if there is a way to have the Stop Button trigger the Relay Bits to set to 0V output and disable the PWM output; but currently when I hit stop the bits remain set and the PWM continues to pulse.
    The EStop button should kill all KFLOP Threads except Thread #1. If your watch dog loop is in that thread it should continue to run.

    Alternatively the latest Test program V4.33k allows you to add an Action to occur after the Stop Button executes. See under KMotionCNC | Tool Setup | M0-M30 | Stop. See:
    Tool Setup Screen M3-M9

    HTH
    Regards
    TK
    http://dynomotion.com

  18. #98
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    Regarding the SoftLimits3Axes.c example. That should work, but KFLOP now has built in Soft Limits that you can configure as part of each Axis. See:

    Configuration Screen

    So that C code should no longer be required if you use the Soft Limits Parameters. And using the Soft Limit parameters should make it easier for you to disable before homing and enable them after homing.

    and when i am using the pause button it seams the steppers stay energized, and if you forget to stop it with the emergency stop in KmotionCNC.exe they get pretty hot.
    it is like the drivers are stuck in a step?
    That is the nature of Stepper Motors. They generate the most heat sitting still just holding position. KSTEP has an enable connected to KFLOP Bit45 to enable and disable the output drivers. When sitting idle for long periods you can disable the motors if you wish. The InitKStep3Axis.c has an example of C code to monitor motion and if there isn't any motion for a few seconds to disable KSTEP. Do you have that code in your Init C program?

    Regards
    TK
    http://dynomotion.com

  19. #99
    Join Date
    Dec 2013
    Posts
    159

    Re: need help to get kflop and and Kmotion up and running

    Quote Originally Posted by TomKerekes View Post
    Hi jossa,

    Regarding the SoftLimits3Axes.c example. That should work, but KFLOP now has built in Soft Limits that you can configure as part of each Axis. See:

    Configuration Screen

    So that C code should no longer be required if you use the Soft Limits Parameters. And using the Soft Limit parameters should make it easier for you to disable before homing and enable them after homing.
    ok, i will check that out =)

    Quote Originally Posted by TomKerekes View Post
    That is the nature of Stepper Motors. They generate the most heat sitting still just holding position. KSTEP has an enable connected to KFLOP Bit45 to enable and disable the output drivers. When sitting idle for long periods you can disable the motors if you wish. The InitKStep3Axis.c has an example of C code to monitor motion and if there isn't any motion for a few seconds to disable KSTEP. Do you have that code in your Init C program?

    Regards
    i see.. is it this one?
    Code:
    	for (;;) // loop forever
    	{
    		WaitNextTimeSlice();
    		
      ----->      // Service Amplifier disable after no activity for a while
    		if (ch0->Dest != LastX || ch1->Dest != LastY || ch2->Dest != LastZ)
    		{
    			// we moved - enable KStep Amplifers
    			SetBit(45);
    			T0 = Time_sec();  // record the time and position of last motion
    			LastX=ch0->Dest;
    			LastY=ch1->Dest;
    			LastZ=ch2->Dest; 
    		}
    		else
    		{
    			if (Time_sec() > T0 + 10.0) ClearBit(45);
    		}
    during normal use (jogging and finishing g code) the steppers are disabled after 10 seconds.. but when using the halt function with my stop button, they stay enabled and just hold position... and when i think about it, it is not a bug, it is a feature.. because when you want to resume the steppers must be in the same place!

    i think i understand now... doh!


    sorry for bugging you with all this, but it is really good for learning..
    i am thinking about documenting what i have gone trough so others might use it as a how to guide on smaller mills like mine..
    since i am a dummy when it comes to this, i might be good at explaining it to other dummies :P

    i really like the kflopp and the kstep, it is a nice piece of hardware and i am recommending it for anyone who is interested in my mill and starts talking about it with me

  20. #100
    Join Date
    May 2006
    Posts
    4047

    Re: need help to get kflop and and Kmotion up and running

    Hi jossa,

    Thanks for your patience. Any documentation you come up with would be greatly appreciated.

    Regards
    TK
    http://dynomotion.com

Page 5 of 6 3456

Similar Threads

  1. Questions about Kmotion (Kflop+SnapAmp)
    By Buruhazard in forum Dynomotion/Kflop/Kanalog
    Replies: 58
    Last Post: 05-26-2017, 06:48 PM
  2. KMotion/KFlop Test Version 4.33a Available - Videos
    By TomKerekes in forum Dynomotion/Kflop/Kanalog
    Replies: 0
    Last Post: 05-23-2014, 08:00 AM
  3. Is Kflop/Kmotion CNC right for me?
    By Phy6 in forum Dynomotion/Kflop/Kanalog
    Replies: 6
    Last Post: 04-01-2014, 01:19 AM
  4. KMotion/KFlop Version 4.31 Released
    By TomKerekes in forum Dynomotion/Kflop/Kanalog
    Replies: 0
    Last Post: 03-12-2014, 11:08 PM
  5. Kmotion/KFLOP - Z axis as DRO
    By drb_001 in forum Dynomotion/Kflop/Kanalog
    Replies: 2
    Last Post: 05-29-2013, 05:33 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
  •