Kfop+Kstep loosing steps


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

Thread: Kfop+Kstep loosing steps

  1. #1
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default Kfop+Kstep loosing steps

    A short story: been using Mach+smoothstepper for 7 years and never happy with both,
    Mach not that reliable, rounding corner,jerky movement,Smoothstepper: disconnect anytime
    And this issue never been solved, so I am looking for a replacement for both, bought kfop
    a year ago but afraid to use it because I don’t know anything about c language, after reading all posts from “fish4fun” I decided take it out of the drawer and hook it up, my first impression is how smooth my stepper sound, and while it run a gcode I try to open autocad, word, coreldraw and even watch video but never have disconnect issue and it return
    to 12 o’clock pos all the time with gecko 203v, have been leave my PC and kflop on for 2 months straight but no disconnect nightmare that I have with SS, so I am so exciting, have to make this wonderful stuff to work. so just bought kstep to simplify hookup, configuration, hope someone can help with kstep loosing steps.
    Kflop+kstep
    My set-up: kmotion cnc ver.428
    - Power supply: 24v-4.5a connect to J1
    - Voltage clamp : A installed – B install – C removed (25v)
    - Stepper PK266-02A bipolar 1.4a – 5v -current set: L installed, H,M removed
    - Isolate jumper both installed, using 5 v from usb
    - JR1, J6 no connections
    I am using kmotioncnc ver. 428, using c:\kmotion428\cprograms\kstep\InitKStep3Axis.c
    I don’t change anything except toolsetup\trajectoryplanner\count-inch from 10,000
    To 5,000 because stepper spin too fast and stall, there are no load on all steppers, I put a tape on stepper pole at 12 o’clock position and run a gcode, after finishing it not return 12 o’clock position anymore, I removed kstep and using Gecko 203v , all setup the same and no lost step at all, I can let it runs gcode all day without any loosing step, is there anything that I am missing, please help. I also tried to remove both isolate jumper and hook up 5v to
    J6 but get the same problem.

    Similar Threads:


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

    Default

    Hi Itran2000,

    Could you try increasing the step pulse to 4us with

    FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80;

    Regards

    Regards
    TK http://dynomotion.com


  3. #3
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80;

    Hi, Tom
    where do I add this line to ? I open c:\kmotion428\DSP_KFLOP\KMotionDef.h
    and change this line: #define STEP_PULSE_LENGTH_ADD 0x06 to #define STEP_PULSE_LENGTH_ADD 63 + 0x80
    is this the correct way ? otherwise can you attach a file so I just copy and replace,
    by the way it lost certain amount each time i run a 3 minute gcode, from 12:00 to 12:03 and 12:06 each time,
    not randomize, I also tried new power supply 40v-15a, thank for your help.
    ltran2000



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

    Default

    Hi Itran2000,

    No. You would add that exact line of C code into your InitKStep3Axis.c program to the beginning of the main function. Such as:

    #include "KMotionDef.h"

    // Defines axis 0, 1, 2 as simple step dir TTL outputs for KSTEP
    // enables them
    // sets them as an xyz coordinate system for GCode

    int main()
    {
    double T0, LastX=0, LastY=0, LastZ=0, Tau;

    KStepPresent=TRUE; // enable KSTEP input multiplexing

    FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80;

    .
    .
    .

    Regards
    TK http://dynomotion.com


  5. #5
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default Problem solved

    Problem solved, thanks Tom for your help, if i can can make this work, everyone can, like i said i don't know anything about C language, this is a very affordable system:
    -- klop $250 + kstep $200(4 drives) +free kmotioncnc = $450 plus a super support,
    next i will figure out how to hook-up relay output for spindle and home/limit switch and all will be set, I will report back when i have time to hook-up to real router and see how it perform, Thanks Tom



  6. #6
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    I tested some more after adding that line code and no more miss steps,
    now how can i slave channel#3 to channel#0 (X axis),
    this is how i do it :
    --- open kmotion, click on "config&flash"
    --- channel=3
    --- axis modes, input=no input, output=step dir
    --- input channel, 0, gain=1, offset=0
    --- outputchannel, 11, gain=1, offset=0
    --- master/slave, slave gain=1, master axis=0
    --- click on "download channel"
    --- click on "c code clipboard"
    --- open c:\kmotion428\cprograms\kstep\InitKStep3Axis.c
    --- paste the clipboard into "InitKStep3Axis.c" right after
    the end of channel 2
    --- add "EnableAxisDest(3,0);" at the end of channel 3
    is this the correct way to do it ? seem it work for me but just make sure i did it right. Thanks



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

    Default

    Yes that sounds correct to me. Homing Slaved axes is usually a bit tricky. Usually the axes are de-slaved, then both homed independently but at the same time while each watching for separate home switches and stopping independently.

    Regards

    Regards
    TK http://dynomotion.com


  8. #8
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Thanks Tom, I just notice that after finishing a job a few seconds kstep
    turn-off all axises off completely, it should reduce current when idle but not turning off, because when I change tool bit i may move the gantry, how do i change this, thanks.



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

    Default

    The loop at the end of the Init.c program is what does this. Delete the entire loop and it will never disable. If necessary it might be possible to PWM the enable to maintain a reduced current.

    Regards

    Regards
    TK http://dynomotion.com


  10. #10
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    I am sorry I don't know how to do this either, can you write a script for
    "PWM the enable to maintain a reduced current" and exactly where to add
    to, thanks



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

    Default

    Itran2000,

    Try replacing the forever loop with the attached code (I just hope it doesn't making an annoying noise turning off and on at 2.5KHz).

    Otherwise did you try deleting the entire loop?

    Regards

    Attached Files Attached Files
    Regards
    TK http://dynomotion.com


  12. #12
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Yes, I did deleted " for (; // loop forever...." to the end, except the very last line " return 0;" and it no longer turn-off any more, I also added the "PWM enable", my steppers are not making any noise at all. Thanks



  13. #13
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Hi, Tom
    Can you help with relay on/off set up for spindle, I tried to hook-up
    but seem like it is not working, here is my set-up:
    ---power supply 24V+ to kstep JP33-pin1(relay 0+)
    ---power supply 24V- to relay 24V-
    ---relay 24V+ to kstep JP33-pin2(relay 0-)
    --- a diode across relay pins.
    Do I need a script or kflop comes with script by default ?
    by looking at "InitKStep3Axis" I don't see any relate info there.Thanks



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

    Default

    Hi Itran2000,


    The wiring sounds correct. You didn't specify the direction of the diode. If placed the wrong way it will short circuit the Relay. It should "point" from the negative to the positive relay terminals so it doesn not normally conduct.

    See:

    Using KStep

    under Relay Driver Outputs

    You can just use the Digital IO Screen to test. All you need to do as set as an output and toggle the state.

    From C code it would be:

    SetBitDirection(0,1); // set bit 0 (Relay0) as an output
    SetBit(0); // set bit 0 (Relay0) on

    Regards

    Regards
    TK http://dynomotion.com


  15. #15
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom
    my wiring is correct (also the diode) after adding
    " SetBitDirection(0,1); // set bit 0 (Relay0) as an output
    SetBit(0); // set bit 0 (Relay0) on"
    to InitKStep3Axis.c ,
    from KmotionCNC when I click on INIT button the relay on right away, (I can turn relay on/off from Kmotion), It should be turn on at
    beginning of Gcode and off after finish the gcode, can I have a code for this, Thanks



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

    Default

    Hi Itran2000,

    What is the purpose of the relay? Spindle? You can assign an MCode to turn on the relay and another to turn it off. Normally M3 and M5 are assigned to turn on and off the spindle. Then place M3 at the beginning of the GCode and an M5 at the end.

    Change the code in the Init program from SetBit to ClearBit so the relay will be off when the system is initialized.

    Regards

    Regards
    TK http://dynomotion.com


  17. #17
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom
    Yes, relay for spindle on/off, Gcode contain M3 and M5
    how do I change from setbit to clearbit ?



  18. #18
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    and exactly where to add these line to InitKStep3Axis.c
    SetBitDirection(0,1); // set bit 0 (Relay0) as an output
    SetBit(0); // set bit 0 (Relay0) on

    Thanks



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

    Default

    Hi Iran2000,

    You may as well add those lines toward the beginning of the Init.c main program. For example just before this line:

    ch0->InputMode=NO_INPUT_MODE;

    But as I described change SetBit to a ClearBit so the Spindle is initially off.

    Within KMotionCNC under Tool Setup | M3-M9

    Configure M3 to turn on bit 0 and configure M5 to turn off bit 0.

    Regards

    Regards
    TK http://dynomotion.com


  20. #20
    Registered
    Join Date
    May 2006
    Location
    USA
    Posts
    62
    Downloads
    0
    Uploads
    0

    Default

    Hi Tom
    From Kmotioncnc/toolsetup I adjust to:

    ----M3 I/Obit setbit 0 to 1
    ----M5 I/Obit setbit 0 to 0

    and add your code: SetBitDirection(0,1); // set bit 0 (Relay0) as an output
    SetBit(0); // set bit 0 (Relay0) on

    the relay on right away after I click INIT button, after i replace your code
    with this code from the manual:

    SetBitDirection(0,1); //set as output

    SetBit(0); // turn output on

    ClearBit(0); // turn output off

    everything working as it should be, I just post here in case someone want to use it. Thanks for all your help.



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

Kfop+Kstep loosing steps

Kfop+Kstep loosing steps