Fanuc 18 Subspindle: Configuring Work Offsets Safely

Jason IP3 min read
FanucOther TopicTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

This method calculates the main-spindle and subspindle work offsets from four part inputs and one measured machine constant. It applies to the documented Fanuc 18, single-turret bar-machine arrangement only after every machine-specific M code, axis sign, and variable assignment has been verified against the machine builder documentation.

Define the Coordinate Model

The calculation requires the main-to-subspindle geometry to remain separate from part dimensions. Measure the distance between the two collets on the actual machine; the documented implementation uses -611.0. Do not transfer that value to another machine.

Variable Documented meaning Example value
#521 Main-spindle projection length 40.0
#522 Outside diameter, used for cleanup facing after a bar change 25.0
#523 Finished overall part length 45.0
#524 Pickup position -25.0
#531 Manually entered correction to the measured spindle spacing Determine on the machine

The sign convention is part of this specific coordinate model. Confirm the B-axis positive direction and both spindle-face reference points before using the equations.

Calculate Pickup Positions and Work Offsets

#525=-611.0+#521+#524+#531
#526=#525+#523+4.0
#527=#523+#524
#528=#525+#523
#5222=#521
#5242=-#527
Result Purpose Result with supplied values
#525 B-axis pickup position -596.0+#531
#526 B-axis position after pulling the bar forward -547.0+#531
#527 Subspindle projection after cutoff 20.0
#528 Rapid approach position in front of the part -551.0+#531
#5222 G54 offset in this implementation 40.0
#5242 G55 offset in this implementation -20.0

The fixed 4.0 increment is present in the documented macro, but its mechanical purpose and suitability for another setup are not established. Validate it against the required pull-forward distance, cutoff geometry, and available travel.

Execute the Bar-Transfer Sequence

The documented transfer subprogram performs the following sequence. Its M functions are machine-specific; confirm each function before executing any motion.

  1. Limit spindle speed with G50 S1500, release the B-axis brake with M46, and establish G97 S250 T1212 M3.
  2. Enable synchronous running with M43, open the subspindle chuck with M35, and enable angular synchronization with M45.
  3. Activate G54 and rapid to Z.5 B#528, placing the B axis in front of the part.
  4. Feed to the pickup position with G1 G98 B#525 F2200, then close the subspindle chuck with M34.
  5. Open the main-spindle chuck with M15, feed to B#526 F1500, and close the main-spindle chuck with M14.
  6. Return from the subprogram with M99. The documented application then performs cutoff and commands the B axis to its reference position from the part program.

The evidence also shows dwell commands and M16 in the original sequence, but it does not establish whether their timing or function transfers to another machine. Preserve them only after confirming their machine-specific purpose.

Control G54 and G55 Explicitly

Call the required work offset after each tool change: the documented examples use T0101 G54 for the main-spindle side and T1030 G55 for the subspindle side. A cleanup-facing subprogram used after a bar change must also restore G54.

Keep G55 active while measuring tools on the subspindle side. The source notes that some machine configurations may require a parameter setting so G55 remains active after manual selection or RESET; the parameter identifier is not supplied. Check the machine builder documentation instead of guessing a parameter number.

Commission and Verify the Calculation

  1. Measure the collet-to-collet spacing on the target machine and replace -611.0 with that machine's measured signed value.
  2. Enter the four part inputs and calculate #525 through #528, G54, and G55 without commanding transfer motion.
  3. Confirm that #528 is a safe approach position, #525 is the intended grip position, and #526 produces the required post-grip projection.
  4. Validate every M function, chuck state, synchronization state, B-axis direction, feed value, and clearance using the machine builder documentation and a controlled commissioning method.
  5. Transfer and cut a verification part, measure its overall length and subspindle-side features, then enter the observed spacing error through #531. Recalculate and verify again before production.

The macro was written for bar work on a one-turret machine. Loaded blanks require a modified material-location and transfer model. Do not assume the bar-work equations locate an individually loaded blank correctly.

FAQ

How do I calculate the Fanuc subspindle G55 offset?

In the documented model, calculate #527=#523+#524 and write #5242=-#527. With #523=45.0 and #524=-25.0, the resulting G55 value is -20.0.

What does #531 correct in the subspindle macro?

#531 corrects residual error in the measured distance between the two collets. Determine it from a controlled transfer and dimensional check; do not copy a correction from another machine.

Which work offset must be active when measuring subspindle tools?

Use G55 for subspindle-side tool measurement in this implementation. If RESET or manual operation cancels it, consult the machine builder documentation for the applicable offset-retention configuration.

Back to blog