What's new
What's new

Pallet Change Macro not responding Fanuc 18M

cdmnyew

Aluminum
Joined
Dec 9, 2013
Location
USA
We have inherited a Takumi vertical milling machining center, with a Fanuc 18M controller on it. I am having issues running the pallet changer in auto mode, it works fine in MDI mode. When I call up the program and try to run it in auto mode it just scrolls through the program lines and nothing physically moves on the machine.

Here is the program that came with the instruction manual:

O9001;(M91 pallet change)
N101;
#131=4003;
IF[#1012 EQ1] GOTO102;
IF[#1013 EQ1] GOTO103;
GOTO 101;
N102;
G91 G28 Z0 M05;
G30 X0 Y0;
M91;
N103;
G#131;
M99;

Does anything look out of the ordinary? When we first got the machine the batteries where dead on the drives so we replaced them with Fanuc's help and got the machine running.

I am less than a novice in the machining world but any help would be much appreciated. Thanks.
 
If it just loops, then you are missing a signal. #1012/#1013 are either direct inputs (likely) or are set by the PLC/PMC. If neither of those are high then all the program does is loop.
 
Thanks Tony,
What do you suggest? Is there a way to trouble shoot #1012/#1013? and yes it is just looping.
 
what is your procedure for making the pallet change in MDI. Maybe we can help you from there seeing that you can make a pallet is change in MDI
 
Actually I may have misspoke, in manual/MDI mode the procedure is as follows and works:

MDI Mode:
G91 G28 Z0;
G91 G30 X0 Y0;

Manual Mode:
Press door open
Press Table unclamp
Press pallet running
Press pallet running (again after button flashes)
Press Table unclamp.
 
is M91 the pallet change code ?
I have seen
M60 ( generic pallet change )
M71 ( pallet 1 or A)
M72 ( pallet 2 or B )
M94 ( pallet 1 or A )
M95 ( pallet 2or B )

variable #1012/#1013 is probably your pallet ready signal. make sure the button is lit if that does not work then
dont know if this will work for you
look at the variables in the control ans see what they register when the pallet ready signal is on or off



when #1012=1 the prog jumps to line 102 and initiates pallet change ( pallet ready on )
when #1013=1 the prog jumps to line 103 and loops to the beginning bypassing the pallet change ( pallet ready off )

look at parameters 6080 thru 6089 and find out which one has a value of 91. then we go from here
 
Okay great, I'll check that out right now and yes M91 and M92 are the pallet change codes
 
Okay great, I'll check that out right now and yes M91 and M92 are the pallet change codes

Look in parameters 6071 to 6079 for the numbers 91 and 92. Program number O9001 is a program number associated with an "M" code to call the program as a Subprogram and not as a Macro program. Parameters 6071 to 6079 are the parameters associated with Program Numbers O9001 to O9009 respectively. You should have another Subprogram that is called by M92. If you don't already know the Program Number of this program, you will be able to determine it by observing the values registered in parameters 6071 to 6079.

To check whats happening in your O9001 Subprogram do as follows:
1. Set bit 4 of parameter 3202 to "0". This will ensure that program O9001 is visible to you in operation.

2. Setting the above bit will also allow you to edit the program.

3. Set bit 5 of parameter 6000 to "1". This will allow the Subprogram to be executed in Single Block Mode, and the program halt after Macro Statement blocks, otherwise the following blocks will be read with one press of the Cycle Start Button without 6000.5 being set.

#131=4003;
IF[#1012 EQ1] GOTO102;
IF[#1013 EQ1] GOTO103;
GOTO 101;

4. Edit Subprogram O9001 as follows:
O9001;(M91 pallet change)
N101;
#131=4003;
#1=#1012
M00
(Check value of #1 in Macro Variable Pages)
IF[#1012 EQ1] GOTO102;
#1=#1013
M00
(Check value of #1 in Macro Variable Pages)
IF[#1013 EQ1] GOTO103;
GOTO 101;
N102;
G91 G28 Z0 M05;
G30 X0 Y0;
M91;
N103;
G#131;
M99;

Making the above checks will allow you to know where in the program Control is going to Jump.

GOTO101 is just forcing the program to idle until either #1012 or #1013 change to logic "1". If #1013 is logic "1", the program will fall though to N103 and bypass a Pallet Change. It could very well be that the Pallet being called by M91(Pallet 1) is already in position, and therefore, no Pallet change is made. Have you tried executing M92?

For the above program to execute a Pallet change, the logic state of I/O Interface Variables #1012 and #1013 would have to be "1" and "0" respectively. If you look in the Subprogram called with M92, you will find that the logic of these two Variable will be reversed to have a Pallet change occur.

When a Subprogram is called by an "M" Code (M91), the occurrence of an "M" Code in the called program will be treated as a normal "M" Code, and another iteration of the Subprogram doesn't result. In most cases with Pallet change programs, the requirement to press, or the fact that Pallet Ready Button has already been pressed, is dealt with in the PLC, and NOT at NC program level. Accordingly, I doubt that #1012 and #1013 have anything to do with the Pallet Ready button, but more to determine if the requested pallet is in place, or not.

Doing the above tests will give you a good idea of whats going on, and why the Pallet is not changing.

Once finished testing, make sure you change programs and parameters back to pretest states.

Regards,

Bill
 
If it is a direct input, then it will be shown in the electrical diagrams as such. Highly doubtful that it's a direct input though, most likely a PMC to NC bit and some digging in the ladder would be needed to find it. But like Bill says, need to verify that you are/are not getting these first.
 
Okay, parameter 6072 is 91 and 6073 is 92. I made the changes Bill has recommended and still nothing is happening, the program does however jump to the M00 code and stays on that code instead of just a continuous loop. Bill I apologize if I'm doing something right or not giving you the information you are looking for, I really am a total beginner at this. Is there something specific I should be watching or looking for after I made these changes?

I tried both programs to make sure it wasn't trying to change to the side that it is already on and still no movement on the machine.

I can change the pallets using MDI mode by executing the following:

G91 G28 Z0;
G30 X0 Y0;
Confirm setting button
M91 or M92.

If that helps any.
 
Okay, parameter 6072 is 91 and 6073 is 92. I made the changes Bill has recommended and still nothing is happening, the program does however jump to the M00 code and stays on that code instead of just a continuous loop. Bill I apologize if I'm doing something right or not giving you the information you are looking for, I really am a total beginner at this. Is there something specific I should be watching or looking for after I made these changes?

You have a problem with the "M" code assignment. The numerals 91 being set in parameter 6072 means that program O9002 is being called by M91, and 92 in parameter 6073 means that program O9003 is called by M92. Check to see if you have programs O9002 and O9003. Post them here for the Forum to see.

M00 is Compulsory Stop. I suggested including that after each of the #1 = #10_ _ blocks so that you could check the state of #1012 and #1013 in the Macro Variable Page before allowing the program to progress. In doing so, you will know (by the value shown in #1) where the program will branch. When the program stops at M00, you have to press Cycle Start to restart the program. Make sure that you have the control in Single Block Mode, so that you can follow that the program is performing correctly according to the logic state of #1012 and #1013.


I can change the pallets using MDI mode by executing the following:

G91 G28 Z0;
G30 X0 Y0;
Confirm setting button
M91 or M92.

If that helps any.

In the above, do you mean that you're pressing the Pallet Confirm Button and then executing M91 or M92? The fact that the above works, means that the Subprograms being called by M91 and M92 are working. The same programs will be called whether by MDI or via a program in Memory Mode. However, the above doesn't make sense if the Pallet Change program is O9001 and parameters 6071 is not set to with a corresponding "M" code number 91.

Please confirm if the stated parameters for 91 and 92 are correct, and whether programs O9002 and O9003 exist or not

Regards,

Bill
 
Bill,
I do not have a O9003 program. Only O9001 and O9002, program O9002 is the same as O9001 except for its calling for M92 instead of M91. Where would I go to find the Macro variables page?

Yes I am pressing the pallet confirm button on the "external" control panel associated with the pallet change system. See picture of instructions on how I am doing this in MDI mode and this works. Also see attached picture of 6071 parameters, 6071 is sub call M 6072 is 91 and 6073 is 92.
 

Attachments

  • 6070's parameters.jpg
    6070's parameters.jpg
    95 KB · Views: 2,757
  • MDI insturctions.jpg
    MDI insturctions.jpg
    93.8 KB · Views: 890
from following the thread you should be able to change parameter 6071 t0 91 and 6072 to 92 and make 6073 to 0 and then use M91 or M92 to load pallets. at that time if the macro is correct M91 should load pallet 1 and M92 will load pallet 2. but you will still need some way of checking which pallet is out and which pallet is in the machine to determine the pallet to load. at this time M60 should have called another program that will call either 9001 or 9002. i have not worked on a Fanuc control in 5 years so i am a little bit rusty
take a look at this link, it explains it more in detail

CNC tip: A pallet testing custom macro


i think your program should read this way

O9001;(M91 pallet change)
N101;
#131=4003;
IF[#1012 EQ1] GOTO102; (checks the pallet in the machine )
IF[#1012 EQ0] GOTO103;
GOTO 101;
N102;
G91 G28 Z0 M05;
G30 X0 Y0;
M91;
N103;
G#131;
M99;

O9002;(M92 pallet change)
N101;
#131=4003;
IF[#1013 EQ1] GOTO102; (checks the pallet in the machine )
IF[#1013 EQ0] GOTO103;
GOTO 101;
N102;
G91 G28 Z0 M05;
G30 X0 Y0;
M91;
N103;
G#131;
M99;
 
Bill,
I do not have a O9003 program. Only O9001 and O9002, program O9002 is the same as O9001 except for its calling for M92 instead of M91. Where would I go to find the Macro variables page?

Check the following two blocks in program O9001 and O9002 and confirm that they are exactly the same as you've stated above. I really can't see how that could be the case.

IF[#1012 EQ1] GOTO102;
IF[#1013 EQ1] GOTO103;


Display the Macro Variable Pages as follow:

1. Press Offset/Settings Hard Button on control.

2. Press the Chapter Change button (Right Arrow Button at Right most position at the bottom of the screen)

3. Step 2 above should display a MACRO Soft Key at the bottom of the screen. Press this button to display the Macro Variable Pages.

4. There are other ways to go directly to the Variable of interest, but you can navigate through the Macro Variable pages by using the Up/Down Page arrows.

Yes I am pressing the pallet confirm button on the "external" control panel associated with the pallet change system. See picture of instructions on how I am doing this in MDI mode and this works. Also see attached picture of 6071 parameters, 6071 is sub call M 6072 is 91 and 6073 is 92.

This does not make sense. 6072 and 6063 are definitely the parameters for programs O9002 and O9003 respectively. "0" registered in any of these parameters means that there is no "M" code assigned; a Macro, or Subprogram can't be called by M00, as would be the "M" code if "0" could be set in these parameter.

1. Are you pressing the Pallet Ready button before executing M91/M92 in Memory Mode?

2. Are you able to successfully execute a pallet change with M92 in MDI Mode?

3. With bit 4 of parameter 3202 set to "0" so that the 9000 series programs are visible, select Single Block Mode, and execute a Pallet Change M91 in MDI Mode. You will have to repeatedly press the Cycle Start Button to progress the program.

4. In carrying out the above steps, does the control trace into program O9001, or O9002?

5. Report back with the program number.

Regards,

Bill
 
Last edited:
Check the following two blocks in program O9001 and O9002 and confirm that they are exactly the same as you've stated above. I really can't see how that could be the case.

Bill, see attached picture. That is what the instructions are telling me.


Pallet auto op.jpg




I don't see anything in the marco variables page, just the variables number.



This does not make sense. 6072 and 6063 are definitely the parameters for programs O9002 and O9003 respectively. "0" registered in any of these parameters means that there is no "M" code assigned; a Macro, or Subprogram can't be called by M00, as would be the "M" code if "0" could be set in these parameter.

1. Are you pressing the Pallet Ready button before executing M91/M92 in Memory Mode?---Yes

2. Are you able to successfully execute a pallet change with M92 in MDI Mode?-No I get an alarm 078 number not found.

3. With bit 4 of parameter 3202 set to "0" so that the 9000 series programs are visible, select Single Block Mode, and execute a Pallet Change M91 in MDI Mode. You will have to repeatedly press the Cycle Start Button to progress the program.

4. In carrying out the above steps, does the control trace into program O9001, or O9002? It traces back to O9002

5. Report back with the program number.

Regards,

Bill

I also tried what cncdawg recommended and program O9002 moves into position in auto mode but does not change the pallet. I get an alarm M.S.T. not found.
 
that instructions is for loading pallet #1 or #2
what is the code and program for a generic pallet change?
 
cncdawg,
I'm not quite sure what you mean. Do you want the code and program I am trying to run?
 








 
Back
Top