Hello Guest it is April 19, 2024, 05:39:58 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Chips OTool

Pages: 1 2 3 »
1
Found the problem!

2
I am still trying to set my CNC mini-lathe up with the trial version of Mach3. I got the axes to work correctly, but now when I try to test the lathe with a simple turning job, Mach3 blows by lines of Gcode. I would really like to get this thing running and buy a license so I can run long programs. Any idea what could cause this?

I tried a simple turning program, using the Mach3 turning wizard. I was trying to turn the last half-inch of a piece of 0.75" Delrin down to 0.670". The z-axis refused to back up (positive direction). The stepper on that end only recognized commands to go in the negative direction.

I used simple test programs to tune the axes. One program moves the z axis back and forth half an inch without moving the x axis, and the other moves the x axis without moving the z axis.

3
Again, thanks.

My error was pretty basic. I didn't tell the tool where it was at the start of the routine, so it tried to move to where it was supposed to be. When I did that, it was happy to start where it was instead of moving through the work to look for a starting point.

4
I must have the KFlop set up wrong, or something needs to be adjusted in Mach3. Thanks for the reply. Before I can post anything else, I have to find out what my xml is. That should show you how little I know about what I'm doing!

5
I gave up on my CNC mini-lathe a long while back, and today I am trying to resurrect it. Sorry to say, I have forgotten a lot.

I was trying to do a simple OD arc (like the round end of a broomstick). The code works fine, except for one thing. It thinks it's starting in the center of the broomstick. Not at the end...inside. It tries to back out before it starts cutting, even though it's already at the outside diameter of the work. Obviously, I can't start it in the center of the work.

Why does my tool think it's in the center of the sphere when I start the program?

I will post the code. It's supposed to make a round end 1" in diameter.

G18 G64 G80 G90 G40 G49
M3
G00 X0.51
G00 Z0.51
F2
G00 Z0.4929
G01 X0.5
G01 X0.5
G03 X0.4929 Z0.5 I-0.5 K-0.4929
G01 Z0.51
G00 X0.51
G00 Z0.4858
G01 X0.5
G01 X0.5
G03 X0.4858 Z0.5 I-0.5 K-0.4858
G01 Z0.51
G00 X0.51
G00 Z0.4786
G01 X0.5
G01 X0.5
G03 X0.4786 Z0.5 I-0.5 K-0.4786
G01 Z0.51
G00 X0.51
G00 Z0.4713
G01 X0.5
G01 X0.5
G03 X0.4713 Z0.5 I-0.5 K-0.4713
G01 Z0.51
G00 X0.51
G00 Z0.464
G01 X0.5
G01 X0.5
G03 X0.464 Z0.5 I-0.5 K-0.464
G01 Z0.51
G00 X0.51
G00 Z0.4566
G01 X0.5
G01 X0.5
G03 X0.4566 Z0.5 I-0.5 K-0.4566
G01 Z0.51
G00 X0.51
G00 Z0.4491
G01 X0.5
G01 X0.5
G03 X0.4491 Z0.5 I-0.5 K-0.4491
G01 Z0.51
G00 X0.51
G00 Z0.4416
G01 X0.5
G01 X0.5
G03 X0.4416 Z0.5 I-0.5 K-0.4416
G01 Z0.51
G00 X0.51
G00 Z0.434
G01 X0.5
G01 X0.5
G03 X0.434 Z0.5 I-0.5 K-0.434
G01 Z0.51
G00 X0.51
G00 Z0.4264
G01 X0.5
G01 X0.5
G03 X0.4264 Z0.5 I-0.5 K-0.4264
G01 Z0.51
G00 X0.51
G00 Z0.4186
G01 X0.5
G01 X0.5
G03 X0.4186 Z0.5 I-0.5 K-0.4186
G01 Z0.51
G00 X0.51
G00 Z0.4108
G01 X0.5
G01 X0.5
G03 X0.4108 Z0.5 I-0.5 K-0.4108
G01 Z0.51
G00 X0.51
G00 Z0.4029
G01 X0.5
G01 X0.5
G03 X0.4029 Z0.5 I-0.5 K-0.4029
G01 Z0.51
G00 X0.51
G00 Z0.3948
G01 X0.5
G01 X0.5
G03 X0.3948 Z0.5 I-0.5 K-0.3948
G01 Z0.51
G00 X0.51
G00 Z0.3867
G01 X0.5
G01 X0.5
G03 X0.3867 Z0.5 I-0.5 K-0.3867
G01 Z0.51
G00 X0.51
G00 Z0.3785
G01 X0.5
G01 X0.5
G03 X0.3785 Z0.5 I-0.5 K-0.3785
G01 Z0.51
G00 X0.51
G00 Z0.3702
G01 X0.5
G01 X0.5
G03 X0.3702 Z0.5 I-0.5 K-0.3702
G01 Z0.51
G00 X0.51
G00 Z0.3617
G01 X0.5
G01 X0.5
G03 X0.3617 Z0.5 I-0.5 K-0.3617
G01 Z0.51
G00 X0.51
G00 Z0.3531
G01 X0.5
G01 X0.5
G03 X0.3531 Z0.5 I-0.5 K-0.3531
G01 Z0.51
G00 X0.51
G00 Z0.3444
G01 X0.5
G01 X0.5
G03 X0.3444 Z0.5 I-0.5 K-0.3444
G01 Z0.51
G00 X0.51
G00 Z0.3355
G01 X0.5
G01 X0.5
G03 X0.3355 Z0.5 I-0.5 K-0.3355
G01 Z0.51
G00 X0.51
G00 Z0.3264
G01 X0.5
G01 X0.5
G03 X0.3264 Z0.5 I-0.5 K-0.3264
G01 Z0.51
G00 X0.51
G00 Z0.3172
G01 X0.5
G01 X0.5
G03 X0.3172 Z0.5 I-0.5 K-0.3172
G01 Z0.51
G00 X0.51
G00 Z0.3077
G01 X0.5
G01 X0.5
G03 X0.3077 Z0.5 I-0.5 K-0.3077
G01 Z0.51
G00 X0.51
G00 Z0.2981
G01 X0.5
G01 X0.5
G03 X0.2981 Z0.5 I-0.5 K-0.2981
G01 Z0.51
G00 X0.51
G00 Z0.2882
G01 X0.5
G01 X0.5
G03 X0.2882 Z0.5 I-0.5 K-0.2882
G01 Z0.51
G00 X0.51
G00 Z0.278
G01 X0.5
G01 X0.5
G03 X0.278 Z0.5 I-0.5 K-0.278
G01 Z0.51
G00 X0.51
G00 Z0.2676
G01 X0.5
G01 X0.5
G03 X0.2676 Z0.5 I-0.5 K-0.2676
G01 Z0.51
G00 X0.51
G00 Z0.2568
G01 X0.5
G01 X0.5
G03 X0.2568 Z0.5 I-0.5 K-0.2568
G01 Z0.51
G00 X0.51
G00 Z0.2457
G01 X0.5
G01 X0.5
G03 X0.2457 Z0.5 I-0.5 K-0.2457
G01 Z0.51
G00 X0.51
G00 Z0.2341
G01 X0.5
G01 X0.5
G03 X0.2341 Z0.5 I-0.5 K-0.2341
G01 Z0.51
G00 X0.51
G00 Z0.2221
G01 X0.5
G01 X0.5
G03 X0.2221 Z0.5 I-0.5 K-0.2221
G01 Z0.51
G00 X0.51
G00 Z0.2095
G01 X0.5
G01 X0.5
G03 X0.2095 Z0.5 I-0.5 K-0.2095
G01 Z0.51
G00 X0.51
G00 Z0.1962
G01 X0.5
G01 X0.5
G03 X0.1962 Z0.5 I-0.5 K-0.1962
G01 Z0.51
G00 X0.51
G00 Z0.182
G01 X0.5
G01 X0.5
G03 X0.182 Z0.5 I-0.5 K-0.182
G01 Z0.51
G00 X0.51
G00 Z0.1669
G01 X0.5
G01 X0.5
G03 X0.1669 Z0.5 I-0.5 K-0.1669
G01 Z0.51
G00 X0.51
G00 Z0.1503
G01 X0.5
G01 X0.5
G03 X0.1503 Z0.5 I-0.5 K-0.1503
G01 Z0.51
G00 X0.51
G00 Z0.1319
G01 X0.5
G01 X0.5
G03 X0.1319 Z0.5 I-0.5 K-0.1319
G01 Z0.51
G00 X0.51
G00 Z0.1107
G01 X0.5
G01 X0.5
G03 X0.1107 Z0.5 I-0.5 K-0.1107
G01 Z0.51
G00 X0.51
G00 Z0.0846
G01 X0.5
G01 X0.5
G03 X0.0846 Z0.5 I-0.5 K-0.0846
G01 Z0.51
G00 X0.51
G00 Z0.0459
G01 X0.5
G01 X0.5
G03 X0.0459 Z0.5 I-0.5 K-0.0459
G01 Z0.51
G00 X0.51
G00 Z0.0448
G01 X0.5
G01 X0.5
G03 X0.0448 Z0.5 I-0.5 K-0.0448
G01 Z0.51
G00 X0.51
F0.5
G00 Z0
G01 X0.5
G01 X0.5
G03 X0 Z0.5 I-0.5 K-0
G01 Z0.51
G00 X0.51
M5
M30

6
General Mach Discussion / Re: Steps/Inch on Lathe = 75,000; Seems a Tad High
« on: September 12, 2014, 04:26:20 PM »
I am still fooling with this. I'm trying to figure out as much as I can so I don't waste other people's time too much.

I learned more new stuff. It appears that I shouldn't even think about setting things in Mach3 until I've tried KMotion. And if I use KMotionCNC, I have to remember to go through that, too. I am trying to resist downloading mot files out of habit.

It turns out KMotionCNC has an area where you set the motor up. It's in Tool Setup/Trajectory Planner. I had to go in there and tell the software how many counts per inch I wanted. For unknown reasons, on x, I ended up with 81958 and change. The x axis appears to be accurate to within a thousandth over half an inch, which is not something I'm going to complain about on a Chinese mini-lathe.

Now I'm having fun with backlash correction. This is found in the init.c file, and to turn it on, I have to change "ch0->BacklashMode=BACKLASH_OFF;" to "ch0->BacklashMode=BACKLASH_LINEAR;." You would think the opposite of "off" would be "on," but no. It's "linear."

My problem now is figuring out when the backlash correction is added and how. The x backlash is less than a thousandth, which I don't understand, but anyway, it's so small, it's difficult to know whether correction works or not. I am trying to use z to figure it out.

The documentation says the correction works in the "positive" direction, but it doesn't say what that means. If I enter a number of steps (you can't enter thousandths) adding up to 10 thousandths, does that mean I put the lathe at zero with the backlash taken out and turn it on, and then it moves the dial ten thousandths the other way and THEN starts counting the z travel? Danged if I know.

To make things even worse, I bought Dolphin CAD/CAM, so if I ever get KMotionCNC figured out, I'll have to start over with Dolphin. But it looks like a great program.

I'm still blown away by the fact that KMotion reckons the steps/inch thing in inverse distance per cycle, where a cycle is four steps, but I'm sure there is some solid engineer reason for it.

7
General Mach Discussion / Re: Steps/Inch on Lathe = 75,000; Seems a Tad High
« on: September 04, 2014, 05:50:44 PM »
Well, I guess the jerk units must be inches/sec.^3. I must have been asleep when I wrote that.

8
General Mach Discussion / Re: Steps/Inch on Lathe = 75,000; Seems a Tad High
« on: September 04, 2014, 05:39:29 PM »
I am getting back to this today. I got a call from Dolphin CAD/CAM about a discount, so I have been trying to get their demo to work with Alibre Design Personal, and it has sucked up a lot of time.

Regarding jerk, I have no idea what an acceptable figure is. I assume the notation used ("4e+006") means "4.00 x 10 to the sixth power," but I don't know what the units are or what levels make sense.

M x velocity is about 25"/min., and my z is about 138. The x acceleration is about 3.3"/second^2, and the z figure is about 32. Mach3 picked these figures. I don't know why it would ever need to move that fast on a mini-lathe in a garage. I can fool with it and see what happens.

9
General Mach Discussion / Re: Steps/Inch on Lathe = 75,000; Seems a Tad High
« on: September 02, 2014, 02:51:56 PM »
I got this to work in Mach3 and KmotionCNC, but the steps/inch setting seems to be wandering around now. I am working on that. The motors run much cooler now. I am researching jerk to find out the right setting. I have a physics degree, so I have some clue what acceleration per second is, but "jerk" is an engineering term, so I have never worked with it before. It sounds like a bad thing, but I assume it refers to softening the changes in motion, like reducing the pressure on a brake pedal?

Anyway, I will keep fooling with it. You have been a tremendous help. I had no idea the Kflop had to be told there was a Kstep, or that the mot files were not needed.

It's pretty cool, finally seeing something happen in KmotionCNC.

#include "KMotionDef.h"

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

int main()
{
   double T0, LastX=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) = 63 + 0x80;  // set polarity and pulse length to 4us
   
   ch0->InputMode=NO_INPUT_MODE;
   ch0->OutputMode=STEP_DIR_MODE;
   ch0->Vel=40000;
   ch0->Accel=200000;
   ch0->Jerk=4e+006;
   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=0x0;
   ch0->SoftLimitPos=1e+030;
   ch0->SoftLimitNeg=-1e+030;
   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=40000;
   ch1->Accel=200000;
   ch1->Jerk=4e+006;
   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=0;
   ch1->InputChan1=0;
   ch1->OutputChan0=9;
   ch1->OutputChan1=0;
   ch1->MasterAxis=-1;
   ch1->LimitSwitchOptions=0x0;
   ch1->SoftLimitPos=1e+030;
   ch1->SoftLimitNeg=-1e+030;
   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.92076;
   ch1->iir[2].A2=-0.923833;
    EnableAxisDest(1,0);

   

   DefineCoordSystem(0,-1,1,-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 != LastZ)
      {
         // we moved - enable KStep Amplifers
         SetBit(45);
         T0 = Time_sec();  // record the time and position of last motion
         LastX=ch0->Dest;
         LastZ=ch1->Dest;
      }
      else
      {
         if (Time_sec() > T0 + 10.0) ClearBit(45);
      }
   }

    return 0;
}

10
General Mach Discussion / Re: Steps/Inch on Lathe = 75,000; Seems a Tad High
« on: September 02, 2014, 01:57:24 PM »
I am looking at the "mot" files in Kmotion. It appears that they duplicate a lot of the stuff in the init.c file. Not sure why I need mot files AND an init.c file.

Pages: 1 2 3 »