585,668 active members*
4,391 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Dynomotion/Kflop/Kanalog > starting my C program, any guidance would be appreciated.
Page 2 of 11 1234
Results 21 to 40 of 215
  1. #21
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    You aren't answering questions so it makes it hard to have progress.

    Which KFLOP axis is your Z axis? Does your Z axis work in KMotion.exe?
    TK
    http://dynomotion.com

  2. #22

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    You aren't answering questions so it makes it hard to have progress.

    Which KFLOP axis is your Z axis? Does your Z axis work in KMotion.exe?
    0 is my Z axis and works when i run it in KMotion but not KMotioncnc.

  3. #23

    Re: starting my C program, any guidance would be apreciated.

    I don't know why, but they are all working/counting correctly now. I couldn't get it last night, but it's working now. Freaking gremlins!

  4. #24

    Re: starting my C program, any guidance would be apreciated.

    I'm trying to run G code to test axis movement and keep getting (Gcode error Gcode Aborted) seemes to happen on G0.

  5. #25
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    Most likely the Velocities and Accelerations in KFLOP are set too high.
    TK
    http://dynomotion.com

  6. #26

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    Most likely the Velocities and Accelerations in KFLOP are set too high.
    So do I need to reduce that in Kmotion or in KmotionCNC (Trajectory Planner) What should a normal Velocity and Acceleration look like. Mine are currently about 50000 and 500000.

  7. #27
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    KMotion.exe used to set, test, and create the Init C Program control G0 Rapid rates. The settings are dependent on your system. See also here.

    A common problem is to have too high of settings and not realize it when only testing small moves. This is like stating your car can go 300mph but then only test it in your driveway.
    TK
    http://dynomotion.com

  8. #28

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    KMotion.exe used to set, test, and create the Init C Program control G0 Rapid rates. The settings are dependent on your system. See also here.

    A common problem is to have too high of settings and not realize it when only testing small moves. This is like stating your car can go 300mph but then only test it in your driveway.
    I reduced the V and A 20% in KMotion and then updated the C code file. I also changed the KMotion CNC Trajectory Planner. The G code still will not run and now stops at G01.

  9. #29
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    Hi Gunmachinist,

    Please put more effort into your responses otherwise we don't know what you are doing and can't help.

    Please determine your Velocities, Accelerations, and Jerks as described here. Describe what you did and post the results. Test big enough moves that reach full velocity and post them.
    TK
    http://dynomotion.com

  10. #30

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    Hi Gunmachinist,

    Please put more effort into your responses otherwise we don't know what you are doing and can't help.

    Please determine your Velocities, Accelerations, and Jerks as described here. Describe what you did and post the results. Test big enough moves that reach full velocity and post them.
    I have read and reread Dynomotion wiki. I have re-tuned the servos and after tuning I decreased Velocity, and Acceleration by 20% and updated my C program. X and Y axis are at 40000 Velocity and 400000 Acceleration, Z is 32000, and 320000. Jerk is set at 100000 for all three axes. I entered the information in Kmotion CNC for XYZ axis and attempted to run a short program just to verify that the axis would work, and I get the message Gcode error/Gcode aborted. I've tried different G code programs with the same results. At this point I dont know what more to include, It may help if you guys would ask questions.

    Here is C code as it is now.

    #include "KMotionDef.h"

    // Default Initial Configuration for 3 Axis Analog DAC Servo with encoder feedback
    //
    // Note Low Gains, Limited Max Limits, No Limit Options, No Soft Limits,
    // Large allowed Following Error, No Feed Forward, No Filters, etc

    void main()
    {
    SetBit(152); // enable AMPS
    SetBit(157);
    SetBit(158);

    ch0->InputMode=ENCODER_MODE;
    ch0->OutputMode=DAC_SERVO_MODE;
    ch0->Vel=32000;
    ch0->Accel=320000;
    ch0->Jerk=100000;
    ch0->P=26.68;
    ch0->I=0.0001;
    ch0->D=32.332;
    ch0->FFAccel=0.0001;
    ch0->FFVel=0.0009;
    ch0->MaxI=2047;
    ch0->MaxErr=100;
    ch0->MaxOutput=2047;
    ch0->DeadBandGain=3;
    ch0->DeadBandRange=0;
    ch0->InputChan0=0;
    ch0->InputChan1=1;
    ch0->OutputChan0=0;
    ch0->OutputChan1=1;
    ch0->MasterAxis=-1;
    ch0->LimitSwitchOptions=0x11f;
    ch0->LimitSwitchNegBit=136;
    ch0->LimitSwitchPosBit=136;
    ch0->SoftLimitPos=1e+30;
    ch0->SoftLimitNeg=-1e+30;
    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=10000000;
    ch0->StepperAmplitude=250;

    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=1;
    ch0->iir[2].B1=0;
    ch0->iir[2].B2=0;
    ch0->iir[2].A1=0;
    ch0->iir[2].A2=0;

    ch1->InputMode=ENCODER_MODE;
    ch1->OutputMode=DAC_SERVO_MODE;
    ch1->Vel=40000;
    ch1->Accel=400000;
    ch1->Jerk=100000;
    ch1->P=22;
    ch1->I=0.0001;
    ch1->D=12;
    ch1->FFAccel=0.0001;
    ch1->FFVel=0.0006;
    ch1->MaxI=2047;
    ch1->MaxErr=100;
    ch1->MaxOutput=2047;
    ch1->DeadBandGain=4;
    ch1->DeadBandRange=0;
    ch1->InputChan0=1;
    ch1->InputChan1=1;
    ch1->OutputChan0=1;
    ch1->OutputChan1=1;
    ch1->MasterAxis=-1;
    ch1->LimitSwitchOptions=0x11f;
    ch1->LimitSwitchNegBit=138;
    ch1->LimitSwitchPosBit=138;
    ch1->SoftLimitPos=1e+09;
    ch1->SoftLimitNeg=-1e+09;
    ch1->InputGain0=1;
    ch1->InputGain1=1;
    ch1->InputOffset0=0;
    ch1->InputOffset1=0;
    ch1->OutputGain=1;
    ch1->OutputOffset=0;
    ch1->SlaveGain=0;
    ch1->BacklashMode=BACKLASH_OFF;
    ch1->BacklashAmount=0;
    ch1->BacklashRate=0;
    ch1->invDistPerCycle=1;
    ch1->Lead=0;
    ch1->MaxFollowingError=10000000;
    ch1->StepperAmplitude=250;

    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=1;
    ch1->iir[2].B1=0;
    ch1->iir[2].B2=0;
    ch1->iir[2].A1=0;
    ch1->iir[2].A2=0;

    ch2->InputMode=ENCODER_MODE;
    ch2->OutputMode=DAC_SERVO_MODE;
    ch2->Vel=40000;
    ch2->Accel=400000;
    ch2->Jerk=100000;
    ch2->P=6;
    ch2->I=0.0001;
    ch2->D=6;
    ch2->FFAccel=0.0001;
    ch2->FFVel=0.0009;
    ch2->MaxI=2047;
    ch2->MaxErr=1000;
    ch2->MaxOutput=2047;
    ch2->DeadBandGain=3;
    ch2->DeadBandRange=0;
    ch2->InputChan0=2;
    ch2->InputChan1=1;
    ch2->OutputChan0=2;
    ch2->OutputChan1=1;
    ch2->MasterAxis=-1;
    ch2->LimitSwitchOptions=0x11f;
    ch2->LimitSwitchNegBit=137;
    ch2->LimitSwitchPosBit=137;
    ch2->SoftLimitPos=1e+30;
    ch2->SoftLimitNeg=-1e+30;
    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=10000000;
    ch2->StepperAmplitude=250;

    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=1;
    ch2->iir[2].B1=0;
    ch2->iir[2].B2=0;
    ch2->iir[2].A1=0;
    ch2->iir[2].A2=0;

    EnableAxis(0);
    EnableAxis(1);
    EnableAxis(2);

    DefineCoordSystem(2,1,0,-1);// define XYZA axes
    }

  11. #31
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    Actually I see now the Following Errors are set huge so regardless of how bad the tuning is you wouldn't get any error. It must be something unrelated to tuning.

    I see "Launch on Power up" is set so you have modified KFLOP. Please remove those changes by re-flashing "New Version"

    I can't think of why you would get a "G Code Error" without some other message. Is there any? You might try simulating the GCode.

    Maybe the installation is messed up. You might reinstall it after making a copy of your current installation.
    TK
    http://dynomotion.com

  12. #32

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    Actually I see now the Following Errors are set huge so regardless of how bad the tuning is you wouldn't get any error. It must be something unrelated to tuning.

    I see "Launch on Power up" is set so you have modified KFLOP. Please remove those changes by re-flashing "New Version"
    also.

    The max following errors in the configuration or step response screen? I reflashed

    Quote Originally Posted by TomKerekes View Post
    I can't think of why you would get a "G Code Error" without some other message. Is there any? You might try simulating the GCode.
    No other message that gcode error/gcode aborted.

    Quote Originally Posted by TomKerekes View Post
    Maybe the installation is messed up. You might reinstall it after making a copy of your current installation.
    I assume your talkning about KMotion and KMotion CNC?

  13. #33
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    also.
    huh?

    The max following errors in the configuration or step response screen?
    Configuration Screen

    I reflashed
    And?

    I assume your talkning about KMotion and KMotion CNC?
    Yes, but actually the full installation on the PC
    TK
    http://dynomotion.com

  14. #34

    Re: starting my C program, any guidance would be apreciated.

    Quote Originally Posted by TomKerekes View Post
    huh?
    Not sure where that came from.

    Quote Originally Posted by TomKerekes View Post
    Configuration Screen

    And?
    I'm working on the Max following errors to get them down. When I started it basically stopped the axis from working. How low should the Max following error be?

  15. #35
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    I'm working on the Max following errors to get them down. When I started it basically stopped the axis from working. How low should the Max following error be?
    Observe what your following errors are under normal conditions and set to a larger value.
    TK
    http://dynomotion.com

  16. #36

    Re: starting my C program, any guidance would be apreciated.

    I did some work with tuning my axis and have been able to get the Max Following Errors down, but when trying to run G-code I still get and the same error code. Here is my current screen shots of each axis. I ve also been playing with TripsWPF, and could you explain how I'm supposed to use the check all?

  17. #37
    Join Date
    May 2006
    Posts
    4045

    Re: starting my C program, any guidance would be apreciated.

    It seems you miss-understood my post #31 where I tried to explain following error was not the problem and to try other things. So then you focused on following error and ignored the other suggestions.

    Its good your playing with TripsWPF. Hopefully you get a better understanding of Velocity, Acceleration, Jerk, and distance.

    Regarding TripsWPF Check All button: You wouldn't use it. Its for our use to apply many sets of parameters to TripsWPF to check it is able to solve them all correctly.
    TK
    http://dynomotion.com

  18. #38

    Re: starting my C program, any guidance would be apreciated.

    Ok, Max following error, and tuning were my last resort after I reflashed and reinstalled KMotion. Those were the only things you mentioned so I tried all of them. If tuning isn't the problem with why im getting the G-code error then then Im guessing it's in setting up KMotionCNC trajectory planner. Do you see anything wrong in trajectory planner in post 30? What else could be the reason all I get is gcode aborted message?

  19. #39

    Re: starting my C program, any guidance would be apreciated.

    Oops

  20. #40

    Unhappy Re: starting my C program, any guidance would be apreciated.

    I guess I dont know what I'm looking for with Trips, because it is not giving me good results when entering the information in KMotion. When getting settings in Trips what am I supposed to be looking for, do you have an example of what a good looking Trips looks like?

Page 2 of 11 1234

Similar Threads

  1. Starting at New CNC Build -- Guidance Needed!!
    By dtmille2 in forum DIY CNC Router Table Machines
    Replies: 21
    Last Post: 01-02-2013, 05:00 AM
  2. Need some guidance on starting out
    By AlanDv in forum DIY CNC Router Table Machines
    Replies: 2
    Last Post: 08-20-2011, 05:13 AM
  3. starting program
    By chucker in forum Fanuc
    Replies: 2
    Last Post: 11-10-2009, 07:28 PM
  4. Starting program in fanuc 6m
    By Bolle_Ma in forum Fanuc
    Replies: 4
    Last Post: 10-17-2008, 09:11 AM
  5. Starting knee-mill retrofit. Your input appreciated.
    By jamma in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 03-01-2007, 05:41 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
  •