English / Metric Output
SURFCAM can be configured to output NC code in either English (inch) or Metric (millimeter) units. The output is affected by the system settings and the Post Processor word address, commands and variables.
To produce the NC code SURFCAM uses the INC file created when the geometry is cut. This INC file can be in either English or Metric units. This output is effected by the system settings when the geometry is created. The INC file values are defined by the input values when the geometry is created. When the system setting is in Inch mode for the geometry creation, the INC file output values are the same as those entered by the user. SURFCAM does not convert the geometry values to metric when the system setting is switched to MM units.
Note The INC file output unit is not the determining factor for the NC code output units.
The Post Processor uses INC file, Word Address, Inch/MM command, and unitmode variable to determine the NC code output units.
INC File
The INC file output units are determined by the Inches / MM command on the Options menu. The system default is for Inch output. When this option is selected the system uses millimeter input for all dialog boxes and the INC file is output in metric units.
Word Address
The Word Address can be used to convert an Inch INC file to millimeters by using the Mult modifier. This modifier only affects the Word Address for which it is coded. It must be used for each Word Address that requires the conversion.
Mult
The value after this command is used as a multiplier for all the values that will output for this word. The following example will output metric values:
X ->3.>4 Mult 25.4
|
INC File Value |
NC Code Output |
|
11. |
X279.4 |
|
2.5 |
X63.5 |
|
.2135 |
X5.4229 |
Note Division is accomplished by multiplying by the inverse. Mult .03937 converts metric to inches.
Inch/MM
The Inch/MM line indicates the numerical values of the G code that set the inch or millimeter programming mode on the NC machine. The code selected by the Post Processor is determined by the INC file output units. When the system is set to Inch, the Inch code is used. When the system is set to MM, the Metric code is used. For most machines, it is G70 and G71. The example below is entered in the POSTFORM file for a machine tool that uses G20 and G21 for inch and millimeter mode.
Inch/MM 20 21
The default for this command is 70 71 for mills and 20 21 for lathes.
Unitmode
This variable outputs the value for the G code defined by the Inch/MM command.
1stToolChange
M6 T[tool] ([0] d[toolrad] e[tooldiam] f[corner]
G0 G[unitmode] G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Note When the Mult modifier is used to convert the Word Address, this variable must not be used. The machine code for the units must be hard coded.
POSTFORM Formatting
The examples below show a variety of methods to output English or Metric unit NC code.
This example uses the system default of Inch units to create the geometry and the INC file. The NC code output units is Inches.
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G[unitmode] G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
G0 G70 G90 S2000 M3 E1 X1. Y1.
H1 M7 Z.1
This example uses the system MM units to create the geometry and the INC file. The NC code output units is Millimeters.
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G[unitmode] G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
G0 G71 G90 S2000 M3 E1 X25.4 Y25.4
H1 M7 Z2.54
This example uses the system default Inch units to create the geometry and the INC file. The NC code output units is Millimeters for the X and Y axis. The Mult modifier is used in the Word Address. The machine G code for the metric mode must be hard coded into the sequences.
X ->3.>4 Mult 25.4
Y ->3.>4 Mult 25.4
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G71 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
0 G71 G90 S2000 M3 E1 X25.4 Y25.4
H1 M7 Z.1
This example uses the system default MM units to create the geometry and the INC file. The NC code output units is Inches for the X and Y axis. The Mult modifier is used in the Word Address. The machine G code for the metric mode must be hard coded into the sequences.
X ->3.>4 Mult .03937
Y ->3.>4 Mult .03937
Inch/MM 70 71
1stToolChange
M6 T[tool]
G0 G70 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The output code:
M6 T1
G0 G70 G90 S2000 M3 E1 X1. Y1.
H1 M7 Z2.54