I asked you to try simulation mode.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.
Ah yes. Cnts/Inch are set to 0. That will cause a division by 0. Set any unused axis to 100.Do you see anything wrong in trajectory planner in post 30?
Can you see that the bottom blue plot in TripsWPF is the same as the blue Command Plot in KMotion? What do each show at t=3 seconds?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?
Regards
TK http://dynomotion.com
I changed the Cnts/Inch to 100 for all the axis I'm not using which are, (UVABC), and all the Vel in/sec and Accel in/sec² I left at 0.
I now get an error that says "Invalid buffer times in Trajectory Planner".
I've just had a skim through this thread, and it appears you're just randomly changing things to try and get things to work.
So lets take a bit of step back, and work through things a bit more methodically.
If you're still getting an error message when the simulate button in KMotionCNC is ticked, then it's the GCode itself that's causing the problem not the machine. In simulate, the KFlop configuration doesn't matter, as it's only the PC doing the simulating.
However with the error messages you're getting, I would expect some kind of additional error to be displayed via the console. Although KMotionCNC will pop-up an error message saying the G-code has been aborted, the KFlop will output to the console the reason why it's aborted, so try having the console open within KMotion while trying to run GCode in KMotionCNC.
Another area I think needs clarified, is around all the Vel/Acc settings.
The channel settings (what goes in your C program) control how fast each axis can move (IIRC these are what are used for G0/rapid moves - Tom can you clarify that?)
Then the settings within KMotionCNC control how fast the axes can move when carrying out feed rate (G1/2/3) moves.
It would have been helpful if you would have told us you did it and what happened.I asked you to try simulation mode.
Same error came up.
Could you elaborate? When does this occur? Any output on KMotion's Console? Do any of the axes become disabled?I now get an error that says "Invalid buffer times in Trajectory Planner".
Please re post your Init.c Program and Trajectory planner settings.
Correct. Described here.The channel settings (what goes in your C program) control how fast each axis can move (IIRC these are what are used for G0/rapid moves - Tom can you clarify that?)
Then the settings within KMotionCNC control how fast the axes can move when carrying out feed rate (G1/2/3) moves.
Very good. Can you see what maximum Velocity and Acceleration are used?Can you see that the bottom blue plot in TripsWPF is the same as the blue Command Plot in KMotion? What do each show at t=3 seconds?
Somewhat, about 16000?
Regards
TK http://dynomotion.com
At this point, after I changed the Cnts/Inch to 100 for all the axis I'm not using I'm not getting the error code, G-code has been aborted (only). I tried the simulate check box and run button, but it blinks but doesn't actually do anything (no error code). If I attempt to run one of the stock G-code files I get the pop-up "Invalid buffer times in Trajectory Planner" and then pop up error message saying the G-code has been aborted.
Ok, Nothing happened. I can check the simulate box and push the run button all day and nothing.
I can't elaborate as noting happens the computer screen will blink, that's it.
The error occurs after i click on the green arrow button in KMotionCNC and after the first 2-3 lines.
Not sure what you mean by any output on KMotion CNC console.
All the axis are disabled.
#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=35000;
ch0->Accel=35000;
ch0->Jerk=50000;
ch0->P=4;
ch0->I=0.0001;
ch0->D=1;
ch0->FFAccel=0.0001;
ch0->FFVel=0.0009;
ch0->MaxI=2047;
ch0->MaxErr=1000;
ch0->MaxOutput=2047;
ch0->DeadBandGain=1;
ch0->DeadBandRange=0;
ch0->InputChan0=0;
ch0->InputChan1=1;
ch0->OutputChan0=0;
ch0->OutputChan1=1;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x12f;
ch0->LimitSwitchNegBit=136;
ch0->LimitSwitchPosBit=136;
ch0->SoftLimitPos=1e+09;
ch0->SoftLimitNeg=-1e+09;
ch0->InputGain0=1;
ch0->InputGain1=1;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
ch0->OutputGain=1;
ch0->OutputOffset=0;
ch0->SlaveGain=0;
ch0->BacklashMode=BACKLASH_OFF;
ch0->BacklashAmount=1;
ch0->BacklashRate=10;
ch0->invDistPerCycle=1;
ch0->Lead=0;
ch0->MaxFollowingError=1000;
ch0->StepperAmplitude=250;
ch0->iir[0].B0=0.570375;
ch0->iir[0].B1=-1.07753;
ch0->iir[0].B2=0.508907;
ch0->iir[0].A1=1.91629;
ch0->iir[0].A2=-0.918042;
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=30000;
ch1->Accel=30000;
ch1->Jerk=100000;
ch1->P=27;
ch1->I=0.0001;
ch1->D=6;
ch1->FFAccel=0.0001;
ch1->FFVel=0.0008;
ch1->MaxI=2047;
ch1->MaxErr=1000;
ch1->MaxOutput=2047;
ch1->DeadBandGain=1;
ch1->DeadBandRange=0;
ch1->InputChan0=1;
ch1->InputChan1=1;
ch1->OutputChan0=1;
ch1->OutputChan1=1;
ch1->MasterAxis=-1;
ch1->LimitSwitchOptions=0x110;
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=1000;
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=30000;
ch2->Accel=300000;
ch2->Jerk=100000;
ch2->P=10;
ch2->I=0.0001;
ch2->D=2;
ch2->FFAccel=0.0001;
ch2->FFVel=0.0009;
ch2->MaxI=2047;
ch2->MaxErr=200;
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=200;
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
}
That tells us the G-Code file itself is fine. If you were to open the G Viewer, you should see the simulated motion.
If you open KMotion (not KMotionCNC), there is an option to display the Console-I can't elaborate as noting happens the computer screen will blink, that's it.
The error occurs after i click on the green arrow button in KMotionCNC and after the first 2-3 lines.
Not sure what you mean by any output on KMotion CNC console.
All the axis are disabled.
This will often show more information about why GCode has been aborted, for example if an axis disables for some reason, the KFlop will output a message to the console saying what axis disabled, whereas KMotionCNC will simply tell you GCode has been aborted.
However buffer errors are not something I know anything about, so I'll let Tom suggest why you're receiving them.
This probably isn't your problem but I see you changed the Trajectory Planner Feed Rate Overrides to 0. Set them both to 1. A Max Rapid FRO = 0 means Rapids will all be overridden down to a speed of zero.
Regards
TK http://dynomotion.com
What have you got setup for the M0-M30 functions in Setup?
That jogging stop message is from the C program to stop the spindle.
I'm guessing whatever is causing the problem, is then triggering an EStop in the KFlop, which will trigger an M5 (spindle off), so that message is just a symptom, and not the problem.
Is it the buffer error you're still getting?
No those wrong settings would give you different errors.Yes, Could it be that the Vel In/Sec and Acc in/sec2 calculated correctly? I'm not sure how to calculate that 100%, I read it in another thread but not sure I did it correct.
I'm able to run with your configuration without any errors without having any motors or hardware by turning off limits and following errors. You might try that. I've attached your Init file with those changes.
To simplify things further you might set the KMotionCNC M3, M4, M5 Actions to "none"
#1 disconnect power to your hardware (motors)
#2 power cycle KFLOP
#3 from KMotion.exe C Program Screen Thread #1 load attached GunInit.c and Save/Compile/Download/Execute it
#4 Verify on Axis Screen first 3 axes are enabled
#5 KMotionCNC load circles.ngc into File #1
#6 Cycle Start
Describe in detail which of these steps you understood, which you did, and what happens. Reference each step by number in your response.
You might also post your KMotionCNC fixture offsets screen and all Tool Setup Screens
Regards
TK http://dynomotion.com
I don't have the GunInit.c file attached anywhere that I can download.
I may have located it, the tool lengths were not set in my tool file. I no longer get the error code, so I reconnected the servos to power and rebooted Kflop from the console screen. when I run the G-code it doesn't move the machine.
Last edited by Gunmachinist; 12-29-2020 at 01:14 PM.
Oops somehow Guninit.c wasn't attached.
But anyway I think I see the problem. Somehow the G54 Fixture ABC offsets got set to nan (not a number/infinity). Try clearing those to zero.
Regards
TK http://dynomotion.com
Why are you pushing send?
Regards
TK http://dynomotion.com