Hello Guest it is March 28, 2024, 11:00:08 AM

Author Topic: Why do large files cause lost steps?  (Read 6572 times)

0 Members and 1 Guest are viewing this topic.

Why do large files cause lost steps?
« on: April 02, 2008, 05:20:21 PM »
I've been trying to do 3d contouring on a 4-axis stepper/gecko machine we built recently, and I'm experiencing strange behavior, which I'm at a loss to account for. While a combined move in the X and A axes works perfectly with the X axis set at 300 ipm and the A axis at 790 dpm (degrees per minute), when I try to run my large (11mb) finishing pass, which calls for multiple tiny moves in Z at the same time as it rotates in A, I have to slow down to a crawl (75 Z, 150 A) in order not to miss steps. At this rate, the motors sound very odd (the A axis groans, and the Z axis clicks) and of course the progress of the cutting operation is practically nil; the cutter basically burns its way through the wood.

I'm trying to figure out what's going on. Is memory overhead from the file size interfering with pulse generation? Is it the graphic redraw that's slowing things down? (How do I turn that off?) I haven't had nearly as much trouble when combining tiny moves in X and Z; is there an issue with combined rotary and linear moves? Should I set a different plane of movement? (X/Y is called by default) Or is it the Constant Velocity function that's messing things up? (When I've tried Exact Stop, things get very herky-jerky). I've used Mach for a while without having problems like this; is it something to do with Version 2.63? Why is there such a huge difference between the speeds that work reliably in testing and the ones that I have to use when running my program? What is it that's causing this massive loss of steps, particularly in A? Any suggestions would be much appreciated - I haven't got much more hair to tear out...

Andrew Werby
www.computersculpture.com

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Why do large files cause lost steps?
« Reply #1 on: April 03, 2008, 03:46:29 AM »
Whilst I haven't much of a clue - I might give you some general pointers - I hope you haven't thought of all these. I have looked at your web site and if some of the intricate designs on there are anything to go by, I can see what you mean.

As far as a rotary and linear axis is concerned, I cannot see that this should be any problem - both are driven by stepper motors - I assume within the limits of the motors themselves. The only difference between a linear and rotary axis is that they do not change units when switching from metric to imperial or vica versa.

When you say you have built this machine recently - I take it you have not needed, or got switched on, the backlash feature.

Yes - when you are making many tiny moves, the computing time needed shoots up. I do not know which mode, CV or Absolute stop, uses more. In Absolute Stop  the axis literally stop between each move, then accelerate again - hence the jerky movement, whereas in CV the computer has to calculate similar acceleration and deceleration patterns for the two axis as they move, and introduces the next movement as it slows the previous one. Upping the "look ahead" facility - the number of lines Mach3 computes in advance -  might be some help here

There has been mention in this forum some time ago of the screen redrawing interfering with running - particularly of large files. I didn't note how to turn iit off because it didn't apply to me - but no doubt someone will be able to tell us.

On a simple note - is your computer up to the job. The speed of the processor is quite clealry fundamental, but more so the RAM memory is critical in computing speed - and is a simple way to try and improve, without costing a fortune. I am a member of a theatre organ forum - computer based - and the difference in performance between 256MB and 2GB is astounding. No doubt you have a large memory, but I would up it to the maximum and see if that gets the processor working faster.

I hope some of this helps you find where to look.
 
« Last Edit: April 03, 2008, 03:49:31 AM by jimpinder »
Not me driving the engine - I'm better looking.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: Why do large files cause lost steps?
« Reply #2 on: April 03, 2008, 04:06:53 AM »
If you go to the Diagnostics, page just above the reset button you can turn off the toolpath.

It should help.

Graham.
Without engineers the world stops

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: Why do large files cause lost steps?
« Reply #3 on: April 03, 2008, 11:44:18 AM »
multiple tiny moves in Z at the same time as it rotates in A
Sounds to me like you don't have CV mode turned on. For "multiple tiny moves", without it your machine will make a pretty good impression of a machine gun about to self destruct :-)
Re: Why do large files cause lost steps?
« Reply #4 on: April 03, 2008, 03:36:50 PM »
Thanks for the help, guys. Taking things from the bottom up: yes, I do have CV turned on. I've generally had good luck with it, since it smooths out all these little moves and makes them flow together better. But in this case, it seems to be a big part of the problem. When I've called G61 (exact stop) I lose a lot fewer steps, although motion is more intermittant. I upgraded to the latest bleeding-edge version of Mach, which is supposed to have improved CV, but maybe they haven't gotten to fixing combined Z-A moves yet.

I'll try turning off the toolpath in the Diagnostics page (which seems like an odd place to put that function) - thanks.

I don't have backlash turned on; the linear axes don't seem to have any, but I'm sure there's some in the rotary. However, I'm having bigger problems than that right now...

I tried fiddling with the lookahead and CV feedrate settings; nothing I did seemed to make much difference. Can someone explain what CV feedrate is, and what the effect of a "2" or ".5" instead of a "1" should be? Is the lookahead in inches, degrees, combined units or what? Wouldn't making the number bigger increase the load on the computer?

And yes, this is not the fastest or most memory-loaded computer in the world I'm running Mach on. I was under the impression that Mach didn't need a lot of CPU speed or RAM. But if that's necessary to run my long and intricate part files, I guess I can get a new one; any suggestions for something people running big files with combined moves have had good luck with?

Andrew Werby
www.computersculpture.com




Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Why do large files cause lost steps?
« Reply #5 on: April 03, 2008, 04:36:25 PM »
There must be a limit to the computing power - at the moment Mach also generates all the drive pulses for the cards. I understand this will alter with the introduction of "Smooth Stepper" where the drive pulses are generated on the card. This will decrease the demands on computing power.

No - I don't think the demands are outrageous. I assume your PC is a stand alone, doing only the one job, - but when you are doing intricate work, as you say, with many little moves, at high speed, then the demands clearly rise.

The "look ahead" is the number of lines of code that Mach3 pre digests so to speak. I dont know how far it goes. I assume with some small files, it can pre work all the code and hence display the tool path from the start. Turning the tool path off shoud help as Graham said.

I would still consider increasing the RAM of your machine, but look out for the smooth stepper - perhaps some of those testing them will let us know if it would help in this case.
Not me driving the engine - I'm better looking.
Re: Why do large files cause lost steps?
« Reply #6 on: April 06, 2008, 09:53:20 PM »
In the G-code program that's causing me problems, just two motors are running at the same time: A and Z. The same setup doesn't have a problem with moves that combine X and Z, or Y and Z; these work fine. And if I turn CV off, the program runs without losing steps, just slow and jerkily. Brian suggested giving A a separate feedrate of its own (in degrees per minute) but I'm not sure how to do that in my software, and I don't know how that would work with combined moves. By the way, I got the file to misbehave when I'd radically truncated it (to one revolution) and turned off the screen display, so maybe I need to change the name of this thread to "Why does CV cause lost steps in A"? But Brian also said he'd found a "little bug" there which he's going to scope out, so maybe I can give this a rest pretty soon and get back to carving...

Andrew Werby
www.computersculpture.com

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Why do large files cause lost steps?
« Reply #7 on: April 07, 2008, 12:05:46 PM »
How have you got the A axis set up. You say it is a rotary axis. In that case your number of steps per unit should, I would have thought, be in degrees. The speed then translates to degrees per minute - not ins or mm's as shown on the screen.

If you say the computer has no problem with xy or yz or whatever, why don't you set up the a axis as a linear axis. Compute whatever the distance is you want to move at the circumference, think of this as a distance unit and enter in the appropriate nuber of pulses to turn your A axis far enough to give that distance at the circumference ( a bit of pi will be involved) but to Mach it makes no difference - all it wants to know is the number of pulses it has to output to move your axis whatever distance you decide upon - it could be measured in finger widths for all the computer knows.

You may be right - the computer might have difficulty doing CV on a rotary axis (I can't see why, but it might)

I am assuming this pattern is described on wood of a given diameter, and therefore it does not matter if you are in rotary or linear settings.
Not me driving the engine - I'm better looking.
Re: Why do large files cause lost steps?
« Reply #8 on: April 07, 2008, 02:44:29 PM »
How have you got the A axis set up. You say it is a rotary axis. In that case your number of steps per unit should, I would have thought, be in degrees. The speed then translates to degrees per minute - not ins or mm's as shown on the screen.

[Right; it's set up as a rotary axis with the units being degrees and not inches. In motor tuning it worked okay at 1000 units per minute, but I backed it down to 750 to give a margin of error. That works fine in G0 moves in MDI, even combined ones like G0 A360 Z3. But when I run my program that calls for CV, the pulses Mach puts out don't seem to drive it correctly, and I end up way off the mark.]

If you say the computer has no problem with xy or yz or whatever, why don't you set up the a axis as a linear axis. Compute whatever the distance is you want to move at the circumference, think of this as a distance unit and enter in the appropriate nuber of pulses to turn your A axis far enough to give that distance at the circumference ( a bit of pi will be involved) but to Mach it makes no difference - all it wants to know is the number of pulses it has to output to move your axis whatever distance you decide upon - it could be measured in finger widths for all the computer knows.

[I tried that, and it didn't make any difference, which surprised me. But maybe there are more places to uncheck than "A is angular"? I'm not sure how to specify the pulses, but if you're talking about changing steps per unit in motor tuning, wouldn't changing that to an arbitrary linear unit lose the accuracy of my revolutions? If the rotary axis doesn't rotate 360 degrees when called upon to do so, I don't see how it could possibly make a correct part.]

You may be right - the computer might have difficulty doing CV on a rotary axis (I can't see why, but it might)

I am assuming this pattern is described on wood of a given diameter, and therefore it does not matter if you are in rotary or linear settings.

[It's not that simple, actually. I'm carving something that varies in diameter quite a bit from one end to the other. Yes, if all I ever wanted to do was inscribe text or something on cylinders of a fixed diameter, I could see this working, but I want to be able to carve all sorts of things on this machine, which can cut rotary parts from about 1/4" to about 36" in diameter. I'm really hoping that this is a simple little bug in the CV, and that everything will work after some squashing takes place...]

Andrew Werby
www.computersculpture.com