Leading Trailing Zeros CNC Programming Basics

Leading Trailing Zeros CNC Programming Basics

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

Leading Trailing Zeros

You do not need leading or trailing zeros in a CNC program (see below):

O0001(G81 DEMO)
G21 G90 G40
T01 M06 (20.0 MM DIA X 90 POINT SPOT DRILL)
G90 G00 G54 X12.64 Y88.00 S2546 M03
G43 H01 Z15.00 M08
G0 Z100.00
Z1.00
G01 Z-0.1
Without leading Zero is exactly the same. (Trust me it won’t self destruct or start world war 3)
O1(G81 DEMO)
G21 G90 G40
T1 M6 (20.0 MM DIA X 90 POINT SPOT DRILL)
G90 G0 G54 X12.64 Y88. S2546 M3
G43 H1 Z15. M8
G0 Z100.
Z1.
G1 Z-.1

Try to keep your code consistent. As I mentioned before try to make all programs look the same.

Create an SOP (Standard Operating Procedure) which will cover all programming layout options. Haas controls will insert their own leading and trailing zeros so you won’t have a choice there.

Leading Trailing Zeros and Memory

Leading Trailing Zeros, if you are short of memory (not as in forgetful) this can save loads of space, and you might be surprised how small the memory is on some CNC machines, some have the memory of a fish.

Leading Trailing Zeros

CNC Programming

The main thing is that you are happy with the layout of your program.

If you are not consistent with your approach it can cause a lot of problems.

Please remember that when you are typing code into the machine it will take you considerably longer to type G01 X0.200 Y0.200 F100.00 than G1 X.2 Y.2. It could wear out your fingers or give you multi RSI.

A Haas control will automatically add leading zeros but just try to ignore it. Maybe Mr Haas likes to see them.

Main thing is you don’t need to type them in.

Take a look at this article.

Another way to save space on a Mazak control is to delete all the spaces (ISO G code programs only)

Contact David :07834 858 407

Services offered at CNC Training Centre

CNC Programming Course

Onsite CNC Machine Training.

Training on all controls and machines.

Mazak Training Fanuc Training

Don’t forget we offer training on all types of Mazak Machines and all Fanuc Controls 6m to 31i Oi old to young.


Webster & Bennett with Fanuc 10T

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

 

Contact CNC Training Centre

I Just Love Old Machines

I recently got to train someone on one of these, a Webster & Bennett with Fanuc 10t Control.

Webster & Bennett

It’s what I crudely call a big bastard. But bastard it is not, it can definitely machine some big shit

Webster & Bennett

Like this monster.

Don’t ask me what it is or I would have to kill you. Joking aside I think it’s a water valve. Beware these jacuzzis use a lot of water,

The machine is a Webster & Bennett vertical borer and I think the Fanuc 10t control was possibly a retro fit.

When these start whizzing around even a few RPM it can scare the living shit out of even the most seasoned engineer. And me, well I,m more seasoned than a piece of Nando’s chicken.

G50 on a Webster & Bennett Your Best Friend

Anyway joking aside your best buddy now is definitely G50 get this wrong and it’s fuckin world war three.

Imagine the scenario, you program G96 S180 M3. Spin at 180m/min. Not too fast but…. what if the tool is sat in the middle of the part.

Machine says “come on lads happy days foot to the floor flat out joy riding” and it fucks off like two teenage boys in a stolen Lamborghini.

So without a G50, or the wrong speed, this beast will accelerate to it’s maximum rpm.

Oh and did I Mention it’s harder to stop than a P & O Criuise Ship with 4000 obese pensioners on board?

“Read More”

Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407