Global Variables
This variable outputs the radius of the arc.
CwCode
G11 I[ival] J[jval] R[arcrad] C[startang]
G12 C[endang]
End
Related Variables: endang, startang
A Block number is output for this variable. It is incremented according to the Sequence#s line. See Block Number Output.
N[block] T[tool] M6
G0 G90 S[speed] M[direct]
X[h] Y[v]
This variable identifies the number of thread to cut for the taper out move.
Related Variables: passes, tipang, tparams
This variable outputs a Lathe compensated T number.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4
M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
The Coolant value, defined by the Coolant command for on, off, or mist is output for this variable.
ToolChange
M5 M9
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: coolantoff
This variable outputs a coolant off command as defined by the Coolant command.
ToolChange
M5 M[coolantoff]
G0 G49 G90 Z0
E0 X0 Y0
M6 T[tool1]
M2
Related Variables: cool
This variable outputs the current depth value.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: h, v, endh, endv, homeh, homev, lastd, lasth, lastv
This outputs the Diameter compensation offset number. It is used when cutter compensation is desired in the NC program.
Infeed
H[lcomp] D[dcomp] Z[d]
G1 G[side] X[h] Y[v] F[frate]
End
Related Variables: hcdc, vcdc, lcomp
This variable outputs the distance the depth axis moves during the current move. This variable is not specifically coded in the POSTFORM file.
Related Variables: hdist, vdist.
This variable outputs the depth of the upcoming cycle for milling machines and the total depth of thread for lathes.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
The M code value of the Spindle direction is output with this variable. The value is defined by the CW and CCW commands.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
This variable outputs the Dwell value.
Drill 3
S0
Z[d]
X[h] Y[v] G81
L2 M61
G4 P[dwell]
L2 M62
G4 P[dwell]
End
The ending angle of an arc is output for this variable.
CwCode
G11 I[ival] J[jval] R[arcrad] C[startang]
G12 C[endang]
End
Related Variables: arcrad, lastrotang, rotangle, startang
The G code for IPR and IPM output that is set with the FeedType command is output for this variable.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4
M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
Related Variables: frate, plunge.
This variable is similar to the cool variable. The options are low, off, medium, and high.
This is the same as cool.
This variable outputs the Feed Rate value.
Drill
G81 G99 R[vclear] Z[d] F[frate] X[h] Y[v]
End Cancel
Related Variables: feedtype, plunge
This variable outputs the Z axis gauge length for both mills and lathes.
This variable outputs the current horizontal value.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: d, v, endh, ednv, homeh, homev, lastd, lasth, lastv
This variable outputs the current horizontal value for the auxiliary second plane.
Related Variables: v2
This variable outputs the horizontal component of the cutter diameter compensation vector for older machine tools.
Linecode
G79 X[h] Y[v] E0 H0 P[hcdc] Q[vcdc] F[frate]
End
Related Variables: dcomp, lcomp, vcdc
This variable outputs the absolute horizontal center value of an arc.
CwCode
c0 I[hctr] J[vctr] K[d]
I0.0 J0.0 K1.0
x[h] y[v] z[d]
End
Related Variables: vctr.
This variable outputs the horizontal distance the axis moves during the current move. This variable is not specifically coded in the POSTFORM file.
Related Variables: ddist, vdist
The horizontal home position for Lathes is output for this variable.
EndCode
G0 X[homeh] Z[homev] T[tool] t0 M5
M30
%0
End
Related Variables: d, h, v, endh, endv, homev, lastd, lasth, lastv
The vertical home position for Lathes is output for this variable.
EndCode
G0 X[homeh] Z[homev] T[tool] t0 M5
M30
%0
End
Related Variables: d, h, v, endh, endv, homeh, lastd, lasth, lastv
This variable outputs the horizontal vector direction of the first completely compensated cutting move. It is used on machines that do not have look ahead ability to indicate which way the tool is going to go on the move after the infeed.
Infeed
G1 X[h] Y[v] F[frate]
G91
G1 A[hvector] B[vvector]
G[side] I[hvector] J[vvector] D[dcomp]
G90
G86 R-.1 Z[d] F[plunge] D[lcomp]
F[frate]
End
The following example shows the use of this variable for the AGIE EDM machine tool.
Infeed
G1 x[hvector] y[vvector] G44
G1 X[h] Y[v] G40
End
Related Variables: vvector
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
This variable is the initial depth where cutting begins.
ToolChange
M5 M9
G0 G49 G90 Z0
M6 T[tool]
G0 G90 S[speed] M[direct] X[h] Y[v]
H[lcomp] M[cool] Z[d]
G83 R[vclear] z[inidep] F[frate] Q[vbite] X[h] Y[v]
G80
End
Related Variables: plunge, rplane
This is the value entered in the Init'l Power field.
This variable outputs the inverse time for 4 axis motion. Check the machine manual to determine the correct letter format to use for the InvTime variable. Not all machine tools use the letter F. Some machine tools may also require the use of the G93 code.
LineCode
G1 X[h] Y[v] Z[d] F[InvTime]
End
Related Variables: movelength, movetime
This variable outputs the X axis coordinates of the center of an arc. The incremental or absolute output is determined by the CtrIncremental? command.
CcwCode
F[frate]
X[h] Y[v] I[ival] J[jval]
End
Related Variables: ivect, jval, jvect, kvect
This variable is used to describe the normal X axis vectors for 3D cutter compensation used by some machines. They can be added to a LineCode sequence as follows:
LineCode
G1 X[h] Y[v] Z[d] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, jval, jvect, kvect
Note Requires SURFCAM 5 axis.
This variable outputs the Y axis coordinates of the center of an arc. The incremental or absolute output is determined by the CtrIncremental? command.
CcwCode
F[frate]
X[h] Y[v] I[ival] J[jval]
End
Related Variables: ival, ivect, jvect, kvect
This variable is used to describe the normal Y axis vectors for 3D cutter compensation used by some machines. They can be added to a LineCode sequence as follows:
LineCode
G1 X[h] Y[v] Z[d] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, ivect, jval, kvect
Note Requires SURFCAM 5 axis.
This variable is used to describe the normal Z axis vectors for 3D cutter compensation used by some machines. They can be added to a LineCode sequence as follows:
LineCode
G1 X[h] Y[v] I[ivect] J[jvect] K[kvect] F[frate]
End
Related Variables: ival, ivect, jval, jvect.
Note Requires SURFCAM 5 axis
The position of the last depth move is output for this variable.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lasth, lastv
The position of the last horizontal move is output for this variable.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lastd, lastv
Some controls require a M99 at the end of a drilling cycle rather then a G80.
Heidenhain 2500B is similar to a Fanuc G80 but the M99 must be on the same line as the last X, Y, or it drills the hole twice. The [LastHole] variable that gets set to 1 if the hole currently being processed is the last one in the cycle. (Otherwise, it's set to 0.)
This variable can be used inside any canned cycle to differentiate between the last hole and all others.
Following is an example of the changes needed in the postform file:
|
|
Drill 2 |
# Drilling canned/manual cycle |
|
|
if [LastHole] = 1 |
|
|
|
G<81> X<H> Y<V> Z<D> R<Vclear> F<FRate> M99 |
|
|
|
else |
|
|
|
G<81> X<H> Y<V> Z<D> R<Vclear> F<FRate> |
|
|
|
endif |
|
|
|
|
|
|
|
if [LastHole] = 1 |
|
|
|
X<H> Y<V> Z<D> R<Vclear> F<FRate> M99 |
|
|
|
else |
|
|
|
X<H> Y<V> Z<D> R<Vclear> F<FRate> |
|
|
|
Endif |
|
This variable outputs the previous rotary axis position.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: arcrad, endang, rotangle, startang, sweep
This variable outputs the tool number of the previous tool.
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
M6 T[lasttool]
End
Related Variables: nexttool, tool, tool1.
The position of the last vertical move is output for this variable
UnWind
G0 G49 G90 Z0
A0
E[work]
H[lcomp] M[cool] Z[d]
G0 X[lasth] Y[lastv] A[lastrotang]
G1 Z[lastd]
End
Related Variables: d, h, v, endh, endv, homeh, homev, lastd, lasth
This variable outputs the length compensation offset number. It is output for milling machines only.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: dcomp, hcdc, vcdc
This is the distance from the bottom of the part to the lower guide.
This variable outputs the total chordal length of the current move. It does not consider the 4 axis motion, it is the difference in location from the start location to the end location of the axis position. This code is not specifically coded in the POSTFORM file.
Related Variables: movetime, InvTime
This variable determines the amount of time the machine should require to execute the current movement. It is equal to the movelength value divided by the frate value. This code is not specifically coded in the POSTFORM file.
Related Variables: movelength, InvTime
This variable outputs the tool number of the next tool to be used. This can be used to index the tool changer before the next tool change.
1stToolChange
M6
G0 G90 S[speed] M[direct]
X[h] Y[v]
G43 H[lcomp] Z[d] T[nexttool]
M[cool]
End
Related Variables: lasttool, tool, tool1
This variable identifies the number of spring passes for thread cutting.
Related Variables: chams, tipang, tparams
This is the depth of the first thread pass for the G76 cycle. It is used for Lathes only.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
This is the number of threads per unit.
This variable outputs the plunge feed rate value.
1stToolChange
G90 M[direct] S[speed]
G80 T[tool] M06
G00 X[h] Y[v] F[frate]
G86 R-0001 Z[d] F[plunge] D[lcomp]
End
Related Variables: inidep, rplane
This variable is used when the machine tool requires the hole depth to be described from the surface of the part.
Drill
G81 X[h] Y[v] Z[pointd] R[vclear] F[frate]
End Cancel
Related Variables: d
This is the value entered in the Power Setting field.
Return Plane Variable sets the value defined by the RetractPlane command for output in the NCC code (Drilling Cycles).
Drill
G81 G[RetPlane] X[H] Y[V] ...
end
- G98 when the tool should rapid at the (higher) initial plane (the post's [RPlane] level), or
- a G99 when the tool should rapid at the (lower) rapid level (the post's [VClear] level).
SURFCAM posts sets to the value of 1 during a rigid tapping cycle. During any other cycle, [Rigid] is set to 0. Use an IF line to detect rigid tapping and output the appropriate code(s) in the TAP and CANCEL sequences.
Tap
If [Rigid] > 0
G93 G93 to lock Z to spindle rotation.
G84 X[H] Y[V] Z[D] K[VBite] J0 R[VClear] F[FRate]
else
G84 X[H] Y[V] Z[D] R[VClear] F[FRate] Normal (non-rigid) tap.
endif
end cancel
Note The [Rigid] variable is not reset until the start of the next cycle, it can be used in the CANCEL sequence as well as the TAP sequence.
cancel
G80
if [Rigid] > 0
G94 Unlock Z if w/ rigid tap.
endif
end
The rotary angle position in degrees is output for this variable.
Index X
G0 G49 G90 Z0
X[h] Y [v] E[val1] A[rotangle]
H[comp] M[cool] Z[d]
End
Related Variables: arcrad, endang, lastrotang, startang, sweep
This variable reports the direction of 4 axis moves, CCW motion reports '1' & CW motion reports '-1'.
This variable outputs the Z dimension of the Rapid Plane for milling machines only.
Drill 3
H[lcomp] M[cool] Z[rplane]
G81 Z[d] R[vclear] F[frate]
X[h] Y[v]
End
Related Variables: inidep, rplane
This is the Side cut amount output.
Peck
G74 R[depth]
G74 Z[h] Q[sbite] F[frate]
End
Related Variables: sclear, sleave, vbite, vclear, vleave
This variable outputs the Side Clearance amount.
Back
G76 G99 R[vclear] z[d] F[frate] Q[sclear] X[h] Y[v]
End Cancel
Related Variables: sbite, sleave, vbite, vclear, vleave
The Cutter compensation side value is output for this variable. It is determined by the DComp command entered in the POSTFORM file.
Infeed
G1 G[side] X[h] Y[v] F[frate]
End
This variable outputs the Side Leave amount.
Outfeed
G1 G40 X[sleave] Y[sleave] F[frate]
End
Related Variables: sbite, sclear, vbite, vclear, vleave
This is the value entered in the Spark gap field.
The Spindle speed value is output for this variable.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: speedtype
This is the Speed code defined by the SpeedType command. This variable is for Lathe machines only.
1stToolChange
O[comp] G90 S[speed] M42
G[feedtype] M31
G92 S[maxrpm]
G0 X.4 Z.4 M[direct]
V77 T[tool] M6
G0 X[v] Z[h] M32
G[speedtype] R[v] S[speed]
End
Related Variables: speed, maxrpm
This outputs the Starting Angle of an arc.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
Related Variables: arcrad, endang, lastrotang, rotangle, sweep
Stop codes, M0 or M1, are placed at the end of the first cutting pass and at the end of the tab cutting pass.
This variable outputs the Subprogram number.
SubCall
E[work] X[h] Y[v]
M[98] P[sub] L[times]
End
Related Variables: subline, times
This variable outputs the N number for the Subprogram.
SubCall
E[work] X[h] Y[v]
M98 P[subline] L[times]
End
Related Variables: sub, times
This is used to output the span of an arc. It is measured in degrees. This is typically used with the CcwCode and CwCode sequences. The value output for clockwise arcs is negative; use the MULT modifier or RevSign to reverse the output when required.
CwCode
I[hctr] J[vctr]
C2 A[sweep]
End
Related Variables: arcrad, endang, lastrotang, rotangle, startang
This is the value entered in the Taper field.
It is the difference in height at the start and end of the thread. It is usually an I value.
Lathe example:
AutoThread
G76 A[tparams] Q[vbite] I[taper] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
EDM example:
LineCode
G1 X[H] Y[V] A[taper]
End
This is the thickness of the material being cut.
This variable outputs the number of repetitions for the Subprogram.
SubCall
E[work] X[h] Y[v]
M98 P[subline] L[times]
End
Related Variables: sub, subline
This variable identifies the angle on the cutting tool.
Related Variables: passes, chams, tparams
This variable outputs the current Tool number.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: lasttool, nexttool, tool1
This is the tool number of the first tool in the program. It is usually referenced in the EndCode section to return the turret to tool position number one at the end of the program.
EndCode
M5 M9
G0 G49 G90 Z0
E0 X0 Y0
M6 T[tool1]
M2
%0
End
Related Variables: lasttool, nexttool, tool
Category: Motion Attributes
This is an ESTIMATE of the total distance the tool has traveled (so far) while in FEED mode. (Not rapid.) This is typically used in the EndCode sequence to display the overall estimated CUTTING (not including rapid) time as in this example:
EndCode
M30%0'
(EST._FEED_TIME:_' t[TotalCutTime] '_MIN._[' t[TotalCutDist] '_IN.])'
End
Related Variables: TotalCutTime, MoveLength
Category: Motion Attributes
This is an ESTIMATE of the total TIME (in minutes) that the tool has spent (so far) while in FEED mode. (Does not include rapid moves.) See usage example immediately above.
Related Variables: TotalCutDist, MoveTime
This is a six digit code containing three parameters that consist of two digits each. These digits are defined in the following example:
A010360
|
A |
Identifies the axis letter designation. |
|
01 |
Identifies the number of spring passes. |
|
03 |
Identifies the number of threads to cut for the taper out move. |
|
60 |
Indicates the "Infeed angle" that is set on the Thread Control page. |
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] R[startang] P[depth] q[peck1] F[frate]
End
Related Variables: chams, passes, tipang
The number of the currently active turret. This variable is for Lathe only.
ToolChange
G0 T[lasttool] t0 Z[h] M5
D[turret]
T[tool] t0
G[feedtype] G[speedtype] S[speed] M[direct]
G0 X[v] Z[h] T[tool] t[lcomp] M[cool]
End
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
This is the distance from the top of the part to the upper guide.
The current Vertical value is output.
1stToolChange
M6 T[tool]
G0 G90 S[speed] M[direct] E[work] X[h] Y[v]
H[lcomp] M[cool] Z[d]
End
Related Variables: d, h, endh, endv, homeh, homev, lastd, lasth, lastv
This variable outputs the current vertical value for the auxiliary second plane.
Related Variables: h2
These values are defined by the Ask command.
Index X
Ask [val1] "Enter the fixture offset number?" "1"
G0 G49 G90 Z0
X[h] Y[v] E[val1] A[rotangle]
H[lcomp] M[cool] Z[d]
End
This is the Vertical cut amount for vmilling machines. This variable also describes the minimum depth of the G76 threading cycle for Lathe.
LTap
G74 G99 R[vclear] Z[d] F[frate] Q[vbite] X[h] Y[v]
End Cancel
Related Variables: sbite, sclear, sleave, vclear, vleave
This variable outputs the vertical component of the cutter diameter compensation vectorv in older Cincinnati formats.
Linecode
G79 X[h] Y[v] H0 P[hcdc] Q[vcdc] F[frate]
End
Related Variables: dcomp, hcdc, lcomp
This variable outputs the Vertical Clearance amount for milling machines only.
LTap
G74 G99 R[vclear] Z[d] F[frate] Q[vbite]
X[h] Y[v]
End
Related Variables: sbite, sclear, sleave, vbite, vleave
This variable outputs the absolute Vertical Center value of an arc.
CwCode
c0 I[hctr] J[vctr] K[d]
I0.0 J0.0 K1.0
x[h] y[v] z[d]
End
Related Variables: hctr
This variable outputs the vertical distance the axis moves during the current move. This variable is not specifically coded in the POSTFORM file.
Related Variables: ddist, hdist
This variable outputs the X axis gauge length for lathes, 0 for mills.
The Vertical Leave amount is output for this variable.
AutoThread
G76 A[tparams] Q[vbite] R0
G76 X[v] Z[h] P[peck1] Q[vleave] R0 F[frate]
End
Related Variables: sbite, sclear, sleave, vbite, vclear
This variable outputs the vertical vector direction of the first completely compensated cutting move. It is used on machines that do not have look ahead ability to indicate which way the tool is going to go on the move after the infeed.
Infeed
G1 X[h] Y[v] F[frate]
G91
G1 A[hvector] B[vvector]
G[side] I[hvector] J[vvector] D[dcomp]
G90
G[86] R-.1 Z[d] F[plunge] D[lcomp]
F[frate]
End
The example below shows the use of this variable for the AGIE EDM machine tool:
Infeed
G1 x[hvector] y[vvector] G44
G1 X[h] Y[v] G40
End
Related Variables: hvector
This is the value entered in the Wirefeed field.