Generate NC Code

task target This task shows you how to generate NC code from the program. An APT source file will be generated in this example.

Before doing this task, double-click the Part Operation entity in the tree and, in the dialog box that appears, click the Machine icon to access the Machine Editor dialog box. Make sure that you have selected a Horizontal lathe machine and that the desired NC data format is set to Axis (X, Y, Z).

scenario 1. Use the right mouse key on the Manufacturing Program.1 entity in the tree to select Generate NC Code Interactively. The Generate NC Output Interactively dialog box appears.

2. Select APT as the desired NC data type.
  3. Click the Output File button to select the folder where you want the file to be saved and specify the name of the file.
4. Click Execute to generate the APT source file.
An extract from a typical APT source file is given below.

$$ -----------------------------------------------------------------
$$ Generated on Wednesday, April 07, 2004 11:16:08 AM
$$ CATIA APT VERSION 1.0
$$ -----------------------------------------------------------------
$$ Manufacturing Program.1
$$ Part Operation.1
$$*CATIA0
$$ Manufacturing Program.1
$$ 1.00000 0.00000 0.00000 0.00000
$$ 0.00000 1.00000 0.00000 0.00000
$$ 0.00000 0.00000 1.00000 0.00000
PARTNO Part Operation.1
$$ OPERATION NAME : Turning Tool Change.1
$$ Start generation of : Turning Tool Change.1
$$ TOOLCHANGEBEGINNING
CUTTER/ 10.000000
TOOLNO/1,TURN,1,0,9, 5.000000,$
0.000000, 0.000000, 0.400000,MMPR, 70.000000,RPM,$
CCLW,ON, 0.000000,NOTE
TPRINT/T1 External Insert-Holder,T1 External Insert-Holder,Turning Tool$
Assembly.1
LOADTL/1,1,1
$$ TOOLCHANGEEND
$$ End of generation of : Turning Tool Change.1
$$ OPERATION NAME : Rough Turning.1
$$ Start generation of : Rough Turning.1
SWITCH/9
FEDRAT/ 0.3000,MMPR
SPINDL/ 70.0000,RPM,CCLW
GOTO / 107.08333, 0.00000, 257.00000
GOTO / 107.08333, 0.00000, 255.00000
...
FEDRAT/ 0.8000,MMPR
GOTO / 40.21213, 0.00000, 150.21213
$$ End of generation of : Rough Turning.1
$$ OPERATION NAME : Turning Tool Change.2
$$ Start generation of : Turning Tool Change.2
$$ TOOLCHANGEBEGINNING
CUTTER/ 2.400000
TOOLNO/1,TURN,1,0,9, 1.200000,$
0.000000, 0.000000, 0.400000,MMPR, 70.000000,RPM,$
CCLW,ON,,NOTE
TPRINT/T3 External Groove Insert-Holder,T3 External Groove Insert-Holde$
r,Turning Tool Assembly.1_1
LOADTL/1,1,1
$$ TOOLCHANGEEND
$$ End of generation of : Turning Tool Change.2
$$ OPERATION NAME : Groove Turning.1
$$ Start generation of : Groove Turning.1
SWITCH/9
FEDRAT/ 0.3000,MMPR
SPINDL/ 70.0000,RPM,CCLW
GOTO / 108.20000, 0.00000, 96.70000
GOTO / 106.20000, 0.00000, 96.70000
...
RAPID
GOTO / 108.20000, 0.00000, 57.91213
$$ End of generation of : Groove Turning.1
$$ OPERATION NAME : Turning Tool Change.3
$$ Start generation of : Turning Tool Change.3
$$ TOOLCHANGEBEGINNING
CUTTER/ 10.000000
TOOLNO/1,TURN,1,0,9, 5.000000,$
0.000000, 0.000000, 0.400000,MMPR, 70.000000,RPM,$
CCLW,ON, 0.000000,NOTE
TPRINT/T1 External Insert-Holder,T1 External Insert-Holder,Turning Tool$
Assembly.1
LOADTL/1,1,1
$$ TOOLCHANGEEND
$$ End of generation of : Turning Tool Change.3
$$ OPERATION NAME : Profile Finish Turning.1
$$ Start generation of : Profile Finish Turning.1
SWITCH/9
FEDRAT/ 0.3000,MMPR
SPINDL/ 70.0000,RPM,CCLW
GOTO / -2.00000, 0.00000, 225.00000
GOTO / 0.00000, 0.00000, 225.00000
...
GOTO / 40.00000, 0.00000, 145.00000
FEDRAT/ 0.8000,MMPR
GOTO / 40.21213, 0.00000, 144.78787
$$ End of generation of : Profile Finish Turning.1
FINI

end of task