G Code

CNC related queries on software; firmware; DOS; Windows; parameters; programming; error messages etc.

Moderators: Martin, Steve, Mr Magoo

Post Reply
TDIPower
CNC Guru
CNC Guru
Posts: 613
Joined: Tue 29 Apr , 2014 18:38 pm
Hardware/Software: Starturn 5 (sort of running, I will get this done!)
Lathe cam designer V1.11
Quickturn 2D Design
FANUC offline and online programs.
Microrouter Pro NS V5 (microstep)
VR2 and VR5
Boxford VMC260
Techsoft 2d Design tools V1 > V2
ProDesktop
Fusion 360
Deskproto

G Code

Post by TDIPower » Tue 03 Jun , 2014 17:47 pm

Is there a full list of G code, M code etc that Denford machines use/have used over the years?

I have been reading about Quickturn 2d not being able to do threading on older machines. So was wondering if I was to buy Quickturn could I swap out the threading commands with the ones I would need for my Starturn 5 through the DOS FANUCSLD once the Quickturn has created the G code file.

Pete

User avatar
Steve
CNC Guru
CNC Guru
Posts: 1432
Joined: Tue 21 Feb , 2006 16:15 pm
Location: Denford UK

Re: G Code

Post by Steve » Wed 04 Jun , 2014 12:57 pm

Hi,

I think we made a change so we cut the threads without using a cycle so it will work with older machines. I attach a sample program that cuts a 10mm thread. This uses a turning tool 1 parting tool 7 and threading tool 5 material is set to plastic. Just run this through your software and see if it works.
Attachments
test thread 50mm billet 25mm dia plastic.fnl
(3.28 KiB) Downloaded 855 times

TDIPower
CNC Guru
CNC Guru
Posts: 613
Joined: Tue 29 Apr , 2014 18:38 pm
Hardware/Software: Starturn 5 (sort of running, I will get this done!)
Lathe cam designer V1.11
Quickturn 2D Design
FANUC offline and online programs.
Microrouter Pro NS V5 (microstep)
VR2 and VR5
Boxford VMC260
Techsoft 2d Design tools V1 > V2
ProDesktop
Fusion 360
Deskproto

Re: G Code

Post by TDIPower » Wed 04 Jun , 2014 14:22 pm

Brilliant Steve, Ill give this a go.

Was it produced with QuickTurn?

I just posted about this in my thread about Lathe Cam.

I also managed to find the 'generic DOS turning software manual' which looks to list all the G/M codes etc.

I had actually been talking to the wife about how the sample code in the Starturn manual is about 25lines yet the same drawing in lathecam comes out at 150ish. I had remembered back then memory was expensive and that putting loop commands into programs was common to save on memory usage.
The advantage of having a full list of all commands is you can see where an error may be.

Do you know what the max number of lines the Starturn 5 would take? (I posted a pic of the control board and eprom label in my 1st ever post in the Starturn section).
I have seen comments about drip feed and get the idea of what it will do but how would it be used.

Thanks Pete

User avatar
Steve
CNC Guru
CNC Guru
Posts: 1432
Joined: Tue 21 Feb , 2006 16:15 pm
Location: Denford UK

Re: G Code

Post by Steve » Wed 04 Jun , 2014 14:31 pm

I think it depends on the control card in the starturn. Its a bit before my time as I dont know what the older machines had fitted.

The program was made in QuickTURN 2D Design.

TDIPower
CNC Guru
CNC Guru
Posts: 613
Joined: Tue 29 Apr , 2014 18:38 pm
Hardware/Software: Starturn 5 (sort of running, I will get this done!)
Lathe cam designer V1.11
Quickturn 2D Design
FANUC offline and online programs.
Microrouter Pro NS V5 (microstep)
VR2 and VR5
Boxford VMC260
Techsoft 2d Design tools V1 > V2
ProDesktop
Fusion 360
Deskproto

Re: G Code

Post by TDIPower » Sun 08 Jun , 2014 19:53 pm

had a bit of a fail when I came to testing this one (the gearbox in my ATC stripped a tooth)

However I did run the program whilst 'machining air'
With the threading section in the QuickTurn file the chuck kept spinning quite fast and the tool feed was very slow.
I drew up a piece the same size on LatheCam and when it got to the threading section the chuck slowed right down and the tool feed was very quick.

This basically mirrored what I had seen in FANUCL. the outcome in FANUCL had a 'smooth finish' with the Quickturn using G32 and a thread using the Lathecam G76 commands.

Is the problem in the Starmill or FANUCL. Obviously one of them is not doing what it should with the G32 code.

I have been trying to understand the G32 and G76 commands better but feel lost.

I suppose for external threading I could get away with drawing up the threaded section in LatheCam and pasting the code into a Quickturn file. However I need to know what to do for internal threading for the future.

Sorting this out will dictate if I will go down the route of buying quickturn.
The files look to be doing the 'same thing' it appears that the spindle and feed rates don't work from the Quickturn file


This is the Lathe cam file for an M10 x 15mm thread.

N1 G28 U0 W0 go home
N2 M6 T0505 Tool Change
N3 G97 M3 S350 Cancel constant surface speed control, Spindle forwards, speed 350
N4 G0 X11 Z5 fast move to X/Y position to start the threading
N5 G76 P036060 Q60 R0.03 Thread cycle cut P = first contour block (what do the numbers mean) Q = Final contour block (what do the numbers mean) R = ???
N6 G76 X8.16 Z-16 R0 P920 Q260 F1.5 Thread cycle cut X=final position/dia of cut, Z=final position/thread length R=?? P=?? Q=?? F=?? (possible thread pitch??)
N7 M5 Stop spindle
N8 G28 U0 W0 go home
N9 M30 reset rewind program

This is the file from Quickturn (I added the line numbers for comparison)

(External Threading Operation)
N1 G28U0W0 As per N1 in lathecam
N2 M06T0505 As per N2 in lathecam
N3 G97 M03 S350 As per N3 in lathecam
N4 G98 F250 Feed per min at 250
N5 G00 X11.600 Z1.798 fast move to X/Y position to start the threading
N6 G01 X9.300 linear interpolation (cutting feed)
N7 G32 X9.300 Z-13.750 F1.500 G32= Thread cutting, x starting point, z finishing pointWhat does the F1.500 mean?
N7 G00 X11.600 move tool clear in X direction
N8 G00 Z-13 move tool in Z
N9 G00 Z1.714 move tool in Z to start point
N10 G01 X9.010 F250 repeat N6-N10 but cutting closer to the centre line with each pass through to N74
N11 G32 X9.010 Z-13.750 F1.500
N12 G00 X11.600
N13 G00 Z-13
N14 G00 Z1.650
N15 G01 X8.788 F250
N16 G32 X8.788 Z-13.750 F1.500
N17 G00 X11.600
N18 G00 Z-13
N19 G00 Z1.596
N20 G01 X8.600 F250
N21 G32 X8.600 Z-13.750 F1.500
N22 G00 X11.600
N23 G00 Z-13
N24 G00 Z1.548
N25 G01 X8.435 F250
N26 G32 X8.435 Z-13.750 F1.500
N27 G00 X11.600
N28 G00 Z-13
N29 G00 Z1.505
N30 G01 X8.285 F250
N31 G32X8.285Z-13.750F1.500
N32 G00X11.600
N33 G00Z-13
N34 G00Z1.465
N35 G01X8.148F250
N36 G32X8.148Z-13.750F1.500
N37 G00X11.600
N38 G00Z-13
N39 G00Z1.428
N40 G01X8.020F250
N41 G32X8.020Z-13.750F1.500
N42 G00X11.600
N43 G00Z-13
N44 G00Z1.414
N45 G01X7.972F250
N46 G32X7.972Z-13.750F1.500
N47 G00X11.600
N48 G00Z-13
N49 G00Z1.401
N50 G01X7.923F250
N51 G32X7.923Z-13.750F1.500
N52 G00X11.600
N53 G00Z-13
N54 G00Z1.387
N55 G01X7.875F250
N56 G32X7.875Z-13.750F1.500
N57 G00X11.600
N58 G00Z-13
N59 G00Z1.373
N60 G01X7.827F250
N61 G32X7.827Z-13.750F1.500
N62 G00X11.600
N63 G00Z-13
N64 G00Z1.373
N65 G01X7.827F250
N66 G32X7.827Z-13.750F1.500
N67 G00X11.600
N68 G00Z-13
N69 G00Z1.373
N70 G01X7.827F250
N71 G32X7.827Z-13.750F1.500
N72 G00X11.600
N73 G00Z-13
N74 G00Z-1
N75 M05 Stop spindle
N76 G28U0W0 go home
N77 M30 reset rewind program

TDIPower
CNC Guru
CNC Guru
Posts: 613
Joined: Tue 29 Apr , 2014 18:38 pm
Hardware/Software: Starturn 5 (sort of running, I will get this done!)
Lathe cam designer V1.11
Quickturn 2D Design
FANUC offline and online programs.
Microrouter Pro NS V5 (microstep)
VR2 and VR5
Boxford VMC260
Techsoft 2d Design tools V1 > V2
ProDesktop
Fusion 360
Deskproto

Re: G Code

Post by TDIPower » Mon 09 Jun , 2014 23:55 pm

Ive been having a ponder/read about this..

Still need to work out the G32 / G76 and why G32 isn't liked by the starturn

But looking at the G76 code. To change from an External to an internal do I just need to produce the code for an external and swap the finish depth from the threads minor to the threads major (is that called the major in a nut or is it still the minor?), then the start point from being externally clear of the job to being internally clear?

M10 thread external

N1 G28 U0 W0
N2 M6 T0505
N3 G97 M3 S350
N4 G0 X11 Z5 Clear of job start point
N5 G76 P036060 Q60 R0.03
N6 G76 X8.16 Z-16 R0 P920 Q260 F1.5 Thread minor
N7 M5 Stop spindle
N8 G28 U0 W0 go home
N9 M30 reset rewind program

M10 thread Internal??

N1 G28 U0 W0
N2 M6 T0505
N3 G97 M3 S350
N4 G0 X7.5 Z5 (Clear of job internal start point)
N5 G76 P036060 Q60 R0.03
N6 G76 X9.892 Z-16 R0 P920 Q260 F1.5 (Thread minor of 'nut')
N7 M5 Stop spindle
N8 G28 U0 W0 go home
N9 M30 reset rewind program

Forgive me if Ive not got the X value correct in line N6 as ive never had to work that out before. But Is the idea correct for machining internal threads with G76 ?

Post Reply