Programming counter-spindles in G-code

Counter-spindle

Standard lathes have a spindle into which the workpiece is chucked and then machined with turning or milling tools. To allow the workpiece to be completely machined (including the “back” side) it must be rechucked by hand – a process in which errors can often be made at the expense of the precision of the workpiece. By using machines with counter-spindles, this process is automated, allowing a much higher level of precision to be achieved. These counter-spindles pick off the workpiece from the main spindle with positional accuracy so that it can be completely machined on one machine. The operator can simply program takeover of the workpiece with ShopTurn in one cycle. If ShopTurn is not available, synchronization must be programmed via G-code.

Programming example

The following example describes this sequence. Siemens accepts no liability for the general validity and functional safety of the program example shown.

Synchronous takeover at 1000 rpm
G-code
Comment
COUPDEF(S3,S1,1,1,“NOC“,“DV“)
; S3 is counter-spindle
COUPON(S3,S1)
; S1 is main spindle
G95 S1000 M4
 
Handover
G-code
Comment
M?
; Open M-function to counter-spindle chuck with spindle rotating
G0 Z2=300
; Preliminary position of counter-spindle absolute dimension
G94 G1 Z2=280 F1000
; Pick-off position absolute dimension approach at 1000 mm/min
G4 F0.5
; Dwell time
M?
; Close M-function to counter-spindle chuck with spindle rotating
G4 F0.5
; Dwell time
M?
; Open M-function to main spindle chuck with spindle rotating
G4 F0.5
; Dwell time
G0 Z2=600
; Pull-back position counter-spindle absolute dimension
Pull-back position counter-spindle absolute
G-code
Comment
COUPOF(S3,S1)
COUPDEL(S3,S1)
M1=5
M3=5
 
MIRROR Z0
; Mirror the machining, programming in Z minus direction
SETMS(3)
; Select master spindle for counter-spindle
Note:

With the mirror command, the control system automatically resets the path correction commands (G41/G42 and/or G42/G41) in keeping with the change in machining direction – that is, G42 external machining is also programmed on the counter-spindle.

Machining on the counter-spindle
G-code
Comment

G55

; Zero point of counter-spindle

MIRROR
M30

; Deselect mirroring

Would you like to contact the CNC4you team?

Questions or suggestions? Write us!

Do you have a suggestion for a video tutorial, a workpiece or an online article? We are curious about it!