CLFile Formats

This section describes CLFile Formats.

Related Topics
Generating NC Code
NC Data Options

CLFile Format

A CLFile is a set of CLdata type records. This type of record consists of a series of logic words. Record length is variable, up to a maximum of 245 words.

The general structure of a record is as follows:

  • W1 = record sequence number (integer)
  • W2 = record type (integer)
  • W3 to Wn = data depending on the record type.

The first three words have the same length (4 bytes) and are integers.

The following words 4 to 245 have the same length (8 bytes) and may represent either an integer, a real number or a group of six characters.

  • If the logic word represents an integer, the four right most bytes are used.
  • If the logic word represents a real, all the bytes are used.
  • If the logic word represents a six-character group, the left six bytes are used, the two remaining bytes are blank. If the group consists of less than six characters, it can be completed on the left by blank characters, in order to obtain the six characters needed.

Generated Record Types

The following record types are generated by the application:

1000, 2000, 3000, 5000, 6000, 9000, 10000, 14000, 15000 and 28000.

Type 1000 Record

Type 1000 gives the record sequence number.

  • W1 = record sequence number (integer)
  • W2 = 1000
  • W3 = W1.

Type 2000 Record

Type 2000 gives the post-processor instructions.

  • W1 = record sequence number (integer)
  • W2 = 2000
  • W3 = n (integer) code corresponding to a major word.
  • W4 and the following words can contain either an integer representing a minor word code, a real number, or a character string.

Type 3000 Record

For circular interpolation, type 3000 gives the canonical form of the circle followed by the tool tip. A type 3000 record is followed by one or more type 5000 records to describe the tool path.

  • W1 = record sequence number (integer)
  • W2 = 3000
  • W3 = 2 (integer)
  • W4 = 0 (integer)
  • W5 = 4 (integer) indicating a circle
  • W6 = 9 (integer) number of following words that are used to defined the circle
  • W7 = symbolic name (CIR) of the circle (characters)
  • W8 = n (integer) number associated to the circle
  • W9 = x coordinate of the circle center (real)
  • W10 = y coordinate of the circle center (real)
  • W11 = z coordinate of the circle center (real)
  • W12 = x component of the circle axis unit vector (real)
  • W13 = y component of the circle axis unit vector (real)
  • W14 = z component of the circle axis unit vector (real)
  • W15 = radius of the circle (real)

Type 5000 Record


  • W1 = record sequence number (integer)
  • W2 = 5000
  • W3 = 3 for FROM, 5 for the other types of movements (for example, GOTO) and 6 for a series of movements (integer).
  • W4 = symbolic name (PT) of the point (characters), if the record contains one single point.
  • W5 = n (integer) number associated to the point, if the record contains one single point.
  • From W6, point coordinates are given. A record can contain data on 40 or 80 points.

For 40 points, point and axis information is given:

  • W6 = x coordinate of first point (real)
  • W7 = y coordinate of first point (real)
  • W8 = z coordinate of first point (real)
  • W9 = i component of tool axis (real)
  • W10 = j component of tool axis (real)
  • W11 = k component of tool axis (real)
  • W12 = x coordinate of second point (real)
  • etc.
  • W245 = z coordinate of 40th point (real)

For 80 points, only point information is given:

  • W6 = x coordinate of first point (real)
  • W7 = y coordinate of first point (real)
  • W8 = z coordinate of first point (real)
  • W9 = x coordinate of second point (real)
  • etc.
  • W245 = z coordinate of 80th point (real)

Type 6000 Record

Type 6000 contains either data on the tool geometry or the machining tolerances.

Machining tolerances:

  • W1 = record sequence number (integer)
  • W2 = 6000
  • W3 = 4 for "INTOL" or 5 for "OUTTOL"
  • W4 = tolerance value (real)

Tool data:

  • W1 = record sequence number (integer)
  • W2 = 6000
  • W3 = 6 for "CUTTER"
  • W4 = tool diameter (real)
  • W5 = tool corner radius (real)
  • W6 = horizontal distance between the tool axis and the center of the corner radius (real)
  • W7 = vertical distance between the tool bottom and the center of the corner radius (real)
  • W8 = 0 (real)
  • W9 = angle between the flank of the tool and the vertical (real)
  • W10 = height of the tool (real).

Type 9000 Record

Type 9000 indicates either tool axis orientation in the machining axis system in 3-axis mode or the multi-axis operating mode in multi-axis mode.

Multi-axis mode (multi-axis operating mode):


  • W1 = record sequence number (integer)
  • W2 = 9000
  • W3 = 2 for "MULTAX"
  • W4 = 1 for "ON"

3-axis mode (tool axis orientation):

  • W1 = record sequence number (integer)
  • W2 = 9000
  • W3 = 1 (integer)
  • W4 = 1 (integer) indicates that tool axis components follow
  • W5 = blank (character)
  • W6 = 0 (integer)
  • W7 = x component of tool axis vector expressed in the machining axis system specified in the 28000 record (real)
  • W8 = y component of tool axis vector expressed in the machining axis system specified in the 28000 record (real)
  • W9 = z component of tool axis vector expressed in the machining axis system specified in the 28000 record (real)

Type 10000 Record

Used with type 5000 for specifying radial cutter compensation data. For more information, see Radial Compensation in Clfiles.

  • W1 = record sequence number (integer)
  • W2 = 10000
  • W3 = 0 for NORM_DS, 1 for standard NORM_PS, 2 for NORM_PS without 5000 type record, and 3 for NORM_PS with 5000 type record containing 0, 0, 0, I, J, K for each tool position, where only the I, J, K vector components are useful (integer)
  • W4 = 0 (real)
  • W5 = 0 (real)
  • From W6, compensation data is given on the W3 value.

NORM_DS in 3-axis mode:

  • W6 = P component of the compensation vector (real)
  • W7 = Q component of the compensation vector (real)
  • W8 = R component of the compensation vector (real)

NORM_DS in 5-axis mode:

  • W6 = 0 (real)
  • W7 = 0 (real)
  • W8 = 0 (real)
  • W9 = P component of the compensation vector (real)
  • W10 = Q component of the compensation vector (real)
  • W11 = R component of the compensation vector (real)

NORM_PS:

  • W6 = Xc coordinate of contact point (real)
  • W7 = Yc coordinate of contact point (real)
  • W8 = Zc coordinate of contact point (real)
  • W9 = Xn component of the normal vector (real)
  • W10 = Yn component of the normal vector (real)
  • W11 = Zn component of the normal vector (real)

Type 14000 Record

Type 14000 indicates the end of the CLdata records.

  • W1 = record sequence number (integer)
  • W2 = 14000

Type 15000 Record

For circular interpolation, type 15000 specifies the unsegmented circular path followed by the tool tip.

  • W1 = record sequence number (integer)
  • W2 = 15000
  • W3 = 3 (integer)
  • W4 = 0 (integer)
  • W5 = 4 (integer) indicating a circle
  • W6 = 13 (integer) number of following words that are used to define the circle
  • W7 = symbolic name (CIR) of the circle (characters)
  • W8 = n (integer) number associated to the circle
  • W9 = x coordinate of the circle center (real)
  • W10 = y coordinate of the circle center (real)
  • W11 = z coordinate of the circle center (real)
  • W12 = x component of the circle axis unit vector (real)
  • W13 = y component of the circle axis unit vector (real)
  • W14 = z component of the circle axis unit vector (real)
  • W15 = circle radius (real)
  • W16 = oriented angle of the circular arc in degrees (real)
  • W17 = x coordinate of the arc end point (real)
  • W18 = y coordinate of the arc end point (real)
  • W19 = z coordinate of the arc end point (real)

The direction of the path is determined by the circle axis unit vector (W12 to W14). It corresponds to an angular movement W16 which is positive if the direction is counterclockwise or negative if the direction is clockwise.

Type 28000 Record

Type 28000 specifies the components of the axis system in which the tool path is given. It is specified at the start of the CLFile and at each change of machining axis system.

  • W1 = record sequence number (integer)
  • W2 = 28000
  • W3 = 0 (integer)
  • W4 to W16 = identifier of the axis system (characters)
  • W17 to W28 = components of the axis system (real)

Radial Compensation in CLFiles

Radial compensation data (PLANAR, NORM_DS, and NORM_PS) is managed in CLFile records.

The various compensation cases are as follows:



Where:

  • X, Y, Z: Tip Point
  • I, J, K: Tool Axis Vector
  • Xp, Yp, Zp: Profile Point
  • Xc, Yc, Zc: Contact Point
  • In, Jn, Kn: Part surface Normal Vector
  • P, Q, R: Compensation Vector

Tip Point, Tool Axis Vector, and Profile Point data are stored in 5000 type records according to the standard.

A specific type of record, Type number 10000, allows storing Contact Point, Part surface Normal Vector, and Compensation Vector data.

This 10000 record is written in the CLFile just before the corresponding 5000 record when required. When continuation records need to be generated for 10000 and 5000 type records, all 10000 type records are written before all associated 5000 type records. A single 1000 type record can precede the couple of records (10000 + 5000). In case of continuation record for this couple of records, no additional 1000 record is added.

The record length of the 5000 and 10000 type records is 1948 bytes, but the 28 first bytes are used to define the type of the record. The remaining 1920 bytes allow defining data corresponding to 40 or 80 positions depending on the number of bytes used for one position.

In the table above:

  • Cases 1 and 2:

    A 5000 type record is enough to store data corresponding to these cases, for up to 80 tool positions.

  • Cases 3 and 5:

    A 5000 type record allows storing tip or profile coordinates, for up to 80 tool positions. A 10000 type record (sub-type: 0) allows storing P, Q, R data for these tool positions.

  • Cases 4 and 6:

    A 5000 type record allows storing tip or profile coordinates and associates tool axis vector components, for up to 40 tool positions (48 bytes per tool position). A 10000 type record (sub-type: 0) allows storing P, Q, R data for these tool positions (48 bytes per tool position; the 3 first doubles are set to 0).

  • Case 7:

    A 10000 type record (sub-type: 1) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position). A 5000 type record allows storing tip or profile coordinates for these tool positions. The maximum number of tool positions to be stored in both 5000 and 10000 type records is defined by the 10000 type record.

  • Case 8:

    A 5000 type record allows storing tip or profile coordinates and associates tool axis vector components, for up to 40 tool positions (48 bytes per tool position). A 10000 type record (sub-type: 1) allows storing Contact coordinates and Normal Vector components for these tool positions (48 bytes per tool position).

  • Case 9:

    A 10000 type record (sub-type: 2) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position). Sub-type 2 is similar to sub-type 1 used in previous cases, but the sub-type value allows to define if a 5000 type record is associated to the 10000 (value 1) or not (value 2). No data needs to be stored in a 5000 type record.

  • Case 10:

    A 10000 type record (sub-type: 3) allows storing Contact coordinates and Normal Vector components for up to 40 tool positions (48 bytes per tool position). Sub-type 3 is similar to sub-type 1 used in previous cases, but the sub-type value allows to define if the following 5000 type record associated to the 10000 contains x, y, z, i, j, k information (value 1) or only tool axis vector components (value 3). A 5000 type record allows storing tool axis vector components, for these tool positions.

Converting CLFiles Between Unix and Intel Platforms

There is a CLFile coding difference between Windows and Unix stations. CLFiles generated by V6 are always stored in Unix format. Therefore, using a CLFile created by V6 on Windows requires a conversion.

MfgClfileConvExe

A module called MfgClfileConvExe is delivered under Installation_Path\intel_a\code\bin that allows the conversion of CLFiles between the Unix and Intel platforms. The module recognizes automatically the format of the CLFile and converts it into the other format.

To run the conversion, use the following command:

MfgClfileConvExe -i input_clfile [-o output_clfile] [-rep]

where:

  • -i input_clfile is the CLFile to be converted, with access path (required).
  • -o output_clfile is the resulting CLFile, with access path (optional).

    If -o is not used, the resulting file is written in the temp folder and called ConvertedClfile.

  • -rep, if present, the conversion is done in replace mode

The module does not generate messages, but a return code is given with the following values:

  • 0: OK
  • 1: No input CLFile (required)
  • 2: No PP words table (required)
  • 3: The input CLFile does not exist
  • 4: PP words table loading problem
  • 5: Problem opening the input CLFile
  • 6: The output CLFile exists but cannot be replaced
  • 7: The output CLFile exists but there is no access permission
  • 8: The output CLFile exists but cannot be deleted
  • 9: Problem opening the output CLFile
  • 10: Problem closing the output CLFile
  • 11: Problem closing the input CLFile
  • 12: Internal error
  • 13: Problem reading a record of the input CLFile
  • 14: Conversion direction undetermined
  • 15: Write problem on record length
  • 16: Write problem on record