KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives


Results 1 to 14 of 14

Thread: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

  1. #1

    Default KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi,

    I retrofitted a knee mill a while back. Most of what I have been cutting has been fairly simple geometry and it has been working fine. Today I am working on a very complex mold machining so true 3-axis machining made of polylines (about 2 million lines of g-code per operation). I can't get through more than about 10 minutes of machining, sometimes much less, without the gecko drives disengaging.

    I am using Sprutcam9. I manually edited my g-code file to add G64 to turn on constant velocity. It really smooths things out but it does not seem to help with the disengaging problem any. On the Mach3 Settings page I have CV Distance and CV Feedrate turned off. Side question, does anyone know how to get Sprutcam to post G64? I can't find a setting anywhere that allows you to do this. Also, will anything other than G61 turn it off i.e. if I have G64 at the top of the file it should stay on for every case except a G61 right?

    Code:
    %
    OWater_Jacket_Core_Box_Bottom_
    G54G90 G17 G40 G80
    G00G49
    G20
    (Finishing drive )
    G54
    T1M6
    (TOOL : 1/2" K600 Ball )
    S3056M3
    G00X-18.224 Y0.7405 Z0.2625 G43 H1
    Z-1.9475
    M8
    G01Z-2. F22.9 G64
    Y0.7605Z-1.9847 F45.8
    Y0.7732Z-1.973
    Y0.7858Z-1.9596
    Y0.7985Z-1.944
    Y0.8239Z-1.9097
    Y0.8745Z-1.8381
    Y0.9252Z-1.7668
    .
    .
    .


    Here are the sp
    ecs on my machine:
    -Mach3 version R3.042.040
    -KFLOP software version 4.32
    -Kent KTM 380 Knee mill
    -HEDS-5640-A06 500 countquadrature
    encoders https://www.digikey.com/product-deta...025-ND/1990423
    -Gecko G320X Servo Drives
    -0.2" / rev ball screws
    -Belt reduction (t
    wo - one) from servo to ballscrews
    -KL34-180-72 Servos http://www.automationtechnologiesinc...wed-rear-shaft

    Here is my plugin config file:
    Code:
    #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(KAN_TRIG_REG)=4;      // Mux PWM0 to JP7 Pin5 IO 44 for KSTEP 
    
    
        FPGA(STEP_PULSE_LENGTH_ADD) =  32 + 0x80;  // set polarity and pulse length to 4us
        
        ch0->InputMode=NO_INPUT_MODE;
        ch0->OutputMode=STEP_DIR_MODE;
        ch0->Vel=6000;
        ch0->Accel=27;
        ch0->Jerk=100000;
        ch0->P=0;
        ch0->I=0.01;
        ch0->D=0;
        ch0->FFAccel=0;
        ch0->FFVel=0;
        ch0->MaxI=200;
        ch0->MaxErr=1e+006;
        ch0->MaxOutput=200;
        ch0->DeadBandGain=1;
        ch0->DeadBandRange=0;
        ch0->InputChan0=0;
        ch0->InputChan1=0;
        ch0->OutputChan0=8;
        ch0->OutputChan1=0;
        ch0->MasterAxis=-1;
        ch0->LimitSwitchOptions=0x100;
        ch0->LimitSwitchNegBit=0;
        ch0->LimitSwitchPosBit=0;
        ch0->SoftLimitPos=1e+009;
        ch0->SoftLimitNeg=-1e+009;
        ch0->InputGain0=1;
        ch0->InputGain1=1;
        ch0->InputOffset0=0;
        ch0->InputOffset1=0;
        ch0->OutputGain=-1;
        ch0->OutputOffset=0;
        ch0->SlaveGain=1;
        ch0->BacklashMode=BACKLASH_OFF;
        ch0->BacklashAmount=0;
        ch0->BacklashRate=0;
        ch0->invDistPerCycle=1;
        ch0->Lead=0;
        ch0->MaxFollowingError=1000000000;
        ch0->StepperAmplitude=20;
    
    
        ch0->iir[0].B0=1;
        ch0->iir[0].B1=0;
        ch0->iir[0].B2=0;
        ch0->iir[0].A1=0;
        ch0->iir[0].A2=0;
    
    
        ch0->iir[1].B0=1;
        ch0->iir[1].B1=0;
        ch0->iir[1].B2=0;
        ch0->iir[1].A1=0;
        ch0->iir[1].A2=0;
    
    
        ch0->iir[2].B0=0.000769;
        ch0->iir[2].B1=0.001538;
        ch0->iir[2].B2=0.000769;
        ch0->iir[2].A1=1.92076;
        ch0->iir[2].A2=-0.923833;
        EnableAxisDest(0,0);
    
    
        ch1->InputMode=NO_INPUT_MODE;
        ch1->OutputMode=STEP_DIR_MODE;
        ch0->Vel=6000;
        ch0->Accel=27;
        ch0->Jerk=100000;
        ch1->P=0;
        ch1->I=0.01;
        ch1->D=0;
        ch1->FFAccel=0;
        ch1->FFVel=0;
        ch1->MaxI=200;
        ch1->MaxErr=1e+006;
        ch1->MaxOutput=200;
        ch1->DeadBandGain=1;
        ch1->DeadBandRange=0;
        ch1->InputChan0=1;
        ch1->InputChan1=0;
        ch1->OutputChan0=9;
        ch1->OutputChan1=0;
        ch1->MasterAxis=-1;
        ch1->LimitSwitchOptions=0x100;
        ch1->LimitSwitchNegBit=0;
        ch1->LimitSwitchPosBit=0;
        ch1->SoftLimitPos=1e+009;
        ch1->SoftLimitNeg=-1e+009;
        ch1->InputGain0=1;
        ch1->InputGain1=1;
        ch1->InputOffset0=0;
        ch1->InputOffset1=0;
        ch1->OutputGain=1;
        ch1->OutputOffset=0;
        ch1->SlaveGain=1;
        ch1->BacklashMode=BACKLASH_OFF;
        ch1->BacklashAmount=0;
        ch1->BacklashRate=0;
        ch1->invDistPerCycle=1;
        ch1->Lead=0;
        ch1->MaxFollowingError=1000000000;
        ch1->StepperAmplitude=20;
    
    
        ch1->iir[0].B0=1;
        ch1->iir[0].B1=0;
        ch1->iir[0].B2=0;
        ch1->iir[0].A1=0;
        ch1->iir[0].A2=0;
    
    
        ch1->iir[1].B0=1;
        ch1->iir[1].B1=0;
        ch1->iir[1].B2=0;
        ch1->iir[1].A1=0;
        ch1->iir[1].A2=0;
    
    
        ch1->iir[2].B0=0.000769;
        ch1->iir[2].B1=0.001538;
        ch1->iir[2].B2=0.000769;
        ch1->iir[2].A1=1.92081;
        ch1->iir[2].A2=-0.923885;
        EnableAxisDest(1,0);
    
    
        ch2->InputMode=NO_INPUT_MODE;
        ch2->OutputMode=STEP_DIR_MODE;
        ch2->Vel=4000;
        ch2->Accel=400000;
        ch2->Jerk=4e+006;
        ch2->P=0;
        ch2->I=0.01;
        ch2->D=0;
        ch2->FFAccel=0;
        ch2->FFVel=0;
        ch2->MaxI=200;
        ch2->MaxErr=1e+006;
        ch2->MaxOutput=200;
        ch2->DeadBandGain=1;
        ch2->DeadBandRange=0;
        ch2->InputChan0=2;
        ch2->InputChan1=0;
        ch2->OutputChan0=10;
        ch2->OutputChan1=0;
        ch2->MasterAxis=-1;
        ch2->LimitSwitchOptions=0x100;
        ch2->LimitSwitchNegBit=0;
        ch2->LimitSwitchPosBit=0;
        ch2->SoftLimitPos=1e+009;
        ch2->SoftLimitNeg=-1e+009;
        ch2->InputGain0=1;
        ch2->InputGain1=1;
        ch2->InputOffset0=0;
        ch2->InputOffset1=0;
        ch2->OutputGain=1;
        ch2->OutputOffset=0;
        ch2->SlaveGain=1;
        ch2->BacklashMode=BACKLASH_OFF;
        ch2->BacklashAmount=0;
        ch2->BacklashRate=0;
        ch2->invDistPerCycle=1;
        ch2->Lead=0;
        ch2->MaxFollowingError=1000000000;
        ch2->StepperAmplitude=20;
    
    
        ch2->iir[0].B0=1;
        ch2->iir[0].B1=0;
        ch2->iir[0].B2=0;
        ch2->iir[0].A1=0;
        ch2->iir[0].A2=0;
    
    
        ch2->iir[1].B0=1;
        ch2->iir[1].B1=0;
        ch2->iir[1].B2=0;
        ch2->iir[1].A1=0;
        ch2->iir[1].A2=0;
    
    
        ch2->iir[2].B0=0.000769;
        ch2->iir[2].B1=0.001538;
        ch2->iir[2].B2=0.000769;
        ch2->iir[2].A1=1.92081;
        ch2->iir[2].A2=-0.923885;
        EnableAxisDest(2,0);
    
    
        DefineCoordSystem(0,1,2,-1);
        
        SetBitDirection(45,1);  // set Enable Signal as Output
        SetBit(45);                // Enable the amplifiers
        
    //  Add a small amount of Coordinated Motion Path smoothing if desired
    //    Tau = 0.001;  // seconds for Low Pass Filter Time Constant
    //    KLP = exp(-TIMEBASE/Tau);
        KLP=0; // force to 0 to disable
    //    printf("Tau=%f KLP=%f\n",Tau,KLP);
        
        
        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);
            }
        }
    
    
        return 0;
    }
    ...and Mach3 tuning settings


    I turned the jerk settings in the .c file way down and noticed it impacts the X axis when I jog but does not seem to have an impact on the Y axis. With the current settings the X axis is extremely sluggish while Y is quite zippy. Does anyone know what I have done wrong?

    Thanks,
    Adam





    Similar Threads:
    Attached Thumbnails Attached Thumbnails KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives-mach3tuning-jpg  


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

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Adam,

    Could the drives be overheating due to lots of constant acceleration or deceleration? Are your Accelerations for all 3 Axis on the Mach3 Tuning Screen all set at 5 in/s^2?

    You have a mistake in your Init C file where you set the X axis Velocity twice but not the Y Velocity. Change:

    ch1->InputMode=NO_INPUT_MODE;
    ch1->OutputMode=STEP_DIR_MODE;
    ch0->Vel=6000;
    ch0->Accel=27;
    ch0->Jerk=100000;
    ch1->P=0;
    ch1->I=0.01;

    to:

    ch1->InputMode=NO_INPUT_MODE;
    ch1->OutputMode=STEP_DIR_MODE;
    ch1->Vel=6000;
    ch1->Accel=27;
    ch1->Jerk=100000;
    ch1->P=0;
    ch1->I=0.01;


    Changing these accelerations should have no effect on your problem that occurs when running a Job. Mach3 and the Mach3 "Motor Tuning" parameters will determine the motion while running a job.

    Other thoughts:

    You might remove these lines regarding KStep as I don't think you have a KStep

    KStepPresent=TRUE; // enable KSTEP input multiplexing
    FPGA(KAN_TRIG_REG)=4; // Mux PWM0 to JP7 Pin5 IO 44 for KSTEP

    You might also remove the "for" loop at the end to disabled KStep when idle.


    It looks like your pulse rates are slow so try setting the max pulse width. Change:

    FPGA(STEP_PULSE_LENGTH_ADD) = 32 + 0x80; // set polarity and pulse length to 4us

    to

    FPGA(STEP_PULSE_LENGTH_ADD) = 63 + 0x80; // set polarity and pulse length to 4us


    Consider upgrading to KMotion V4.33

    Consider upgrading Mach3 to V 3.043.066 (some may disagree)

    Consider changing the allowed following error of the Geckos

    Consider wiring the encoder signals back to KFLOP so KFLOP can observe what is happening. Its possible to have KFLOP capture the motion trajectory and following errors.

    Or at least the Gecko fault outputs. That way KFLOP can tell you what were the previous trajectory commands before the fault.

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  3. #3

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Tom,

    Thanks for the quick reply. I made the code changes you recommended. I could not see my error where I set the X velocity twice for the life of me. Jerk is responding like it should now that I changed it. I'll upgrade the software later. I plan to get input from the encoders (or better yet some scales) wired into the KFLOP, just need to schedule the time to do it.

    I'm now thoroughly confused about the Vel, Accel, and Jerk in KFLOP. I read all the documentation but it is still not sinking in. No matter what I set Vel and Accel to it does not seem to make a difference either running G-code or jogging. Jerk is the only one that seems to respond. If I set Vel in the KFLOP .c code to a low number lets say 1,000 should it not limit travel to 1,000 steps per second or 3ipm[(1,000 step/s) / (1/20,000 step/in)] = 0.05 in/s = 3 ipm)? When I do this I still get 200ipm rapids and 45ipm feed from my g-code file or jogging.

    Also I think I read somewhere in the documentation that they should be about an order of magnitude away from each other. In Mach3 I have 200ipm for velocity and 5in/s/s for acceleration. This was based on what gave me a warm fussy when manually jogging back and forth. So for a Jerk setting in Kflop adding an order of magnitude to 5in/s/s (5step/s/s *20,000 in/s/s = 100,000 step/s/s), then a ballpark setting for jerk would be 1,000,000 step/s/s/s.

    Here is what I understand the units in Kflop to be. Please correct me if I am wrong:
    ch0->Vel=6000; (steps/second)
    ch0->Accel=27; (steps/second/second)
    ch0->Jerk=100000; (steps/second/second/second)

    Thanks,
    Adam



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

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Adam

    I could not see my error where I set the X velocity twice for the life of me.
    I assume you see it now? It wasn't only for velocity.

    Jerk is responding like it should now that I changed it
    I'm not sure why you refer to Jerk here. Velocity and Acceleration are easier to observe.


    I'm now thoroughly confused about the Vel, Accel, and Jerk in KFLOP. I read all the documentation but it is still not sinking in. No matter what I set Vel and Accel to it does not seem to make a difference either running G-code or jogging.
    You might read this article:
    Dynomotion

    Certain motions that are controlled by KFLOP such as Homing, Jogging, Tool Change sequences, and such use the settings in KFLOP. But all the GCode motions (Feeds and Rapids) are planned by Mach3 and KFLOP just does exactly what it is told so the settings in Mach3 apply. So part of your statement makes sense. It also makes a difference what type of Jogging you are doing? Steps or Continuous.

    You are sort of doing things backwards. First fully understand your system and its limitations as explained in the article above using KMotion.exe and not using Mach3 at all. Only after that configure Mach3.

    Here is what I understand the units in Kflop to be. Please correct me if I am wrong:
    ch0->Vel=6000; (steps/second)
    ch0->Accel=27; (steps/second/second)
    ch0->Jerk=100000; (steps/second/second/second)
    Yes those are the correct units. It normally is written as steps/sec, steps/sec^2, steps/sec^3

    Regards

    Regards
    TK http://dynomotion.com


  5. #5

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Tom,

    I assume you see it now? It wasn't only for velocity.
    Yes I see I had it screwed up for Accel and Jerk as well.

    I'm not sure why you refer to Jerk here. Velocity and Acceleration are easier to observe.
    This is why I was confused. If I reduce Jerk enough it results in a slower "acceleration" when jogging in continuous mode via Mach3 and it seems to do the same when running g-code via Mach3 as well. But no matter what values I try for velocity and acceleration I never see a change with anything when using Mach3. However I now see that it does make a difference when running KMotionCNC. I did not see a change before when running KMotionCNC while testing the X axis because of the code error you mentioned. If I remember correctly this is the reason I am going about things backwards - tuning Mach3 before Kflop. When I first set up the machine I used random values for velocity and acceleration because they did not seem to have any effect. So I set the limits in Mach3 and it worked at the time so I called it good.

    You might read this article:
    Dynomotion
    Thanks for the doc. I have read it before but I'll give it another read.

    I'm thinking I need to make the time to get encoders wired in to the Kflop to tell what is really going on with the system.


    Thanks,
    Adam

    Last edited by goldenfab; 06-03-2016 at 12:02 PM.


  6. #6

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    I did some more tweaking on my machine this morning.

    I upgraded to KMotion V4.33 and Mach3V 3.043.066

    From what I have gathered experimentally and reading on some other forums it seems the jerk value does have an affect when running Mach3 but only for moves such as continuous jogging. The part I was having trouble understanding with is dues to my assumption that since the jerk setting effects Mach3 when continuous jogging, it seemed natural to assume that the velocity and acceleration settings should as well, this is not the case. I did not gather this from any of the documentation but maybe its because I can be a bit dense at times.

    I read somewhere on a forum someone said that when Mach3 is in CV mode that it can increase the acceleration limits by 100%. I still need to verify with artsoft so don't take my word for it as fact. If this is the case it explains what I have been seeing. That is I set the acceleration limits based on what felt right when jogging. For most GCode moves the acceleration seemed to adhere to the acceleration limit I set. However, when running a lot of short polylines with CV on the acceleration seemed very noticeably higher. So to get around this I bumped my acceleration down to 2in/s^2. Alarmingly slow but its running my part with no problems so far....

    It is really unfortunate that Mach3 has infinite jerk. KMotionCNC runs so much better than Mach3 when you tune down the jerk! The problem is I can't use my jogging pendant and probe with KMotionCNC. Is there any way to get Mach3 to adhere to the Kflop jerk setting? I'm guessing this is all on the Mach3 side.

    The only issue I have remaining is that KMotionCNC is still not working 100%. I tuned the vel, accel, and jerk values by the seat of my pants and it all works good jogging. I can get 300ipm rapids jogging without issue. However when I go to run my GCode below the drives fault out halfway through my first rapid from a starting position of (0,0,0).

    Code:
    %
    OWater_Jacket_Core_Box_Bottom_
    G54 G90 G17 G40 G80
    G00 G49
    G20
    ( Finishing drive )
    G54
    T1 M6
    ( TOOL : 1/2" K600 Ball )
    S3056 M3
    G00 X-18.224 Y0.7405 Z0.2625 G43 H1
    Z-1.9475
    M8
    G01 Z-2. F22.9 G64
    Y0.7605 Z-1.9847 F45.8
    Y0.7732 Z-1.973
    Y0.7858 Z-1.9596
    Y0.7985 Z-1.944
    Y0.8239 Z-1.9097
    Y0.8745 Z-1.8381
    Y0.9252 Z-1.7668
    Y0.9759 Z-1.6953
    Y1.0266 Z-1.6238
    Y1.0773 Z-1.5543
    Y1.128 Z-1.4861
    Y1.1787 Z-1.4195
    Y1.2294 Z-1.3523
    Y1.2801 Z-1.2855
    Y1.3054 Z-1.2563
    Y1.3181 Z-1.2429
    Y1.3308 Z-1.2309
    Y1.3561 Z-1.2102
    Y1.3814 Z-1.1936
    X-18.2249 Y1.3952 Z-1.1886
    X-18.225 Y1.3962 Z-1.1884
    X-18.2249 Y1.3994 Z-1.1867
    X-18.2245 Y1.4072 Z-1.1823
    X-18.2243 Y1.413 Z-1.1795
    Y1.4203 Z-1.1769
    X-18.2246 Y1.4275 Z-1.1747
    X-18.225 Y1.4331 Z-1.1736
    X-18.2242 Y1.4442 Z-1.1685
    X-18.2239 Y1.452 Z-1.1657
    X-18.2241 Y1.4978 Z-1.1555
    Y1.5 Z-1.1552
    X-18.2245 Y1.5165 Z-1.1536
    Y1.5173 Z-1.1534
    X-18.224 Y1.5383 Z-1.1497
    Y1.5409 Z-1.1494
    Y1.6293 Z-1.1413
    Y1.7178 Z-1.132
    Y1.762 Z-1.1259
    Y1.8062 Z-1.1174
    Y1.8505 Z-1.1061
    X-18.224 Y1.8947 Z-1.0924
    Y1.9831 Z-1.063
    Y2.0273 Z-1.0508
    Y2.0716 Z-1.0414
    X-18.2241 Y2.1158 Z-1.0349
    Y2.16 Z-1.0308
    Y2.2484 Z-1.0274
    Y2.2497
    X-18.2245 Y2.28 Z-1.0277
    Y2.2803
    X-18.2241 Y2.3871 Z-1.0284
    Y2.3875
    Y2.4614 Z-1.03
    Y2.5353 Z-1.0318
    Y2.6092 Z-1.0341
    Y2.6831 Z-1.0365
    Y2.757 Z-1.0402
    Y2.8309 Z-1.0448
    Y2.9048 Z-1.0507
    Y2.9417 Z-1.0544
    Y2.9787 Z-1.0588
    Y2.9801 Z-1.0591
    X-18.2244 Y3.0005 Z-1.0626
    Y3.0011 Z-1.0626
    X-18.224 Y3.0277 Z-1.0664
    Y3.0297 Z-1.0667
    X-18.2241 Y3.0915 Z-1.0794
    X-18.2242 Y3.1533 Z-1.0944
    X-18.2243 Y3.2151 Z-1.1107
    X-18.2244 Y3.2769 Z-1.1272
    Y3.277
    X-18.2242 Y3.3117 Z-1.1363
    X-18.2239 Y3.3466 Z-1.1472
    Y3.3475 Z-1.1475
    X-18.224 Y3.3981 Z-1.1671
    Y3.4005 Z-1.1681
    X-18.2245 Y3.4165 Z-1.1759
    Y3.4174 Z-1.1763
    X-18.224 Y3.4344 Z-1.1831
    Y3.4378 Z-1.1846
    X-18.2242 Y3.4756 Z-1.2046
    X-18.2244 Y3.5136 Z-1.2269
    X-18.2243 Y3.5973 Z-1.2779
    X-18.2242 Y3.681 Z-1.3302
    X-18.224 Y3.7648 Z-1.3808
    X-18.2239 Y3.8486 Z-1.4286
    Y3.9085 Z-1.4615
    G03 G19 Y4.1482 Z-1.5798 J1.918 K3.586
    G03 Y4.3476 Z-1.6683 J5.321 K11.716
    G01 Y4.4478 Z-1.7113
    G02 Y5.0471 Z-1.9879 J-4.136 K-9.748
    G01 Y5.0719 Z-2.
    X-18.2202 Y5.086 Z-1.9995 F22.9
    X-18.2162 Y5.1001 Z-1.9991
    X-18.212 Y5.114 Z-1.9988
    X-18.2078 Y5.128 Z-1.9989
    X-18.2033 Y5.1419 Z-1.9988
    X-18.1987 Y5.1557 Z-1.9991
    X-18.1938 Y5.1695 Z-1.9993
    X-18.1889 Y5.1832 Z-2.
    G03 Y4.8052 Z-1.8163 J-9.13 K-18.305 F45.8
    G03 Y4.4464 Z-1.657 J-4.954 K-10.675
    G02 Y4.0877 Z-1.4969 J3.857 K9.126
    G02 Y3.8485 Z-1.3721 J1.681 K3.51
    G01 X-18.189 Y3.7648 Z-1.3233
    X-18.1891 Y3.681 Z-1.272
    X-18.1893 Y3.5973 Z-1.2195
    Y3.5554 Z-1.1939
    X-18.1894 Y3.5135 Z-1.1696
    Y3.5134 Z-1.1695
    X-18.1892 Y3.4758 Z-1.1489
    X-18.1889 Y3.438 Z-1.1304
    X-18.189 Y3.4334 Z-1.1284
    X-18.1894 Y3.4165 Z-1.1216
    Y3.4156 Z-1.1212
    X-18.1891 Y3.4014 Z-1.115
    Y3.3982 Z-1.1137
    X-18.1889 Y3.3475 Z-1.0957
    Y3.3464 Z-1.0953
    X-18.1892 Y3.3116 Z-1.0851
    X-18.1894 Y3.2766 Z-1.0757
    X-18.1893 Y3.215 Z-1.0594
    X-18.1892 Y3.1533 Z-1.0434
    X-18.1891 Y3.0915 Z-1.0288
    X-18.1889 Y3.0298 Z-1.0166
    Y3.0271 Z-1.0162
    X-18.1894 Y3.0005 Z-1.0124
    Y2.9999 Z-1.0123
    X-18.1892 Y2.9806 Z-1.0092
    Y2.9787 Z-1.0089
    Y2.9048 Z-1.001
    Y2.8309 Z-0.9952
    Y2.757 Z-0.9907
    Y2.6831 Z-0.9871
    Y2.6092 Z-0.9845
    Y2.5353 Z-0.9823
    Y2.4614 Z-0.9804
    Y2.387 Z-0.9789
    X-18.1895 Y2.2802 Z-0.9781
    Y2.2799
    X-18.1891 Y2.2501 Z-0.9779
    Y2.2485
    Y2.2042 Z-0.979
    Y2.16 Z-0.9812
    X-18.1891 Y2.1158 Z-0.9851
    Y2.0716 Z-0.9912
    Y2.0273 Z-0.9999
    Y1.9831 Z-1.0114
    Y1.9389 Z-1.0253
    X-18.189 Y1.8947 Z-1.0402
    Y1.8505 Z-1.0545
    Y1.8284 Z-1.0609
    Y1.8062 Z-1.0666
    Y1.762 Z-1.0757
    Y1.7178 Z-1.0822
    X-18.189 Y1.6736 Z-1.0873
    Y1.6294 Z-1.0917
    Y1.5409 Z-1.0998
    Y1.5375 Z-1.1002
    X-18.1895 Y1.5165 Z-1.1033
    Y1.5156 Z-1.1034
    X-18.1891 Y1.5009 Z-1.1051
    Y1.4979 Z-1.1055
    X-18.189 Y1.475 Z-1.1095
    X-18.1889 Y1.4521 Z-1.1146
    X-18.1893 Y1.4417 Z-1.1177
    X-18.1897 Y1.4356 Z-1.1199
    X-18.1899 Y1.4331 Z-1.1208
    X-18.1897 Y1.43 Z-1.1215
    X-18.1893 Y1.4204 Z-1.1241
    Y1.4132 Z-1.1265
    X-18.1895 Y1.4053 Z-1.1296
    X-18.1899 Y1.3975 Z-1.133
    X-18.189 Y1.3814 Z-1.1386
    Y1.3561 Z-1.1514
    Y1.3308 Z-1.1676
    Y1.3054 Z-1.1873
    Y1.2801 Z-1.2113
    Y1.2547 Z-1.2389
    Y1.2294 Z-1.2699
    Y1.1787 Z-1.3375
    Y1.128 Z-1.4044
    Y1.0773 Z-1.4711
    Y1.0266 Z-1.5394
    Y0.9759 Z-1.6097
    Y0.9252 Z-1.6813
    Y0.8745 Z-1.7526
    Y0.8239 Z-1.8242
    Y0.7732 Z-1.8951
    Y0.7605 Z-1.9123
    G02 Y0.7225 Z-1.9519 J-0.16 K0.115
    G01 Y0.7098 Z-1.9611
    Y0.6971 Z-1.9692
    Y0.6718 Z-1.9831
    Y0.6464 Z-1.9951
    Y0.6351 Z-2.
    X-18.1803 Y0.6115 Z-1.9997 F22.9
    X-18.1717 Y0.5878
    X-18.1628 Y0.5643 Z-1.9999
    X-18.154 Y0.5407 Z-2.
    Y0.5415 Z-1.9997 F45.8
    Y0.5438 Z-1.999
    Y0.5526 Z-1.9963
    Y0.5702 Z-1.9904
    Y0.5704 Z-1.9904
    Y0.5958 Z-1.9813
    Y0.6211 Z-1.9714
    Y0.6464 Z-1.96
    Y0.6591 Z-1.9538
    G03 Y0.7098 Z-1.921 J-0.107 K0.22
    G01 Y0.7161 Z-1.9151
    Y0.7225 Z-1.9085
    Y0.7288 Z-1.9011
    Y0.7352 Z-1.8929
    Y0.7478 Z-1.8757
    Y0.7732 Z-1.8401
    Y0.8239 Z-1.769
    Y0.8745 Z-1.6977
    Y0.9252 Z-1.626
    Y0.9759 Z-1.555
    Y1.0266 Z-1.4858
    Y1.0773 Z-1.4183
    Y1.128 Z-1.3517
    Y1.1787 Z-1.2843
    Y1.204 Z-1.2506
    Y1.2294 Z-1.2194
    Y1.2547 Z-1.1916
    Y1.2801 Z-1.1672
    Y1.2927 Z-1.1565
    Y1.3054 Z-1.1466
    Y1.3308 Z-1.1295
    Y1.3498 Z-1.1186
    Y1.3561 Z-1.1153
    Y1.3814 Z-1.1038
    X-18.1548 Y1.3984 Z-1.098
    X-18.1546 Y1.4034 Z-1.096
    X-18.1543 Y1.4133 Z-1.0924
    Y1.4205 Z-1.0901
    X-18.1548 Y1.4325 Z-1.087
    X-18.1548 Y1.4331 Z-1.0869
    X-18.1546 Y1.4356 Z-1.0861
    X-18.1544 Y1.4392 Z-1.0849
    X-18.1539 Y1.4522 Z-1.0813
    X-18.154 Y1.4751 Z-1.0765
    X-18.1541 Y1.498 Z-1.0726
    Y1.5017 Z-1.0721
    X-18.1545 Y1.5165 Z-1.0703
    Y1.5173 Z-1.0702
    X-18.154 Y1.5366 Z-1.0675
    Y1.5409 Z-1.067
    Y1.6294 Z-1.0588
    Y1.6736 Z-1.0544
    Y1.7178 Z-1.0492
    Y1.762 Z-1.0426
    Y1.7841 Z-1.0383
    Y1.8062 Z-1.0332
    Y1.8284 Z-1.0272
    Y1.8505 Z-1.0206
    Y1.8947 Z-1.0061
    X-18.154 Y1.9389 Z-0.9913
    Y1.9831 Z-0.9777
    Y2.0274 Z-0.9665
    Y2.0716 Z-0.9582
    Y2.1158 Z-0.9522
    Y2.16 Z-0.9484
    X-18.1541 Y2.2042 Z-0.9463
    Y2.2485 Z-0.9453
    Y2.2506
    X-18.1545 Y2.2803 Z-0.9455
    Y2.2806
    X-18.1541 Y2.3869 Z-0.9463
    Y2.3875
    Y2.4614 Z-0.9478
    Y2.5353 Z-0.9497
    Y2.6092 Z-0.952
    Y2.6831 Z-0.9545
    Y2.757 Z-0.9581
    Y2.8309 Z-0.9627
    Y2.9048 Z-0.9684
    Y2.9417 Z-0.972
    Y2.9787 Z-0.9764
    Y2.9811 Z-0.9767
    X-18.1544 Y3.0004 Z-0.9796
    Y3.001 Z-0.9797
    X-18.154 Y3.0265 Z-0.9835
    Y3.0298 Z-0.984
    X-18.1541 Y3.0916 Z-0.996
    X-18.1542 Y3.1533 Z-1.0104
    X-18.1543 Y3.215 Z-1.0262
    X-18.1544 Y3.2768 Z-1.0426
    X-18.1542 Y3.3114 Z-1.0518
    X-18.1539 Y3.3462 Z-1.0618
    Y3.3476 Z-1.0623
    Y3.3729 Z-1.0706
    X-18.154 Y3.3793 Z-1.0728
    Y3.3812 Z-1.0735
    Y3.3816 Z-1.0736
    Y3.3824 Z-1.0739
    Y3.3983 Z-1.0797
    X-18.1541 Y3.4022 Z-1.0812
    X-18.1544 Y3.4164 Z-1.087
    Y3.4173 Z-1.0874
    X-18.154 Y3.4325 Z-1.0933
    X-18.1539 Y3.4382 Z-1.0957
    X-18.1542 Y3.4759 Z-1.1133
    X-18.1544 Y3.5136 Z-1.133
    Y3.5137 Z-1.1331
    X-18.1543 Y3.5555 Z-1.1568
    Y3.5973 Z-1.1821
    X-18.1541 Y3.6811 Z-1.2344
    X-18.154 Y3.7648 Z-1.2862
    X-18.1539 Y3.8485 Z-1.3354
    G03 Y4.2064 Z-1.517 J2.018 K3.532
    G01 Y4.3254 Z-1.5697
    G03 Y4.5644 Z-1.6732 J8.961 K20.376
    G02 Y5.0416 Z-1.8947 J-4.025 K-9.296
    G01 Y5.2551 Z-2.
    X-18.1454 Y5.2676 Z-1.9994 F22.9
    X-18.1368 Y5.2802 Z-1.9993
    X-18.1279 Y5.2925 Z-1.9994
    X-18.1189 Y5.3048 Z-2.
    G03 Y4.8603 Z-1.7828 J-14.542 K-29.186 F45.8
    G03 Y4.4437 Z-1.5971 J-5.05 K-10.771
    G02 Y4.1461 Z-1.4649 J3.588 K8.48
    G02 Y3.8485 Z-1.3099 J1.615 K3.465
    G01 X-18.119 Y3.7648 Z-1.2603
    X-18.1191 Y3.6811 Z-1.2081
    X-18.1193 Y3.5974 Z-1.1555
    Y3.5555 Z-1.1301
    X-18.1194 Y3.5137 Z-1.1063
    Y3.5136 Z-1.1062
    X-18.1192 Y3.476 Z-1.0864
    X-18.1189 Y3.4383 Z-1.0684
    X-18.119 Y3.4316 Z-1.0656
    X-18.1194 Y3.4164 Z-1.0594
    Y3.4155 Z-1.059
    X-18.1191 Y3.4031 Z-1.0537
    X-18.119 Y3.3983 Z-1.0518
    X-18.119 Y3.373 Z-1.0425
    Y3.3477 Z-1.0339
    Y3.346 Z-1.0334
    X-18.1192 Y3.3113 Z-1.0231
    X-18.1194 Y3.2766 Z-1.0137
    Y3.2765
    X-18.1193 Y3.2149 Z-0.9974
    X-18.1192 Y3.1533 Z-0.9815
    X-18.1191 Y3.0916 Z-0.9669
    X-18.1189 Y3.0299 Z-0.9547
    Y3.0259 Z-0.954
    X-18.1194 Y3.0004 Z-0.9501
    Y2.9998 Z-0.95
    X-18.1192 Y2.9816 Z-0.9472
    Y2.9787 Z-0.9468
    Y2.9417 Z-0.9423
    Y2.9048 Z-0.9387
    Y2.8309 Z-0.9329
    Y2.757 Z-0.9283
    Y2.6831 Z-0.9246
    Y2.6092 Z-0.9221
    Y2.5353 Z-0.9197
    Y2.4614 Z-0.9178
    Y2.3875 Z-0.9163
    Y2.3867
    X-18.1195 Y2.2805 Z-0.9153
    Y2.2802
    X-18.1191 Y2.251 Z-0.9151
    Y2.2485
    Y2.2043 Z-0.9161
    Y2.16 Z-0.9181
    X-18.1191 Y2.1158 Z-0.9217
    Y2.0716 Z-0.9277
    Y2.0274 Z-0.936
    Y1.9831 Z-0.9471
    Y1.9389 Z-0.9606
    Y1.8947 Z-0.9754
    X-18.119 Y1.8505 Z-0.9899
    Y1.8063 Z-1.0025
    Y1.7841 Z-1.0077
    Y1.762 Z-1.012
    Y1.7178 Z-1.0186
    Y1.6736 Z-1.0239
    X-18.119 Y1.6294 Z-1.0283
    Y1.5409 Z-1.0365
    Y1.5358 Z-1.0371
    X-18.1195 Y1.5165 Z-1.0398
    Y1.5156 Z-1.0399
    X-18.1191 Y1.5026 Z-1.0416
    X-18.1191 Y1.4981 Z-1.0422
    X-18.119 Y1.4752 Z-1.046
    X-18.1189 Y1.4523 Z-1.0509
    X-18.1195 Y1.4368 Z-1.0553
    X-18.1196 Y1.4353 Z-1.0558
    X-18.1197 Y1.4331 Z-1.0566
    X-18.1193 Y1.4207 Z-1.0599
    Y1.4134 Z-1.0622
    X-18.1196 Y1.4016 Z-1.0665
    Y1.4014 Z-1.0665
    X-18.1197 Y1.3991 Z-1.0675
    X-18.119 Y1.3814 Z-1.0738
    Y1.3561 Z-1.0854
    Y1.3308 Z-1.0997
    Y1.3054 Z-1.1167
    Y1.2927 Z-1.1265
    Y1.2801 Z-1.1368
    Y1.2547 Z-1.16
    Y1.2294 Z-1.1862
    Y1.204 Z-1.2153
    Y1.1787 Z-1.2476
    Y1.128 Z-1.3152
    Y1.0773 Z-1.382
    Y1.0266 Z-1.4489
    Y0.9759 Z-1.5175
    Y0.9252 Z-1.588
    Y0.8745 Z-1.6595
    Y0.8239 Z-1.731
    Y0.7732 Z-1.8022
    Y0.7225 Z-1.8731
    Y0.7098 Z-1.8896
    G02 Y0.6591 Z-1.929 J-0.126 K0.109
    G01 Y0.6464 Z-1.9356
    Y0.6338 Z-1.9417
    Y0.6211 Z-1.9475
    Y0.5958 Z-1.9578
    Y0.5704 Z-1.9671
    Y0.5702 Z-1.9672
    Y0.5349 Z-1.9788
    X-18.119 Y0.4996 Z-1.9894
    Y0.4644 Z-1.9991
    Y0.4607 Z-2.
    X-18.1104 Y0.4444 Z-1.9997 F22.9
    X-18.1017 Y0.4281
    X-18.0929 Y0.4118 Z-1.9998
    X-18.0842 Y0.3956 Z-2.
    Y0.3961 Z-1.9999 F45.8
    Y0.4027 Z-1.9984
    Y0.4115 Z-1.9963
    Y0.4291 Z-1.992
    X-18.0841 Y0.4644 Z-1.9831
    Y0.4996 Z-1.9733
    X-18.084 Y0.5349 Z-1.9627
    Y0.5701 Z-1.9508
    Y0.5704 Z-1.9507
    Y0.5958 Z-1.9412
    Y0.6211 Z-1.9307
    Y0.6338 Z-1.9247
    Y0.6464 Z-1.9182
    Y0.6591 Z-1.9113
    Y0.6704 Z-1.9046
    G03 Y0.6908 Z-1.8883 J-0.081 K0.122
    G01 Y0.7008 Z-1.8772
    Y0.7098 Z-1.8652
    Y0.7225 Z-1.8476
    Y0.7732 Z-1.7765
    Y0.8239 Z-1.7053
    Y0.8746 Z-1.6338
    Y0.8872 Z-1.6159
    Y0.8928 Z-1.608
    Y0.8999 Z-1.598
    Y0.9252 Z-1.5623
    Y0.9759 Z-1.492
    Y1.0266 Z-1.4235
    Y1.0773 Z-1.3562
    Y1.128 Z-1.2887
    Y1.1787 Z-1.2202
    Y1.204 Z-1.1877
    Y1.2294 Z-1.158
    Y1.2357 Z-1.1512
    Y1.2389 Z-1.1478
    Y1.2405 Z-1.1461
    G02 Y1.2801 Z-1.1075 J0.355 K-0.325
    G01 Y1.3054 Z-1.0872
    Y1.3308 Z-1.0699
    Y1.3561 Z-1.0555
    Y1.3814 Z-1.0437
    X-18.0847 Y1.3995 Z-1.0371
    Y1.3997 Z-1.037
    Y1.4008 Z-1.0366
    X-18.0843 Y1.4135 Z-1.0319
    Y1.4208 Z-1.0296
    X-18.0847 Y1.4328 Z-1.0262
    X-18.0846 Y1.4343 Z-1.0258
    X-18.0839 Y1.4524 Z-1.0205
    X-18.084 Y1.4753 Z-1.0156
    X-18.0841 Y1.4982 Z-1.0117
    X-18.0841 Y1.5034 Z-1.011
    X-18.0845 Y1.5165 Z-1.0093
    I can see the commanded feed is about 200ipm when it faults and the current is about the same. I can jog at 300ipm all day long. Here is the .c file below. I tried with both 32 + 0x80; and 64 + 0x80; pulse length.

    Code:
    #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;
    	
    	FPGA(STEP_PULSE_LENGTH_ADD) =  63 + 0x80;  // set polarity and pulse length to ?us
    	
    	ch0->InputMode=NO_INPUT_MODE;
    	ch0->OutputMode=STEP_DIR_MODE;
    	ch0->Vel=6000;
    	ch0->Accel=27;
    	ch0->Jerk=100000;
    	ch0->P=0;
    	ch0->I=0.01;
    	ch0->D=0;
    	ch0->FFAccel=0;
    	ch0->FFVel=0;
    	ch0->MaxI=200;
    	ch0->MaxErr=1e+006;
    	ch0->MaxOutput=200;
    	ch0->DeadBandGain=1;
    	ch0->DeadBandRange=0;
    	ch0->InputChan0=0;
    	ch0->InputChan1=0;
    	ch0->OutputChan0=8;
    	ch0->OutputChan1=0;
    	ch0->MasterAxis=-1;
    	ch0->LimitSwitchOptions=0x100;
    	ch0->LimitSwitchNegBit=0;
    	ch0->LimitSwitchPosBit=0;
    	ch0->SoftLimitPos=1e+009;
    	ch0->SoftLimitNeg=-1e+009;
    	ch0->InputGain0=1;
    	ch0->InputGain1=1;
    	ch0->InputOffset0=0;
    	ch0->InputOffset1=0;
    	ch0->OutputGain=-1;
    	ch0->OutputOffset=0;
    	ch0->SlaveGain=1;
    	ch0->BacklashMode=BACKLASH_OFF;
    	ch0->BacklashAmount=0;
    	ch0->BacklashRate=0;
    	ch0->invDistPerCycle=1;
    	ch0->Lead=0;
    	ch0->MaxFollowingError=1000000000;
    	ch0->StepperAmplitude=20;
    
    	ch0->iir[0].B0=1;
    	ch0->iir[0].B1=0;
    	ch0->iir[0].B2=0;
    	ch0->iir[0].A1=0;
    	ch0->iir[0].A2=0;
    
    	ch0->iir[1].B0=1;
    	ch0->iir[1].B1=0;
    	ch0->iir[1].B2=0;
    	ch0->iir[1].A1=0;
    	ch0->iir[1].A2=0;
    
    	ch0->iir[2].B0=0.000769;
    	ch0->iir[2].B1=0.001538;
    	ch0->iir[2].B2=0.000769;
    	ch0->iir[2].A1=1.92076;
    	ch0->iir[2].A2=-0.923833;
        EnableAxisDest(0,0);
    
    	ch1->InputMode=NO_INPUT_MODE;
    	ch1->OutputMode=STEP_DIR_MODE;
    	ch1->Vel=6000;
    	ch1->Accel=27;
    	ch1->Jerk=100000;
    	ch1->P=0;
    	ch1->I=0.01;
    	ch1->D=0;
    	ch1->FFAccel=0;
    	ch1->FFVel=0;
    	ch1->MaxI=200;
    	ch1->MaxErr=1e+006;
    	ch1->MaxOutput=200;
    	ch1->DeadBandGain=1;
    	ch1->DeadBandRange=0;
    	ch1->InputChan0=1;
    	ch1->InputChan1=0;
    	ch1->OutputChan0=9;
    	ch1->OutputChan1=0;
    	ch1->MasterAxis=-1;
    	ch1->LimitSwitchOptions=0x100;
    	ch1->LimitSwitchNegBit=0;
    	ch1->LimitSwitchPosBit=0;
    	ch1->SoftLimitPos=1e+009;
    	ch1->SoftLimitNeg=-1e+009;
    	ch1->InputGain0=1;
    	ch1->InputGain1=1;
    	ch1->InputOffset0=0;
    	ch1->InputOffset1=0;
    	ch1->OutputGain=1;
    	ch1->OutputOffset=0;
    	ch1->SlaveGain=1;
    	ch1->BacklashMode=BACKLASH_OFF;
    	ch1->BacklashAmount=0;
    	ch1->BacklashRate=0;
    	ch1->invDistPerCycle=1;
    	ch1->Lead=0;
    	ch1->MaxFollowingError=1000000000;
    	ch1->StepperAmplitude=20;
    
    	ch1->iir[0].B0=1;
    	ch1->iir[0].B1=0;
    	ch1->iir[0].B2=0;
    	ch1->iir[0].A1=0;
    	ch1->iir[0].A2=0;
    
    	ch1->iir[1].B0=1;
    	ch1->iir[1].B1=0;
    	ch1->iir[1].B2=0;
    	ch1->iir[1].A1=0;
    	ch1->iir[1].A2=0;
    
    	ch1->iir[2].B0=0.000769;
    	ch1->iir[2].B1=0.001538;
    	ch1->iir[2].B2=0.000769;
    	ch1->iir[2].A1=1.92081;
    	ch1->iir[2].A2=-0.923885;
        EnableAxisDest(1,0);
    
    	ch2->InputMode=NO_INPUT_MODE;
    	ch2->OutputMode=STEP_DIR_MODE;
    	ch2->Vel=4000;
    	ch2->Accel=400000;
    	ch2->Jerk=4e+006;
    	ch2->P=0;
    	ch2->I=0.01;
    	ch2->D=0;
    	ch2->FFAccel=0;
    	ch2->FFVel=0;
    	ch2->MaxI=200;
    	ch2->MaxErr=1e+006;
    	ch2->MaxOutput=200;
    	ch2->DeadBandGain=1;
    	ch2->DeadBandRange=0;
    	ch2->InputChan0=2;
    	ch2->InputChan1=0;
    	ch2->OutputChan0=10;
    	ch2->OutputChan1=0;
    	ch2->MasterAxis=-1;
    	ch2->LimitSwitchOptions=0x100;
    	ch2->LimitSwitchNegBit=0;
    	ch2->LimitSwitchPosBit=0;
    	ch2->SoftLimitPos=1e+009;
    	ch2->SoftLimitNeg=-1e+009;
    	ch2->InputGain0=1;
    	ch2->InputGain1=1;
    	ch2->InputOffset0=0;
    	ch2->InputOffset1=0;
    	ch2->OutputGain=1;
    	ch2->OutputOffset=0;
    	ch2->SlaveGain=1;
    	ch2->BacklashMode=BACKLASH_OFF;
    	ch2->BacklashAmount=0;
    	ch2->BacklashRate=0;
    	ch2->invDistPerCycle=1;
    	ch2->Lead=0;
    	ch2->MaxFollowingError=1000000000;
    	ch2->StepperAmplitude=20;
    
    	ch2->iir[0].B0=1;
    	ch2->iir[0].B1=0;
    	ch2->iir[0].B2=0;
    	ch2->iir[0].A1=0;
    	ch2->iir[0].A2=0;
    
    	ch2->iir[1].B0=1;
    	ch2->iir[1].B1=0;
    	ch2->iir[1].B2=0;
    	ch2->iir[1].A1=0;
    	ch2->iir[1].A2=0;
    
    	ch2->iir[2].B0=0.000769;
    	ch2->iir[2].B1=0.001538;
    	ch2->iir[2].B2=0.000769;
    	ch2->iir[2].A1=1.92081;
    	ch2->iir[2].A2=-0.923885;
    	EnableAxisDest(2,0);
    
    	DefineCoordSystem(0,1,2,-1);
    	
    	SetBitDirection(45,1);  // set Enable Signal as Output
    	SetBit(45);				// Enable the amplifiers
    	
    //  Add a small amount of Coordinated Motion Path smoothing if desired
    	Tau = 0.001;  // seconds for Low Pass Filter Time Constant
    	KLP = exp(-TIMEBASE/Tau);
    //	KLP=0; // force to 0 to disable
    //	printf("Tau=%f KLP=%f\n",Tau,KLP);
    
        return 0;
    }




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

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Adam,

    These settings make no sense to me:

    ch0->Vel=6000;
    ch0->Accel=27;
    ch0->Jerk=100000;

    For example to achieve 6000 steps/sec with an acceleration of only 27 steps/sec^2 would take:

    6000/27 = 222.2 seconds

    That is ridiculously slow acceleration.

    Are you sure you are posting the settings you are actually using? Post a KMotion.exe Step Response Screen Plot of a motion with this settings and you will see what I mean.

    Regards

    Regards
    TK http://dynomotion.com


  8. #8

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Tom,

    Thanks for the help and sorry for the delayed response. Been tied up with other jobs but back into making chips now.

    I appear to have copied the wrong .c file in my last post. Here is the one I am currently using:

    Code:
    #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;
    	
    //	FPGA(STEP_PULSE_LENGTH_ADD) =  63 + 0x80;  // set polarity and pulse length to 4us
    	FPGA(STEP_PULSE_LENGTH_ADD) =  32 + 0x80;  // set polarity and pulse length to 4us
    	
    	ch0->InputMode=NO_INPUT_MODE;
    	ch0->OutputMode=STEP_DIR_MODE;
    	ch0->Vel=70000;
    	ch0->Accel=200000;
    	ch0->Jerk=900000;
    	ch0->P=0;
    	ch0->I=0.01;
    	ch0->D=0;
    	ch0->FFAccel=0;
    	ch0->FFVel=0;
    	ch0->MaxI=200;
    	ch0->MaxErr=1e+006;
    	ch0->MaxOutput=200;
    	ch0->DeadBandGain=1;
    	ch0->DeadBandRange=0;
    	ch0->InputChan0=0;
    	ch0->InputChan1=0;
    	ch0->OutputChan0=8;
    	ch0->OutputChan1=0;
    	ch0->MasterAxis=-1;
    	ch0->LimitSwitchOptions=0x100;
    	ch0->LimitSwitchNegBit=0;
    	ch0->LimitSwitchPosBit=0;
    	ch0->SoftLimitPos=1e+009;
    	ch0->SoftLimitNeg=-1e+009;
    	ch0->InputGain0=1;
    	ch0->InputGain1=1;
    	ch0->InputOffset0=0;
    	ch0->InputOffset1=0;
    	ch0->OutputGain=-1;
    	ch0->OutputOffset=0;
    	ch0->SlaveGain=1;
    	ch0->BacklashMode=BACKLASH_OFF;
    	ch0->BacklashAmount=0;
    	ch0->BacklashRate=0;
    	ch0->invDistPerCycle=1;
    	ch0->Lead=0;
    	ch0->MaxFollowingError=1000000000;
    	ch0->StepperAmplitude=20;
    
    	ch0->iir[0].B0=1;
    	ch0->iir[0].B1=0;
    	ch0->iir[0].B2=0;
    	ch0->iir[0].A1=0;
    	ch0->iir[0].A2=0;
    
    	ch0->iir[1].B0=1;
    	ch0->iir[1].B1=0;
    	ch0->iir[1].B2=0;
    	ch0->iir[1].A1=0;
    	ch0->iir[1].A2=0;
    
    	ch0->iir[2].B0=0.000769;
    	ch0->iir[2].B1=0.001538;
    	ch0->iir[2].B2=0.000769;
    	ch0->iir[2].A1=1.92076;
    	ch0->iir[2].A2=-0.923833;
        EnableAxisDest(0,0);
    
    	ch1->InputMode=NO_INPUT_MODE;
    	ch1->OutputMode=STEP_DIR_MODE;
    	ch1->Vel=70000;
    	ch1->Accel=200000;
    	ch1->Jerk=900000;
    	ch1->P=0;
    	ch1->I=0.01;
    	ch1->D=0;
    	ch1->FFAccel=0;
    	ch1->FFVel=0;
    	ch1->MaxI=200;
    	ch1->MaxErr=1e+006;
    	ch1->MaxOutput=200;
    	ch1->DeadBandGain=1;
    	ch1->DeadBandRange=0;
    	ch1->InputChan0=1;
    	ch1->InputChan1=0;
    	ch1->OutputChan0=9;
    	ch1->OutputChan1=0;
    	ch1->MasterAxis=-1;
    	ch1->LimitSwitchOptions=0x100;
    	ch1->LimitSwitchNegBit=0;
    	ch1->LimitSwitchPosBit=0;
    	ch1->SoftLimitPos=1e+009;
    	ch1->SoftLimitNeg=-1e+009;
    	ch1->InputGain0=1;
    	ch1->InputGain1=1;
    	ch1->InputOffset0=0;
    	ch1->InputOffset1=0;
    	ch1->OutputGain=1;
    	ch1->OutputOffset=0;
    	ch1->SlaveGain=1;
    	ch1->BacklashMode=BACKLASH_OFF;
    	ch1->BacklashAmount=0;
    	ch1->BacklashRate=0;
    	ch1->invDistPerCycle=1;
    	ch1->Lead=0;
    	ch1->MaxFollowingError=1000000000;
    	ch1->StepperAmplitude=20;
    
    	ch1->iir[0].B0=1;
    	ch1->iir[0].B1=0;
    	ch1->iir[0].B2=0;
    	ch1->iir[0].A1=0;
    	ch1->iir[0].A2=0;
    
    	ch1->iir[1].B0=1;
    	ch1->iir[1].B1=0;
    	ch1->iir[1].B2=0;
    	ch1->iir[1].A1=0;
    	ch1->iir[1].A2=0;
    
    	ch1->iir[2].B0=0.000769;
    	ch1->iir[2].B1=0.001538;
    	ch1->iir[2].B2=0.000769;
    	ch1->iir[2].A1=1.92081;
    	ch1->iir[2].A2=-0.923885;
        EnableAxisDest(1,0);
    
    	ch2->InputMode=NO_INPUT_MODE;
    	ch2->OutputMode=STEP_DIR_MODE;
    	ch2->Vel=70000;
    	ch2->Accel=200000;
    	ch2->Jerk=900000;
    	ch2->P=0;
    	ch2->I=0.01;
    	ch2->D=0;
    	ch2->FFAccel=0;
    	ch2->FFVel=0;
    	ch2->MaxI=200;
    	ch2->MaxErr=1e+006;
    	ch2->MaxOutput=200;
    	ch2->DeadBandGain=1;
    	ch2->DeadBandRange=0;
    	ch2->InputChan0=2;
    	ch2->InputChan1=0;
    	ch2->OutputChan0=10;
    	ch2->OutputChan1=0;
    	ch2->MasterAxis=-1;
    	ch2->LimitSwitchOptions=0x100;
    	ch2->LimitSwitchNegBit=0;
    	ch2->LimitSwitchPosBit=0;
    	ch2->SoftLimitPos=1e+009;
    	ch2->SoftLimitNeg=-1e+009;
    	ch2->InputGain0=1;
    	ch2->InputGain1=1;
    	ch2->InputOffset0=0;
    	ch2->InputOffset1=0;
    	ch2->OutputGain=1;
    	ch2->OutputOffset=0;
    	ch2->SlaveGain=1;
    	ch2->BacklashMode=BACKLASH_OFF;
    	ch2->BacklashAmount=0;
    	ch2->BacklashRate=0;
    	ch2->invDistPerCycle=1;
    	ch2->Lead=0;
    	ch2->MaxFollowingError=1000000000;
    	ch2->StepperAmplitude=20;
    
    	ch2->iir[0].B0=1;
    	ch2->iir[0].B1=0;
    	ch2->iir[0].B2=0;
    	ch2->iir[0].A1=0;
    	ch2->iir[0].A2=0;
    
    	ch2->iir[1].B0=1;
    	ch2->iir[1].B1=0;
    	ch2->iir[1].B2=0;
    	ch2->iir[1].A1=0;
    	ch2->iir[1].A2=0;
    
    	ch2->iir[2].B0=0.000769;
    	ch2->iir[2].B1=0.001538;
    	ch2->iir[2].B2=0.000769;
    	ch2->iir[2].A1=1.92081;
    	ch2->iir[2].A2=-0.923885;
    	EnableAxisDest(2,0);
    
    	DefineCoordSystem(0,1,2,-1);
    	
    	SetBitDirection(45,1);  // set Enable Signal as Output
    	SetBit(45);				// Enable the amplifiers
    	
    //  Add a small amount of Coordinated Motion Path smoothing if desired
    	Tau = 0.001;  // seconds for Low Pass Filter Time Constant
    	KLP = exp(-TIMEBASE/Tau);
    //	KLP=0; // force to 0 to disable
    //	printf("Tau=%f KLP=%f\n",Tau,KLP);
    
        return 0;
    }
    To reiterate where I am at for basic 2D machining I have not had much issues with the acceleration settings in Mach3 at 5in/s^2 or so. But when doing complex 3 axis machining with short polyline segments (I machine complex sand casting patterns/molds) Mach 3 apparently ignores its own acceleration limits so I have to set it to something really low like 1in/s^2. I'm guessing this problem is nothing that can be fixed on the KFLOP side of things and I don't see Mach3 being fixed since they have release Mach4.

    I'm not really that interested in using KMotion because it does not work with my pendant and it does not have any digitizing routines. As a last resort I guess I could use Mach3 for things like jogging and setting up offsets and digitizing but use KMotion motion for actually running code... So at the moment I'm not going to spend the time to wire up encoders to my KFLOP to get step response plots unless it is going to get Mach3 to work any better.

    At this point I'm thinking of ditching Mach3 altogether and going with LinuxCNC. Is there any way to use the KFLOP as an IO board for LinuxCNC?

    Thanks,
    Adam



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

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Adam,

    No we don't have a driver for LinuxCNC. LinuxCNC is sort of contradictory to the purpose of KFLOP. KFLOP is designed to handle all the real-time functions so the Host computer doesn't need to be deterministically real-time. LinuxCNC is designed to do all the real-time functions in the Host PC.

    What type of digitizing functionality do you need?

    Regards

    Regards
    TK http://dynomotion.com


  10. #10

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    I get its contradictory. Just wishful thinking on my part so I don't have to buy another card... Just thinking out loud here, the price point of the KFLOP is comparable and in some cases inexpensive when compared to other LinuxCNC IO card alternatives. It would give you a bigger market share too. One thing I would say about KFLOP is that it takes a bit more technical know how to setup over Mach3. While I'm guessing people use Mach3 over LinuxCNC because they are don't feel technically apt.

    My biggest thing keeping me from solely using KMotion is making use of my pendant I spent a chunk of cash on P4-SE vistaCNC. My pendant supposedly works with LinuxCNC.

    My digitizing needs are for reverse engineering as well as locating parts. Things like getting whole locations as well as 3D point could data. Mach3 has some wizards that work ok. I'm open to trying something else.



  11. #11

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    I started using KMotion CNC instead of Mach3 + plugin. The difference is night and day! Motion is so much smoother and I can run much higher speeds and acceleration without any issues. It would really be great to be able to use my P4-SE pendant with this setup.



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

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Hi Adam,

    We prefer to focus on the non-USB pendents so they have real-time response not dependent on any PC/Windows/USB Latencies. Maybe you can sell/trade yours?

    Regards

    Regards
    TK http://dynomotion.com


  13. #13

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    I can see how that is the better route. I'm just trying to keep making chips keeping the side projects to a minimum. Are there any pendants you recommend?



  14. #14
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    1723
    Downloads
    0
    Uploads
    0

    Default Re: KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives

    Goldenfab,

    As you discovered Kmotion is much smoother than MACH3 and the plugin. A simple pendant like the ones on CNC4PC work perfect with KmotionCNC. They are direct so no USB connection, you can also find others on ebay that are just the pendant with straight wire connections. The pendant you have is popular for people running both Mach3 and Mach4, my guess is you could get a buyer for the Vista Pendant pretty easy.

    Russ


    MPG2 - Pendant - MPGs & CNC Panels - Motion Control



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 + Mach3 Config Problems - Jerky Movement Trips Servo Drives

KFLOP + Mach3 Config Problems - Jerky Movement Trips Servo Drives