1
General Mach Discussion / Queue depth going to zero -- causes start/stop motion
« on: May 03, 2012, 07:31:33 PM »
I'm running a lot of points closely spaced to get a very precise contour. The first dozen or so points run smooth, then the motion reverts to start/stop motion (i.e. appears to stop at every point rather than accelerate/decelerate smoothly through the points). The application is a computerized ornamental lathe where the C-axis is a stepper motor on the lathe spindle for very precise rotation control. A sample of the g-code is shown below:
g20 (units are inches)
g90 (absolute distance mode)
g93 g1 x0.31761 z0.16371 c0.00 f60
g94 g1 x0.35899 z0.07267 c-0.00 f10
g93 g1 x0.35900 z0.07265 c-0.08 f40000 (Note this is inverse time mode)
g93 g1 x0.35900 z0.07265 c-0.17 f40000
g93 g1 x0.35900 z0.07265 c-0.25 f40000
g93 g1 x0.35900 z0.07260 c-0.33 f40000
g93 g1 x0.35905 z0.07260 c-0.42 f40000
g93 g1 x0.35905 z0.07255 c-0.50 f40000
g93 g1 x0.35905 z0.07250 c-0.58 f40000
g93 g1 x0.35910 z0.07250 c-0.66 f40000
g93 g1 x0.35910 z0.07245 c-0.75 f40000
g93 g1 x0.35915 z0.07235 c-0.83 f40000
g93 g1 x0.35915 z0.07230 c-0.91 f40000
g93 g1 x0.35920 z0.07225 c-1.00 f40000
g93 g1 x0.35925 z0.07215 c-1.08 f40000
g93 g1 x0.35925 z0.07205 c-1.16 f40000
g93 g1 x0.35930 z0.07200 c-1.25 f40000
g93 g1 x0.35935 z0.07190 c-1.33 f40000
g93 g1 x0.35940 z0.07180 c-1.41 f40000
g93 g1 x0.35945 z0.07170 c-1.50 f40000
g93 g1 x0.35950 z0.07155 c-1.58 f40000
etc.
Some detective work: On the diagnostic screen, the Queue depth goes up to about 8 then drops rapidly to zero. At the point it drops to zero, the start/stop motion begins. The LookAhead is set to 20 lines. Changing it to 100 lines didn't make any noticeable change. The Queue depth never gets up over about 8. The g-code window no longer updates either (sticks at about line 20).
By increasing the angular spacing on the C-axis, I was able to Queue to fill up to about 23 (with LookAhead still set at 100) but is still runs down to zero after about 100 lines of g-code.
I need the very fine resolution to get a very smooth surface (I'm using an increment of 0.08 degrees now). A larger increment in C will show striations in the cut surface. The reason for using inverse time mode is so that the rotation of the C-axis is constant which has been found to give the cleanest cuts.
Kernel speed is 25KHz (and the Driver Test shows "System Excellent" all the way up to 100KHz). Increasing the Kernel speed had no effect.
The F40000 gives a 1/40,000 minute (or 1.5mSec) interval between g-code instructions. The C-axis is set up with 13,000 pulses per rotation, so this means only 3 pulses have to be generated in the 1.5mSec interval (this is about 9rpm). X and Z axis are 20,000 pulses per inch. Reducing the inverse time interval to F4000 makes no difference.
My guess is that the Look-Ahead calculations aren't able to keep up with the demand for the information. Is there any way to cause the LookAhead calculations to be done in batch mode prior to starting the run? Is there anything I can do to give the LookAhead calculations a bigger chunk of the processor or run it in a different thread?
I admit to being a newbie to Mach3. I've been using EMC2 up until now (which apparently does it's trajectory planning in batch when loading the g-code). I really like Mach3 now that I've used it some and would like to find a way to make it work for my application.
Hardware info:
Intel Pentium G620 Sandy Bridge 2.6GHz
Gigabyte GA-H61MA-D3V motherboard
4Gb RAM
PCI Express parallel port connected to Gecko G540
g20 (units are inches)
g90 (absolute distance mode)
g93 g1 x0.31761 z0.16371 c0.00 f60
g94 g1 x0.35899 z0.07267 c-0.00 f10
g93 g1 x0.35900 z0.07265 c-0.08 f40000 (Note this is inverse time mode)
g93 g1 x0.35900 z0.07265 c-0.17 f40000
g93 g1 x0.35900 z0.07265 c-0.25 f40000
g93 g1 x0.35900 z0.07260 c-0.33 f40000
g93 g1 x0.35905 z0.07260 c-0.42 f40000
g93 g1 x0.35905 z0.07255 c-0.50 f40000
g93 g1 x0.35905 z0.07250 c-0.58 f40000
g93 g1 x0.35910 z0.07250 c-0.66 f40000
g93 g1 x0.35910 z0.07245 c-0.75 f40000
g93 g1 x0.35915 z0.07235 c-0.83 f40000
g93 g1 x0.35915 z0.07230 c-0.91 f40000
g93 g1 x0.35920 z0.07225 c-1.00 f40000
g93 g1 x0.35925 z0.07215 c-1.08 f40000
g93 g1 x0.35925 z0.07205 c-1.16 f40000
g93 g1 x0.35930 z0.07200 c-1.25 f40000
g93 g1 x0.35935 z0.07190 c-1.33 f40000
g93 g1 x0.35940 z0.07180 c-1.41 f40000
g93 g1 x0.35945 z0.07170 c-1.50 f40000
g93 g1 x0.35950 z0.07155 c-1.58 f40000
etc.
Some detective work: On the diagnostic screen, the Queue depth goes up to about 8 then drops rapidly to zero. At the point it drops to zero, the start/stop motion begins. The LookAhead is set to 20 lines. Changing it to 100 lines didn't make any noticeable change. The Queue depth never gets up over about 8. The g-code window no longer updates either (sticks at about line 20).
By increasing the angular spacing on the C-axis, I was able to Queue to fill up to about 23 (with LookAhead still set at 100) but is still runs down to zero after about 100 lines of g-code.
I need the very fine resolution to get a very smooth surface (I'm using an increment of 0.08 degrees now). A larger increment in C will show striations in the cut surface. The reason for using inverse time mode is so that the rotation of the C-axis is constant which has been found to give the cleanest cuts.
Kernel speed is 25KHz (and the Driver Test shows "System Excellent" all the way up to 100KHz). Increasing the Kernel speed had no effect.
The F40000 gives a 1/40,000 minute (or 1.5mSec) interval between g-code instructions. The C-axis is set up with 13,000 pulses per rotation, so this means only 3 pulses have to be generated in the 1.5mSec interval (this is about 9rpm). X and Z axis are 20,000 pulses per inch. Reducing the inverse time interval to F4000 makes no difference.
My guess is that the Look-Ahead calculations aren't able to keep up with the demand for the information. Is there any way to cause the LookAhead calculations to be done in batch mode prior to starting the run? Is there anything I can do to give the LookAhead calculations a bigger chunk of the processor or run it in a different thread?
I admit to being a newbie to Mach3. I've been using EMC2 up until now (which apparently does it's trajectory planning in batch when loading the g-code). I really like Mach3 now that I've used it some and would like to find a way to make it work for my application.
Hardware info:
Intel Pentium G620 Sandy Bridge 2.6GHz
Gigabyte GA-H61MA-D3V motherboard
4Gb RAM
PCI Express parallel port connected to Gecko G540