On Saturday 26 July 2014 17:16:52 andy pugh did opine
And Gene did reply:
> On 26 July 2014 22:01, Gene Heskett <[email protected]> wrote:
> > Load it, and try to run it gets me a "code exceeds machine lower
> > limit for axis X".  The code doesn't, for this template, get within
> > 40mm of of the axis0 min limit in the .ini file.
> 
> Does the code depend on a parameter that isn't set at program load
> time? (when the preview does a dry-run to spot the job limits)

Well, for the G76 code, you do need quite a few parameters, but the only 
ones set at program load time are the Zstart, Zend, TPI or TPmm and the OD 
of the thread.  Everything else is calculated from that by the std 
textbook formulas within the program.

The code:

%
g21     (use metric measurements for this one)
g8      (use radius mode for X)
s700
        ( all measurements in millimeters, set thread pitch )
#<tp_mm>        =       1.0

#<pitch>        =       [1.000 / #<tp_mm>]
(debug, thread pitch = #<pitch>)
( set threads OD )
#<thread_mm_OD> =       47.10 (demo, cuts air only)

( from thread_OD set drive & retrace diameters )
( set drive line OD )
#<drive_line>   =       [#<thread_mm_OD> + 1.60]
(debug, drive_line = #<drive_line>)

( set z far enough away sync is good by the time it )
( gets to real metal )
#<zdrive_start> =       82 (mm)

( ending point of thread at first pass, Q will advance it! )
#<zend> = 56 (in mm folks)

( calculate this K from pitch )
( so I want to use 80% of pitch /0.866 according to the Handbook)
#<kpp>=[0.8 * [#<pitch> / 0.866]]
(debug, kpp = #<kpp>)

( set threads OD, drive_line minus i )
#<i_cut>=[0.000 -[#<drive_line> - #<thread_mm_OD>] - 0.03]
(debug, i_cut = #<i_cut>)
g1 f950 x#<drive_line>
g1 f950 z#<zdrive_start>

m3 ( start spindle )
g4 p3 ( spindle wind up time )

g76 p#<pitch> z#<zend> i#<i_cut> j0.125 r1.90 k#<kpp> q30.01 h3 e0.5 l2

( leave its x where it started from )
g1 f1450 x#<drive_line>
m5 ( stop spindle )
g1 f1450 z280 ( leave room to inspect thread )
m2
<-cut here

About the only thing not properly defined above is the drive_line, it 
should be calculated so the tool just clears the thread being cut on the 
last retrace moves while doing the h3.  This is a bit in excess (about 3x 
according to the back plot) of that obviously.  A better method would be 
gleefully plagiarized. :)

Thanks Andy.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to