What's new
What's new

Fanuc 31iB Spindle Indexing

RobF

Aluminum
Joined
Dec 23, 2009
Location
Buford,GA
We have a Matsuura MX330 that we are unable to index the spindle on. Matsuura is telling us it is an option (a PC card and some ladder) that must be installed. Their lead time is 14 months and the cost is $20,000 ... you heard that right.

Are we getting the runaround on this? The 31iB is Fanuc's high end control, I assume the encoder is already on the spindle motor to support rigid tapping and spindle orientation. I cannot understand how this isn't just a software option that can be enabled.

We purchased this machine for a specific application of broaching and both the machine dealer (Yamazen) and Matsuura knew this. As you can imagine, we are beyond disappointed at what we are finding.

Any help is much appreciated!
 
I was looking at this recently for a different application on my mam72, but haven't had a chance to play around with it yet. Possible work-around might be to change the spindle orient parameter to your desired angle. You can change parameters with G10 L52 (on my machine spindle orient is param 4031 and you can view the current angle in diagnostic 445)

Maybe not the safest solution though. If the program was interrupted you could have issue with orient for toolchange. Unless you add a default orient value to your toolchange macro.
 
  • Like
Reactions: Ox
I was looking at this recently for a different application on my mam72, but haven't had a chance to play around with it yet. Possible work-around might be to change the spindle orient parameter to your desired angle. You can change parameters with G10 L52 (on my machine spindle orient is param 4031 and you can view the current angle in diagnostic 445)

Maybe not the safest solution though. If the program was interrupted you could have issue with orient for toolchange. Unless you add a default orient value to your toolchange macro.

IF he can at least call an M19?
Maybe he doesn't have that feature at all - without actually being in the M6 macro?

But if you can make that happen...

I doo something similar but mine gits into the weeds a little deeper yet, but what I doo is I set everything back to OEM value in the header of my program, as well as just after needing to use the edited version.

IF you can edit your toolchange macro - I would slip that little ditty in there for sure!
That would solve all issues!


----------------

Think Snow Eh!
Ox
 
No matter which model fanuc you have, implementing spindle indexing is something the machine builder has to do. Fanuc control has the ability, but the builder has to spec the correct hardware and software and after they decide how they want it to work. Could range anywhere between a full C axis to simple M code driven indexing.
 
I came up with a work around where i could not orient 180. Needed for probe calibration.
the work around is writing a new value to the "spindle orientation stop position shift" parameter
this parameter number is the same in the 18iMB and 31i series controls. I just checked manual #B-65280EN/08

(zero degree orient pos)
M03S50 (cancels orient)
G10L50
N4077P1R0
G11
G04X1.
M05
M19(0*SPDL*POS)

(180 degree orient pos)
M03S50
G10L50
N4077P1R2048
G11
G04X1.
M05
M19(ORIENT180)(180*SPDL*POS)

And just in case I put it inside the tool change macro to prevent disaster.
%
O9003(TOOL CHANGE)
G91G30Z0
G10L50
N4077P1R0
G11
G91G30X0Y0
M6
G90
M99
%

there would be no board to add to get arbitrary angle indexing on the spindle. My Robodrill Mate did it. M19 Sxxx and it was a 0iMD with beta drives.
Its just a way Matsuura has found to milk you.
 
Thank you everyone for your replies!! I didn't expect such great info but I'm immensely appreciative. I'm going to do some checking and testing based on what everyone has contributed. I'll report back with any interesting findings.
 
Similar to GeneralDisarray - here is a spindle orientation macro I wrote for a Matsuura MAM. Assigned it to G119, so we could just use G119 like a factory multi orientation command.

Assuming your MAM is the same, you should have all the right hardware, and the same parameter numbers.

Code:
%
O9045(G119 SPINDLE ORIENT MACRO)
(G119 SPINDLE ORIENT MACRO)
(NME 2-1-17)
(USED TO TEMPORARILY ROTATE SPINDLE TO NEW POSITION)
(EXAMPLE: G119 S180)
(*WARNING* G119 S0 MUST BE SPECIFIED BEFORE NEXT TOOL CHANGE)
(#19 = SPINDLE ORIENT POSITION IN DEGREES)

#720=PRM[4031]/[1]  (READ FACTORY M19 POSITION)
#20=#19*11.375        (CONVERT UNITS)

IF [#720 LE 0] THEN #3000=1 (ERROR-READING-SPINDLE-POSITION)
IF [#19 LT 0] THEN #3000=1 (INVALID-SPINDLE-POSITION-SPECIFIED)

G10 L52
N4031 R[#720+#20] P1 (WRITE PARAMETERS FOR NEW M19 POSITION)
G11

M20        (RELEASE SPINDLE ORIENTATION)
M19        (ORIENT SPINDLE AT NEW POSTION)

G10 L52
N4031 R#720 P1    (WRITE PARAMETERS FOR FACTORY M19 POSITION)
G11

M99
%
 
19 = SPINDLE ORIENT POSITION IN DEGREES
Similar to GeneralDisarray - here is a spindle orientation macro I wrote for a Matsuura MAM. Assigned it to G119, so we could just use G119 like a factory multi orientation command.

Assuming your MAM is the same, you should have all the right hardware, and the same parameter numbers.

Code:
%
O9045(G119 SPINDLE ORIENT MACRO)
(G119 SPINDLE ORIENT MACRO)
(NME 2-1-17)
(USED TO TEMPORARILY ROTATE SPINDLE TO NEW POSITION)
(EXAMPLE: G119 S180)
(*WARNING* G119 S0 MUST BE SPECIFIED BEFORE NEXT TOOL CHANGE)
(#19 = SPINDLE ORIENT POSITION IN DEGREES)

#720=PRM[4031]/[1]  (READ FACTORY M19 POSITION)
#20=#19*11.375        (CONVERT UNITS)

IF [#720 LE 0] THEN #3000=1 (ERROR-READING-SPINDLE-POSITION)
IF [#19 LT 0] THEN #3000=1 (INVALID-SPINDLE-POSITION-SPECIFIED)

G10 L52
N4031 R[#720+#20] P1 (WRITE PARAMETERS FOR NEW M19 POSITION)
G11

M20        (RELEASE SPINDLE ORIENTATION)
M19        (ORIENT SPINDLE AT NEW POSTION)

G10 L52
N4031 R#720 P1    (WRITE PARAMETERS FOR FACTORY M19 POSITION)
G11

M99
%
Awesome! This is exactly what I was thinking we could do! I have a couple questions as I'm not super familiar with some of this syntax:

What are you converting to/from with the 11.375 conversion?

How do you specify that variable #19 is an argument for G119? I need to do some research on macro program calling by G-code as this is new to me.

Thanks boosted!
 
The value from the letters during the call "G119" become local variables when it goes to the sub program. This is the same behavior as a G65 subroutine call. In our case we are giving "S" a value, which is local variable #19 when it gets to the sub program.

The 11.375 conversion was a number based on the total number of locations possible in the parameters table. IIRC (and it's been a while) the param table read between 0 and 4150, so some extrapolation was required to convert that into 0 - 360 degrees.
 
Code:
%
O9045(G119 SPINDLE ORIENT MACRO)
(G119 SPINDLE ORIENT MACRO)
(NME 2-1-17)
(USED TO TEMPORARILY ROTATE SPINDLE TO NEW POSITION)
(EXAMPLE: G119 S180)
(*WARNING* G119 S0 MUST BE SPECIFIED BEFORE NEXT TOOL CHANGE)
(#19 = SPINDLE ORIENT POSITION IN DEGREES)

#720=PRM[4031]/[1]  (READ FACTORY M19 POSITION)
#20=#19*11.375        (CONVERT UNITS)

IF [#720 LE 0] THEN #3000=1 (ERROR-READING-SPINDLE-POSITION)
IF [#19 LT 0] THEN #3000=1 (INVALID-SPINDLE-POSITION-SPECIFIED)

G10 L52
N4031 R[#720+#20] P1 (WRITE PARAMETERS FOR NEW M19 POSITION)
G11

M20        (RELEASE SPINDLE ORIENTATION)
M19        (ORIENT SPINDLE AT NEW POSTION)

G10 L52
N4031 R#720 P1    (WRITE PARAMETERS FOR FACTORY M19 POSITION)
G11

M99
%

This is money! Great workaround
 
Also, our 30i controls have 4096 pulses per 360 degrees. I'm not sure if the 31i is any different. It's just something to note.

I can confirm param 4031 and diag 445 is correct for spindle orientation on the 30i as well.
 
Last edited:
Also, our 30i controls have 4096 pulses per 360 degrees. I'm not sure if the 31i is any different. It's just something to note.

I can confirm param 4031 and diag 445 is correct for spindle orientation on the 30i as well.
Whatever the index should be for the tool change, if a Tool Change Macro is used, the correct parameter setting can be added to the Macro. If a Tool Change Macro isn't used, then create one so that you don't have to remember to set the parameter correctly before executing a Tool Change.

Regards,

Bill
 
Whatever the index should be for the tool change, if a Tool Change Macro is used, the correct parameter setting can be added to the Macro. If a Tool Change Macro isn't used, then create one so that you don't have to remember to set the parameter correctly before executing a Tool Change.

Regards,

Bill
Great idea. That makes it dummy proof.
 
Last edited:
I confirmed this worked great! I had to change the parameter from 4031 to 4077 as the MX330 uses a different parameter than the MAM. Everything else worked as expected.

I did also modify the tool change macro (O9001) to hard-code the parameter 4077 M19 position in the event we had something go wrong like a power fail at the exact wrong time.

The ONLY case I can think of where this all goes to hell is if there is a spindle replacement and the 4077 parameter is changed to align the spindle tangs with the tool changer arm. If this is done, we MUST change the hard coded M19 position in the tool change macro (O9001) otherwise it'll write the old position and crash the arm.

Thank you to everyone for your help. Y'all have made my month. Special thanks to Boosted for doing most of the work :).

Similar to GeneralDisarray - here is a spindle orientation macro I wrote for a Matsuura MAM. Assigned it to G119, so we could just use G119 like a factory multi orientation command.

Assuming your MAM is the same, you should have all the right hardware, and the same parameter numbers.

Code:
%
O9045(G119 SPINDLE ORIENT MACRO)
(G119 SPINDLE ORIENT MACRO)
(NME 2-1-17)
(USED TO TEMPORARILY ROTATE SPINDLE TO NEW POSITION)
(EXAMPLE: G119 S180)
(*WARNING* G119 S0 MUST BE SPECIFIED BEFORE NEXT TOOL CHANGE)
(#19 = SPINDLE ORIENT POSITION IN DEGREES)

#720=PRM[4031]/[1]  (READ FACTORY M19 POSITION)
#20=#19*11.375        (CONVERT UNITS)

IF [#720 LE 0] THEN #3000=1 (ERROR-READING-SPINDLE-POSITION)
IF [#19 LT 0] THEN #3000=1 (INVALID-SPINDLE-POSITION-SPECIFIED)

G10 L52
N4031 R[#720+#20] P1 (WRITE PARAMETERS FOR NEW M19 POSITION)
G11

M20        (RELEASE SPINDLE ORIENTATION)
M19        (ORIENT SPINDLE AT NEW POSTION)

G10 L52
N4031 R#720 P1    (WRITE PARAMETERS FOR FACTORY M19 POSITION)
G11

M99
%
 








 
Back
Top