Author Archives: David

Fanuc Subprogram (Local Subroutine)

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

Fanuc Subprogram (Local Subroutine)

If you have ever used local subroutines on Heidenhain or Yasnac. Then you will know how convenient it is to save all your programs in one go. No need to remember to save all those shitty little external sub programs.

What’s He On About?

If you are now saying “what the fuck is he on about”. Here is an explanation.

A local subroutine or subprogram is where you stuff all your subprograms at the end of your main program.

So on a Fanuc control if you were making this part below.

Drill spot drill then tap.

Fanuc Subprogram

Programme would look like this.

Fanuc Subprogram

 

Thing is the code is just repeated three times. I have nice round numbers in here like X40. and Y20. so it’s easy to notice mistakes. But if it was X40.392 for example you wouldn’t spot a slight mistake.

So if you call a subprogram it looks like this.

Fanuc Subprogram

And then your Subprogram is like this.

Fanuc Subprogram

Fanuc Subprogram

The M98 P500 calls the external Fanuc Subprogram. Read this if you don’t know about sub programmes.

Saves you having to repeatedly write shit loads of code.

So that’s why we use a Fanuc Subprogram. But……

You have to look after these bloody things and they seem to be able to just get lost on their own.

You find them at the back of the fridge sometimes along with a piece of mouldy old cheese. At least you can make a meal of the cheese.

Fanuc Subprogram No More Lost Programs

So this is how it looks with a Local Subroutine.

All you need to do is replace P with Q. So mind your P’s and Q’s as they say.

The Q corresponds to any N number. So you could have loads of these stacked up at the end of your programme and you only need to save it once. All this shit will go with it and you don’t need to worry about it ever again.

Haas To The Rescue

Of course Mr Haas sorted this out years ago with M97, this calls a local sub. M98 calls an external program. It’s on all Haas machines and you definitely do need to fuck with any parameters.

Just A word Of Caution.

There are PARAMETERS involved. Arrrrrrrrrrrh……..the dreaded PARAMETERS

To call a subroutine on your Fanuc control. You first need to make sure that Bit 0 of parameter 06005 is set to 1

Fanuc Subprogram

This should make it work. If it doesn’t then maybe you should call the Samaritans.

It’s only on the newer controls by the way.

Sub programs on a Siemens control.

Thanks For Reading My Articles We Love you all .

If you have been affected by any of the issues in this post or need CNC Counselling then contact me.

If you want to learn to program CNC Milling Machines

 

 

 

 


Background Edit Fanuc

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

Background edit, I only really get to hear about background edit when people get stuck in it. It’s a bit like being accidentally locked in a toilet you feel a bit of a twat and very embarrassed in equal measures.

This button is your closest friend

Now I made it real big because one day it will save your life.

You know when you play Monopoly and you get one of those cards that says “GET OUT OF JAIL FREE”

If you get sent to jail you just present this card and your sentence is immediately quashed it’s a bit like having Donald Trump as a mate.

It doesn’t work for shop lifting by the way I tried it as a child when I nicked a tin of Spam from the Coop. Fortunately in those days the police were never involved as they knew your parents would beat you to within an inch of your life at the slightest hint of petty larceny.

Anyway press this button background edit all your woes will cease.

And if that doesn’t work this one is the nuclear option.

background edit

The first one is for the program you’re actually background editing. Don’t forget you can have more than one program that you are background editing, more on this later.

Anyway this button stops them all, a clean sheet as it were.

Oh Dear

The reason people get into such a mess with this is because you can actually get into background editing by accident it’s easy.

If you are in a folder and you press INPUT then whatever program your cursor is on immediately comes up for background editing.

If you do this a few times then you can have several programs on the screen to edit.

 

You can switch between these programs and edit any one. You can copy and paste between them which makes writing programs from templates really easy.

Use the FORWARD and BACKWARD softkeys to switch between programs

To escape this lot you need the help of this key

background edit

This will end it all.

Background Edit is Amazing

Yes background edit is really useful, maybe amazing is stretching it a bit, but it does have many uses. Editing a few programs together is the bit I like.

If you want to edit whilst you are running a program then that’s also useful.

Background edit Warning

Don’t hit the fuckin reset button!!!!

Obviously this will stop everything so why would you do it?

Well maybe you are one of those very naughty boys who uses it to get to the head of the program when editing.

When in background edit it’s easy to press reset except this time you just stopped everything because your program is running.

Change Your Habits

Use rewind, some controls have a rewind button

use this to get to the head of the program.

On other controls it’s LINE SEARCH then press TOP or BOTTOM

This will take you directly to the head of your program or the end of your program.

Nothing is stopped and no one is harmed.

background edit

 

Why I Hate Background Edit

It’s an absolute pain in the bollocks mainly because it is so easy to accidentally get into background edit and not even realise.

You keep pressing the MDI button and the screen just wont change. If you have Guide i then you will get a warning when you switch over and you can’t do anything until you end it.

To be honest I don’t hate it at all. You just need to be aware that you need to come out of it to do various other things.

Another Useful Feature

If you want to use a program for reference. In other words you want to look at what’s in it but you need to be careful not to alter it.

Press BG EDIT then type in your program number

Press REF EXEC

Your program will appear in green meaning it is “read only” so you can’t accidentally alter it.

What’s Running in The Background?

You can also call your running program in background edit. This will also appear in green and be read only.

 

 


Taking a Screen Shot Fanuc Control

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

To take a Screen Shot Fanuc, you will need to have either a data card installed or a USB

Screen Shot Fanuc

MDI

In MDI I/O channel needs to be set (4) data card or (17) memory stick

Screen Shot Fanuc

Stick the Card in (or the stick)

Press and hold the shift key for about 10 seconds. You will see the clock stop. That’s how you know it worked. Time will stand still at this point and all the people around you will appear static.

Try not to panic, the world didn’t end. Your control just needs to ponder a while and think about what you just did.

Stop The Clock

Once it’s done your clock wil start again (phew).

Screen Shot Fanuc

Then press CARDScreen Shot Fanuc

Screen will show what is on the data card

Screen Shot Fanuc

The BMP files are your screen shots. You can then view them on your laptop or PC.

Now I know you are saying “what is the fuckin is the use of that”

Well It’s just so that I can show off my knowledge.

Parameter

If this does  not work then you may need to alter parameter 3301 bit zero and bit 7 need to be 1

 

Should look like this to make it work.

Screen Shot Fanuc

A good use is when you are changing parameters. There’s nothing worse than changing a parameter and trashing a £100,000 machine. Help is at hand, luckily you did a screen shot before you changed the parameter and you can view it and change it back.

With this parameter it wont work because you need to switch it on!!!

Good luck with the massive dent in the guarding and the bent tool. No screen shot will fix that.

Screen capture Fanuc, thanks for reading.

 


Hyundai Wia L 300LC CNC Lathe

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

Very solid nice big Hyundai Wia CNC two axis lathe with Guide i, what more could you want?

Hyundai Wia

You know like when you have been on holiday eating loads of fancy food and you get home and all you fancy is a nice simple chips n egg?

Staple diet of my childhood. Anyway that is what this machine is. It’s the chips n egg of the CNC Lathe world.

Having just worked on a Nomura sliding head that’s as complicated as a nuclear reactor (are they complicated, I don’t know?) Anyway it just seems nice to come back to some nice simple stuff.

This is a no messing sturdy beast, none of your namby pamby driven tool shit.

No Y axis, and no stupid sub spindle to mess about with. G12.1 forget it. C axis no way.

Happy days, easy training job simple two axis CNC Lathe with a Fanuc i series control. Oh and it’s got Guide i too. I’m gonna love this.

Hyundai Wia With Guide i

Seem to get loads of these lately an I’m kind of getting to like them mmm maybe not. There’s loads of good stuff mixed in with some bad shit.

Sorry I’m rambling.

Guide i Did You Know?

Well I certainly didn’t. Anyway it’s got this button called alter.

Fanuc Guide i

Always wondered what it did so today after some deep breathing exercises I plucked up the courage to press it. Put on a mask, gloves and full PPE.

Safety shoes, check.
Incontinence briefs, check.
Crash helmet, check.

Bingo I pressed it.

Guess what it did…….

Nothing, jack shit, fuck all.

Ah but wait don’t go off to some other boring stupid website with naked chicks or naked dudes. No no no.

After much deliberation me and my new bestie (James) tried every combination.

Anyway if you highlight an M code and then press the beast. Guess what it comes up with a list of all your M codes, all their meanings and you get to pick one.

Fanuc Guide i

Woopee, err, not. Well I suppose it must have a use. If you didn’t know the M code you needed I suppose it could be good.

Now I lost a good 10 minutes of my life trying to sort out what this button did and I’m not impressed.

No matter how totally bladdered my mates are at the pub tonight I wont be able to impress them with this one.

Anyway enough said, I bet someone at Fanuc got promoted after inventing this exceptional, programming aid. A close runner up to the Fanuc PROGRAM RESTART button as another contender for the “this button is fuckin useless” award 2023.

Guide i Did You Know

Honestly this one really is worth reading. When you want to call a sub-program and you are not sure what number it is this one helps.

Press  Fanuc Guide i

Then from the screen move over to subprogram.

Fanuc Guide i

This takes you into the directory and from here you can select your subprogram. It will insert this into your program complete with the M98. And if you use names for your programs then it puts it in those nice little V shaped brackets. What do you call those funny brackets by the way. Does anyone out there know?

Guide i

Names For Programs

Using names for programs is cool. When you are an old school pre-septuagenarian git like me it seems real 21st century. Saves on all those shitty four digit numbers and bracketed descriptions.

This is mine above <FACE-GUIDEI>, certainly save on typos. I recon if you get into the habit of using this it could be very useful.

Guide i

If this sub program call feature is on Trust pilot I will give it 6 out of ten or maybe 7.

So bloody shit-faced convoluted to find. I mean who the fuck would think right I’ll press this button called FIGURE I mean it’s bound to take me somewhere where I can input my sub programs straight from the folder they are in.

Enough said.

The Machine David The Machine

Oh yea, some stuff I like on this machine.

Absolute encoders, no stupid zero return. Switch it on wait a few minutes press the standby button and you are good to go.

No open and close the door shit, no rotate the turret shit no no no just switch the beast on. Lovely.

Clever that is, my tellies at home are the same, can safely say I never had to zero return any of my many 50″ tellies. One in every room by the way except for the shit-house.

No open and close the door shit, no rotate the turret shit no no no just switch the beast on. Lovely.

Gear Change

Now I knew this thing had a gearbox but I couldn’t get the thing to change gear. Well actually you don’t need to. Just select a speed in G97 and it gets the right gear. What’s all the fuss you ask? Well if you are in G96 and it’s in low gear. Imagine you are facing off a part, well it will get to 1000 revs and just stay there.

Anyway the technique is as follow

You will get low gear

G97 S500 M3
G96 S200

You will get high gear

G97 S1200 M3
G96 S200

The G97 will make the machine select the correct gear.

Hand wheel Hyundai Wia

The jog and hand wheel are the same mode just press this button.

Hyundai Wia

When an increment is selected the button will start to flash indicating that You are in hand-wheel mode.

Hyundai Wia

There is a slight delay in starting the jog mode so be patient. A couple of times I thought it wasn’t working and started playing around with other buttons.

Turret Index

Turret will only index in manual mode when the X axis is at zero return. It is probably better to use MDI as it doesn’t mind where it is. Obviously take a good look at the surroundings before pressing cycle start.

Indexing the turret is done with these buttons. Hold in the middle one and press either of the outside ones to move turret clockwise or counter-clockwise. Press and hold for continuous rotation, Top red number is station number.

Hyundai Wia

Don’t forget when you index the turret the tool is not active, the Fanuc control will only display last tool used in MDI or in  program.

Start Spindle Hyundai Wia

As with most Fanuc controlled machines you will have to set a speed in MDI before you can start the machine manually. Once the speed is set use these buttons. Press and hold central button and your direction to start spindle manually,

Hyundai Wia

If you press forward or reverse without the central button the machine will jog the axis at the programmed speed. You can also do this with the door open. lucky you.

Hyundai Wia

Rapid does not work at all with the door open.

The jog feed potentiometer will stop all movement in rapid if set to it’s lowest position, It needs just one notch to make rapid work. A little trick, you only make this mistake once. A call to some smart arsed service engineer who says “did you try moving the dial one click?”

Zero Return

Select zero return then press direction key. One press and you don’t need to keep your finger on the button, This machine has a tailstock so keep an eye out for it when referencing the Z axis,

You can set both axis going together.

I like the door locks on this machine because they release on their own, There is no button to open and close, I like that,

A Room With a View

The viewing window is a bit small but I suppose its a good safety thing when you have a big chuck spinning at 3000 RPM.

One very concerning thing is the fact that there is no safety back kick plate on the chuck pedals, This is a 2022 machine so I would have thought it would have one.

It means you can accidentally press the pedal and open the chuck!! Holy fuckin shit.

We decided to put the pedal under the bench so you couldn’t press it by accident.

Guide i Again

Every time I use guide i I find something new that I like about it. Me and Guide i are definitely in a love hate relationship.

This time I found the two things above.

Fixed Forms

I recon with some work using Fixed forms is a good quick way of programming, Given time you could get a really good library of things.

This would make program creation very quick. Multi screen editing is also good on Guide i. You can have several programs open together and switch between them when editing.

This also means no pesky background edit where you get locked in a fuckin time warp and nothing works until you find the escape button (BG END)

Graphics Graphics Sodding Graphics

Graphics are still pretty shitty, When you alter the rotation or size of the part you lose everything and have to start again.

How annoying is that. I mean I should be used to it by now.

Come on Fanuc this is 2024 not 1981. There is no speed control on the graphics either so it’s all over in a flash.

Not sure on this one can somebody explain? Some controls have a speed control on graphics and some don’t!!

Hyundai Wia Tool Measure

Tool measurement with the tool arm uses the hand-wheel to drive tool towards the probe. Never been a great fan of this way of setting tools but I suppose it’s still better than cut and measure.

You can index the turret with the arm down so beware. Jog and rapid don’t work when the arm is down so that’s good.

No lights on the probe! What no lights on the probe, that’s annoying. When you make contact with the probe the axis just stops, There is no light so you are not sure it has stopped.

It does jump to the correct offset for you and it zeros the wear, Good because not all machines do that.

Big Chuck

It is a big 12 station turret but with a large chuck therefore adjacent tools can easily cause a problem so beware.

Take a look below the tool you are using as it approaches the chuck. Better still bring em in manually just to check before running.

I know you are never supposed to have the jaws above the chuck outside but that’s difficult with hard jaws but it’s really important to watch out for this one.

Big Fanuc Guide i Screen

All men love big TV’s, why is that? I know I do.

Anyway this machine a has a big “fuck off” screen. Big screen means more keys are visible happy days.

Means you don’t have to keep using arrow keys to find butttons.

QWERTY keyboard too, What utter luxury.

Hyundai Wia Easy to Use

All in all I liked the interface on this Hyundai Wia machine, Pretty easy to get it to do most things. Not too many frustrations. Apart from the slight delay on some buttons like the jog, I’d prefer to be able to index the turret anywhere and I don’t like using the Hand-Wheel to measure tools. A light to indicate when you are touching the probe wouldn’t go a miss either.

Tool Change Position

This Hyundai Wia has G30 P2 which you can set a position in parameter 1241 and have a second Zero Return position (G30 P2 U0 w0)

Personally I wouldn’t use it. You will need loads of different tool change positions on a machine this big. Otherwise you’ll be travelling a mile to get to small jobs.

I set it up to use local sub routines. This means I can call program 500 in any program and it can be a unique tool change position. Read this.

My tool change position is local to this program so you can change it for every job.

Hyundai Wia

 

 


Ten Things You Might Not Know About The Fanuc Sub Program

CNC Training Call David: 07834 858 407

 

CNC Training Centre Reviews

30 five star ratings on Google (Just saying)

Sub Program Fanuc

Here are ten things you might not know about Fanuc sub programs,

Fanuc CNC controls are the most common controls in the world so it might be useful to have a good understanding of how sub programs are called and used.

(1) You Can Call a Sub Program By Name.

Yes you heard it here the program can be called by it’s name or it’s number. When calling by name don’t use the P.

Just put the name of the program in these things <> with an M98 and your away.

M98<ALBERT>

The only problem with this is that the syntax needs to be spot on so if you have got complicated names for your your sub routines then you might be in the shit.

I always call mine names like ALBERT that are easy to remember.

(2) You can use internal sub routines on a Fanuc Control.

Some people call these local sub programs. It just means it’s tagged on the end of your program which makes them nice n easy to look after. A bit like a pet Goldfish or a pet fly.

I bought mine from the local pet store. I asked the assistant if he sold pet flies and he said no. I said “well there are loads in the window”.

Anyway he sold me one (£15) his name is Paul

 

This is not him this is Steve.

Internal Sub-Routines

By typing M98 Q500 your control will look for N500 within your current program. This is great because you can add the sub programs to the end of your main program. Don’t forget to leave big gaps so you can clearly see where and what they are. Oh and mind your P’s and Q’s.

M98 P500 (Call O500 externally)

M98Q500 (Call N500 in main program.

Oh and read this too.

Sub Program

Just one other thing. Watch your n numbers it’s easy to get them mixed up. Try and use a convention.

“Read More”

Careers in CNC

View all current vacancies in CNC

Click here

Call David: 07834 858 407