Hello Guest it is April 25, 2024, 08:18:40 PM

Author Topic: correct construction of drive programe  (Read 2673 times)

0 Members and 1 Guest are viewing this topic.

correct construction of drive programe
« on: January 21, 2010, 12:23:35 PM »
Hi.
    Back to my favourite subject, subroutines.     I,m boring 18 x 18.5dia holes at various coordinates.   As these are only clearance holes I could have quite easily used a simple point to point with a G12,  but chose the circle cutting wizard in NFS.   I simply used this G code with O1001 at the head and M99 to end.    As I was using G52 to move to each position I edited any cutter compensation calls with in the sub.   The drive programe was:
g0g49g40g17g80g50g90g98g54g21
m6 t1
m03s7000
m9
g00g43h1z6
g52x107.5y-35
g01z2
m98p1001
g52x0y0
g52107.5y0
g01z2
m98p1001

and so on.
  The control ran the first position exactly at the x0 y0 position, not the x107.5 y-35 programed.   After trying various permentations with out success, I wrote a new point to point programe to the individual coordinates using the same sub, but for some reason this programe wouldn't run.   Now, I realise it isn't the control at fault and that I'm making a fundemental mistake some where, but after several hours of trying different ideas, I'm back to square one.   Has using the code from the circle cutting wizard got any thing to do with it and how should I go about writting the simple point to point programe to run the sub, are there any rules for this that I'm not aware of.   Coming this far I don't want to give up and resort to G12
Regards   
 

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: correct construction of drive programe
« Reply #1 on: January 21, 2010, 03:35:22 PM »
If you are milling the holes to size you need to use one type of program if you are boring with a boring bar then another is needed :-

To mill the holes.

(USING 10mm CUTTER)

G21 G40 G00 G49 G54
M6 T1
S7000 M3
G90X107.5 Y-35.
G43 H1 Z6.
M98 P1001
X107.5 Y35.
M98 P1001
X-107.5 Y35.
M98 P1001
(Etc......)
M30

O1001
G90Z1.
G91G01 Z-5. F50.
X4.25 F100.
G03 I-4.25 F125.
G01X-4.25
G00 G90 Z1.
M99

(USING A 18.5 DIA BORING BAR)

G21 G40 G00 G99 G54
M6 T1
S7000 M3
G90G43H1Z6.
X107.5Y-35.
G81 G98 Z-5. R1. F25.
X107.5 Y35.
X-107.5 Y35.
(Etc......)
G80
M30

Or something like this

Graham
« Last Edit: January 21, 2010, 03:39:26 PM by Graham Waterworth »
Without engineers the world stops
Re: correct construction of drive programe
« Reply #2 on: January 22, 2010, 06:43:02 AM »
Thanks Graham.
                     I knew it would be simple, G90 insteasd of G52 on the first line.   
Regards.
                         Mick