Originally Posted by
spank
Jimmy,
As Tom said, you set the level microstepping at the drive, not at Kflop. In other words, if you are just tuning and setting up your motors within Kmotion, number of steps per revolution is not part of the equation. Once you start using a CNC control program, you would set your number of steps per revolution there. In KmotionCNC you do that in your Tool Setup Trajectory motion parameters. Since you have no interest in using Kmotion CNC, you would probably be doing this within Mach 3. As far as setting up your motors is concerned though, all you're doing in Kmotion is finding a set of parameters that works for your setup. Kflop will send step pulses, and your drives are going to behave according to the amount of microstepping you have set at the drives. Your goal within Kmotion is to try to adjust for the best performance given the setup of your drives and motors.
Thank you guys for helping me. Such an amazing community.
I am trying to make my own custom GUI in c++.
My motor moves pretty well in KMotionCNC
now I wanna drive it manually.
All the libraries are included and compiles successfully. I was able to manually blink a LED
here is my code
Code:
KM = new CKMotionDLL(0); // create as board 0
char response[MAX_LINE];
// Setup Axis for a simple stepper motor
if (KM->WriteLine( "SetBitDirection0=1")) MyError();
if (KM->WriteLine( "ClearBit0")) MyError();
if (KM->WriteLine( "DisableAxis0=0")) MyError(); // Set board 0, Axis 1 to OFF while changing parameters
if (KM->WriteLine( "Zero0=0")) MyError();
if (KM->WriteLine( "StepperAmplitude0=80"))MyError();
if (KM->WriteLine( "Vel0=100")) MyError();
if (KM->WriteLine( "Accel0=50")) MyError();
if (KM->WriteLine( "Jerk0=2000")) MyError();
if (KM->WriteLine( "Lead0=10")) MyError();
if (KM->WriteLine( "OutputMode0=1")) MyError();
if (KM->WriteLine( "EnableAxisDest0 100")) MyError();
if (KM->WriteLine( "Echo Setup Complete")) MyError();
if (KM->WriteLine( "MoveRel0=100")) MyError();
Can you tell me what's wrong ?