Hello Guest it is March 28, 2024, 04:20:41 PM

Author Topic: worm gear cad design  (Read 21484 times)

0 Members and 1 Guest are viewing this topic.

Re: worm gear cad design
« Reply #30 on: December 27, 2013, 11:59:02 AM »

"The equation to calculate STEPS PER is:
Motor steps per revolution (200) * ratio of timing belt drive (2) * ratio of Rotary table (40)  = Total number pulses to go 360 degrees = 16000
Divide this number (16000) by 360 degrees = STEPS PER 1 degree = 44.44444

You cannot have a fractional STEPS PER except if it is an even fraction equal to micro-steps, like 1/2, 1/4, 1/8 micro-steps, then a fraction like .5, .25, .125 will equate to a whole number when factored with the multiplier of 2,4,8 in the final calculation."

Won't Mach work with the 44.44444 but only stop on a whole number? Like 6 degrees (266.6664) would stop at 267 or maybe 266
Re: worm gear cad design
« Reply #31 on: December 27, 2013, 12:42:22 PM »
Hi Tony:
I thought I made this point in my post about steps and degees of rotation. I did not say to use a fraction like 44.44444. I fully understand a stepping motor will go to either 44, or 45, not some interval in between, because we are dealing with a magnetic lock on 1 step out of 200 per revolution. I thought this was clear.

My reply was to explain how the STEP PER number is derived, and why it must be a whole number.

I am trying to explain things that are pretty fundamental to a non-English speaking person, who although new to Mach3, is serious about doing a fairly difficult machine job. His English is 100 times better than my ability to speak any foreign language.

Regards,
John
Re: worm gear cad design
« Reply #32 on: December 27, 2013, 01:02:46 PM »
Hi Tony:
We cannot use a non-whole number, even though as you said it will stop on 267, or 266 because each revolution will be either too little or too much. I know in the case of 6 revolutions it doesn't  mean that much, but the original post which is not even the same topic was about cutting an increasing pitch in 24" of travel.

In the case of my explanation of how to make a repeating subroutine, each pass though the loop had to be an exact amount. If the loop was executed multiple times, the error would be accumulative.

If the error in 44.4444 degrees per step was used, each 360 degrees of rotation would be off about a half step for each degree, which way I do not know. The would equate to about 8 steps for each revolution. This is not totally bad depending upon what the end use is, but I tend to think of how to get all the numbers correct.

Now that you have me thinking, we could always lie to the program, and instead of writing the G-code to go say 3600 degrees (10 revolutions), just write 3602 or 3603, and now it all works. ;D

John


Re: worm gear cad design
« Reply #33 on: December 27, 2013, 02:21:15 PM »

Thanks John, now I see what you mean in incremental mode.

I also have a very poor resolution rotary axis for pipe coping with plasma but it works quite well in absolute coordinates.

 40.2777778 steps per degree.

G01 A .1 gets. .0993
   10 = 10.0055
   20 = 19.9862
        3600 = 3600.0000

Sorry to have gotten off subject.

Tony

Re: worm gear cad design
« Reply #34 on: December 27, 2013, 04:04:43 PM »
Tony:
Really not off subject, as the original post was about cutting a variable pitch screw 24" long, and then Khaled wanted info how to cut a 27mm pitch conventional thread, then things evolved into how to set STEPS PER with his gearing, ....... and so it goes. I suggested starting a new topic, but khaled is new to Mach3 and the forum, perhaps did not get my drift.
 
Never heard anymore about the original post. That was a really interesting problem.

I spent over 20 years doing prototype 4-axis CNC machining including all kinds of cams, so that post really got my attention.
 
John
Re: worm gear cad design
« Reply #35 on: December 28, 2013, 08:37:33 AM »
Andy never said how many turns the worm was to make in the 24” but attached if a file that will generate a ten turn ¼ to ¾ variable pitch in 24”

You could edit the following BASIC code to generate anything you wanted.


Here’s the BASIC code I used to generate the file:

OPEN "VPITCH.TAP" FOR OUTPUT AS #1

X = 0
VPITCH = .5 / 3600 '=.0001333 pitch increased per degree
INC = 23.5 / 3600  '=.0065  pitch increased per degree
 CLS

 FOR I = 1 TO 3600 STEP 1

X = X + VPITCH + INC

'PRINT #1, "TEST"

PRINT "G01 X "; USING "####.####"; X;
PRINT " A "; I

PRINT #1, "G01 X "; USING "####.####"; X;
PRINT #1, " A "; I


 NEXT I

CLOSE #1

Off subject. Is there any new easy way to write and execute code like this? This BASIC is at least 25 years old.

Thanks

Tony
Re: worm gear cad design
« Reply #36 on: December 28, 2013, 03:47:39 PM »
Hi Tony:
Basic may be old, but for generating certain kinds of data, like your increasing pitch problem it works fine.  I made cam programs in basic that you could input the starting degrees, ending degrees, starting radius, ending radius, desired angular step size(like .1 degree per step) for different types of cam motion; Cycloidal, Harmonic, Parabolic etc., and it would crank out the data in seconds. The X,Y coordinates in the case of a flat plate cam, or X, A if the cam was machined on a rotary table. This is sort of "brute force" generating every point of motion by actual G-code X, and A steps. You can compile the Basic program, and have a bunch of little programs for each specific machining need. I should add, the code generated is to the "center of the cutter", not the cam surface. Depending on the size of the part, the program could be several thousand lines long. There are formulas in the math books for such motions, as well a curve fitting.

In the case of my increment example earlier in this post, making a loop, using G91 takes only a few lines of code. Mach3 does all the work adding numbers to the constantly changing X axis motion per the loop, and moving the X and A axis in sync accordingly.

It certainly is possible to write a Basic program that would read user input of starting pitch, ending pitch, and total length of shaft, that would do all the math and output a working G-code, G91 incremental program. But, it is most likely a one time job.

Sometimes just thinking about a given machining problem for a while will let you see a simple solution.

Regarding the 24" screw with variable pitch, there were enough "known" values to derive the "unknown" variable (pitch increase per 1 REV).

One place the Basic has been very useful to me, was writing code to calculate the offset from a NON-Linear line "Normal" to the line. There are cases where G41 or G42 get goofy, and will wreck the part, thus being able to create a "brute force" machine pass offset from a line in which there may be X,Y,A all moving together. Then following that line with a G40 (no offset) cutter will be a perfect offset. I am sure there are CAD programs that will do that, but they can run into the multiple thousands of dollars.

At the end of the day, simple is better. However, there is really no easy way. It all takes time; programming, setting up, test cutting in air (sometimes), special cutters, fixtures, setting  Zero's ....etc., and editing you code to fine tune the actual machining.

John
Re: worm gear cad design
« Reply #37 on: December 29, 2013, 07:38:42 AM »

Hi John:

I too use BASIC to generate cams with uniform acceleration into a constant velocity curve with deceleration at the end. To deal with the cutter comp I have the program write a script to be read by AutoCAD or BobCad. Once in CAD I fit the spline and offset the curve by half the cutter diameter before generating Gcode.

I am comfortable in BASIC and wasn’t looking for an easier way just a newer way. I’ve tried a C++ consol application but can’t find a way to open and write to a file. The same for VB without doing a windows app which takes me forever. Is there a simple way to do this in C++ or VB?

I’m sure you noticed my Gcode output was completely wrong. It is a constant pitch and has nothing to do with what Andy was looking for. Oops!

Tony

Re: worm gear cad design
« Reply #38 on: December 29, 2013, 03:48:07 PM »
Tony:
What matters is the method, or principle in the reasoning. Easy to make a mistake writing examples, in an online format. Sounds like you have gotten into some of the problems of Cam machining, and/or multi-axis prototypes. It's good exercise for the brain. The other side is, most people don't have a clue what your' talking about.

John