top of page

Running multiple parts from a bar with a sub-spindle machine

Writer: Mike LynchMike Lynch

Suggested by Troy Hubert of Cox Manufacturing


In past issues of this newsletter, we have addressed this topic for chucker-type CNC turning centers. With very short workpieces (like washers), it is often advantageous to run several parts from a slug. That is, after loading the raw material long enough to run, say, five workpieces, the machine will run one workpiece and then cut it off. It will repeat this four more times.


Programming this kind of operation is pretty simple using the work shift function. A main program (which is the controlling program), simply sets the work shift value in Z to zero, then calls a subprogram with five repeats. The subprogram completely machines a part and then incrementally modifies the Z axis work shift by an amount equal to the workpiece length plus facing stock plus cutoff tool width. The main program will look like this:

  • O0001 (Main)

  • N005 G10 P0 Z0 (Set work shift Z to zero)

  • N010 M98 P1000 L5 (Run five parts)

  • N015 M30

At the end of the sub-program, this command will modify the work shift:

  • N205 G10 P0 W-0.285 (Modify work shift)

  • N210 M99 (End of sub-program)

W-0.285 incrementally changes the work shift Z value. Note that with some machines, this may have to be a positive value.


Again, this is pretty simple to do when the machine has only one spindle. But it gets much more complicated when the machine has a sub-spindle, and when there are operations to be performed on the sub-spindle side.


Consider these main programs for a Miyano fixed headstock machine (they machine ten workpieces per pull-out):

  • O0700( MAIN SPINDLE MAIN PROGRAM )


  • M900

  • G28U0

  • G30W0

  • M902


  • N101 G10P0Z0(WORK SHIFT CANCEL)


  • N1

  • T1111M8(OD FORM TOOL)

  • G0G99Z-1.229M28

  • X2.5M108


  • M904(WAIT FOR FEEDOUT)


  • M91(MAIN SPINDLE ENCODER ON)

  • G97M3S800

  • X.765

  • G1X.665F.003

  • G0X.685

  • X.67

  • G1X.645F.003

  • X.65

  • X.6406F.002

  • G0X.642

  • G4X.2

  • G1X.6406F.0015

  • G4X.02

  • G0X2.5

  • Z2.0


  • T0


  • N2

  • T0101M91(DRILL)

  • G97G99S4000M3

  • G0Z0.5

  • X-2.753(SPOT)

  • Z.02

  • G1Z-.075F.002

  • G0Z.1

  • X0(DRILL)

  • Z0.

  • G1Z-.875F.004

  • G0Z.1

  • Z-.855

  • G1Z-1.25F0.004

  • G0Z.5


  • T0


  • M906


  • M908(1ST PART)

  • M910

  • M98P1000


  • M912

  • N102 G10P0W.1229(2ND PART)

  • M914

  • M98P1000


  • M916

  • N103 G10P0W.1229(3RD PART)

  • M918

  • M98P1000


  • M920

  • N104 G10P0W.1229(4TH PART)

  • M922

  • M98P1000


  • M924

  • N105 G10P0W.1229(5TH PART)

  • M926

  • M98P1000


  • M928

  • N106 G10P0W.1229(6TH PART)

  • M930

  • M98P1000


  • M932

  • N107 G10P0W.1229(7TH PART)

  • M934

  • M98P1000


  • M936

  • N108 G10P0W.1229(8TH PART)

  • M938

  • M98P1000


  • M940

  • N109 G10P0W.1229(9TH PART)

  • M942

  • M98P1000


  • M944

  • N110 G10P0W.1229(10TH PART)

  • M946

  • M98P1000


  • N111 G10P0Z0(WORK SHIFT CANCEL)


  • G97S100

  • M25

  • M948


  • T1100


  • /M98P9001


  • M999

  • M30

  • O0700( SUBSPINDLE MAIN PROGRAM )


  • M900

  • G28U0B0

  • G28W0

  • G0B-2.5


  • M902


  • N101 G10P0Z0(WORK SHIFT CANCEL)


  • N1

  • T0101M91(FEEDOUT)

  • G97M3S100

  • G0G99Z.2

  • X0

  • Z0.

  • M17(COLLET OPEN)

  • G4X.5

  • M18(COLLET CLOSE)

  • G4X.5

  • Z.1

  • G28U0.0


  • T0


  • M904

  • T0900

  • M906


  • M908(1ST PART)

  • M910

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M912

  • N102 G10P0W.2458(2ND PART)

  • M914

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M916

  • N103 G10P0W.1229(3RD PART)

  • M918

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M920

  • N104 G10P0W.1229(4TH PART)

  • M922

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M924

  • N105 G10P0W.1229(5TH PART)

  • M926

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M928

  • N106 G10P0W.1229(6TH PART)

  • M930

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M932

  • N107 G10P0W.1229(7TH PART)

  • M934

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M936

  • N108 G10P0W.1229(8TH PART)

  • M938

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M940

  • N109 G10P0W.1229(9TH PART)

  • M942

  • M98P2000


  • M230

  • W-.1229

  • M231


  • M944

  • N110 G10P0W.1229(10TH PART)

  • M946

  • M98P2000


  • N111 G10P0Z0(WORK SHIFT CANCEL)


  • T1010(EMPTY PART CATCHER)

  • G28U0.

  • G0Z-1.0

  • M9(COOLANT OFF)

  • M29(HPC OFF)

  • M35(ROTATE TURRET TO DROP PART)

  • M115(ROTATE TURRET CLOCKWISE ONLY)

  • G4X1.0

  • G28W0.0

  • G28B0.

  • M8

  • M28

  • T0100M105

  • M948


  • /M98P9001


  • M999

  • M30

In both main programs, N101 sets the Z axis work shift value to zero. Lines N101, N102, and so on, increment the work shift value by the workpiece length plus the cutoff tool width plus the facing stock for each successive part. Now let’s look at the sub-programs.

  • O1000

  • ( HEAD 1 SUB PROGRAM )

  • T2121M191(BACK DEBUR DRILL)

  • G97S3000M103

  • G0G99Z-.5

  • X0

  • Z0.

  • G1Z.042F.003

  • G4X.2

  • G0Z-.5S1000

  • G28U0.


  • T0


  • T1212(INDEX CUTOFF)

  • G0Z-.1229


  • M901(WAIT FOR EJECT AND FACE)

  • M902(EJECT AND FACE COMPLETE)


  • M91

  • G97M3S3000

  • M903

  • M904(WAIT FOR PICKOFF-HEAD 2)

  • G0X.707

  • G1G99X-.04F.003

  • M905

  • M906

  • G28U0.

  • G28W0.


  • T0


  • M99



  • O2000

  • ( HEAD 2 SUB PROGRAM )

  • T0909M91(FACE/BORE)

  • G97M3S4000

  • G0G99Z.2

  • X.12

  • G4X.5

  • Z.02

  • G1Z-.0467F.008

  • X.122

  • Z-.0315F.001

  • X.1895Z.0074F.0005

  • G4X.2

  • X.159F.01

  • Z-.0035

  • X.72Z0F.0025

  • G0Z2.0

  • G4X.2

  • M3S2000


  • T0


  • M901(READY FOR EJECT)


  • N3

  • T1010M191(PART CATCHER)

  • M104S100G0G99Z0

  • X0.

  • M230

  • W-5.46

  • M231

  • M117(EJECT PART)

  • G4X.5

  • M230

  • W5.46

  • M231

  • G28U0

  • G28W0


  • T0


  • M902(EJECT COMPLETE)


  • M903(WAIT FOR CUTOFF-HEAD 1)


  • M191

  • M104S3000

  • M117

  • G4X.2

  • M230

  • G0W-12.03

  • G1G98W-.045F99.(PICKOFF LOCATION)

  • G4X.2

  • M118

  • G4X.2

  • M904(START CUTOFF)

  • M905

  • G0W.075

  • M906

  • W12.0

  • M231

  • T0


  • M99

Notice that neither sub-program does any work shifting for the Z axis. This is completely done by the main programs. While this technique is much more complicated to use with sub-spindle machines, at least it is possible.

 
 
 

Recent Posts

See All

Comments


bottom of page