Generate One Program per Turret in a Single File

task target This task shows you how to generate NC data for the Part Operation in batch mode.
NC data can be generated as one program per file or several programs in a single file.

Each turret (channel) is segregated by means of program header and specific syntaxes.

Specific syntaxes cross programs for identifying:

  • Synchronizations
  • Spindles.

This enables easier post-processing.

scenario 1. Select File > Open then select the Multi-Turret_Final.CATProcess document.
  2. Select the Part Operation in the PPR tree and click Generate NC Code in Batch Mode in the NC Output Management toolbar.

The following dialog box appears.

 
3. Set the parameters as shown and click Execute to generate the NC data. The generated file will be attached to the first program in the Part Operation.

Please refer to Generate APT Source File in Batch Mode for more information.

4. Right click the first program in the PPR tree and select Display NC File.
 

$$ -----------------------------------------------------------------
$$ Generated on Tuesday, March 16, 2004 04:56:42 PM
$$ CATIA APT VERSION 1.0
$$ -----------------------------------------------------------------
CHANNEL,1
$$ PGM UT
$$ Part Operation : Multi-turret lathe machine
$$*CATIA0
$$ PGM UT,Spindle,1
$$ 0.00000 0.00000 1.00000 0.00000
$$ 1.00000 0.00000 0.00000 0.00000
$$ 0.00000 1.00000 0.00000 0.00000
PARTNO Part Operation : Multi-turret lathe machine
COOLNT/ON
CUTCOM/OFF
$$ OPERATION NAME : Turning Tool Change.1
$$ Start generation of : Turning Tool Change.1
$$ TOOLCHANGEBEGINNING
CUTTER/ 1.000000
TOOLNO/1,TURN
$$ TOOLCHANGEEND
$$ End of generation of : Turning Tool Change.1
PPRINT NC_LATHE_MO_START_COMMENT BEGIN
PPRINT MACHINE OPERATION = Rough Turning
PPRINT OPERATION NAME = External Roughing
PPRINT TOOL ASSEMBLY = External Assembly
PPRINT NC_LATHE_MO_START_COMMENT END
$$ OPERATION NAME : External Roughing
$$ Start generation of : External Roughing
SWITCH/9
FEDRAT/ 0.4000,MMPR
SPINDL/ 70.0000,RPM
GOTO / 77.00000, 0.00000, 45.00000
GOTO / 28.00000, 0.00000, 2.50000
FEDRAT/ 0.3000,MMPR
GOTO / 28.00000, 0.00000, 0.50000
FEDRAT/ 0.4000,MMPR
GOTO / 28.00000, 0.00000, -49.50000
FEDRAT/ 0.8000,MMPR
GOTO / 28.21213, 0.00000, -49.28787
RAPID
GOTO / 28.21213, 0.00000, 2.50000
RAPID
GOTO / 25.50000, 0.00000, 2.50000
FEDRAT/ 0.3000,MMPR
GOTO / 25.50000, 0.00000, 0.50000
FEDRAT/ 0.4000,MMPR
GOTO / 25.50000, 0.00000, -49.50000
FEDRAT/ 0.8000,MMPR
GOTO / 25.71213, 0.00000, -49.28787
RAPID
GOTO / 25.71213, 0.00000, 2.50000
RAPID
GOTO / 23.00000, 0.00000, 2.50000
FEDRAT/ 0.3000,MMPR
GOTO / 23.00000, 0.00000, 0.50000
FEDRAT/ 0.4000,MMPR
GOTO / 23.00000, 0.00000, -49.50000
FEDRAT/ 0.8000,MMPR
GOTO / 23.21213, 0.00000, -49.28787
RAPID
GOTO / 23.21213, 0.00000, 2.50000
RAPID
GOTO / 20.50000, 0.00000, 2.50000
FEDRAT/ 0.3000,MMPR
GOTO / 20.50000, 0.00000, 0.50000
FEDRAT/ 0.4000,MMPR
GOTO / 20.50000, 0.00000, -49.50000
SYNC/1,1,2,2
FEDRAT/ 0.8000,MMPR
GOTO / 20.71213, 0.00000, -49.28787
FEDRAT/ 0.4000,MMPR
GOTO / 77.00000, 0.00000, 45.00000
$$ End of generation of : External Roughing
SPINDL/OFF
REWIND/0
END

$$ -----------------------------------------------------------------
$$ Generated on Tuesday, March 16, 2004 04:56:43 PM
$$ CATIA APT VERSION 1.0
$$ -----------------------------------------------------------------
CHANNEL,2
$$ PGM LT
$$ Part Operation : Multi-turret lathe machine
$$*CATIA0
$$ PGM LT,Spindle,1
$$ 0.00000 0.00000 1.00000 0.00000
$$ 1.00000 0.00000 0.00000 0.00000
$$ 0.00000 1.00000 0.00000 0.00000
PARTNO Part Operation : Multi-turret lathe machine
COOLNT/ON
CUTCOM/OFF
$$ OPERATION NAME : Turning Tool Change.2
$$ Start generation of : Turning Tool Change.2
$$ TOOLCHANGEBEGINNING
CUTTER/ 28.000000
TOOLNO/1,TURN
$$ TOOLCHANGEEND
$$ End of generation of : Turning Tool Change.2
PPRINT NC_AXIAL_MO_START_COMMENT BEGIN
PPRINT MACHINE OPERATION = Drilling
PPRINT OPERATION NAME = Drilling.6
PPRINT PATTERN NAME = Hole.6
PPRINT TOOL ASSEMBLY = Drill Assembly
PPRINT NC_AXIAL_MO_START_COMMENT END
$$ OPERATION NAME : Drilling.6
$$ Start generation of : Drilling.6
SYNC/1,1,2,2
LOADTL/3,1
TLAXIS/ 0.000000, 0.000000, 1.000000
SPINDL/ 70.0000,RPM
RAPID
GOTO / -77.00000, 0.00000, 45.00000
FEDRAT/ 300.0000,MMPR
GOTO / 0.00000, 0.00000, 10.00000
RAPID
GOTO / 0.00000, 0.00000, 1.00000
CYCLE/DRILL, 60.206665, 1.000000, 0.400000,MMPR
GOTO / 0.00000, 0.00000, 0.00000
CYCLE/OFF
RAPID
GOTO / 0.00000, 0.00000, 10.00000
FEDRAT/ 1000.0000,MMPR
GOTO / -77.00000, 0.00000, 45.00000
$$ End of generation of : Drilling.6
SPINDL/OFF
REWIND/0
END

 

information   The program PGM UT on CHANNEL 1 (upper turret) is synchronized with the program PGM LT on CHANNEL 2 (lower turret) by means of the SYNC/1,1,2,2 statements. In this example, the start of the retract macro of the Rough turning operation and the start of drilling is synchronized.

The synchronization is possible thanks to the following statements in the PP table:

*START_NC_INSTRUCTION      NC_PROGRAM_HEADER
*START_SEQUENCE
CHANNEL,%MFG_CHANNEL_NUMBER
*END
*END

where:
MFG_CHANNEL_NUMBER: channel (turret) number associated to the program

*START_NC_COMMAND      NC_SYNCHRONISATION
SYNC/%MFG_SYNCHRONISATION_NUMBER,%MFG_CHANNEL1,%MFG_CHANNEL2,%MFG_MASTER_CHANNEL
*END

where:
MFG_SYNCHRONISATION_NUMBER: index of the synchronization
MFG_CHANNEL1: first synchronized channel
MFG_CHANNEL2: second synchronized channel
MFG_MASTER_CHANNEL: number of the channel set as master.

end of task