Incremental output is determined by the use of word address modifiers, commands and variables.
|
Word Address Modifiers: |
Inc |
|
|
Mult |
|
|
Sub |
|
Commands: |
Incremental? |
|
|
Inc/Abs |
|
Variables: |
incmode |
Abs/Inc
All output for this word will be incremental. The default is absolute. It can be coded although it is not necessary. The examples below output the Y values incrementally. The examples below also indicate the Y incremental move values based on the starting point of Y0.
Y ->3.>4 Inc
|
INC File Value |
NC Code Output |
|
11. |
Y11. |
|
-2.5 |
Y-13.5 |
|
.2135 |
Y2.7135 |
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.
Sub
Subtraction modifier added to the functionality of the post.
Example:
Z ->4.>3 sub 1
Will subtract 1 from every value that uses the Z address.
Incremental? — Mill, Lathe, EDM
This switch is used to set the machine output to the Incremental or Absolute mode.
Incremental? Y
This will cause the code to be output in Incremental. The machine can also require a G91. Ensure that a G91 code is placed in your StartCode or 1stToolChange sequence.
Note The Y can easily be changed to an N to result in absolute programs. Remember to remove the G91 in your StartCode or 1stToolChange sequence. When absolute and incremental programs are both used regularly, create two appropriate posts within the POSTFORM file.
When incremental output is desired, the Incremental? command should be entered as Y. This allows the post processor to output incremental code for the program.
Note When incremental output is desired, the POSTFORM file must recognize the motion letters as modal. This can be accomplished with the ModalLetters command.
The Inc/Abs line indicates the numerical values of the G code that set the incremental or absolute programming mode on the NC machine. The post processor issues a warning when a mode change command is processed. The default is shown below.
Inc/Abs G 91 90
The letter defines the NC code letter for these modes. The first number indicates the incremental code and the second indicates the absolute code. This NC code information is used by the incmode variable.
When these codes are hard coded into the POSTFORM file, the output code remains in the coded mode until changed. The example below shows a Subprogram that is incremental with an absolute main program.
SubStart
O[sub]
G91
End
SubEnd
G90
M99
End
The SubStart sequence hard codes the incremental mode for the subprogram. The subprogram remains in the incremental mode until the SubEnd sequence is used. This returns the program to the absolute mode for the main program.
When an absolute G code is hard coded, the Incremental? command has no effect on the output code. The incremental G code must be hard coded to ensure proper NC code output.
Incmode — Mill, Lathe, EDM
The incremental code defined by the Inc/Abs command is output for this variable.
ToolChange
M5 M9
G0 G49 G[incmode] Z0
M6 T[tool]
G0 G[incmode] S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
The incmode variable can be used to output the appropriate NC code defined by the Inc/Abs command. This variable will output a G90 when the Incremental? command is entered as N and the Inc/Abs command is entered as shown above. When Y is entered for the Incremental? command, the output is G91.
Note When the POSTFORM file encounters a hard coded mode, either G90 or G91, the Post uses that code for the remainder of the file. Use the incmode variable instead of hard coded variables to ensure the proper incmode variable output.
The examples below show the NC code output determined by the word address modifiers, commands and variables coded in the POSTFORM file.
This example used the Incremental? command as Y, yet hard codes the G90 for absolute mode.
|
Incremental? Y |
The output code |
|
Inc/Abs G 91 90 |
|
|
ToolChange |
|
|
M6 T[tool] |
M6 T1 |
|
G0 G90 S[speed] M[direct] |
G0 G90 S2000 M3 |
|
X[h] Y[v] |
X1. Y1. |
|
H[lcomp] Z[d] M[cool] |
H1 Z.1 M7 |
|
End |
|
This example sets the Incremental? command at N, yet hard codes a G91 for the incremental mode.
|
Incremental? N |
The output code |
|
Inc/Abs G 91 90 |
|
|
ToolChange |
|
|
M6 T[tool] |
M6 T1 |
|
G0 G91 S[speed] M[direct] |
G0 G91 S2000 M3 |
|
X[h] Y[v] |
X0 Y0 |
|
H[lcomp] Z[d] M[cool] |
H1 Z.1 M7 |
|
End |
|
This example uses the incmode variable to output the incremental set in the Inc/Abs command.
|
Incremental? Y |
The output code |
|
Inc/Abs G 91 90 |
The G91 code is determined by the Inc/Abs command line above. |
|
ToolChange |
|
|
M6 T[tool] |
M6 T1 |
|
G0 G[incmode] S[speed] M[direct] |
G0 G91 S2000 M3 |
|
X[h] Y[v] |
X0 Y0 |
|
H[lcomp] Z[d] M[cool] |
H1 Z.1 M7 |
|
End |
|
This example shows the absolute output using the incmode variable.
|
Incremental? N |
The output code |
|
Inc/Abs G 91 90 |
|
|
ToolChange |
|
|
M6 T[tool] |
M6 T1 |
|
G0 G[incmode] S[speed] M[direct] |
G0 G90 S2000 M3 |
|
X[h] Y[v] |
X1. Y1. |
|
H[lcomp] Z[d] M[cool] |
H1 Z.1 M7 |
|
End |
|
This example shows a sequence that toggles between absolute and incremental output.
|
Incremental? N |
The output code |
|
Inc/Abs G 91 90 |
|
|
|
|
|
ToolChange |
|
|
G0 G91 G28 Z0 |
G0 G91 G28 Z0 |
|
M6 T[tool] |
M6 T1 |
|
G0 G90 S[speed] M[direct] |
G0 G90 S2000 M3 |
|
X[h] Y[v] |
X1. Y1. |
|
H[lcomp] Z[d] M[cool] |
H1 Z.1 M7 |
|
End |
|