Most of the examples are taken from the standard postprocessors provided.
- TIME
-
Grammar: TIME / val
Action:
Adds a time in minutes to the postprocessor’s total time.
Relevant variables: ETAT0.time= ETAT0.time + val
Macro call: no
- TLAXIS
-
Grammar: TLAXIS / val0
TLAXIS / val1, val2, val3
Action:
If val0: definition of the tool length compensation axis and the drilling axis.
1 = X, 2 = Y, Z = 3 -1 = -X, -2 = -Y, -3 = -Z
If (val1, val2, val3): defines the tool orientation using these coordinates in the
workpiece coordinate system. The corresponding position will be reached in the next
motion block.
Relevant variables:
- ETAT0.tlaxis = val0
- ETAT0.pts[4] = val1
- ETAT0.pts[5] = val2
- ETAT0.pts[6] = val3
Macro call: yes
- TLON
-
Syntax: TLON
Action:
Defines the tool’s position relative to the profile. This instruction is used with
the GOFWD, GOLFT, and GORGT functions. The tool positions itself on the profile.
Relevant variables:none
Macro call: yes
Example: excerpt from an APTfile AUTOPS
INDIRV/ -.98291, -.18408, .00000
TLON,GOFWD/ (CIRCLE/ -22.55961, 35.93804, 48.00000,$
10.00000),ON,(LINE/ -22.55961, 35.93804, 48.00000,$
-32.45586, 37.37480, 48.00000)
GOTO / -42.43755, -31.37838, 48.00000
- TOLIB
-
Grammar: TOLIB / val1, val2, val3, val4, val5, val6, val7, val8
Action:
Storing the tools used for reference in the FINI macro, for example.
- val1 = tool number
- val2 = tool diameter
- val3 = tool cutting length
- val4 = toolform radius
- val5 = tool angle
- val6 = total tool length
- val7 = shank diameter
- val8 = tool type
If TOLIB has only one argument, the function uses the tool definition with CUTTER,
including the CUTTER.ref comment
Relevant variables:
- TOOLIB.max:number of tools used
- TOOLIB.num[] = val1
- TOOLIB.D[] = val2
- TOOLIB.L[]= val3
- TOOLIB.r[] = val4
- TOOLIB.a[] = val5
- TOOLIB.l[] = val6
- TOOLIB.q[] = val7
- TOOLIB.type[]= val8
- TOOLIB.ref CUTTER
Macro call: No
Example: excerpt from the LOADTL
macro LOADTL.num = VAL("VALUE",1) LOADTL.osetno = VAL("VALUE",1)
STATE0.delete = 2
TOOLIB / LOADTL.num, CUTTER.d, CUTTER.h
$$ ENDIF
$$
IF ( NVAL("LENGTH") ) THEN LOADTL.length = VAL("LENGTH",1)
CUTTER.h = LOADTL.length
TOOLIB / LOADTL.num, CUTTER.d, CUTTER.h ENDIF
$$
IF ( NVAL("RADIUS") ) THEN CUTTER.d = 2*VAL("RADIUS",1)
TOOLIB / LOADTL.num, CUTTER.d, CUTTER.h ENDIF
- TOLREF
-
Grammar:
TOLREF / num “,” ref
Action:
Saves the tool reference.
- num= tool number
- ref = tool reference
Relevant variables:
- TOOLIB.max: number of tools used
- TOOLIB.num[] = num
- TOOLIB.ref[]: fields are separated by the ‘|’ character
Macro call: no
Example: excerpt from the FINI macro. $$ PRINT
PRINT " tools used : " FORMAT(2,TOOLIB.max) PRINT
LOOP(i,1,1,TOOLIB.max)
text = " D = " FORMAT(1,TOOLIB.D[i]) text
= text + " R = " FORMAT(1,TOOLIB.r[i])
text = text + " length = " FORMAT(1,TOOLIB.L[i]) text = text + " ref = " STRXGET(TOOLIB.ref,i,"|")
PRINT " > tool " FORMAT(2,TOOLIB.num[i]) + text
ENDLOOP PRINT
$$
- TPRINT
-
Grammar:
TPRINT / ‘tool comment’
Action:
Definition of the tool comment and copy to CUTTER.ref
Affected variables: none
Macro call: yes
- TRACUT
-
Syntax: TRACUT / matrix
TRACUT / NOMORE
Action:
Definition of a 4x3 matrix that will be applied to all subsequent coordinates,
including GOTO, FROM, GODLTA, GOLFT, GORGT, GOFWD, etc. The first three rows of the
matrix define the orientation; the fourthrow defines the translation.
- TRACUT / matrix: Enable the TRACUT matrix /
- NOMORE: Disable this matrix
Relevant variables: DATUM[12]: matrix applied to displacement coordinates
Macro call: yes
Example: symmetry with respect to the X and Y
axes. TRACUT / ( MATRIX / -1 , 0 , 0 , 0 , 0 , -1 , 0 , 0 , 0 , 0 , 1 , 0 )
- TRANS
-
Syntax:
TRANS / x, y, z
Action:
The part coordinates will be translated by the vector (x, y, z).
Related variables:
- TRANS[1] = TRANS[1] + val1
- TRANS[2] = TRANS[2] + val2
- TRANS[3] = TRANS[3] + val3
Macro call: yes
- UCODE
-
Syntax: UCODE / val1, val2
Action:
Writes a U code with the value val1 to the ribbon file, subject to the output
conditions val2. The variable ETAT0.xyzabc[7] and the runs are updated.
- val2 = 0 The code is generated according to its specifications.
- val2 = 1 The code is generated regardless of its conditions.
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[7] is
updated.
UCODE without an argument: the value of U will be generated in the next motion block.
The address of the corresponding code is defined by the variable CODE.used[9]
Relevant variables:
ETAT0.xyzabc[7]
LIMIT.max[7]
LIMIT.min[7]
CODE.used[9]
Macro call: no
Example: see XCODE
- UNITS
-
Grammar:
UNITS / MM
UNITS / CM
UNITS / INCH
UNITS / FT
Action:
Definition of the unit system.
- MM = millimeter
- CM= centimeter
- INCH = inch
- FT = foot
Relevant variables: none
Macro call: no
- UPDATE
-
Syntax: UPDATE
UPDATA / ON
UPDATE / OFF
Action:
No arguments: Closes the current block and updates the current state to the previous
state (STATE1 = STATE0 + EOB). If UPDATE.on is -1, the update is partial because the
previous GOTO block had no movement.
ON (default): The UPDATE function is performed by the GOTO, GOCIR, GODLTA, and
GOCYCL.mode instructions. UPDATE.on is set to 1
OFF: The UPDATE function is no longer performed by the GOTO, GOCIR, GODLTA, and
GOCYCL instructions, in order to add additional code to the current block or to
retrieve the circle calculation before it is generated.
Related variables: UPDATE.on
ETAT0
ETAT1
Macro call: no
Example: GOCIR macro from the HEIDENHAIN postprocessor $$
CODE / 3, 0.0
xyz = XYZ( ARG1.val[1] , ARG1.val[2] , ARG1.val[3])
CODE / 8, xyz[1] CODE / 9, xyz[2] ZCODE / xyz[3], -1 EOB
$$
STATE1.move = STATE0.move UPDATE / OFF
GOCIR
$$
CODE / 4, 0.0
IF ( STATE0.move .EQ. 2 ) CODE / 11 , -1.1 IF ( STATE0.move .EQ. 3 ) CODE / 11 , +1.1 UPDATE
UPDATE / ON
$$
- VCODE
-
Grammar: VCODE / val1, val2
Action:
Writes a V code with the value val1 to the ribbon file, subject to the output
conditions val2. The variable ETAT0.xyzabc[8] and the runs are updated.
- val2 = 0 The code is generated according to its mode
- val2 = 1 The code must be generated
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[8] is updated
VCODE without an argument: the value of V will be generated at the next motion
block. The address of the corresponding code is defined by the variable
CODE.used[10].
Relevant variables: ETAT0.xyzabc[8]
LIMIT.max[8]
LIMIT.min[8]
CODE.used[10]
Macro call: no
Example: see XCODE
- VECTOR
-
Syntax:
VECTOR / val1, val2, val3
Action:
Definition of a vector entity by these coordinates. (val1, val2, val3): IJK
coordinates of the vector
Related variables: none
Macro call: no
Example: excerpt from an APT
file GOTO / 200.99785, -41.64583, -30.93251
INDIRV/ .00000, -1.00000, .00000
TLON,GOFWD/(CYLNDR/ 198.99785, -41.64583, -30.93251,$
.00000, .00000, -1.00000, 2.00000),ON,$ (PLANE/PERPTO,$
(PLANE/(POINT/ 198.99785, -41.64583, -30.93251),PERPTO,$
(VECTOR/ .000000, .000000,-1.000000)),$
(POINT/ 198.99785, -41.64583, -30.93251),$
(POINT/ 198.99785, -43.64583, -30.93251))
GOTO / 182.99785, -43.64583, -30.93251
- WARNING
-
Grammar:
WARNING / ‘warning message’
Action:
Displays a warning message on the screen; the warning variable is incremented. The
message is written to the ‘INFO’ file.
Relevant variables: SGP.attention:number of warnings during processing
Macro call: no
- WCODE
-
Syntax: WCODE / val1, val2
Action:
Writes a W code with the value val1 to the ribbon file, subject to the output
conditions val2. The variable ETAT0.xyzabc[9] and the runs are updated.
- val2 = 0 The code is generated according to its specifications.
- val2 = 1 The code is generated regardless of its conditions.
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[9] is
updated.
WCODE without an argument: the value of W will be generated in the next motion block.
The address of the corresponding code is defined by the variable CODE.used[11]
Relevant variables: ETAT0.xyzabc[9]
LIMIT.max[9]
LIMIT.min[9]
CODE.used[11]
Macro call: no
Example: see XCODE
- WRITE
-
Syntax: WRITE "string"
Action:
Writes a string to a block in the ribbon file. This string can consist of numeric or
text variables.
Relevant variables: none
Macro call: no
Example: WRITE"X" X " T" FORMAT(1,T) out --> X1.0000 T2
- WRITE1, WRITE2, WRITE3, WRITE4, WRITE5
-
Syntax:
WRITE1 "character string"
WRITE2 "character string"
WRITE3 "character string"
WRITE4 "character string"
WRITE5 "character string"
Action:
Writes a string to an nctapefile if n=1,3,4,5 or to an aptfile if n=2, opened with
OPENn. This string can consist of numeric or text variables.
Relevant variables: none
Macro call: no
Example: Excerpt from the INIT macro for AGIE SBL format. $$
RENAME / UPPER(SGP.output[1,8]) + ".SBL"
OPEN1 / UPPER(SGP.output[1,8]) + ".SBR" version
= "AGIE.VERSION 4,02.03.00;"
WRITE1 / version
WRITE1 / ".LONGNAME " SGP.output ";"
$$
- XCODE
-
Grammar: XCODE / val1, val2
Action:
Writes an X code with the value val1 to the ribbon file, subject to the output
conditions val2. The variable ETAT0.xyzabc[1] and the runs are updated.
- val2 = 0 The code is generated according to its mode.
- val2 = 1 The code is generated regardless
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[1] is
updated.
When XCODE is called without an argument, the value of X will be generated in the
next motion block. The address of the corresponding code is defined by the variable
CODE.used[3]
Relevant variables: ETAT0.xyzabc[1]
LIMIT.max[1]
LIMIT.min[1]
CODE.used[3]
Macro call: no
Example: Excerpt from the GOCYCL macro for the MAHO postprocessor $$
XYZ = XYZ ( ARG1.val[1] , ARG1.val[2] , ARG1.val[3] ) XCODE / XYZ[1] , 1
YCODE / XYZ[2], 1 ZCODE / XYZ[3], 1
FCODE / CYCLE.fedval GCODE
/ 79
EOB
$$
- XYZCODE
-
Syntax: XYZCODE / val0, val1, val2
Action:
Writes a code X, Y, or Z with the value val1 to the ribbon file, subject to the
output conditions val2. The variable ETAT0.xyzabc[val0] and the stroke counts are updated.
- val0 = 1 for X, 2 for Y, 3 for Z
- val2 = 0 The code is generated according to its mode
- val2 = 1 The code must be generated
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[1] is
updated.
XYZCODE without arguments: the values of X, Y, and Z will be generated in the next
motion block. The address of the corresponding code is defined by the variable
CODE.used[2+val0].
Relevant variables: ETAT0.xyzabc[val0]
LIMIT.max[val0]
LIMIT.min[val0]
CODE.used[2+val0]
Macro call: no
- XYPLANE
-
Syntax: XYPLANE / XYZ, val2
XYPLANE
Action:
Writes the X, Y, or Z codes to the ribbon file based on the plane defined by
ETAT0.plane, subject to the output conditions specified by val2. The positions are
updated.
- If ETAT0.plane = 1: writes X and Y (ETAT0.xyzabc[1] and ETAT0.xyzabc[2])
- If ETAT0.plane = 2: writes Z and X (ETAT0.xyzabc[3] and ETAT0.xyzabc[1])
- If ETAT0.plane = 3: writes Y and Z (ETAT0.xyzabc[2] and ETAT0.xyzabc[3])
- val2 = 0 The code is generated according to its conditions
- val2 = 1 The code must be generated
- val2 = -1 The code is not generated, but the ETAT0.xyzabc[n] variables are
updated.
XYPLANE without arguments: the values of X, Y, or Z (depending on ETAT0.plane) will
be generated in the next motion block.
Relevant variables: ETAT0.plane
ETAT0.xyzabc[]
LIMIT.max[]
LIMIT.min[]
Macro call: yes
Example: Excerpt from the GOTO macro for the HEIDEN
postprocessor. ETAT0.pts[1] = VEC(ARG1.val[1], ARG1.val[2], ARG1.val[3])
ETAT0.pts[4] = VEC(ijk[1], ijk[2], ijk[3])
ETAT0.xyzabc = XYZ(ARG1.val[1], ARG1.val[2], ARG1.val[3])
$$
$$ XY movement(C)
$$
CODE / 2, 0.0 XYPLANE / XYZ, 1.0
IF ( ABC.type[3] = 1 ) CCODE / ETAT0.xyzabc[6] , 1.0 CODE / 14 , 0.0 , 1
CUTCOM.out = 0
FEED / 0 UPDATE
$$
$$ at least 1 head (XYAB)
$$
IF ( MACHIN.type > 1 ) THEN RTCP / ON
XYPLANE / XYZ
IF ( ABC.type[1] = 1 ) ACODE / ETAT0.xyzabc[4], 1.0 IF ( ABC.type[2] = 1 ) BCODE / ETAT0.xyzabc[5], 1.0 ENDIF
$$
$$ Z movement
$$
CODE / 2 , 0.0 ZPLANE / XYZ , 1.0 FEED / 0
UPDATE
- YCODE
-
Grammar: YCODE / val1, val2
Action:
Writes a Y code with the value val1 to the ribbon file, subject to the output
conditions val2. The variable ETAT0.xyzabc[2] and the runs are updated.
- val2 = 0 The code is generated according to its conditions
- val2 = 1 The code must be generated
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[2] is
updated.
YCODE without an argument: the value of Y will be generated in the next motion block.
The address of the corresponding code is defined by the variable CODE.used[4].
Relevant variables: ETAT0.xyzabc[2]
LIMIT.max[2]
LIMIT.min[2]
CODE.used[4]
Macro call: No
Example: see XCODE
- ZCODE
-
Syntax: ZCODE / val1, val2
Action:
Writesa Z code with the value val1 to the ribbon file, while adhering to the output
conditions val2. The variable ETAT0.xyzabc[3] and the strokes are updated.
- val2 = 0 The code is generated according to its specifications.
- val2 = 1 The code is generated regardless of the conditions.
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[3] is
updated.
ZCODE without an argument: the value of Z will be generated in the next motion
block. The address of the corresponding code is defined by the variable CODE.used[5]
Relevant variables: ETAT0.xyzabc[3]
LIMIT.max[3]
LIMIT.min[3]
CODE.used[5]
Macro call: yes
Example: see XCODE
- ZPLANE
-
Syntax: ZPLANE / val1, val2
ZPLANE / XYZ, val2
Action:
Writes the X, Y, or Z code to the ribbon file according to the plane defined by
ETAT0.plane, while respecting the output conditions specified by val2. The positions
are updated.
- If XYZ: val1 = ETAT0.xyzabc[]
- If ETAT0.plane = 1: write Z (val1 or ETAT0.xyzabc[3] if XYZ)
- If ETAT0.plane = 2: write Y (val1 or ETAT0.xyzabc[2] if XYZ) I
- f ETAT0.plane = 3: write X (val1 or ETAT0.xyzabc[1] if XYZ)
- val2 = 0 The code is generated according to this condition
- val2 = 1 The code must be generated
- val2 = -1 The code is not generated, but the variable ETAT0.xyzabc[] is
updated.
ZPLANE without an argument: the value of X, Y, or Z (depending on ETAT0.plane) will
be generated in the next motion block.
Relevant variables: ETAT0.plane
ETAT0.xyzabc[]
LIMIT.max[]
LIMIT.min[]
Macro call: yes
Example: see XYPLANE.
|