The trick is really to match the Machine / Control unit settings, to the CAM System / Post settings.
In the example above, we are using some code on the 840 D control to rotate the "Frame" or Coordinate System of the machine, so that the "Z" axis of the new Coordinate System is now aligned to the Tool Axis of the RAH Spindle. This allows us to program as if "Z" was the axis of the tool, when in reality with the RAH, that could be X or Y motion the machine is actually making.
In addition to the "CROT" command, the "CTRANS" command can be used to "translate" the origin for each "feature". The advantage you gain by using CROT to rotate the Coordinate System (Frame), and CTRANS, is you can use a "regular drill cycle" for output.
$TC_CARR37=201002000 CYCLE800(1,"TC1",0,57,0,0,0,0,0,-90,0,0,0,-1) $P_PFRAME=CROT(X,90) <<<<<< THIS ROTATES THE FRAME
$P_PFRAME=CTRANS(X,-3.627,Y,2.78541,Z,1.1147) <<<<<< THIS OFFSETS THE HOLE LOCATION
G00 X0. Y0. <<<<<< THIS MOVES TO HOLE CENTER
Z2. <<<<<< THIS MOVES TO 2" ABOVE HOLE START
CYCLE81(2.,1.5,.1,,-.25) <<<<<< THIS DRILLS THE ACTUAL HOLE