MfgBatch Utility for Generating NC Data

task target MfgBatch is a utility program that allows you to generate NC data files from a manufacturing program referenced by a CATProcess.

You can run this program using one of the Generate NC Data commands in your NC workbench. This is described in the following user tasks:

You can also run MfgBatch as an executable program under Windows or a shell under UNIX. In this case MfgBatch uses an input text file called FT05 containing a set of keywords similar to the keywords of the equivalent Version 4 utility.

This document describes how to define the FT05 input file and run MfgBatch.

scenario 1. Defining the FT05 file

MfgBatch uses an input text file containing keywords that describe the processing to be done. It is largely derived from the CATIA Version 4 FT05 file. The available keywords are described below.

Sample FT05 for generating an APT file:

*REA E:\tmp
*MOD Processinfra1.CATProcess
*PRG Manufacturing Program.1
*WRI E:\tmp
*MEM aptcub1.aptsource
*APT 1
*REP Y
*PPR 3
*RUN

Sample FT05 for generating an NC Code file:

*REA E:\tmp
*MOD Processinfra1.CATProcess
*PRG Manufacturing Program.1
*WRI E:\
*MEM test1.CATNCCode
*ISO CNT
*REP Y
*PPR 3
*PPN NUM1060_5X
*STX N
*RUN

scenario   Do not use the character $ in path names, as this character may be interpreted as an environment variable.
2. Running MfgBatch

A CATIA V5 environment is needed in order to run MfgBatch. The entry point is the MfgBatch.exe executable program (under Windows) or MfgBatchCmd.sh shell (under UNIX).

You should create a RunMfgBatch.bat file under Windows or a RunMfgBatch.sh file under UNIX. The three arguments required for running the utility are:

environment name: -env environment_name
environment directory or folder: -direnv environment_location
full name of the FT05 file: -ft05 file_name

Running MfgBatch under Windows

Here is an example of the RunMfgBatch.bat file you need to create. It must be accessible in your user path.

"C:\Program Files\Dassault Systemes\B17\intel_a\code\bin\mfgbatch.exe"
-env CATIA.V5R17.B17
-direnv "C:\Program Files\Dassault Systemes\B17\CATEnv"
-ft05 %1

In this example, CATIA Version 5 is installed at C:\Program Files\Dassault Systemes\B17.
You will find this information in the Properties menu of the icon that is used to start CATIA.

The executable program is run by specifying the required arguments. The %1 parameter represents the FT05 file name.

How to use it:

RunMfgBatch FT05_file_name

Example:

RunMfgBatch e:\users\myself\Drilling_1_ft05.txt

Running MfgBatch under UNIX

Here is an example of the RunMfgBatch.sh file you need to create. It must be accessible in your user path.

#!/bin/ksh
set -x
/home/data/TESTR9164/aix_a/code/command/catstart
-env CATIA_P1.V5R17.B17
-direnv /CATEnv
-run "MfgBatchCmd.sh -ft05 $1"

In this example, CATIA Version 5 is installed at /home/data/TESTR9164. This is followed by a reference to the operating system, which can be:

  • aix_a
  • hpux_a
  • irix_a
  • solaris_a.

You will find this information in the /CATEnv directory in the environment_name.txt files.

The shell is run by specifying the required arguments. The $1 parameter represents the FT05 file name.

How to use it:

RunMfgBatch.sh FT05_file_name

Example:

RunMfgBatch.sh /u/users/myself/Drilling_1_ft05.txt

3. Results

For the command:

RunMfgBatch d:\dir\fichierFT05.txt

with:

*WRI E:\tmp
*MEM aptcub1.aptsource

results are:

  • a first LOG file: d:\dir\fichierFT05.txt.LOG
  • a result file: E:\tmp\aptcub1.aptsource
  • a second LOG file: E:\tmp\aptcub1.LOG

If an error occurs, you should first look at the LOG files which give a diagnostic about the problem encountered (for example, syntax error or file not found).

scenario The following keywords can be used in the FT05 file. Note that, compared with a CATIA Version 4 FT05 file, only 3-letter keywords can be used in Version 5.

Please refer to NC Data Options for more information about these keywords.

APT output:

*REA CATProcess read directory (required keyword).
*MOD CATProcess name (required keyword).
*PRG Manufacturing program to be processed (required keyword).
*WRI Write directory for the generated file.
*MEM Generated file name.
*APT 1 Generate APT source. Copy and/or Tracut instructions will not be processed. In this case there will be Copy or Tracut statements remaining in the generated APT source.
*APT 2 Generate APT source. Copy and/or Tracut instructions will be processed. In this case there will be no Copy or Tracut statements remaining in the generated APT source.
*REP If output file already exists with same name, allows replacing it (Y/N)
*PPR n
or
*PPR nnn
Display mode for general information (such as tool names), Part operation comments, and Machining operation names (1: PPRINT, 2: no comments, 3: $$).

For example:
*PPR 1 will give general information, Part operation comments, and Machining operation names as PPRINT
*PPR 121 will give general information, and Machining operation names as PPRINT and Part operation comments as $$
*PPR 333 will give general information, Part operation comments, and Machining operation names as $$.

*RUN Command to start processing (required keyword).

Clfile, NC code or CATProduct output:

*CLF Generate Clfile (replaces *APT)
*ISO Generate NC code (replaces *APT)
    *CGR Generate CATProduct in-process model (replaces *APT).
In previous releases, a CGR in-process model is generated with this keyword.
    *AVR Associate a Video Result CATProduct (replaces *APT).
 

Possibility to write CATProcess after processing:

*FLW CATProcess write directory.
*MDW CATProcess name.
*MRP If CATProcess already exists with same name, allows replacing it (Y/N).
    *AOF Associates the NC output file with the CATProcess after processing (Y/N).

Other keywords:

*CIR Circular interpolation mode (0: no circle, 1: CIRCLE only, 2: CIRCLE or CYLINDR).
*FGO 3 axis or 5 axis (POINT/AXIS)
*PPN Post-processor name
*STX Syntax to be used or not for Cycles (Y/N)
*TPS Compute only, no generation of APT, NC code or Clfile.
*FCP Force compute.
*TOM Tool Output Management (1: Tip, 2:Tool center).
*FOM File Operation Management (1: output one file per program, 2: output one file per operation, 3:  output one file for all programs).
*HPM Home Point Management (2: write home point of the machine in FROM or GOTO according to the machine parameter).
*LCK Lock operations.
    *SRP 1 Rapid feedrate at start of each operation.
    *RAP 1 Rapid defined according to the value defined on the machine feedrate.
    *RMT 1 No GOTO statement is to be included before each tool change.
    *GBC 1 Remove GOTO statements before axial machining operations.
    *PAC 1 Remove double points after PP commands.
    *ALP 1 Remove aligned points.
*SPC Split circle into two circular arcs.

0: No split.
1: If the circle angle is greater than 179 degrees, it is split into two equal circular arcs (this is known as the V5 mode).
2: If the circle angle between 179 and 181 degrees, or between 359 and 361 degrees, it is split into two circular arcs.
The first arc has an angle of 90 degrees, the second has an angle of 'circle angle-90' degrees (this is known as the V4 mode).

If this keyword if not used, the circle is not split.

See Generated APT Output: Split Circles Behavior for more information about this functionality.

    *NDX N.D Format for point coordinates
N=total number of digits for each point coordinate
D=number of digits after the decimal point for each point coordinate.
    *NDI N.D Format for axial components
N=total number of digits for tool axis vector component
D=the number of digits after the decimal point for tool axis vector component.

end of task