What's new
What's new

Help with 8025M Tool Change Subroutine

TAProwler

Plastic
Joined
Jun 7, 2011
Location
NorCAL
Hey Everyone,
I could use some help with getting my tool change subroutine to work on my 8025M router. The tool changer is a Non-Random 6 tool changer (basically just X/Y tool positions {ISO30 tool clips} mounted along the long side of a 4'x8' table). Here is a rough diagram:

....._T1_T2_T3_T4_T5_T6_
__/____________________\__
|......................................| ^
|......................................| |
|......................................| Y=4'
|......................................| |
|o_______________________| v
<----------- X=8' --------->

After a machine reference (Home):
The absolute coordinates of the table origin are at (X6.365,Y0.135,Z-5.75).
The absolute coordinates of T1 are @ (X39.643,Y59.990,Z-4.702).
The TC subr references the position of T2-T6 to the positon of T1.
The table soft limits (absolute referenced from machine ref zero) are:
XPos=111.0, XNeg= -1.0
YPos=61.5, YNeg=-0.5
ZPos=1.0, ZNeg=-5.75

There are two programs that I am trying to use (attached at the bottom of this post). The first program (%43210) is a short program that simply calls for a tool change. The second is the tool change subroutine (%99998). The TC subr has a lot of comments included here, but I have stripped them out on the version that I have loaded on the machine.

PROBLEM

When I try to just run the %99998 in single block mode, I get the following:

Error 016 : N _ _ Doesn't Exist
N0310 G26N3000.3030

The Error Code Book says: Error 016 - The called subroutine or block does not exist or the block searched by means of a special function F17 does not exist.

As I scroll thru the lines of code on the machine, the blocks N3000 thru N3030 are definitely in there, but?!?!?!

Any help or insight would be greatly appreciated.
R/Todd

Here are the two programs:

%43210
%43210
N0040 G90
N0050 G70 (Inch)
N0060 G59 X0 Y0 Z0
N0140 M05
N0200 T6.6
N0220 M6
N0280 G0 X0.0 Y0.0 Z0.0
N0290 M05
N0540 M30

%99998
%99998
N0010 (TOOL CHANGE PROGRAM WITH NEW X&Y AXES)
N0020 ()
N0030 G22N99 (DEFINES THIS AS A STANDARD SUBROUTINE NUMBER 99)
N0040 G90 (SET ALL MOVES TO ABSOLUTE PROGRAMMING)
N0050 G53 (ZERO ALL OFFSETS)
N0060 M5 (TURN SPINDLE OFF)
N0070 P40=K39.643 (X BASE POS - X POS OF TOOL #1)
N0080 P41=K59.990 (Y BASE POS - Y POS OF TOOL #1)
N0090 P42=K-4.702 (Z BASE POS - Z POS OF TOOL #1)
N0100 ()
N0110 (P45=LAST OR OLD TOOL NUMBER)
N0120 (P49=SELECTED OR NEW TOOL NUMBER)
N0130 (P50=CALC X POS FOR OLD OR NEW TOOL)
N0140 (P51=CALC Y POS FOR OLD OR NEW TOOL)
N0150 (P52=CALC Z POS FOR OLD OR NEW TOOL)
N0160 P53=K57.000 (SET P53 TO A TEMP Y POSITION 1)
N0170 P54=K50.000 (SET P54 TO A TEMP Y POSITION 2)
N0180 ()
N0190 (-------------------------------------------------------------)
N0200 (DETERMINE THE OLD TOOL NUMBER FOR X,Y&Z CALCS)
N0210 ()
N0220 P23=P45 (SETS PARAMETER P23 = LAST/OLD TOOL NUMBER)
N0230 (IS THIS OLD TOOL #1 ?)
N0240 P49=P23F2K1 (IF O.T.#1-1=0, THEN DO NEXT LINE, ELSE SKIP)
N0250 G26N1000.1030 (IF O.T. WAS #1 THEN GOTO LINES 1000 TO 1030)
N0260 (IS THIS OLD TOOL #2 ?)
N0270 P49=P23F2K2 (IF O.T.#2-2=0, THEN DO NEXT LINE, ELSE SKIP)
N0280 G26N2000.2030 (IF O.T. WAS #2 THEN GOTO LINES 2000 TO 2030)
N0290 (IS THIS OLD TOOL #3 ?)
N0300 P49=P23F2K3 (IF O.T.#3-3=0, THEN DO NEXT LINE, ELSE SKIP)
N0310 G26N3000.3030 (IF O.T. WAS #3 THEN GOTO LINES 3000 TO 3030)
N0320 (IS THIS OLD TOOL #4 ?)
N0330 P49=P23F2K4 (IF O.T.#4-4=0, THEN DO NEXT LINE, ELSE SKIP)
N0340 G26N4000.4030 (IF O.T. WAS #4 THEN GOTO LINES 4000 TO 4030)
N0350 (IS THIS OLD TOOL #5 ?)
N0360 P49=P23F2K5 (IF O.T.#5-5=0, THEN DO NEXT LINE, ELSE SKIP)
N0370 G26N5000.5030 (IF O.T. WAS #5 THEN GOTO LINES 5000 TO 5030)
N0380 (IS THIS OLD TOOL #6 ?)
N0390 P49=P23F2K6 (IF O.T.#6-6=0, THEN DO NEXT LINE, ELSE SKIP)
N0400 G26N6000.6030 (IF O.T. WAS #6 THEN GOTO LINES 6000 TO 6030)
N0410 ()
N0420 (------------------------------------------------------------------)
N0430 ( REMOVE THE OLD TOOL FROM SPINDLE )
N0440 ()
N0450 G0YP54 (MOVE Y TO TEMP Y POSTION Y2)
N0460 XP50 (MOVE X TO CALC X POS FOR IN/OUT OF CUR TOOL)
N0470 YP53 (MOVE Y TO TEMP Y POSITION Y1)
N0480 ZP52 (MOVE Z TO CALC Z POS FOR IN/OUT OF CUR TOOL)
N0490 M89 (DECODED M FUNCT FOR TSDEVICE RELEASE)
N0500 G1G7YP51F200 (MOVE RACK TO SPINDLE IN SQUARE MOTION)
N0510 (G7 = Y MOVE MUST BE DONE BEFORE Z1 MOVE)
N0520 M91 (DECODED M FUNCTION FOR RELEASE DRAWBAR)
N0530 G4K1 (DWELL FOR 1 SEC)
N0540 Z1 (MOVE Z TO ABSOLUTE Z=1.0 - APPROX 5.5" UP)
N0550 G0YP54 (RAPID Y TO TEMP Y POSITION 2)
N0560 ()
N0570 (---------------------------------------------------------------)
N0580 (DETERMINE NEW TOOL AND CALC NEW POSITIONS)
N0590 ()
N0600 P29=F29 (SET PARAM P29=VALUE OF NEW TOOL#)
N0610 (FOR NEW TOOL = 1)
N0620 P49=P29F2K1 (IF N.T.#1-1=0, THEN DO NEXT LINE, ELSE SKIP)
N0630 G26N1000.1030 (IF N.T. IS #1 THEN GOTO LINES 1000 TO 1030)
N0640 (FOR NEW TOOL = 2)
N0650 P49=P29F2K2 (IF N.T.#2-2=0, THEN DO NEXT LINE, ELSE SKIP)
N0660 G26N2000.2030 (IF N.T. IS #2 THEN GOTO LINES 2000 TO 2030)
N0670 (FOR NEW TOOL = 3)
N0680 P49=P29F2K3 (IF N.T.#3-3=0, THEN DO NEXT LINE, ELSE SKIP)
N0690 G26N3000.3030 (IF N.T. IS #3 THEN GOTO LINES 3000 TO 3030)
N0700 (FOR NEW TOOL = 4)
N0710 P49=P29F2K4 (IF N.T.#4-4=0, THEN DO NEXT LINE, ELSE SKIP)
N0720 G26N4000.4030 (IF N.T. IS #4 THEN GOTO LINES 4000 TO 4030)
N0730 (FOR NEW TOOL = 5)
N0740 P49=P29F2K5 (IF N.T.#5-5=0, THEN DO NEXT LINE, ELSE SKIP)
N0750 G26N5000.5030 (IF N.T. IS #5 THEN GOTO LINES 5000 TO 5030)
N0760 (FOR NEW TOOL = 6)
N0770 P49=P29F2K6 (IF N.T.#6-6=0, THEN DO NEXT LINE, ELSE SKIP)
N0780 G26N6000.6030 (IF N.T. IS #6 THEN GOTO LINES 6000 TO 6030)
N0790 ()
N0800 (-------------------------------------------------------------)
N0810 (NEW TOOL INTO SPINDLE)
N0820 ()
N0830 XP50 (MOVE X TO CALC X POSITION)
N0840 YP51 (MOVE Y TO CALC Y POSITION)
N0850 G1ZP52 (LINEAR MOVE Z TO CALC Z POSITION FROM Z1.0)
N0860 M92 (DECODED M FUNCTION FOR DRAW BAR HOLD)
N0870 G4K1 (DWELL FOR 1 SEC)
N0880 G0YP53 (RAPID Y TO TEMP Y POSITION 1 - TOOL OUT OF HOLDER)
N0890 Z1 (MOVE Z BACK UP TO ABS Z=1.0)
N0900 YP54 (MOVE Y TO TEMP Y POSITION 2)
N0910 M90 (DECODED M FUNTION FOR TSDEVICE HOLD)
N0920 P45=F29 (SET P45 = NEW TOOL# DETERMINED ABOVE SECT)
N0930 G24 (END OF SUBROUTINE)
N0940 ()
N0950 (------------------------------------------------------------)
N0960 ()
N1000 P50=P40 (CALC X FOR TOOL #1 = X BASE POS VALUE)
N1010 P51=P41 (CALC Y FOR TOOL #1 = Y BASE POS VALUE)
N1020 P52=P42 (CALC Z FOR TOOL #1 = Z BASE POS VALUE)
N1030 ()
N1040 ()
N2000 P50=P40F1K6.004 (CALC X FOR T#2 = X BASE + T2 X OFFSET)
N2010 P51=P41F1K-0.042 (CALC Y FOR T#2 = Y BASE VALUE)
N2020 P52=P42F1K0.044 (CALC Z FOR T#2 = Z BASE + T2 Z OFFSET)
N2030 ()
N2040 ()
N3000 P50=P40F1K12.020 (CALC X FOR T#3 = X BASE + T3 X OFFSET)
N3010 P51=P41F1K-0.137 (CALC Y FOR T#3 = Y BASE)
N3020 P52=P42F1K0.105 (CALC Z FOR T#3 = Z BASE + T3 Z OFFSET)
N3030 ()
N3040 ()
N4000 P50=P40F1K18.005 (CALC X FOR T#4 = X BASE + T4 X OFFSET)
N4010 P51=P41F1K-0.077 (CALC Y FOR T#4 = Y BASE)
N4020 P52=P42F1K0.142 (CALC Z FOR T#4 = Z BASE + T4 Z OFFSET)
N4030 ()
N4040 ()
N5000 P50=P40F1K24.051 (CALC X FOR T#5 = X BASE + T5 X OFFSET)
N5010 P51=P41F1K-0.150 (CALC Y FOR T#5 = Y BASE)
N5020 P52=P42F1K0.209 (CALC Z FOR T#5 = Z BASE + T5 Z OFFSET)
N5030 ()
N5040 ()
N6000 P50=P40F1K30.0 (CALC X FOR T#6 = X BASE + T6 X OFFSET)
N6010 P51=P41F1K-0.188 (CALC Y FOR T#6 = Y BASE)
N6020 P52=P42K0.57 (CALC Z FOR T#6 = Z BASE + T6 Z OFFSET)
N6030 ()
N6040 ()
 
Have you actually ran that code?

I run an 8025, and have an 8025M mill I'm getting online, but I've never seen any Fagor code programs written like that, so no help here. Never ran single block mode either.

I would be very interested in seeing your tool holders on the table. I would like to do the same for my mill, and have thought of a setup like that. Any pictures?

How far north are you?
 
Another possible thing is your block numbers with "N00". Maybe that's what it means by N_ _.

I never run zeros before the line number.

Example:

N10
N20
N30

Not-

N0010
N0020
N0030
 
Now No Error, But Stuck "In Execution"

So, in an effort to try to troubleshoot this, I forced the machine to think that there was a different tool in the spindle.

Prior to this, the machine last thought (correctly) that T3 was in the spindle, and when I ran the TC program it errored as described above.

Now, I forced the machine to think that T4 was in the spindle (changed T03 P00 & T04 P04 to new T03 P03 & T04 P00). In addition, checked to make sure that the tool table showed T00 P04.

When I ran the TC program this time, the machine got stuck "In Execution" somewhere in the M06 routine. I let it sit for 5-6 minutes waiting to see if it would do something (which it did not). It seems that the machine is waiting for something, or the program is stuck in an infinite loop of some kind.

I also have noticed that after interrupting the program, the tool parameters show T06 P99. This seems important since the tool change program is trying to change to T6.

The book says that P99 indicates one of two things:
The tool is in the tool changer, or;
M06 has not been executed yet.

Since I don't actually have a tool changer (only spindle and pockets) - it would seem that the machine is waiting for something to actually finish executing the M06.

Any ideas?

Back to troubleshooting.
R/Todd
 
Hi Pat

Hey Pat,
Thanks for the replies.
The Error 16 has been overtaken by a new type of problem - see my previous post.

I'm just south of the Redding, CA area.

I don't have real close up pix of the tool holders, but you can see the basic set up on one of my threads here:
w w w . c n c z o n e . c o m/forums/commercial_cnc_wood_routers/129173-anyone_have_any_motionmaster_documentation.html
You'll have to take out the spaces.

If you are able to fit some of these on your mill somewhere, AND I get this code working, I'd be happy to share it with you.

I can also send you some close up pix if you'd like.
R/Todd
 
I live in the next county west of you. I'm down there often.

Question:

Have you ever operated this machine before? Do you have a program that has worked in the past?

I don't see how any T codes or P codes the way you are using them will work.
 
Stuck "In Execution" - DUUHHOO!!! F=0 Dipstick.

OK, so when you have the Feedrate Override knob set to 0 (Zero) - you get "In Execution" forever when you are trying to step through your program (or pretty much anything, really)

Duuhhhooo!!!!

That also means that the Error 16 is back. Yay!

Back to the drawing board.
R/Todd
 
No, Nubie to the F8025M

Hey Pat,
Yes, I'm a nubie to the F8025M (see my previous post).

The code that I posted is the (almost) same code that I pulled off of the machine after I (recently) bought it.

I do have several small programs that were left on the machine from the previous owner. However, I reformatted the X and Y axis, so I had to modify the TC code for the new X & Y axes.

But, the code is basically copied from what was on there previously. All I did was essentially swap all the X variables for the Y variable -- and Y for X.

What do you see about the T and P codes that you are wondering about?

So that would be Humbolt then?
R/Todd
 
Write a test program

I think I'll try writing a simpler, shorter program to test the G26 format/syntax and see if I can figure out what's happening.

I have tried changing up which tool numbers that the T command is going from and to. In each case, no matter what the old tool number is, the associated G26 command gives the ERROR 16.

So, it has to be something with my formatting, syntax, or placement of the G26 block.

Let ya know how it goes. Thanks.
R/Todd
 
Maybe someone here that knows Fagor can decipher that code, but to me it looks like it was programmed by a tweeker ...:D

First off-

Have you homed the machine?

The only time I use "T" in anything is to call up a tool. T 1.1, for example could be your first tool.

Second, all of those G codes can be on one line.,

Third the only time I use "P" is in a canned cycle program.

PM your email address and I'll send you a great manual on programming the 8025.

Pat
 
G26 is not a format, it's a conditional jump.

You really need to look over this operation manual I have. I'd do it before you proceed further.
 
I'm not familiar with this code, but a quick look made me wonder.

Shouldn't all the P49 in this section be P45?

N0190 (-------------------------------------------------------------)
N0200 (DETERMINE THE OLD TOOL NUMBER FOR X,Y&Z CALCS)
N0210 ()
N0220 P23=P45 (SETS PARAMETER P23 = LAST/OLD TOOL NUMBER)
N0230 (IS THIS OLD TOOL #1 ?)
N0240 P49=P23F2K1 (IF O.T.#1-1=0, THEN DO NEXT LINE, ELSE SKIP)
N0250 G26N1000.1030 (IF O.T. WAS #1 THEN GOTO LINES 1000 TO 1030)
N0260 (IS THIS OLD TOOL #2 ?)
N0270 P49=P23F2K2 (IF O.T.#2-2=0, THEN DO NEXT LINE, ELSE SKIP)
N0280 G26N2000.2030 (IF O.T. WAS #2 THEN GOTO LINES 2000 TO 2030)
N0290 (IS THIS OLD TOOL #3 ?)
N0300 P49=P23F2K3 (IF O.T.#3-3=0, THEN DO NEXT LINE, ELSE SKIP)
N0310 G26N3000.3030 (IF O.T. WAS #3 THEN GOTO LINES 3000 TO 3030)
N0320 (IS THIS OLD TOOL #4 ?)
N0330 P49=P23F2K4 (IF O.T.#4-4=0, THEN DO NEXT LINE, ELSE SKIP)
N0340 G26N4000.4030 (IF O.T. WAS #4 THEN GOTO LINES 4000 TO 4030)
N0350 (IS THIS OLD TOOL #5 ?)
N0360 P49=P23F2K5 (IF O.T.#5-5=0, THEN DO NEXT LINE, ELSE SKIP)
N0370 G26N5000.5030 (IF O.T. WAS #5 THEN GOTO LINES 5000 TO 5030)
N0380 (IS THIS OLD TOOL #6 ?)
N0390 P49=P23F2K6 (IF O.T.#6-6=0, THEN DO NEXT LINE, ELSE SKIP)
N0400 G26N6000.6030 (IF O.T. WAS #6 THEN GOTO LINES 6000 TO 6030)
N0410 ()
N0420 (------------------------------------------------------------------)
 
Thanks for the help

Pat and Screen,

Thanks for your help.

Home - Yes, I have homed the machine, and I can run simple programs on it. I still don't have the spindle operating yet, but working on the powering of that. Trying to determine the best way to get 380V 3phase from single phase 220V to feed the beast with.

T's - This machine has 6 tool pockets, so each program must start with a statement of which tool you want to use for this operation (e.g. don't want to profile cut with a drill bit).

P's - P's are "Parametric" variables. The machine allows for up to 255 different variables that allow you to do stuff like this TC program. They can take whatever value that you assign to them, or whatever value you have the program calculate for them.

G26 - I understand that the G26 is a conditional jump, what I meant was maybe I had the format or syntax of that block wrong, or that it was in the wrong place.

P49 - This came from the old TC program and I believe that it is just a "dummy" variable. The G26 conditional jump code just looks at whatever the previous calculation was and determines if it was a 0 (zero) or not. It could just as well be P149 - I think.

P29=F29 - this is a parametric statement that assigns the value that the machine currently has for the tool number in the spindle to the variable P29. The programming manual just says:
F29
Nxx P27 = F29
Block xx, Parameter P27 takes the value of the selected tool number.

Does this make sense? Do I understand it correctly?
Thanks for your help.
R/Todd
 
I'm on dialup in the shop now, so I have to wait until I get in the house to send the manual.

The easiest least expensive way to convert your single phase to 3 phase is with a VFD.

FM50-203-C

I haven't needed to use parametric settings so I don't know about those.

A typical tool line like I use would start like this:

NO (PARTNAME)
N10 G90 G95 S750 T21.21 M3 M8 (FACEISCARTOOL)
 
Are you trying to run in block mode?

Why not just run in auto mode?

I'll send the manual within the hour.

Also- are you confusing your "P" machine parameter settings with programming? Don't want to do that. What modes are you using?
 
The easiest least expensive way to convert your single phase to 3 phase is with a VFD.

FM50-203-C

I have considered this, and I do have a VFD that came in the elecrical panel of the machine. The problem is, you can't get 380V output from a 220V input.


A typical tool line like I use would start like this:

NO (PARTNAME)
N10 G90 G95 S750 T21.21 M3 M8 (FACEISCARTOOL)

Since your machine is not currently set up as having an automatic tool changer (Parameter P601(5)=0) you do not have to include an M06 with your tool change. If you do have an automatic tool changer, then P601(5)=1 and now an M06 must follow your Tx.x

This M06 must be in a block by itself - not allowed to include any other T,M,G functions.

I suspect that this is why you are able to get so many functions on a single line (a good programming technique to cut down on file size).

Are you trying to run in block mode?

Why not just run in auto mode?

I'll send the manual within the hour.

Also- are you confusing your "P" machine parameter settings with programming? Don't want tot do that. What modes are you using?

I'm just currently using the block step mode to try to find out where the machine is getting upset with the code. I've tried the auto mode and it does give the same results, however.

No, the parametric programming is different from the machine parameters - altho they sound the same and they are both designated with the letter "P".

Thank you very much for helping me with this. I will no doubt be able to put your 8025M expertise to good use.
R/Todd
 
Manual sent.

I'm setting up programming for my mill soon, and I would like to incorporate tool changes for sure. If you could post some pics of your tool setup that would be great.

I will be coming down to Redding this week as I just learned the Cold Roll I picked up Friday at Gerlingers was bent to crap by the kid who filled my order... :rolleyes5:
 
Thanks for the manual

Thanks for the manual Pat. I'll pull it down from the email soon.

I will include some pix of the tool changer set up in a reply to your email.

That sucks that you have to make a trip down the hill just for that.

I've had a little success with the TC code. See my next post.
R/Todd
 








 
Back
Top