What do you need exactly?
G110 Z2/C2is sub Z/C axis, used like this
G110 Z2 -Select sub z axis
G0 Zxxx -Move sub z axis
G111 -Deselect sub axis
G112 Mxxx is M code towards sub side.
G112 M200 -Activate sub C axis
G112 M6 -Unclamp sub chuck
Can be used in conjunction with regular M code like this:
M200 G112 M200 -Activate main and sub C axis.
M6 G112 M6 -Unclamp both chucks
M511, M512, M518 is for spindle sync.
I think both spindles need to be M5 when activated.
M511 -Start spindle sync
M512 M518 -Deactivate spindle sync
M508 M509 is for pressing with sub. Select sub Z axis before pressing.
M508 connects sub Z axis load signal to skip input. M509 disconnect it. Use G31 to stop on skip as usual. Use a low feedrate, I use about 100mm/min.
G110 Z2 -Select sub Z axis
G0 Z-700 -Move sub Z towards main
G112 M508 -Pressing start
G1 G31 Z-710 F100 -Press with sub Z towards main with feedrate 100
G112 M509 -Pressing end
G0 Z0 -Send sub home
G111 -Deselect sub Z
So, a program might look like this
M5 M305 -Stop both spindles
M200 G112 M200 -Activate both C axis
G0 C0 -Move main C to C0
G110 Z2 C2 -Select sub Z and sub C
G0 C0 -Move sub C to C0
G112 M6 -Open sub chuck
G0 Z-800 -Move sub towards main
G112 M508 -Start pressing action
G98 G1 G31 Z-810 F100 -Press with sub
G112 M509 -Stop pressing action
G112 M7 -Close sub chuck
M6 -Open main chuck
G0 Z0 -Move sub home
G111 -Deselect sub axis Z and C
M202 G112 M202 -Deactivate both C axis
I have my post processor put parameters at the top of my programs and spit out transfer codes with those parameters.
Top of program
(SUB PICKOFF Z, NEG VALUE)
(SUB G1 DISTANCE, POSITIVE VALUE)
Then in transfer part of program:
G98 G1 Z[#999] F100
Makes it easy to set transfer Z value for sub. I use the same parameter for G50 to move Z origin to sub after the transfer too, so really easy to use CAM for programming both main and sub operations with same Z offset.