GPP2
GPP2
Table of Contents
3.3.7.5 Sub-Strings............................................................................................................ 87
3.3.7.6 Other String Functions .......................................................................................... 88
3.3.7.7 Splitting Strings to Sub-strings .............................................................................. 88
3.3.7.8 Replacing-strings................................................................................................... 89
3.3.8 Tool Parameter Functions ...................................................................................................... 90
3.3.9 Boolean Expressions .............................................................................................................. 91
3.3.9.1 Comparisons ......................................................................................................... 91
3.3.9.2 Comparing Numeric Expressions.......................................................................... 91
3.3.9.3 Comparing String Expressions.............................................................................. 92
3.3.9.4 Comparing Mixed Expressions – Not Recommended .......................................... 93
3.3.9.5 Testing Variable Set Status................................................................................... 93
3.3.9.6 Complex Boolean Expressions ............................................................................. 94
3.4 Program Structure ................................................................................................................95
3.4.1 Declaration Part ...................................................................................................................... 95
3.4.2 New-Line-Is Section................................................................................................................ 95
3.4.3 Regular Execution Blocks....................................................................................................... 96
3.4.4 System-Defined Blocks and Qualifiers ................................................................................... 96
3.5 Declaration Statements ........................................................................................................97
3.5.1 Post Processor Title................................................................................................................ 97
3.5.2 Post Processor Protection ...................................................................................................... 97
3.5.3 FORMAT................................................................................................................................. 98
3.5.4 INTERACTION........................................................................................................................ 98
3.5.4.1 System Interaction Variables................................................................................. 99
3.5.4.2 Multi-Choice Interaction Variables......................................................................... 99
3.5.4.3 Boolean Interaction Variables ............................................................................. 100
3.5.5 IDENTICAL – Not Recommended ........................................................................................ 101
3.5.6 MODAL ................................................................................................................................. 101
3.5.7 SET_TABS............................................................................................................................ 102
3.5.8 ALWAYS_FORMATTED ...................................................................................................... 102
3.5.9 CONNECTION_SCENARIO................................................................................................. 103
3.5.10 Scenario Actions ................................................................................................................... 103
3.5.10.1 Move.................................................................................................................... 103
3.5.10.2 Move Up .............................................................................................................. 104
3.5.10.3 Move Down.......................................................................................................... 105
3.5.10.4 Move to Safe Position ......................................................................................... 105
3.5.10.5 Machine Control .................................................................................................. 106
3.5.10.6 Set UCS............................................................................................................... 107
3.5.10.7 Forcing a Scenario Action ................................................................................... 108
3.5.10.8 Scenario Examples ............................................................................................. 108
3.5.11 INIT_FILE.............................................................................................................................. 110
3.5.12 REPORT_VARS ................................................................................................................... 111
3.5.13 REPORT_TOOL_VARS ....................................................................................................... 111
3.6 Execution Statements ........................................................................................................112
3.6.1 Assignment ........................................................................................................................... 112
CimatronE 10.0 GPP2 User Guide ⎪v
1 Theory of Operation
.EX2 A program file, also known as the EX2 program file (after its extension). This program
tells GPP2 how to process each toolpath block it encounters. EX2 programs are written,
using the EX2 Editor, in a special dedicated programming language, which is described
in the GPP2 Language Reference Manual. The language is tailored and well suited to
the task of writing post processors.
.DX2 The EX2 program file is compiled, using the EX2 Editor, to create a DX2 file, which is
executed by GPP2.
.DF2 A definitions file, also known as the DF2 file. This file is edited using the DF2 Editor and
contains many definitions that affect how GPP2 interprets and executes the EX2 program
file. It allows fine tuning of the output machine code (generally referred to as “G-Code”),
the formatting of numbers, the way GPP2 handles various motions, etc.
GPP2 is similar but not 100% backward-compatible to the legacy GPP. This was done in order to fix
some of the elements in the legacy GPP, mostly related to the reference coordinate system used for
post-processing. Trying to maintain backward compatibility would have caused more confusion than
bring benefits. The document highlights these differences where applicable.
CimatronE 10.0 GPP2 User Guide ⎪2
Post
Run
Cimatron
GPP2.exe G-
Old GPP Code
TP
(.GPP2) Machine
Simulation
FILE
Rev. Post
GPP2.DEX <POST>.DX2
GPP2.DEF <POST>.DF2
NC
Doc.
The orientation of the Y unit vector can be obtained from a vector multiplication of the Z and X vectors
(Z * X).
The following diagram shows the REF UCS and an ORIGIN UCS. It shows the ORIGIN zero point, Z
axis and X axis, all expressed in the REF coordinate system.
Y
An ORIGIN UCS,
expressed in REF
UCS coordinates ORIGIN UCS
Z
X
Zero point vector
Z
X_ORIGIN
REF UCS Y
Y_ORIGIN
Z_ORIGIN
The MACSYS coordinate system is not used in GPP2, except for the fact that it is the default
reference UCS (REF). Therefore, GPP2 does not include any system variables that define MACSYS
in any way.
• If MACSYS is used as REF, then it’s data if implicitly known (0,0,0,…)
• If another UCS is used as REF, then MACSYS is simply not used in any way.
The model UCS is not used in GPP2. It was partly used in old GPP, since its zero point was the true
reference position for all tool points.
Since this is not the case in GPP2, and all tool points are fully referred to the REF UCS (orientation
and position), the Model UCS is not used.
The user interaction within CimatronE only allows the definition of one REF UCS. It is recommended
that a single posting process be limited to a single setup of the part. If some procedures need to be
executed using a different part setup (i.e., different REF), then a second run of the post-processor is
needed, creating a separate G-Code file.
However, some users prefer to generate a single G-code file covering the entire machining of the part,
including changing the part setup between procedures (at least when an orientation change is
required). Other users like to use “multiple homes” on the machine, each home used for machining at
a specific area or orientation. All these users need to change the REF UCS in the middle of the post-
processor run (between procedures).
In order to achieve this, use the GPP2 system flag SET_REF_BY_ORIGIN. It allows changing the REF
UCS in the middle of the run to be the current procedure ORIGIN UCS. The change can only take
place in the ORIGIN CHANGE block, meaning it can only be done in the first procedure that uses a
given ORIGIN UCS (the block is only invoked when the ORIGIN is changed).
In order to define a new REF UCS, the EX2 program must set the GPP2 system flag,
SET_REF_BY_ORIGIN to TRUE_, inside the ORIGIN CHANGE block. GPP2 only tests this system flag
after the execution of this block. GPP2 will respond by setting the REF UCS to the ORIGIN UCS. All
subsequent motions, including the connection for the current procedure, will take place according to
the new REF UCS.
Another, more advanced, way is to change the REF_UCS at run-time, and support multiple REF
output. By setting the appropriate UCS position and orientation values to the *_REF variables, and
after that setting the SET_REF_BY_VARS system flag to TRUE_, the REF_UCS would change
accordingly.
Note: For standard use there is no need to ever use these variables in the post. They are to be used
ONLY if REF_UCS really needs to be changed.
Usage example: By copying the TP*_ORIG values to the corresponding *_REF variables and
SET_REF_BY_VARS system flag as TRUE_, the current TP UCS would become the new REF_UCS.
Note: All 9 *_REF variables must be set before SET_REF_BY_VARS is used. Do not assume anything
on the previous value of any *_REF variable (for instance, the X/Y/Z_REF variables are not
necessarily at 0,0,0).
Several side effects of the REF change are listed below:
• The next connection (of the current procedure) will use the “tool change” scenario, even if the tool
has not been changed. This is the safest connection scenario (and suitable here, since the
machine head was probably moved aside to allow the new part setup).
• RTCP (M5_RTCP_M128) is turned off (in case it was on). This is only relevant to intelligent 5X
machines.
• The Output UCS is reset (to the new REF) in case it was different. This is only relevant to
intelligent 5X machines.
• All system vectors (like HOME, CURPOS or ORIGIN) are recalculated to conform to the new REF
UCS.
CimatronE 10.0 GPP2 User Guide ⎪7
• The machine simulator does not support multiple part setups. When using multiple setups,
machine simulation cannot be used!
Note: Changing the REF UCS in the middle of the run is a delicate and very advanced action. It is best
used with 3-axis machines only.
CimatronE 10.0 GPP2 User Guide ⎪8
Y
Z Procedure
Orientation (origin) UCS
vector Y Z
(I,J,K) X
(0,0,0)
X
REF UCS
Therefore, it is important to make the distinction between how a block is invoked (with or without a
qualifier) and how it is eventually executed (that depends on the actual structure of the EX2 program).
Note: the order of blocks in the program file has no effect on the logic of execution.
There are some important exceptions in the block execution logic described above.
One of them relates to the LINEAR MOTION block. The LINEAR MOTION block has many qualifiers, 2
of them are used for rapid motions – fast: and fastlencomp:. For these qualifiers, GPP2 defines
a “two-level hierarchy” for selecting the block to be executed.
• In case the block is invoked with the fastlencomp: and the exact block cannot be found in the
program, GPP2 will attempt to execute the block with the fast: qualifier.
• If a block with the fast: qualifier cannot be found either, GPP2 will attempt to execute the block
with no qualifier.
• The two-level hierarchy allows the GPP developer to write a single block LINEAR MOTION:
fast: that handles all the “fast” qualifiers. Without that logic, these blocks (fastlencomp:)
would “fall through” to the standard (feed) LINEAR MOTION block (with no qualifier).
A two-level hierarchy is also used with the CYCLE block. If the toinit: qualifier is invoked, and no
such block exists, GPP2 will attempt to execute the on: qualifier block before defaulting to the “no
qualifier” case.
toinint: Æ on: Æ none
With that logic, the GPP developer can write one CYCLE: on: block that handles both qualifiers,
toinit and on.
Also, the CYCLE: off: block does not fall back to the CYCLE: block, since they really represent
different things. In order for a CYCLE “off” block to be executed, the EX2 program must have a
CYCLE: off: block defined.
Similarly the POST SCRIPT: stopped: block does not fall back to the POST SCRIPT: block, since
they correspond to two very different situations (successful and failed run). In order for the “stopped”
block to be executed, the EX2 program must have a POST SCRIPT: stopped: block defined.
CimatronE 10.0 GPP2 User Guide ⎪10
Several blocks that were supported in old GPP are no longer supported in GPP2:
• AXIS CHANGE (the number of axes is available at the Beginning of Proc block)
• CONSTANT SPEED (lathe only)
• COOLANT (the coolant data is available at the Beginning of Proc block)
• DWELL
• FEED (the feed data is available at the relevant motion blocks)
• GROOVE CYCLE (lathe only)
• NIBBLE (punch machining only)
• NURBS (for now, any nurb motion is converted to linear motions)
• SPIN (spindle data is available at the Beginning of Proc block)
• START STRING
• START THREAD (lathe only)
• STOP POINTS (Wire EDM only)
• THREAD CANNED CYCLE (lathe only)
• THREAD CYCLE (lathe only)
• THREAD STEP (lathe only)
CimatronE 10.0 GPP2 User Guide ⎪11
Block Comments
BEGINNING OF PROC: Additional variables available with GPP2
ORIGIN CHANGE: Optional (only if origin has changed from last procedure)
TOOL CHANGE Optional (only if tool has changed from last procedure)
START PROC: Last block before the connection motions
Connection Blocks A series of blocks that take the tool to the procedure start
point (tool above the first actual cutting point, and properly
oriented). See discussions about GPP2 connections.
PROC FIRST POINT: A block just before the actual procedure motions start
Note that some of the blocks generated by old GPP are missing here (e.g., FEED, SPIN, COOLANT).
These blocks are not needed in GPP2.
Instead, the complete information regarding the feed rate (MCH_FEED), spindle settings (SPIN_DIR and
SPIN_SPEED), and the procedure coolant (MCH_COOL) are provided as new variables in the
BEGINNING OF PROC block. The data is used later, whenever appropriate for the specific post
processor and machine.
Notes:
1. START PROC is a convenient place to do things just before the motions start. For instance, the
spindle may be turned on. If subroutines are used for each procedure, this may also be a good
place to redirect the output and open a subroutine header (e.g., “O101”).
2. While ORIGIN CHANGE and TOOL CHANGE are optional, START PROC is guaranteed to be
invoked by GPP2.
3. PROC FIRST POINT is the place where the actual procedure motions are about to start. After
that block, GPP2 will perform the final approach to the material. It may be a convenient place
to turn the coolant on.
CimatronE 10.0 GPP2 User Guide ⎪12
In the BEGINNING OF CONNECT block, several important system variables provide information about
the connection that is about to take place.
CON_CONTEXT describes the context of the connection, and may receive one of the following
numerical values (predefined GPP2 constants):
Value Meaning
CON_CYCLE The connection takes place between two canned drill cycles
(only happens if such a connection is needed).
CON_SCENARIO is a string variable that contains the name of the scenario selected by GPP2 for this
connection. GPP2 will select one of its default scenarios, based on the context and “size” of the
connection, as well as several DF2 parameters. See more details below.
GPP2 will always select one of the following default scenarios: “short”, “long”, “through-safe” or
“tool-change”.
“Short” connections are quickest, as they take the shortest route between the two points. A “long”
connection takes a “higher” (thus safer) route between the points. A connection through the “safe
point” will first take the machine to a safe position, then move to the connection target point. A “tool-
change” scenario is selected after a tool change, where GPP2 assumes that the machine is already at
a safe point.
CON_ROTATION_A contains the magnitude (absolute value) of the rotation in the alpha axis, in
degrees. Similarly, CON_ROTATION_B contains the magnitude of the rotation in the beta axis. Both are
only applicable in 4/5X machines.
CimatronE 10.0 GPP2 User Guide ⎪14
CON_DISTANCE contains the distance between the connection start point and connection target point,
expressed in the REF coordinate system. Note that it is meaningless in connections after a tool
change (context is CON_AFTER_TOOL), since GPP2 does not really know where the tool is.
The EX2 program can change the value of the CON_SCENARIO variable to another name, during the
BEGINNING OF CONNECT block. That will instruct GPP2 to execute another connection scenario.
GPP2 will choose the proper default scenario based on connection context, the rotary axes rotations,
and the connection distance.
For connections after a tool change (context is CON_AFTER_TOOL), GPP2 always selects the “tool-
change” scenario. This is a special scenario since GPP2 does not know where the tool really is.
With all other connections, the first decision GPP2 has to make is if this is a short or long connection.
All connections are short, unless they meet the criteria for a long connection, as specified by the
following variables:
In milling procedures, CimatronE generates several rapid motions before the actual cutting motions.
The last rapid motions are used by GPP2 to determine the connection point as follows:
- The connection point is “above” the first cutting (feed rate) point, where “above” is measured
along the tool axis.
- The point has the same orientation as the first cutting point
An example is shown in the following image.
Rapid
motion
Feed
Connection motions
Point
In drill procedures, CimatronE generates no rapid motions before the actual cycles. The connection
point is defined at the “init” point of the first cycle.
• The connection point is above the first hole point, where “above” is measured along the tool axis.
The height is defined by the CYC_DZINIT variable.
• The point has the same orientation as the first drill cycle.
An example is shown in the following image.
Init Height
CYC_DZINIT
Connection
Point
The default short connection is composed of two out of the following three steps:
• Move Up, along the Z axis, to the height of the connection target point. This step is skipped if the
tool is already higher than the target point.
• Move sideways, along the XY axes, to the point above the connection target point. In 4/5X
machines, any necessary rotation of the alpha and beta axes also takes place during that step.
Multiple motions are allowed (see below).
• Move down, along the Z axis, to the target connection point. This step is skipped if the tool is
already at the target point after the second step.
All motions are rapid (G00). These steps are illustrated in the following diagram:
The default long scenario is very similar to the short scenario, except that the first step goes up higher,
to the Z_HOME value. Here, we typically see the three steps taking place.
Note that the Z_HOME value is interpreted by GPP2 to be provided in the REF coordinate system.
Move sideways
Z_HOME
P1
Move down
P2
Long Connection
The default connection after tool change is composed of two steps only, since it assumes that the tool
is already in a safe very high position.
• Move sideways, along the XY axes, to the point above the connection target point. In 4/5X
machines, any necessary rotation of the alpha and beta axes also takes place during that step.
This motion cannot be broken to multiple linear motions (see below).
• Move down, along the Z axis, to the target connection point. Perform the linear motion block with a
“cutter length compensation” qualifier.
Move down
P2
The default connection through the safe position is composed of the following three steps.
• Move to the safe position, “in all axes” (not just in Z). This is done by invoking the new MOVE TO
SAFE GPP2 block.
• Move sideways, along the XY axes, to the point above the connection target point. In 4/5X
machines, any necessary rotation of the alpha and beta axes also takes place during that step.
This motion cannot be broken to multiple linear motions (see below).
• Move down, along the Z axis, to the target connection point.
Note that the last two steps are very similar to the “tool-change” scenario, except that here cutter
length compensation is not performed. The linear motions are rapid (G00).
GPP2 will calculate the number of steps necessary so that all the conditions will be met, and none of
the changes (alpha, beta or distance) will exceed the value specified in the corresponding variable.
For instance, the following diagram shows a sideways motion broken into three parts, to limit the angle
rotation.
CimatronE 10.0 GPP2 User Guide ⎪19
Note that this option cannot be used when moving from the safe position or after a tool-change, since
the start point is not known (hence no intelligent decisions or division can be made). This is
implemented in the various default scenarios.
CimatronE 10.0 GPP2 User Guide ⎪20
1.8 Subroutines
CimatronE NC generates subroutines for several NC procedures, such as Pocket and Profile. GPP2
fully supports these subroutines, as well as “exploding” them (replacing subroutine calls with the actual
commands listed in the subroutine) if necessary.
Notes:
1. The order of execution is different than in old GPP. With GPP2, the subroutine is processed
before any call to it is performed (in GPP, the first subroutine call is invoked before the
subroutine definition). That way, GPP2 can “study” the subroutine and record its affect on the
tool position and its expected execution time (both need to be known when a call to the
subroutine takes place).
2. Unlike old GPP, the SUB_NUMBER parameter is available in the BEGINNING OF SUB block,
and can be used as part of the output. The old practice of defining a user variable that is used
instead of SUB_NUMBER is not necessary. Furthermore, setting such a number in the
subroutine call block is too late, since the subroutine definition takes place before the call.
3. In each SUBROUTINE RETURN block, GPP2 presents the correct tool last position
(X_LASTPOS, etc.). GPP2 calculates the motions that will be executed at runtime when the
subroutine is called, and sets the variables accordingly.
CimatronE 10.0 GPP2 User Guide ⎪22
1.10.1 Qualifiers
There are seven potential qualifiers used in GPP2 linear motions.
Basic feed-rate linear motions blocks come with no qualifier. Most of the rapid motions come with the
fast: qualifier (except cutter length compensation, see below).
Four qualifiers are provided for cutter compensation purposes. They should be used to turn cutter
compensation on and off (if relevant to a given procedure).
• normappr: Normal approach to a contour
• normretr: Normal retract from a contour
• ltangappr: Before a tangential approach to a contour
• ltangretr: After a tangential retract from a contour
There are two cutter length compensation (“G43”) qualifiers:
• fastlencomp: Rapid motion where cutter length compensation should be applied
• lencomp: Feed-rate motion, for the same purpose (see rapid to feed)
GPP2 generates the cutter length compensation as part of the connection process from the safe
position (typically takes place after tool change).
Recall the two-level hierarchy regarding linear motions qualifiers:
fastencomp Æ fast Ænone
If a block is invoked with the fastlencomp: and the exact block cannot be found in the program,
GPP2 will attempt to execute the block with the fast: qualifier. Only if that block is missing too,
GPP2 will execute the LINEAR MOTION block with no qualifier.
CimatronE 10.0 GPP2 User Guide ⎪25
GPP2 defines three major planes. On each plane, it is important to define the axis which serves as the
zero angle, as well as the direction for positive angle motion (CCW).
Note the Z-X axis. It is defined from Z to X, not the other way around. This is consistent with the way
right-hand coordinate systems are defined.
The three major planes are illustrated in the following diagram.
Z X Y
Y (angle 90) Z (angle 90) X (angle 90)
Note that each major plane may be viewed from both sides. For instance, the X-Y plane is typically
viewed from the Z axis (from the “top”). For circular motions, the arc axis is aligned with the Z axis. But
the same plane could also be viewed from the –Z axis (from “below”), in which case the arc axis is
reversed.
CimatronE 10.0 GPP2 User Guide ⎪28
For the “reverse” major planes, the meaning of CW and CCW motion is reversed. The following
diagram illustrates this duality on the X-Y plane. Consider a motion from the X axis (angle 0) to the Y
axis (angle 90). Two tools are shown, one coming from the top, with its orientation vector aligned with
the Z axis (0,0,1), while the other coming from the bottom, with its orientation vector aligned with the –
Z axis (0,0,-1). It can be clearly seen that the same motion, from 0 to 90, represents a CCW motion for
the first tool, and a CW motion for the second.
Tool
CCW
Z
Y (angle 90)
X (angle 0)
Tool CW (!!!)
Angles on a plane are cyclic by nature. Typically, the angles in GPP2 range from -180 to 180.
However, GPP2 will also use angles ranging up to 360, in order to keep the definition of CW and CCW
motions consistent. Specifically, GPP2 will choose the angles that satisfy the following rules:
• In CCW motion, the end angle is always bigger than the start angle.
• In CW motion, the end angle is always smaller than the start angle.
CimatronE 10.0 GPP2 User Guide ⎪29
The following diagram and table shows the angles used by GPP2, as well as how GPP2 presents CW
and CCW motions in simple and complex cases:
90
Point B
180 0 (360)
Point C Point A
Point D
-90 (270)
Note that the direction is defined for the “standard” arc axis and the standard major planes. When
viewing the plane from the reverse direction, all directions are reversed (CW becomes CCW, and vice
versa).
CimatronE 10.0 GPP2 User Guide ⎪30
Full 360 degrees are supported. The arc angle will be 360 for CCW arcs, and -360 for CW arcs.
Note that in full 360 degrees circles, the end point is the same as the start point. As most post-
processors define these variables (X/Y/Z_CURPOS) as modal, they will not be set by this circle (as
their value does not change). This will result in no output for the end point.
In order to overcome this, for 360 degree circles GPP2 will force both the center (X/Y/Z_CENTER) and
end point (X/Y/Z_CURPOS) variables to be set “on”.
The arc axis is rotated to convert it to the REF UCS, and a new ARC_PLN value is calculated and
presented to the EX2 program. The same values are used.
Note that in the EX2 program, the same values are used for both the major plane and the reverse
plane. Only the arc direction is reversed.
• If the arc is too small (based on its radius or its length). Here, the arc is simply replaced by one
linear motion, from its start point to its end point. This feature is turned on through a DF2
parameter.
o The small radius value (below which the arc is replaced by a linear motion) is set
through a DF2 parameter that can be later overridden by the GPP2 program through
the system flag ARCS_SMALL_RAD.
o GPP2 also checks the arc length. The minimum length (below which the arc is replaced
by a linear motion) is set through a DF2 parameter that can be overridden by the GPP2
program through the system flag ARCS_SMALL_LEN.
o The arc will be replaced with a single linear motion if the feature is turned on and either
its radius is too small or its length is too small.
If instructed to replace an arc with multiple linear motions, GPP2 will use the following algorithm:
• The interpolation tolerance is calculated based on a DF2 parameter that defines if the tolerance is
an absolute value or is dependent on the NC procedure tolerance.
o If absolute, GPP2 will use the value of the CIRC_TOL system flag.
o If procedure-dependent, GPP2 will use the part surface tolerance or contour tolerance,
whatever is available. These values are specified at the BEGINNING OF PROC block. If
both are available in a given procedure, GPP2 will use the smaller number.
o Even if procedure-dependent, GPP2 will use CIRC_TOL as an upper limit for the
tolerance (it will never be higher than this value).
• The arc is broken into a number of identical length segments, based on the arc radius, angle and
the calculated tolerance.
• The number of segments may be increased if the DF2 file parameter “Arcs Linear Interpolation,
Minimum Segments” is higher than the calculated number. This number may be overwritten by the
GPP2 program through system flag ARCS_MIN_SEGS.
CimatronE 10.0 GPP2 User Guide ⎪33
• The number of segments may also be increased if the resulting segments are too long. A DF2
parameter defines the maximum length of each segment. The length may be overwritten by the
GPP2 program through system flag ARCS_MAX_SEGLEN.
• Finally, when the number of segments has been set to satisfy all the requirements, intermediary
points are calculated along the arc, and multiple Linear Motion blocks are created, following the
points from the arc start point to the arc end point.
Radius
Center Start
Tolerance
CimatronE 10.0 GPP2 User Guide ⎪34
A new DF2 file parameter, “Output Cycles by Planes”, allows the GPP2 user to specify how drill cycles
are handled in GPP2. It is a multi-choice parameter, with the following options:
• Never: canned drill cycles are not supported, in any plane.
• XY Plane: drill cycles are supported in the XY plane only.
• Major Planes: drill cycles are supported in all major planes.
• Any Plane: drill cycles are supported in any plane.
The selected option is copied to a GPP2 system flag, CYC_CTRL_BYPLANE, which can be changed by
the GPP2 program in order to override the original setting. After the system flag is initialized from the
DF2 parameter, GPP2 will follow the setting of the CYC_CTRL_BYPLANE variable.
In order to set or check the value of CYC_CTRL_BYPLANE, it is advised to use the predefined GPP2
constants, DF2_NONE, DF2_XYONLY, DF2_MAJORPLANES and DF2_ANYPLANE. They correspond to the
four options listed above.
Unlike subroutines or arcs, where GPP2 can convert them to something else in case they are not
supported on a given plane, there is no such built-in mechanism for cycles. The way to “simulate” a
canned drill cycle may vary from machine to machine, and cannot be easily automated inside GPP2.
The burden of handling non-supported cycles is left to the EX2 programmer.
GPP2 will set “on” a special new system variable, CYC_MANUAL, which indicates that a given cycle
block is not supported by the machine, based on the cycle plane and the DF2 file parameter. In cases
where the cycle is supported, the system variable will be set to “off”. The EX2 program should execute
different commands based on the set status of CYC_MANUAL.
CimatronE 10.0 GPP2 User Guide ⎪37
An inter-cycle connection will be created if at least one of the conditions will be met.
Note that the angle thresholds will trigger a connection only if the angle difference is greater than the
threshold. That way, setting both angle variables to zero will ensure that an inter-cycle connection will
take place if the two holes really differ by orientation.
If GPP2 decides that an inter-cycle connection is required, it sets the CYC_NEXT_CONNECT variable to
TRUE_. The EX2 program may override the value of this variable. For instance, it can force a
connection after each hole if the machine requires it (e.g., a Heidenhain controller). The final decision
regarding a connection is taken after the CYCLE block is executed, according to the value of
CYC_NEXT_CONNECT.
If GPP2 decides that an inter-cycle connection is required, it will conduct a standard (short or long)
connection between two points. See detailed discussion about GPP2 connections earlier in this
document.
The default height after the hole is determined by the CYC_RETR code, and may be one of the
following:
• The “Clear” height (usually, just above the drill point itself
• The “Init” height (usually much higher above the drill plane)
The height value above the drill point for both cases is taken from the CYC_CLEAR or CYC_DZINIT,
respectively.
GPP2 calculates the default tool position after the cycle is finished by applying the correct retract
length along the tool axis (not necessarily the machine Z axis).
The following diagram explains the process and the tool position after the drill cycle.
Tool
Init Height
Default CYC_DZINIT
Position after Tool
drill cycle or
Clear Height orientation
CYC_CLEAR vector
Drill point
X_CURPOS Z
Y_CURPOS I_CCORD Y
Z_CURPOS J_COORD
K_COORD X
CimatronE 10.0 GPP2 User Guide ⎪40
• CYC_SAME: there is a next cycle, and it is of the same orientation as the current one.
• CYC_ROTATED: there is a next cycle, but it has a different orientation than the current one (so some
rotation will be needed between the holes).
Other GPP2 commands can be freely used, including IF and other program control statements.
One advantage of using SYSTEM_CALL instead of running an external batch file is debugging. By using
step-by-step debugging, it is possible to pause and check the results of each individual command.
The POST SCRIPT block is also invoked in the case of runtime errors and in case the run was stopped
using the GPP_STOP command. In such a case, it is invoked with the “stopped:” qualifier, allowing the
EX2 program to clean up after the non-successful run (typically, delete all the files that were created
during the run).
Unlike most blocks, the “stopped” POST SCRIPT block does not fall back to the regular block (with no
qualifier). In cases of failure, GPP2 will only execute the POST SCRIPT block with the explicit
stopped: qualifier.
More detail on the use of SYSTEM_CALL is given in the GPP2 Language Reference Manual.
CimatronE 10.0 GPP2 User Guide ⎪42
When selecting this option, all transformed motions are exploded and posted as a standard toolpath
output. There are no traces of any transformations (as if the procedures were actually copied and re-
executed in all transformed positions).
This option is important to support GPP post-processors.
In this mode, GPP outputs the transformation procedures in a way that is very similar to the way they
are represented inside CimatronE. That data and structure are used by GPP2 to present the
transformed procedures.
GPP users are able to use that information in a “manual” way in the EXF file.
CimatronE 10.0 GPP2 User Guide ⎪44
In the DF2 file and editor, the following definitions relate to Transformations:
- Transformations. This multi-choice parameter has the following options:
o Exploded: all transformations are exploded into regular motions.
o Subroutines: whenever possible, machine subroutines are used for transformed
procedures. Arrays are broken into multiple individual transformations (using
subroutines).
- Transformation Subroutine Number. A numeric value, telling GPP2 the number of the first
machine subroutine to be used for transformations. Only active and relevant if transformations
are not exploded. This number is also controllable by the EX2 program.
- Output transformation subroutines as separate files (Yes / No). Only active and relevant if
transformations are not exploded. If true, transformation subroutines are output to separate
files with the extension “.t01”, “.t02”, etc. (like 2.5X subroutines in “.s01” files).
Transformation procedures are processed in a “recursive” way, starting from the last transformation
and working backwards to the original procedures.
Whenever a simple transformation is processed, GPP2 first decides if all the referred procedures can
be executed as subroutines. Otherwise, the transformation is exploded to individual motions.
If a subroutine can be used, a simple (non-array) transformation is processed as follows:
- HOME SHIFT shift home position (incremental)
- Execute the referred procedures (recursion)
- HOME SHIFT restore the original home position (incremental)
CimatronE 10.0 GPP2 User Guide ⎪45
If the reference tree contains two simple transformations one pointing to the other, the two
transformations may be combined to one home shift.
Original Æ Transform1 Æ Transform2 is actually equivalent to
Original Æ (Transform1* Transform2)
In GPP2, multi-cutter procedures are broken into multiple single-cutter procedures in the execution list.
Consequently, when a multi-cutter procedure is referred to in a transformation procedure, GPP2 must
process all the individual single-cutter procedures.
A transformation procedure can use subroutines only if every one of the transformed procedures can
use a subroutine in the final orientation.
In 5X processing, the transformed position may be rotated vs. the original position. In such a case, the
machine needs to be rotated for the transformed orientation. With 5X machines, it is usually possible
to align the procedure Z axis with the tool (unless machine limits are reached). However, it is not
always possible to control the orientation of the X and Y axes.
In order to use the same subroutine in the original and transformed positions, the transformed Origin
UCS must be perfectly aligned with the original Origin UCS. The original and transformed origin UCS
must be the same when measured in the REF UCS.
This cannot always be guaranteed in 5X machines. It depends on the nature of the rotation.
If the rotated origin UCS cannot be perfectly aligned with the original origin UCS, then this specific
position must be exploded into individual motions. The subroutine saved in the original orientation
cannot be used.
It may happen that for the same procedure, some transformation instances can use a subroutine while
others cannot. It all depends on the individual transformation UCS and the machine structure. GPP2
will use the subroutine whenever possible, and explode other instances where necessary (while giving
CimatronE 10.0 GPP2 User Guide ⎪46
a warning message).
Note: In some cases, the GPP2 generates a “don’t care” solution for a given Z axis orientation. This
means that one of the axes can be positioned in any angle. In such cases, it is likely that one unique
solution allows the use of subroutines (aligning also the X and Y axes) while all others do not. GPP2
will attempt to find that unique solution and apply it for the transformed position.
CimatronE 10.0 GPP2 User Guide ⎪47
2 GPP2 Editors
The following editors are used by GPP2 developers:
EX2 Editor This tool is used by GPP2 developers to write EX2 programs in a special
dedicated programming language, which is described in the GPP2
Language Reference Manual. This EX2 program file is compiled, using
the EX2 Editor, to create a DX2 file, which is executed by GPP2.
DF2 Editor This tool is used by GPP2 developers to edit a definitions file, also known
as the DF2 file. This file contains many definitions that affect how GPP2
interprets and executes the EX2 program file. It allows fine tuning of the
output machine code (generally referred to as “G-Code”), the formatting of
numbers, the way GPP2 handles various motions, etc..
CimatronE 10.0 GPP2 User Guide ⎪48
Interaction
1. Create a new file (File / New) or open an existing .ex2 file (File / Open or double-click the file)
in the Cimatron\CimatronE\Program\IT\var\post2 folder.
2. Write/edit the EX2 post program file.
If required, see the explanations on the following sections of the EX2 Editor:
Toolbar Buttons
Editor Pane
Marks Pane
Console Log
3. Compile ( ) the EX2 file to create a DX2 file, which is executed by GPP2.
CimatronE 10.0 GPP2 User Guide ⎪49
Cut.
Copy.
Paste.
Delete.
Find.
Compile EXF. This saves the EX2 program file and compiles it to
create a DX2 file, which is executed by GPP2.
Bookmark buttons:
Toggle bookmark.
Next bookmark.
Previous bookmark.
Jump to line number. Enter a line number and press Enter. If the line
number exists in the currently open program, the appropriate line is
displayed and highlighted.
An example of using the Jump To Line # button. Enter the required line number and press Enter.
Whenever any change is done to the post program, [***** Not Compiled *****] is displayed in the title
bar to inform you that the post needs to be compiled. In this case, the semicolon (;) at the end of the
line has been deleted.
CimatronE 10.0 GPP2 User Guide ⎪52
Note: If you attempt to compile the post ( ) when it contains grammatical errors, [ Not Compiled ] is
displayed in the title bar and an appropriate message is displayed in the Console Log enabling you to correct
the problem.
CimatronE 10.0 GPP2 User Guide ⎪53
When editing a post program, the EX2 Editor automatically recognizes commands and variable names
and assists you by converting commands to upper case and displaying appropriate variable options.
Commands
Place the cursor at the beginning of an empty line and type the word “output”.
Notice that before you complete Once the word is completed it changes to
the word, the letters are in lower uppercase and its color turns dark blue.
case. GPP2 automatically recognizes commands
and variable names (if typed correctly!) and
changes their appearance. This is a nice
way to make sure you have no typing errors.
Variable Options
Continuing the above example - after a space, type the letter “X”. Press the CTRL + SPACE
BAR keys.
A popup window is displayed, containing a Select any of the variables in the list and it
list of all the variables. The cursor is replaces the letter you typed with the
placed on the first variable that starts with selected variable. This ensures that the
the letter (or string) you typed. correct variable name is entered, without
you having to remember all the variables.
CimatronE 10.0 GPP2 User Guide ⎪54
Select a block of text to be converted into All the selected lines (including the highlighted
comments and press the toolbar button. line where the cursor is currently positioned)
are converted to comments with one single
command.
Note: To remove the comment status from a block of comments, select the appropriate block press the
toolbar button.
Toggle a comment. This toggles the currently highlighted line between a comment and non-comment
status.
Highlight the appropriate line and press the The highlighted line where the cursor is
toolbar button. currently positioned is toggled. In this case,
notice the following:
1. the line is already a comment, and the
toggle removes the comment status.
2. even though the block of text is
highlighted, only the line where the
cursor is currently positioned is
toggled.
CimatronE 10.0 GPP2 User Guide ⎪55
2.1.2.5 Bookmarks
The Bookmarks buttons are used to create, navigate through and clear all bookmarks in the post
program.
Highlight the appropriate line and press the Use the Next and Previous bookmark
toolbar button. A bookmark flag is buttons to navigate sequentially through all
displayed next to the line number. the bookmarks.
The bookmark button deletes all
bookmarks from the post program.
CimatronE 10.0 GPP2 User Guide ⎪56
Example Use:
The first occurrence of the relevant string (if it exists) in the program is highlighted in the Editor Pane.
Repeated selections of the same item in the Marks Pane, will highlighted subsequent occurrences of
the same string (if they exist) in the program. After the last occurrence, the first occurrence is
highlighted again.
If the item selected in the Marks Pane does not exist in the program, nothing happens.
Note: The Marks Pane list is composed of the entries in the following files from the
Cimatron\CimatronE\Program\gpp2 folder:
• gpp2-blocks.txt
• gpp2-marks.txt
CimatronE 10.0 GPP2 User Guide ⎪57
Hide / Show the Console Log pane by toggling the toolbar button.
The Console Log displays messages informing you of successful or unsuccessful compilation results.
Successful Compile
Successful compilations are displayed in green and inform you that the dx2 file has been created
successfully:
Failed Compile
Unsuccessful compilations are displayed in red. In this case the following occur:
Interaction
1. Open an existing .df2 file (File / Open or double-click the file) in the
Cimatron\CimatronE\Program\IT\var\post2 folder.
2. Set the appropriate parameters in each of the following tabs:
Post
Linear
Circular
Connection
Formats
Machine Code
Output Files
Miscellaneous
3. Save the DF2 file using File / Save or File / Save As.
CimatronE 10.0 GPP2 User Guide ⎪60
There are 19 predefined GPP formats, as listed below. Their names suggest their intended use, but
any variable can be assigned any format.
CHARACTER
COORDINATES
ANGLES
FEED
SPINDLE
DWELL
SEQUENCING
TOOL
USER_1
USER_2
USER_3
USER_4
USER_5
USER_6
USER_7
USER_8
USER_9
USER_10
REAL
There are 2 predefined GPP formats that are used only in the INTERACTION statement (refer to
INTERACTION section)
BOOLEAN
MULTI_CHOICE
Variable formats also define the variable type, which may be numeric or string. Numeric variables
contain floating point values (double precision), whereas string variables contain text character strings.
The maximum length of strings that can be held in variables is 256 characters. Attempting to store a
longer string will result in a runtime error.
Note – there are no pure integer variables in GPP. While a format may be defined to print no decimal
point and no fractions (so the printed output is rounded to an integer value), the internal representation
cannot be limited to integer values only.
The variable format uniquely defines the variable type. The CHARACTER format is the only format for
string variables. All other formats define numeric variables.
Each system variables has a default format, suitable for its use (e.g., the X_CURPOS variable uses
the COORDINATES format, while TOOL_ANGLE uses the ANGLES format). However, the GPP
developer can assign a different format for each system variable. The full list of system variables and
their default formats is given in the “GPP Theory of Operation” document.
User-defined variables, including Interaction variables and arrays, are assigned a format when they
are defined in the GPP program declaration part. Note that it is not possible to define a separate
format to an individual array member – all members of an array share the same format.
CimatronE 10.0 GPP2 User Guide ⎪73
Variable Max. int. Max frac. Min. int. Min frac. Leading Trailing Output
Value digits digits digits Digits zeros zeros
6.6666… 4 3 0 0 No No 6.667
6.6666… 4 1 0 0 No No 6.7
6.6666… 4 3 2 0 No No 6.667
25.1 5 4 3 2 No No 25.1_
2000.0 3 2 1 0 No No Error!
-0.333... 4 3 0 0 No No -0.333
CimatronE 10.0 GPP2 User Guide ⎪75
Notes:
1. A runtime error occurs when the number to be formatted exceeds the maximum number of
digits allowed for the integer part.
2. In an “integer-only” format (when the maximum number of fractional digits is zero), non-integer
numbers are rounded. It does not affect their internal value, only the formatted output string.
3. Although it is theoretically possible to define an 18 digit number (setting both maximum digits
to 9), this is beyond the actual accuracy of double precision numbers. Practically, no more than
14 significant digits can be formatted.
4. The REAL format is internally defined with 14 maximum digits for the integer part and 14
maximum digits for the fractional part. The minimum number of digits for the integer and
fraction parts is set to 1. The numbers set in the DF2 file for these options have no effect on
the REAL format. Other options (like leading or trailing spaces) do affect the REAL format.
However, it is advised to leave the REAL default definition as is.
5. A comma (“,”) can be used for the decimal point character, instead of the standard dot (“.”).
This is common in Germany (ex: 0,5 means 1/2).
6. If the decimal point character is omitted (i.e. “”), the output may be erroneous. For instance, if
max fraction digits is 1, than 6.6666… will be formatted as 67 instead of 6.7 – as if multiplied
by 10!
All Array members share the same modality, which is defined for the whole array.
The only difference between modal and non-modal variables is how they are affected by OUTPUT and
PRINT commands. More specifically, the difference relates to their “set” status – that needs some
explanation.
In GPP, each variable has a special status flag, signaling of the variable is set “on” or “off”. It is
primarily used to identify system variables that are actually assigned new values by GPP when a
block is processed. However, user-defined variables also have the same status set flag, and behave
the same way.
In arrays, each array member has a separate “set” flag. Therefore, some array members may be “on”,
while others may be “off”.
The “set” status flag can be tested in program control statements (such as IF, IF_SET and REPEAT
UNTIL), so that different actions can be taken based on any variable status.
In GPP2, the “set” status flag dose not affect how variables are printed in OUTPUT & PRINT
statements. A variable will be printed even if it is in “set off” status.
A variable is set “on” in one of the following cases:
• The first time it is assigned a value.
• It is set “on” by GPP2 when it needs to be output as part of the G-Code. The exact condition
depends on the variable, the toolpath block, and internal GPP2 logic.
o Some variables, such as X_CURPOS, are set on when they are assigned a new value,
different than the previous value it had before. Note that for numeric variables,
“different” takes into consideration the variable format – values are considered different
only if they appear different when sent to OUTPUT.
o Other variables, such as PART_TOL, are set on when they are included in the toolpath
(e.g., in a given procedure) and off when they are not – regardless of their previous
value (being equal to the new value or not).
• It is explicitly turned on with the SET_ON command (see later).
• An identical variable is turned on (identical variables always have the same set status). See below
regarding identical variables.
CimatronE 10.0 GPP2 User Guide ⎪77
3.3.2 Constants
The simplest expression is a constant, of numeric or string type. String constants are enclosed in
double quotes, and can be up to 256 characters long.
Examples:
10
12.5
“This is a constant string”
Constant strings cannot be broken across lines. The whole string must be entered in the same line.
There are several special predefined named constants in GPP, as follows:
Numeric:
PI (numeric constant, 3.14…)
INCH (numeric constant, 25.4)
TRUE_ or YES_ or ON_ (numeric constant, 1)
FALSE_ or NO_ or OFF_ (numeric constant, 0)
String:
DBL_QUOTE (string with one double-quote (“) character)
Note that DBL_QUOTE is the only way to use a double-quote character in expressions.
DBL_QUOTE is not truly a constant – it is a system variable, which is initialized with a single
double-quote sign, and never changed by GPP.
Special Numeric Constants
GPP contains a large number of predefined numeric constants that can be used instead of numbers
for the purpose of improved clarity of the GPP program.
Consider the following two statements:
ARCS_CTRL_BYPLANE = 2 ;
ARCS_CTRL_BYPLANE = DEF_XYONLY ;
Both statements have the same result, since the DEF_XYONLY predefined constant has the value of 2.
However, the second statement is clearer – it tells us that arcs in this post-processor are only
supported in the XY plane. If the same variable was assigned the value DEF_NONE (1), it would mean
that arcs are not supported in any plane (and are broken to linear motions). That way, these constants
help make the GPP program easier to read and debug.
The special numeric constants are used in conjunction with specific GPP2 system variables
(ARCS_CTRL_BYPLANE was shown here in the example) and commands. The constants provide a
convenient way of setting and testing these variables, without having to remember the numeric value
of each option.
These constants are best explained in conjunction with their applicative use
CimatronE 10.0 GPP2 User Guide ⎪81
within GPP2. The full list of special constants, their meaning, values and associated variables is given
in the GPP Theory of Operation manual.
Output Constants
Special Control Characters, new-line characters and the special TAB_ keyword, are not mentioned
here since they can only be used in OUTPUT statements. They will be described when the OUTPUT
statement is discussed.
As explained earlier in this document, GPP2 variables have unique “format” characteristics that define
how they are printed in the GPP2 output. The format also affects how variables are compared to each
other inside GPP2 expressions. The format does not affect the internal value of variables.
The FORMATTED_NUM function returns a numeric value that is equal to the formatted form of a given
variable. Unlike most other numeric functions, it only accepts variables as arguments (and not any
numeric expression).
For instance, assume variable VAR has the value 5.2299, and its format defines the maximum number
of fraction digits as 2. Therefore, sending VAR to the output will print the string “5.23”.
FORMATTED_NUM(VAR) will return the number 5.23000
Note that use of this function does not change the internal value of the variable. In our example, VAR
will remain at 5.2299.
The following statement will set VAR to its formatted value (similar to the old CONVERT statement):
VAR = FORMATTED_NUM (VAR); Set VAR to 5.23000
The following example demonstrates the effect of FORMATTED_NUM and its importance. Assume all
variables below are formatted with 3 digits after the decimal point.
CimatronE 10.0 GPP2 User Guide ⎪84
While the internal representation of Delta1 seems OK, the formatted output of Delta1 is not the
excepted result. DELTA2 gets the correct result (both internal and output).
Note that the FORMATTED_NUM function can also be used to convert Xold and Xnew:
Xold = FORMATTED_NUM (Xold); // Xold gets 100.00000
Xnew = FORMATTED_NUM (Xnew); // Xnew gets 110.00000
Delta1 = Xnew - Xold; // Delta1 gets 10.0000
FORMATTED_NUM must use a single variable argument. We cannot write:
Delta1 = FORMATTED_NUM (Xnew - Xold); // illegal expression!!!
This function is also related to the format of variable. It returns the maximum number of digits in the
fraction part of the variable. In other words, it gives the level of precision that is used to output
variables of that format.
Note that the returned value does not depend at all on the variable value. It is derived directly from the
variable format (which is fixed for the duration of the run).
The FRAC_DIGITS function in GPP2 comes to substitute a similar capability that was part of the old
GPP CONVERT statement that is not supported in GPP2.
The following examples assume VAR has a format with maximum 2 decimal digits for the fraction part.
VAR = 2.9999; Set internal value to 2.9999
N = FRAC_DIGITS(VAR); N gets 2
VAR = 3;
N = FRAC_DIGITS(VAR); N stays 2 (not dependent on VAR’s value)
CimatronE 10.0 GPP2 User Guide ⎪85
These functions return the integer and the fraction parts of a variable value, respectively.
It is important to note the relationship between these two functions and the special GPP2 variable
“formats”. INT_ and FRAC_ work on the actual value of numeric expressions, ignoring any variable
format information. This may lead to confusion in some cases, if variable formats are ignored.
For instance, assume the variable VAR has the value 2.9999, but its format only allows 2 decimal
digits for the fraction part. Sending VAR to output will print the string “3.00”. When compared to other
variables, VAR will behave as if it has the value 3.00 (see discussion on numeric expression
comparison later in this document).
However, INT_ and FRAC_ ignore the variable format. INT_(VAR) will return 2, and FRAC_(VAR)
will return 0.9999. In most cases, this is indeed the desired result.
If the GPP2 developer needs to integer and fractional values of a variable while taking into account the
variable format, then the following methods can be used:
• Use of the FORMATTED_NUM function. INT_(FORMATTED_NUM(VAR)) will return 3, while
FRAC_(FORMATTED_NUM(VAR)) will return 0.0. This method does not change the internal value
of VAR – it will remain 2.9999.
• Actually change the value of VAR to its formatted value before using the INT_ and FRAC_
functions. This can be achieved with the FORMATTED_NUM function (see above). Note that this
method changes the internal value of VAR to 3.0000.
Examples
VAR = 2.9999;
IPART = INT_(VAR); Set IPART to 2
FPART = FRAC_(VAR); Set FPART to 0.9999
IPART = INT_(FORMATTED_NUM(VAR)); Set IPART to 3, VAR stays 2.9999
FPART = FRAC_(FORMATTED_NUM(VAR)); Set FPART to 0, VAR stays 2.9999
VAR = FORMATTED_NUM (VAR); Change VAR to 3.0000
IPART = INT_(VAR); Set IPART to 3
FPART = FRAC_(VAR); Set FPART to 0
string expressions can be concatenated, as long as the total length of the resulting string is limited to
256 characters.
Example: the expression DBL_QUOTE + “title” + DBL_QUOTE returns a value of “”title”” (the word
title enclosed in double quotes).
Unlike the OUTPUT command, string concatenation can handle string expressions, but not numeric
expressions. In order to include numbers in string concatenation, they must be first converted into
string, using the STR_FORMAT function. Example:
3.3.7.5 Sub-Strings
GPP2 contains a new statement that allows splitting a string into sub-strings. Note – this is not a
function and cannot be used in expressions. However, it is described here because it is part of the
GPP2 string manipulation package.
Examples:
3.3.7.8 Replacing-strings
3.3.9.1 Comparisons
GPP compares numeric expressions in a non-standard way. Instead of simply comparing the numeric
values (double precision floating point), it takes into account the formatting of values as they are sent
to output.
If an operand of the comparison is a variable, it is temporarily “printed” using the variable format, and
the resulting string is converted back into a number before it is used in the comparison.
CimatronE 10.0 GPP2 User Guide ⎪92
For instance, suppose two variables, X and Y, both have a value of 11/3 (3.666666…). However, they
have different formats. When formatted, X uses 3 fractional digits, so it is formatted as 3.667, while Y
uses 1 fractional digit and is formatted as 3.7. When compared by GPP, these two numbers will come
out as non-equal (although internally, they have the same value)! It is therefore not recommended to
compare variables of different formats, as results are difficult to predict.
GPP will ignore “minor” formatting issues, such as leading or trailing zeros. For instance, suppose now
X and Y both have the value of 2.5. But Y is formatted with at least 3 fractional digits, with trailing
zeros. Once formatted, X will result in 2.5, while Y will give 2.500. In such a case, GPP will treat them
as equal. GPP2 also ignores other minor formatting options, such as the characters used for the plus
or minus sign or whether a decimal point is used for integer values. So, GPP2 will treat “2”, “+2”, “2.”
and “2.000” as equal.
When a non-variable expression is compared to a variable, the non-variable expression is also
formatted using the variable format, to ensure proper comparison.
When none of the two operands is a simple variable (e.g., X + 3 <= Y ** 2), both expressions are
formatted using the REAL format, before being compared.
It is possible, but highly not recommended, to compare one numeric expression and one string
expression. The expressions are compared as numeric entities:
• The numeric argument is formatted as a string using the appropriate format (as explained above,
in comparing two numeric expressions), and that string is converted to a numeric value again.
• The string argument is converted to a floating point number.
• The two numbers are compared.
It is the GPP developer’s responsibility to ensure that the string can be properly converted to a
number. If not, results are unpredictable.
A major GPP capability is to decide whether a variable is set “on” or “off”, and to take action
accordingly. The following Boolean functions are available to support this:
VAR_SET(<var>) TRUE if <var> is set, FALSE if not
VAR_NOTSET(<var>) TRUE if <var> is not set, FALSE if it is
The variable argument for the function may be a simple variable or an array member. Full array
variables cannot be used (each member has its own “set” flag).
Examples: VAR_SET(X), VAR_NOTSET(AR[12]), VAR_SET(AR[Y+1])
CimatronE 10.0 GPP2 User Guide ⎪94
GPP2 will issue a compilation warning if the VAR_SET or VAR_NOTSET functions are used with non-
modal variables (since this test is mostly useful for modal variables).
It is possible to combine Boolean expressions with logical OR & AND operations, to form more
complex Boolean expressions.
<bool-expr1> _AN_ <bool-expr2> Logical AND operation
<bool-expr1> && <bool-expr2> Logical AND operation
<bool-expr1> _OR_ <bool-expr2> Logical OR operation
<bool-expr1> || <bool-expr2> Logical OR operation
An AND Boolean expression gives a TRUE value if both of its operands are TRUE.
An OR Boolean expression gives a TRUE value if at least one of its operands is TRUE.
These logical operations did not exist in old GPP. However, in order to support developers who prefer
the traditional operator style (_XX_), both styles have been implemented (traditional and C-like) and
can be used.
Only Boolean expressions can be used as operands for these logical operations.
Examples:
X >= 10 && S1 = “abc”
(X > 0 && Y > 0) || (X < 0 && Y < 0)
Note that the logical AND operator takes precedence over the logical OR operator (like multiply takes
precedence over plus). Therefore, the second example could have been written without the
parentheses. However, it is always advised to use parentheses in such expressions, in order to make
them clearer and to avoid programming errors.
CimatronE 10.0 GPP2 User Guide ⎪95
$ ! @ # % ^ & { } | ~ ?
Example:
NEW_LINE_IS $ ; // new-line character is $
OUTPUT \J “N” SEQ; // output new-line and sequence number
SEQ = SEQ + SEQINCR; // increment sequence number
3.5.3 FORMAT
The FORMAT statement is used to declare user-defined variables and to override the default format of
system variables.
FORMAT (<format-name>) variable1 variable2 ... ;
The format name must be one of the available 19 GPP formats, defined earlier in this document (e.g.,
CHARACTER, COORDINATES, etc.). It must be enclosed in parenthesis. Any number of variables may
be specified in one statement, separated by spaces. As with any statement, it is terminated with a
semi-colon (;).
If the statement specifies a new user-defined variable, it is created by GPP. If the statement specifies
an existing system or user-defined variable, it only changes the format of this variable.
Each time a FORMAT statement is executed, it also sets the variable type – string for CHARACTER
format and numeric for all other formats.
Arrays may also be defined with the FORMAT statement by specifying the number of members in the
array (a constant integer number must be used).
Examples:
FORMAT (USER_1) X Y Z; // creates 3 variables with USER_1 format
FORMAT (COORDINATES) X_CURPOS; // redefine format of system variable
FORMAT (REAL) Queue1[100]; // create an array with 100 members
3.5.4 INTERACTION
The INTERACTION statement defined a user-define or system Interaction variable, to be used by the
GPP user to enter information at runtime.
INTERACTION (<format-name>) “prompt” variable = init-value ;
INTERACTION (<format-name>) “prompt” system-variable;
Only one Interaction variable may be defined in each INTERACTION statement, and it cannot be an
array.
The format name must be one of the available 19 GPP formats, or the special keywords
MULTI_CHOICE and BOOLEAN_, and must be enclosed in parenthesis.
The MULTI_CHOICE pseudo “format” is used for interaction variables that should be displayed to the
user as a List-Box with multiple choices (e.g., “Flat” and “Nested”). See more details below.
The BOOLEAN_ pseudo “format” is used for Yes/No interaction variables. See more details below.
The “prompt” string will be displayed to the GPP user at runtime, typically explaining the nature of the
Interaction variable and asking for input. Like any GPP string, it may be up to 256 characters long.
For user-defined interaction variables, a default initial value for the variable must also be specified (the
= sign is mandatory). This is the value GPP will use if the user does not make any changes to this
CimatronE 10.0 GPP2 User Guide ⎪99
variable. For system interaction variables, initial values are not allowed – the initial values for system
variables can only be set from the DF2 file.
For numerical variables, any data entered by the GPP user at runtime is used “as is”, and never
multiplied by the unit factor, even if the interaction variable uses the COORDINATES format.
GPP2 maintains the value of Interaction variables between toolpath runs (but not between sessions).
For instance, suppose an Interaction variable STARTNUM has the default initial value of 0. Now
suppose the user changes this value to 100 and runs the post-processor to generate an output file.
Now he runs the same post-processor again on a different toolpath - the Interaction variable will show
a value of 100. Re-loading the post-processor or closing GPP and starting it again will reload the
default value defined in the INTERACTION statement. Note, however, that changes made to
interaction variables in the GPP2 program will not have any effect on the next run – only the values
entered by the user are maintained.
No more than 50 Interaction statements can be defined in each GPP program.
Examples:
INTERACTION (CHARACTER) “Enter Name:” Name = “Cimatron”;
INTERACTION (COORDINATES) “Enter Size:” Size = 100;
INTERACTION (SEQUENCING) “Sequencing Start Number:” SEQ_START;
The system variables in INTERACTION statements allow the end-user to override values assigned to
system variables in the DF2 file.
For instance, a DF2 parameter specifies the start number for sequencing. That parameter initializes
the system variable SEQ_START. By defining SEQ_START in an INTERACTION statement, the end-
user gets the ability to change the sequencing start value at runtime.
When using system variables in INTERACTION statements, no initialization value is allowed. The
initial value for these system variables only comes from the DF2 file.
When using system variables in INTERACTION statements, the format parameter does not change
the system variable format. It is only used if MULTI_CHOICE or BOOLEAN_ are specified, in which
case the interaction takes a special form (as explained below). The specified format argument must
“match” the system variable format – they must both be of type string (format CHARACTER) or type
numeric (all other formats).
MULTI_CHOICE interaction variables allow the GPP developer to define a variable that can get one
value out of a list of allowed values.
MULTI_CHOICE variables are actually numeric integer variables. They use the value 1 to represent
the first choice, 2 for the second choice, and so on. They should never be assigned values smaller
than 1 or larger than the number of options defined for them.
The actual internal format of MULTI_CHOICE variables is SEQUENCING (if used for OUTPUT, the result
CimatronE 10.0 GPP2 User Guide ⎪100
Boolean interaction variables allow the GPP developer to define a simple choice variable that can be
either “Yes” or “No”.
BOOLEAN_ variables are actually numeric integer variables. They use the value 0 for “No” and 1 for
“Yes”.
The actual internal format of BOOLEAN_ variables is SEQUENCING (if used for OUTPUT, the result will
be a number, with the SEQUENCING format).
Unlike MULTI_CHOICE variables, the prompt string for BOOLEAN_ interaction variables does not have
to contain any choices displayed to the user (they are always “Yes” and “No”).
Examples:
INTERACTION (BOOLEAN_) “To Be or Not to Be?” TheQuestion = YES_;
Note that the initial value is YES_ (equal to 1), which corresponds to “Yes”. All the Boolean constants
(TRUE_ and YES_ for 1, FALSE and NO_ for 0) can be used as initial values for Boolean interaction
variables.
GPP2 does not enforce the assignment of values to BOOLEAN_ variables. It is the responsibility of the
GPP developer to ensure that only 0 or 1 are assigned to such variables.
CimatronE 10.0 GPP2 User Guide ⎪101
3.5.6 MODAL
The MODAL statement can be used to define variables, both system and user-defined, as modal. See
earlier section for a detailed discussion on variable modality.
MODAL variable variable2 ...;
Note that in GPP2 all variables are non-modal by default. This statement allows the GPP developer to
define specific variables as modal.
Arrays can be used as arguments to these statements. However individual array members cannot be
used – the whole array is either modal or non-modal.
Examples:
MODAL X Y X_CURPOS;
MODAL ARRAY;
3.5.7 SET_TABS
The SET_TABS statement defines the GPP tab positions. Tab positions can be used when the GPP
developer wishes to align output characters to specific positions (columns) in the output file.
SET_TABS N1 N2 N3 ...;
Up to 20 tab positions can be specified in the SET_TABS statement, and they must be specified in
increasing order. The GPP default tab positions are 8, 16, 24, …, up to 160.
The tab positions are used with the special TAB_ keyword used in an OUTPUT statement. See a more
detailed discussion in the section describing the OUTPUT executable statement.
Example:
SET_TABS 4 8 12 16 24 28 32 40; // 4 column increments
SET_TABS 2 4 8 16 32 64 66 // any sequence is OK
3.5.8 ALWAYS_FORMATTED
This new GPP2 statement can be used to define variables that keep their internal value always equal
to their “formatted” value (the value that will be sent to output).
ALWAYS_FORMATTED variable variable2 ...;
Arrays can be used as arguments to the statement. However individual array members cannot be
used – the whole array is either “always formatted” or not.
The statement should only be applied to numeric variables. It has no effect on string variables.
This behavior is especially convenient in incremental post-processors, where the last position should
be kept exactly as output to the machine. Otherwise, a rounding error will accumulate over the
toolpath points. The obvious target variables for this statement are the “LASTPOS” variables, but it
can be used for any numeric variable.
Examples: ALWAYS_FORMATTED X_LASTPOS Y_LASTPOS Z_LASTPOS;
Following that statement, each time values will be assigned to these variables, GPP2 will format the
value and set the internal value to be equal to the formatted one. This holds true for internal
assignments by GPP2 as well as explicit assignments in the EX2 program.
For instance, assume that all the coordinate variables use 3 digits after the decimal point. Assume
MyVar is a user variable of the coordinate format too. Consider the following statements:
MyVar = 9.9999999; // MyVar gets 9.9999999 (internally)
X_LASTPOS = MyVar; // X_LASTPOS gets 10.0 (internally)
OUTPUT $ MyVar “ “ X_CURPOS; // output is “10.000 10.000”
Note that the output of both variables is “10.000”, whereas the internal values are different because of
the “always formatted” nature of X_CURPOS.
CimatronE 10.0 GPP2 User Guide ⎪103
3.5.9 CONNECTION_SCENARIO
GPP2 connections are series of motions and machine control operations generated by GPP2 in order
to connect between toolpath points in a safe and predictable way. Connections take place in several
points throughout the execution, such as at the beginning of procedures or between 5X segments.
See the GPP2 Theory of Operation Manual for more details about GPP2 connections.
GPP2 connections follow a “scenario”, which is a sequence of actions. GPP2 has four built-in
scenarios, and the EX2 programmer can override them or add any number of additional scenarios.
This is done with the CONNECTION_SCENARIO declaration statement.
CONNECTION_SCENARIO <scenario-name> <list-of-actions> ;
Usually, the statement is very long, since it includes several actions and each action contains several
arguments. Therefore, it is recommended to split the statement over multiple lines.
The <scenario-name> argument must be a string constant. It can be any string, and may include
spaces. The names are not case-sensitive (so “scenario1” and “SCENARIO1” refer to the same
scenario).
GPP2 uses four predefined default scenario names, namely “short”, “long”, “through-safe” and
“tool-change”. The use of any of these names in the statement replaces the default scenario of that
name with the one described in the CONNECTION_SCENARIO statement. Any other name creates a
new scenario.
CONNECTION_SCENARIO “long” <actions> ; // replaces built-in “long” scenario
CONNECTION_SCENARIO “very long” <actions> ; // creates new scenario
3.5.10.1 Move
<axes> A string made up of Defines the axes along which the motion will
the letters XYZAB take place (in the REF UCS). Any combination
(e.g. “XY” or “AB”) of the 5 letters is allowed, in any order. Other
letters are not allowed and result in a runtime
error.
3.5.10.2 Move Up
<axis> A string made up of Defines the one axis along which the motion
one letter X, Y or Z will take place (in the REF UCS).
and an optional ‘-‘
Only one axis may be specified, with an
(e.g. “Z” or “-X”)
optional minus sign to indicate how “high” is
measured.
<axis> A string made up of Defines the one axis along which the motion
one letter X, Y or Z will take place (in the REF UCS).
and an optional ‘-‘
Only one axis may be specified, with an
(e.g. “Z” or “-X”)
optional minus sign to indicate how “lower” is
measured.
MOVE_SAFE ( <axes> )
The MOVE_SAFE action invokes the GPP2 “MOVE TO SAFE” block, where the EX2 program is
expected to move the tool to a safe position on the required axes.
It uses the following arguments:
<axes> A string made up of the Defines the axes along which the tool must be taken to
letters XYZAB (e.g. the safe position. Any combination of the 5 letters is
“XYZ” or “Z”) allowed, in any order. Other letters are not allowed.
The value of this argument is copied to the
ACTION_SAFE_AXES variable, to be used by the EX2
program in the MOVE TO SAFE block.
CimatronE 10.0 GPP2 User Guide ⎪106
<qualifier> Any string constant This argument becomes the qualifier used by GPP2
(e.g., “cool-off” or when invoking the MACHINE CONTROL block. This
“RTCP-ON”) block supports user-defined qualifiers for better
program organization.
<string> Any string constant The value of this argument is copied to the
CONTROL_STRING variable, to be used by the EX2
program in the MACHINE CONTROL block.
CimatronE 10.0 GPP2 User Guide ⎪107
<qualifier> Any string constant This argument becomes the qualifier used by
(e.g., “ref” or “proc”) GPP2 when invoking the SET UCS block. This
block supports user-defined qualifiers for better
program organization.
<string> Any string constant The value of this argument is copied to the
CONTROL_STRING variable, to be used by the
EX2 program in the SET UCS block.
GPP2 keeps track of the SET_UCS actions used. If a SET_UCS action is invoked with the same
qualifier as a previous one, and there was no change in alpha or beta angles between the two calls,
the second SET_UCS action will be skipped (since the work plane did not change between the
actions).
Note that the <position> and <rotation> arguments do not have to be used for this purpose, and
can really be set to anything. GPP2 only looks at the qualifier when it comes to decide if that SET_UCS
action is “the same” as the previous one.
CimatronE 10.0 GPP2 User Guide ⎪108
In some cases, scenario actions may be skipped, if GPP2 determines that they are redundant:
• A MOVE_, MOVE_UP or MOVE_DOWN action where no axis is actually set (so there will be no linear
motion block anyway).
• A SET_UCS action where both the qualifier and the machine axis angles are the same as the
previous SET_UCS action.
However, it is sometimes necessary to force GPP2 to execute the action regardless of these rules.
This is especially important when a SET_UCS action must be executed to ensure that the GPP2 output
UCS is not rotated (before a scenario linear motion).
In order to do this, the FORCE_ACTION keyword is used before the action name:
FORCE_ACTION SET_UCS ( ... action variables ... )
This SET_UCS action will be executed regardless of the previous one.
Then it moves the tool horizontally, along the X and Y axes to the point above the target point.
Finally it goes down, along the Z axis to the target point – this time with a cutter-length compensation
qualifier (so the G43 code will be generated).
The decision about which connection is used is done at the end of the END OF CONNECT block.
GPP2 will activate the default connection scenarios according to the context. In case a scenario that is
different from the default is defined, GPP2 has to be told under which conditions to activate it. This
should be done in the END OF CONNECT block.
For example:
The following is a user-defined scenario for an advanced control. In the default scenario there must be
some actions to activate and deactivate 'Working Plane' commands. This scenario is meant to be
activated whenever a short connection needs to be performed under RTCP mode.
CONNECTION_SCENARIO "short-rtcp"
MOVE_UP (CON_FAST "Z" CON_P2 )
MOVE_ (CON_FAST "AB" CON_P2 TRUE_)
MOVE_ (CON_FAST "XY" CON_P2 TRUE_)
MOVE_DOWN (CON_FAST "Z" CON_P2 FALSE_);
For that, the following condition needs to be added to the END OF CONNECT block.
IF (M5_RTCP_M128 == TRUE_ && CON_SCENARIO == "short")
CON_SCENARIO = "short-rtcp";
END_IF;
The condition checks if RTCP mode is turned on and if the conditions match those of a short
connection. If TRUE_, then the connection scenario is changed to “short-rtcp”. Note that
CON_SCENARIO is used both for checking the current status and for changing the scenario. Once
this is done GPP2 will follow the actions of the “short-rtcp” scenario instead those of “short”.
CimatronE 10.0 GPP2 User Guide ⎪110
3.5.11 INIT_FILE
This statement specifies the name of a text initialization file to be loaded and executed before each
run of GPP2.
INIT_FILE <string> ;
The file name may include a full path name, or have no path at all. If no path is specified, GPP2 will
look for the file in the same directory as the post-processors files.
Multiple INIT_FILE statements may be specified in one post-processor. The files are read and
executed in the same order of the INIT_FILE statements.
Examples:
INIT_FILE “C:\Cimatron\standard.txt” ;
INIT_FILE “pp.txt” ;
INIT_FILE “*.txt” ; // ‘*’ is replaced with the PP name
If the file specified in the string argument cannot be found – a warning message is printed, but
execution continues.
The “*.txt” string in the last example has a special meaning. If the first character of the string is ‘*’,
GPP2 replaces it with the post-processor name (without any extension). If the PP file is called
demo.ex2, then this statement will load the file “demo.txt”.
This is a way for the PP developer to give users the ability to create multiple post-processors that only
differ by their initialization, without having to recompile the EX2 file.
The INIT files may contain the following:
- Assignment statements, in the standard EX2 format for these statements. The assigned
variable may be any valid GPP2 variable (system, user-defined or interaction). The assigned
values may be simple constants or full expressions.
- Comments (same format as in EX2 files) and empty lines.
Examples to statements inside INIT files:
SEQ_START = 1000; // numeric assignment
MyComment = “this is a comment”; // string assignment
SEQ_START = SEQ_START + SEQ_INC; // expression
Note that all the user variables used in the INIT files must be defined in the EX2 file (with FORMAT or
INTERACTION statements).
Errors encountered in the execution of INIT file statements are reported, and the faulty statements are
ignored. However, execution continues and other (valid) statements will take effect.
Note that this is a declarative statement. It must appear in the declaration part only, before any
execution block. Trying to use it in a regular block (e.g., at STARTUP) will result in a compilation error.
CimatronE 10.0 GPP2 User Guide ⎪111
3.5.12 REPORT_VARS
Starting from CimatronE 10.0, not all user-defined variables are available for the NC reports. If specific
variables need to be available, they need to be declared as such using the REPORT_VARS
statement.
Example: REPORT_VARS MyVar1 MyVar2;
3.5.13 REPORT_TOOL_VARS
Usually only tool variables from the TOOL CHANGE block are available for the “tools” report. If other
variables need to be available as well, they need to be declared as such using the
REPORT_TOOL_VARS statement.
Example: REPORT_TOOL_VARS MyVar1 DOWN_STEP XML_PROC_FEED;
CimatronE 10.0 GPP2 User Guide ⎪112
3.6.1 Assignment
This is the most basic statement type – the cornerstone of every programming language. It assigns a
value to a variable.
Variable = <expr>;
Any GPP variable may be assigned any type of expression (except Boolean expressions).
Full arrays cannot be assigned a value – only individual array members can. If an array member is
assigned values, the array index can be any numeric expression, not necessarily a constant.
It is highly recommended to ensure that the type of the variable and the assigned expression are
the same (numeric or string). This is proper programming practices. However, GPP accepts type-
mismatched assignments, where a string is assigned into a numeric variable or vice versa. The result
may be unpredictable if the conversion is not straightforward. For instance, assume X is a numeric
variable. The statement X = “3”; will result in X getting the value of 3.0, as expected. But X = “abc”;
will assign an unpredictable number to X.
An assignment type mismatch generates a compilation warning.
Examples
X = X_CURPOS + ORIGINX;
Alpha = ACOS (Y / X);
STRAARRY[10] = “Yes”;
STRAARRY[I] = STR_LEFT(NAME, 4);
S1 = “one two three “; // S1 gets “one two three”
CimatronE 10.0 GPP2 User Guide ⎪113
3.6.2 IF
The IF statement allows conditional execution of statements, based on various conditions. It replaces
IF_SET as the generic “if” statement.
IF ( <Bool-expr> )
Sequence of execution statements...
END_IF;
The sequence of statements will only be executed if the Boolean expression is true. Otherwise, they
will be skipped. See earlier section for a detailed discussion of Boolean expressions.
IF ( <Bool-expr> )
Sequence of execution statements for the TRUE case...
ELSE
Sequence of execution statements for the FALSE case...
END_IF;
With the IF / ELSE form, it is possible to define two sequences of statements. One will be executed
if the Boolean expression is true, while the other will be executed if the Boolean expression is false.
IF statements can be nested within each other in any combination and to any depth, as long as each
one is properly terminated with an END_IF clause.
Examples:
IF (X_CENTER != 0)
OUTPUT $ “I” X_CENTER;
END_IF;
IF (VAR_SET(X_CURPOS) && X_CURPOS < 100)
OUTPUT $ “X” X_CURPOS;
OLDX = X_CURPOS;
ELSE
X_CURPOS = X_CURPOS + 1;
END_IF;
Note: indentation of the statements inside an IF structure, as shown in these examples, is not
mandatory. However, it is very useful in making the GPP program easier to read and understand. It is
highly recommended to indent each level of nested IF statement, as follows:
IF (<expr>)
IF (<expr>)
Statements…
ELSE
Statements…
END_IF;
END_IF;
3.6.3 IF_SET
The IF_SET statement is essentially a shortcut for the IF statement, used to check if a given variable
is “on”. In old GPP, it could be used as a generic “if” statement. In GPP2, it is only used to test the “on”
flag of variables.
IF_SET ( <variable> ) // same as IF(VARSET(<variable>))
Sequence of execution statements...
END_IF;
Note that use of IF_SET is identical to using the IF statement with the VAR_SET function. The
IF_SET / ELSE combination is also supported.
GPP2 will issue a runtime warning if the IF_SET statement is used with a non-modal variable (since
this test is mostly useful for modal variables).
3.6.4 IF_EXISTS
The IF_EXISTS statement was used in the past to check the existence of Tools/Cycles user-defined
variables of the form $XXX. Since these variables are no longer supported in GPP2, IF_EXISTS is
not supported in GPP2.
CimatronE 10.0 GPP2 User Guide ⎪115
3.6.6 OUTPUT
The OUTPUT statement writes text to the output G-code file. This is the way to generate the post-
processor output machine program.
OUTPUT argument1 argument2 ...
The arguments of the OUTPUT statement are special entities in GPP2, and regular expressions
cannot be used. The arguments may be one of the following:
The new-line character (e.g., $): this argument may only be used if the GPP program contains a
NEW_LINE_IS section where the new-line character has been defined. The OUTPUT argument must
match the character used in that earlier definition.
In response to the new-line character in the OUTPUT statement, GPP2 will execute the statements
listed in the NEW_LINE_IS block. The mechanism is similar to a procedure call each time the new-line
character is encountered. All real output is expected to take place in the NEW_LINE_IS block itself.
Strings: any constant string may be used
CimatronE 10.0 GPP2 User Guide ⎪116
Variables: GPP2 will format the variable according to its format, and convert it to a string. For string
variables, the formatted output is simply the variable contents. For numeric variables, the formatted
string depends on the DF2 file definitions, as explained earlier.
Any type of GPP variable may be used (system user or interaction). Array members may also be
used, but not full arrays.
Using non-initialized variables does not generate any output and creates a runtime warning.
With GPP2, it is possible to output a variable regardless of it “set” status. The same result will
be created if the variable is set “on” or “off”.
Many times, the PP program tests the status flag before outputting a variable. For instance, a common
line will be:
IF_SET (X_CURPOS) OUTPUT “ X” X_CURPOS; END_IF;
The IF_SET statement ensures that no output is generated if X_CURPOS is not set. This, of course,
includes the “ X” string.
If, however, the GPP developer wishes to output a variable value regardless of its set status, he or she
can do so easily without using the SET_ON statement first.
For instance, consider the following code after a tool change:
SET_ON SPIN_SPEED SPIN_DIR // Not needed in GPP2!
OUTPUT $ " S" SPIN_SPEED " " SPIN_DIR; // output guaranteed!
The OUTPUT line will turn the spindle on regardless of the set values of the parameters.
Modal variables are set “off” after being output (if they were “on” before).
The special TAB_ keyword: instructs GPP2 to insert space characters until the next tab position. Tab
positions can be defined with the SET_TABS statement. In case the output file is already positioned on
a tab position, GPP2 will insert spaces until the next tab position.
CimatronE 10.0 GPP2 User Guide ⎪117
Control characters (\A to \Z): GPP2 will output the corresponding ASCII character to the output file
(1 for \A, up to 26 for \Z). Also, \+ may be used to indicate the new-line character (same as \J).
In addition, any ASCII character can be output by using the \ddd format, where ddd is the ASCII
value of the character. That format may be used to output non-standard characters that do not fall
between ASCII 1 to 26 (e.g., \250). The number must be no higher than 255.
GPP2 has a special treatment to the new-line control character (\J or \+). It will only output it if the
current file line already contains some other characters. Otherwise, the new-line character will be
suppressed. That way, no empty lines are ever generated in the output G-code file. At the end of the
file, if the last line is not terminated with a new-line character, GPP2 will automatically add it.
Examples:
OUTPUT “X” X_CURPOS $;
OUTPUT TAB_ “A” TAB_ “B” \J;
OUTPUT $ LIN_MOV $;
Suppose the tabs were set as follows with the SET_TABS statement:
SET_TABS 4 8 12 16; // tabs every 4 positions
Now, suppose the GPP program executes the following statements:
OUTPUT \J "12345678901234567890";
OUTPUT \J TAB_ "A" TAB_ "B" TAB_ "C" TAB_ "D";
OUTPUT \J "*" TAB_ "A";
OUTPUT \J "***" TAB_ "A";
OUTPUT \J TAB_ TAB_ TAB_ TAB_ "D";
The output file will look as follows:
12345678901234567890
A B C D
* A
***A
D
CimatronE 10.0 GPP2 User Guide ⎪118
The OUTPUT command does not support standard expressions. In order to output expressions, they
first need to be assigned to variables, which will be used in the OUTPUT command. It means that all
calculations and string operations must be done in advance. In order to output the value of A + B:
C = A + B;
OUTPUT C; // OUTPUT A + B; is invalid
In order to output a value that is the result of a function (like the number of the next-tool):
A = NEXT_TOOL(TOOL_NUM);
OUTPUT A;
In order to output a manipulated string (like upper-case):
A = STR_UPPER (MyParameter);
OUTPUT A;
Notes:
It is not recommended to use the new-line character (e.g., $) in any of these PRINT statements (since
the block will probably contain OUTPUT statements that will send text to the main G-code file, not to
the expected PRINT destination). The \J control character (new line) should be used instead.
1. The <toolpath> name is the name of the GPP2 input DAT file, without any extension.
2. The <post> name is the name of the current post-processor used, without any extension.
PRINT0 was traditionally used in old GPP to create the script (batch) file that is run after the post-
processor execution. With GPP2, post-run system commands may be created and executed in the
new POST SCRIPT block, essentially making the PRINT0 command mostly redundant.
Using the OUTPUT_CLOSE when no redirection is active (output is currently sent to the main file) has
no effect, and a runtime warning is issued.
The use of OUTPUT_REDIRECT can be nested, by using different letters. For instance, output can be
redirected to “._a01”, then redirected to “._b01”, then redirected to “._c01”. The behavior is like a
“stack” of redirections. The first use of OUTPUT_BACK will restore redirection from “._c01” to “._b01”,
the next use will restore it to “._a01” and another use will restore it to the main file.
GPP2 will support up to 10 levels of nesting. It is only allowed to use any letter once inside a nesting
redirection stack. Therefore, trying to redirect to “a”, then to “b” and then to “a” again (without going
back to the main file) will generate a runtime error.
Examples:
OUTPUT “Main file line 1”;
OUTPUT_REDIRECT “a”; // redirect output to “._a01”
OUTPUT “AAAAA line 1”;
OUTPUT_REDIRECT “b”; // redirect output to “._b01”
OUTPUT “BBBBB line 1”;
OUTPUT_CLOSE; // close file “._b01”
OUTPUT “BBBBB line 1 to file ._b02”; // send to file “._b02”
OUTPUT_REDIRECT “c”; // redirect output to “._c01”
OUTPUT “CCCCC line 1”;
OUTPUT_BACK; // restore output (to “._b02”)
OUTPUT “BBBBB line 2 to file ._b02”;
OUTPUT_BACK; // restore output (to “._a01”)
OUTPUT “AAAAA line 2”;
OUTPUT_BACK; // restore output (to main file)
OUTPUT “Main file line 2”;
CimatronE 10.0 GPP2 User Guide ⎪121
The output files generated will be as follows (assuming the main file is named tp.post):
File tp.post (main):
Main file line 1
Main file line 2
File tp.post._a01:
AAAAA line 1
AAAAA line 2
File tp.post._b01:
BBBBB line 1
File tp.post._b02:
BBBBB line 1 to file ._b02
BBBBB line 2 to file ._b02
File tp.post._c01:
CCCCC line 1
3.6.9 LOAD_FILE
LOAD_FILE is formally a function, not a statement. However, it is described here (and not in the
functions section) since it is actually used as a statement.
LOAD_FILE allows the GPP developer to load an external file and dump it, as is, to the current output
G-Code file.
RESULT = LOAD_FILE (<str-expr>) Load file named in the string
LOAD_FILE will evaluate the string expression and will load the file with the resulting name. The name
is expected to include the full path name.
The function returns a numeric value: 1 if the loading was successful, 0 if not. That way, the GPP2
program can take action in case the loading of the file failed. In case of failure, a runtime warning is
issued as well.
The data from the loaded file will be sent to the “current” output file. In case of output redirection, it will
be sent to the redirected output file.
Note: GPP2 supports a DF2 parameter that can force the output to be all lowercase or all uppercase.
If that parameter is used, it also affects the loaded file data – it will all be converted to lowercase or
uppercase respectively.
Examples:
RESULT = LOAD_FILE (“C:\Cimatron\MyData.txt”);
IF (RESULT == 0) GPP_STOP; END_IF;
LOAD_FILE(“C:\Cimatron\MyData.txt”); // Error! LOAD_FILE is a function.
CimatronE 10.0 GPP2 User Guide ⎪122
3.6.11 Sequencing
GPP2 provides new tools for sequencing of G-code output lines, in several levels of nesting. It allows
sequencing of a main program as well as machine subroutines, at several levels.
The sequencing mechanism works as follows:
• A new numeric global system variable, SEQ_NUM, is used to hold the current sequence number.
SEQ_NUM is “auto-incrementing” – each time it is sent to the output, its value is incremented by a
predefined number (e.g., 1 or 10).
• The auto-increment value is determined by a new DF2 parameter, which can be later overridden
through a GPP2 global system variable, SEQ_INC.
• The sequencing start number is determined by another DF2 parameter, which can be later
overridden through a GPP2 global system variable, SEQ_START.
• The maximum sequencing number is determined by another new DF2 parameter, which can be
later overridden through a GPP2 global system variable, SEQ_MAX. Whenever SEQ_NUM is
incremented above SEQ_MAX, it is automatically reset to the predefined start value (represented in
SEQ_START).
• Typically, SEQ_NUM is sent to the output in the New-Line-Is block, if sequencing is required.
• In case a new series of sequencing is required for a machine subroutine (e.g., for 2.5X
subroutines), the SEQ_LEVEL_NEXT command is used to re-initialize SEQ_NUM with a predefined
start number.
• Once the subroutine is finished, GPP2 is instructed to go back to the previous sequencing series,
with the SEQ_LEVEL_BACK statement. This statement restores the previous value of SEQ_NUM
(the value it had when the SEQ_LEVEL_NEXT statement was executed).
• It is possible to use up to 10 levels of nesting for separate sequencing levels. In practice, no more
than 3 levels are usually needed (main program plus two levels of subroutine nesting).
SEQ_LEVEL_NEXT; // increase nesting, reset SEQ_NUM
SEQ_LEVEL_BACK; // decrease nesting, restore SEQ_NUM
CimatronE 10.0 GPP2 User Guide ⎪124
Examples:
Assume SEQ_NUM happens to be equal to 200, and SEQ_INC is 10.
OUTPUT \J SEQ_NUM; // output 200, SEQ_NUM gets 210
SEQ_START = 1000; // next level will start here
SEQ_LEVEL_NEXT; // SEQ_NUM is set to 1000
OUTPUT \J SEQ_NUM; // output 1000, SEQ_NUM gets 1010
OUTPUT \J SEQ_NUM; // output 1010, SEQ_NUM gets 1020
SEQ_LEVEL_BACK; // SEQ_NUM restored to 210
OUTPUT \J SEQ_NUM; // output 210, SEQ_NUM gets 220
The FILE_NAME system variable is very useful in the SYSTEM_CALL statement, as it contains the
toolpath name and the post name:
Examples:
SYSTEM_CALL “copy ” FILE_NAME “.s* subs.txt”;
This system command will copy all the subroutine files generated through the run to one file called
subs.txt. Assuming the toolpath file is called “TP” and the post being used is called “DEMO”,
FILE_NAME will contain the value “TP.DEMO”. GPP2 will execute the following command: “copy
TP.DEMO.s* subs.txt”.
SYSTEM_CALL “RENAME ” FILE_NAME “ OUTPUT”;
This system command will rename the output G-code file. For the same file and post names, GPP2
will execute the following command: “RENAME TP.DEMO OUTPUT”.
Note: If the output file name is changed using system calls, the EX2 program must “tell” GPP2 about
the new file name, so it will be able to display the G-code file if requested. Simply assign the new
name to FILE_NAME, inside the POST SCRIPT block.
FILE_NAME = “OUTPUT” ;
Similarly, if the output file is copied or moved to another directory, the EX2 program must tell GPP2
about the new directory. The current output directory name is held in the OUTPUT_DIR variable. The
EX2 program must update its value as needed.
For instance, assume that a sub-directory name “SUB” needs to be opened under the current output
directory and the G-code file must be moved to the new sub-directory.
SYSTEM_CALL “MD SUB” ; // create sub-directory
SYSTEM_CALL “MOVE ” FILE_NAME “ SUB” ; // move G-code file
OUTPUT_DIR = OUTPUT_DIR + “SUB\” ; // tell GPP2
CimatronE 10.0 GPP2 User Guide ⎪126
3.6.13 GPP_STOP
This GPP2 statement allows the GPP developer to stop the execution at any point. It is used in cases
where there is no point in carrying on with the process (e.g., reached machine limits or some other
critical condition).
GPP_STOP;
GPP_STOP <str-expr>; // string is optional
In case a string argument is used, it will be displayed to the user. That way, the developer can explain
why the execution had to be stopped (or what needs to be done in order to fix the problem).
Examples:
GPP_STOP “Reached machine X axis limit!”;
3.6.15 KEEP
The KEEP statement is no longer supported in GPP2 (it had no effect in old GPP either). The values
of system variables are “kept” anyway, until changed in a subsequent toolpath block or explicitly in the
GPP program.
CimatronE 10.0 GPP2 User Guide ⎪127
Procedure parameters can be named like any other user-defined parameter (e.g., X, Y). In fact, they
may even use names already used by other “global” user-defined variables. GPP will not be confused
by an X variable defined in the program declaration part and another X parameter defined inside a
procedure.
This behavior, common to many programming language, is known as variable name “scope”.
Normally, GPP works within a global scope, where all variables are recognized and no duplication is
allowed. When a procedure is called, however, GPP enters a local scope, where procedure
parameter names take precedence over any global variable of the same name.
Referring to X inside the procedure will mean the local parameter X, while referring to X outside the
procedure means the global user-defined variable X.
This behavior must be understood by the GPP developer. The advantage of it is the ability to use
simple and short variable names, such as X, I, CNT and TMP, inside procedures, without worrying
about duplication of variable names.
Example:
FORAMT (USER_1) X; // global parameter X
GPP_PROCDEF Proc1;
GPP_PROCPARAM REAL X; // local parameter
OUTPUT X; // this refers to the local variable
more statements...
Examples:
Executing: 0064 X = (X_CURPOS + 20.0)
Result: X = 35.333333 // shows internal value
Executing: 0065 IF(VAR_SET(Arr[2]))
Condition: TRUE value
Executing: 0066 OUTPUT X CONTROL(10) “abc”
Output: “35.333” // the formatted value
Output: Char(10) // new-line character
Output: “abc”
Executing: 0067 GPP_CALLLPROC myproc (1, “abc”)
Parameters myproc.step = 1, myproc.msg = “abc”
Notes:
1. The executed statements are not shown exactly as they were written in the original EXF file.
What is shown is the compiled representation of these statements. In most cases, the printout
will be self-explanatory. Note that expressions will be shown with parentheses, exactly
describing the structure of complex mathematical expressions.
2. In IF_SET statements that use the traditional GPP “short form” to test if a variable is “on” (e.g.,
IF_SET (X_CURPOS), the trace printout will show the implicit VAR_SET function used by GPP:
IF (VAR_SET(X_CURPOS))
3. In assignment statements, the internal value of the assigned variables is shown, with 6 decimal
digits, regardless of their format. The formatted form is clearly shown in OUTPUT statements of
the variables.
4. When an assigned variable has identical variables, all of them will be shown in the result
section. For instance:
Executing: 0064 X = (X_CURPOS + 20.0)
Result: X = Y = 35.333333 // X and Y are identical
5. Control characters (like \J) in Output statements are shown as CONTROL(nn), where nn is
the ASCII value of the character. \A has ASCII value of 1, \J is 10, and \Z is 26. The resulting
output is shown as Char(nn).
6. The execution of each block, including the new-line block, is titled.
7. When a procedure with parameters is called, the trace shows the values assigned to its
parameters as follows: suppose a procedure myproc has a parameter step of type numeric.
The trace will show myproc.step = 1.
CimatronE 10.0 GPP2 User Guide ⎪131
Notes:
1. All formats represent double-precision floating point numeric numbers, except format
CHARACTER (0), which represents a string (up to 256 characters).
2. The COORDINATE format (1) has a special meaning in GPP2. Every system variable of that
format is multiplied by the unit factor, as defined in the DF2 file.
3. In GPP2, the FEED format (3) is also multiplied by the unit factor, as defined in the DF2 file.
CimatronE 10.0 GPP2 User Guide ⎪143
4.4.2 Sequencing
The following new variables control the automatic sequencing process.
On some machines and under some conditions, it is necessary to introduce a connection between two
consecutive drill cycles. For instance, a connection may be needed if the drill plane height (the “Z”,
measured along tool axis) changes between the holes. A connection may also be needed in full 5X
drill, where two successive holes may require a different orientation.
The following new variables control the way GPP2 handles inter-cycle connections.
4.4.7 Miscellaneous
System Variable Default Use and Comments
format
SUBS_CTRL_BYPLANE 6 Determines if 2.5X subroutines are exploded in the G-
Code file, depending on the subroutine plane.
Use the following predefined values:
DEF_NONE (no subroutines)
DEF_XYONLY
DEF_MAJORPLANES
DEF_ANYPLANE
This system flag replaces NO_SUBROUT
CYC_CTRL_BYPLANE 6 Determines if drill cycles can be performed on the
machine, based on the cycle plane.
Use the following predefined values:
DEF_NONE
DEF_XYONLY
DEF_MAJORPLANES
DEF_ANYPLANE
If a drill cycle is not supported, GPP2 will set the
CYC_MANUAL variable. It is the responsibility of the EX2
program to further handle the situation.
SUPPRESS_BLANKS 6 If set to TRUE_ (1), GPP2 will suppress any blank lines, as
well as any spaces at the beginning of each output line. If
set to FALSE_ (0), the output will be “as is”.
TOOLCHANGE_TIME 18 This parameter controls the time required to change a tool
in the machine. This time is added to the air motion time
for each tool.
CimatronE 10.0 GPP2 User Guide ⎪153
A_LASTPOS 2 The angles for “alpha” and “beta” rotary axes of the last
B_LASTPOS tool position (4/5 axes machines)
TP_BLOCKS 6 The number of blocks in toolpath.
CimatronE 10.0 GPP2 User Guide ⎪158
4.8.5 Miscellaneous
System Variable Default Use and Comments
Format
REVERSE_X_AXIS 6 If set to TRUE_ (1), reverse (negate) the X axis output. The
negation takes place after all calculations are done with
the regular X axis direction.
REVERSE_Y_AXIS 6 If set to TRUE_ (1), reverse (negate) the Y axis output. The
negation takes place after all calculations are done with
the regular Y axis direction.
REVERSE_Z_AXIS 6 If set to TRUE_ (1), reverse (negate) the Z axis output. The
negation takes place after all calculations are done with
the regular Z axis direction.
REVERSE_CW_AXIS 6 If set to TRUE_ (1), reverse the circular motion directions
commands (clockwise and counterclockwise). GPP2 will
output the opposite machine code to the CIRC_MOV and
MOTION_CODE variables.
REVERSE_ANG_AXIS 6 If set to TRUE_ (1), reverse (negate) the circular motion
angles. GPP2 will negate the variables ARC_ANG, ST_ANG
and END_ANG.
MACH_MAJOR_AXIS 6 Defines the machine “major” axis (usually axis Z). This
information is used for GPP2 connections, where GPP2
requires that the major axis of output UCS is aligned with
the major axis of the machine.
This variable is set by default to constant AX5_PZ, and
should only be changed for machines where the major
axis is horizontal (valid values are AX5_PX, AX5_PY,
AX5_MX and AX5_MY).
CimatronE 10.0 GPP2 User Guide ⎪170
4. In GPP2, the set of variables EL_PRNAME1 to EL_PRNAME1 (E Long name) have been replaced
by one variable, PROC_LONGNAME.
5. In GPP2, the *_START variables (X_START, etc.) are not used.
6. In GPP2, X_INTER, Y_INTER, and Z_INTER are not used.
4. In GPP2, the variables PART_NAM2 to PART_NAM13 have been deleted. The PART_NAME
variable is used to hold the full part name (up to 256 characters).
5. In GPP2, the variables PART_PATH2 to PART_PAT13 have been deleted. The PART_PATH
variable is used to hold the full path name (up to 256 characters).
6. In GPP2, the variables LAST_TOOL and FIRST_TOOL have been replaced by functions that
provide information about any parameter of the first or last tool. See GPP2 Language
Reference Manual for details.
Notes:
1. Each time this block is called, either CUTCOM_OFF is set “on” and CUTCOM_ON is set “off” or vice
versa. These two parameters work in conjunction with each other – exactly one of them is set
“on” and indicates the nature of the block (off or on) as well as the machine code that should
be output.
CimatronE 10.0 GPP2 User Guide ⎪183
CYC_NEXT 6 Indicates the type and nature of the next cycle bloc. It may
get one of the following values:
CYC_OFF: this is the last cycle in a series, and the next
cycle block is a cycle “off”.
CYC_SAME: the next cycle has the same orientation as the
current cycle.
CYC_ROTATED: the next cycle has a different orientation
than the current cycle.
CYC_NEXT_CONNECT 6 Indicates if a connection is needed for the next cycle. GPP2
will set it to TRUE_ or FALSE_ based on the relevant DF2
parameters.
During the CYCLE block, the EX2 program may override the
value of this variable, forcing GPP2 to have or avoid a
connection after the cycle.
ZCYC_NEXT_INIT 1 The “init” Z value of the next cycle. This variable is only
meaningful if the next cycle is in the same orientation as
the current cycle. See CYC_NEXT.
ZCYC_NEXT_CLEAR 1 The “clearance” Z value of the next cycle. This variable is
only meaningful if the next cycle is in the same orientation
as the current cycle. See CYC_NEXT.
ZCYC_INIT_FIRST 1 The “init” Z value of the first cycle in a series (the “on” or
“toinit” cycle.
ZCYC_END 1 The tool Z value after the cycle. GPP2 initializes that
variable according to the retract code (to the init or
clearance height).
During the CYCLE block, the EX2 program can change the
value of the variable, telling GPP2 where the tool really
ended, based on the specific machine behavior.
TOOL_FEED_TIME 0 The total cutting time of the current tool until (and including)
this block. This is a string variable, of the form “hh:mm:ss”,
measuring the cutting time in hours, minutes and seconds.
CYCLE_SUB 6 If the value of this parameter is 14, this means that it is a
thread milling cycle, otherwise it is one if the legacy cycles.
TRD_APRFED 18 Relevant only to thread cycle (CYCLE_SUB is 14).
Approach Feed, expressed as percentage (%) of normal
feed rate.
Real, non-unit-dependent.
CimatronE 10.0 GPP2 User Guide ⎪186
TRD_STOCK_WIDTH 1 Material stock width. GPP2 will make several passes, each
one deeper into the material, and each one closer to the
nominal thread size by the side step.
For internal threads, GPP2 will start with a diameter smaller
than the nominal, and will enlarge it with each pass. For
external threads, it does the opposite.
In GPP, this variable is named: TRD_STKWID.
TRD_SIDE_STEP 1 The side step used between two passes, except possibly
the last pass. Only relevant if the stock width is not zero.
In GPP, this variable is named: TRD_SIDEST.
TRD_APR_RADIUS 1 Thread helix requested approach radius. The actual radius
may be smaller if there is no room between the tool and the
hole (in internal threads only).
Approach radius of 0.0 indicated normal approach.
In GPP, this variable is named: TRD_APRRAD.
TRD_CUTTER_COMP 6 Flag indicating cutter compensation mode:
0 – off.
1 – on, with toolpath created for the tooltip.
2 – on, with toolpath created for the geometry – this mode
is only relevant to CimatronE10 and beyond!
In GPP, this variable is named: TRD_CUTCOM.
TRD_USE_ARCS 6 If TRUE_, GPP2 will use helical (360-degree) arcs for the
thread helix. If FALSE_, all arcs will be broken to linear
motions.
Default is TRUE_ if the PP uses “linear arc fitting” (as
defined in the DF2 file) and helical arcs are allowed there
(see variable ARCFIT_HELICAL). Otherwise, the default of
TRD_USE_ARCS is set to FALSE_.
TRD_LIN_TOL 1 If arcs are broken to linear motions, this variable defines
the tolerance (maximum distance between the perfect arc
and the linear lines).
Default 0.01 mm (0.0004 inch).
In GPP, this variable is named: TRD_LINTOL.
TRD_FASTFED_PERCENT 18 Feed rate of the “fast” motions inside the cycle (like moving
up to do the next pass). Expressed as percentage of
normal feed.
CimatronE 10.0 GPP2 User Guide ⎪188
A_CURPOS 2 Target angles for “alpha” and “beta” rotary axes (4/5 axes
B_CURPOS machines)
I_CURPOS 18 Target tool axis orientation (at the end of the motion), in the
J_CURPOS posting UCS coordinate system. Note – these variables
K_CURPOS replace the old GPP I/J/K_COORD.
TOOL_FEED_TIME 0 The total cutting time of the current tool until (and including)
this block. This is a string variable, of the form “hh:mm:ss”,
measuring the cutting time in hours, minutes and seconds.
MOTION_LENGTH 1 Real length of motion, as measured on the work piece itself
– useful for Inverse Time Feed Rate mode.
INVERSE_TIME_FEED 3 The feed rate for the Inverse Time mode. This feed rate is
calculated by dividing the original feed rate (as expressed
in the MCH_FEED variable) by the motion length (as
expressed in the MOTION_LENGTH variable).
SET_REF_BY_VARS FALSE_ When set to TRUE_ in the ORIGIN CHANGE block, GPP2
(format 6) Set by will modify the REF UCS to be according to the values set
GPP2 at in the above *_REF variables.
run-time
(in
response
to the
EX2
program
setting it
first)
UCS_COUNT 6 Counts all UCS's, including new ones created by
transformations.
Note: All coordinates and orientation vectors are given in accordance to the GPP orientation definition
(e.g., MACSYS) and with respect to the model UCS zero point (like regular procedure motions).
CimatronE 10.0 GPP2 User Guide ⎪195
TOOL_TOTAL_LENGTH 1 The calculated total length of the tool (including holder and shank).
Only relevant for 5X machines with a rotated head and no head
RTCP.
Note: This length can be overridden by the EX2 program during
the TOOL CHANGE block (e.g., based on an exact value entered by
the user during the interaction).
GPP2 will only use the variable value to modify the machine
geometry after the block is executed.
TOOL_TYPE_NAME 0 Outputs the tool type name as a string; different from E_TOL_TYPE
which outputs the same as a number.
USE_WHOLEN 6 Use whole length.
WHOL_LEN 1 Cutter whole length.
These machines have two rotary axes on the table, one mounted on top of the other. The head is
fixed, typically (but not necessarily) at the Z axis orientation. On table-table machines, the part, which
is mounted on the table, rotates and moves with each axis rotation (hence, the procedure origin UCS
rotates and moves as well). The spindle and tool remain stationary, and are not affected by axis
rotation.
We term the first axis (mounted on the floor) the primary (or alpha) axis, and the other axis (mounted
on top of the first) the secondary (or beta) axis. Note that rotation of the alpha axis affects the position
and direction of the beta axis.
The following diagrams illustrate several table-table machines. The alpha axis is shown in green,
whereas the beta axis (the table) is shown in blue.
Figure 3: Alpha axis Z,-Y (45 degrees), Beta axis Z, Vertical Tool
CimatronE 10.0 GPP2 User Guide ⎪203
These machines have one rotary axis on the table, and one rotary axis on the head. The axes are
independent – rotation of one axis has no effect on the other.
In GPP2, the table axis is always termed the primary (or alpha) axis, and the head axis is the
secondary (or beta) axis.
The part, which is mounted on the table, rotates and moves with the table axis. The spindle and tool
rotate with the head axis.
The following diagrams illustrate several table-head machines. The table axis is shown in green,
whereas the head axis (the table) is shown in blue.
In these machines, both rotary axes are located on the spindle, and the table does not rotate. As a
consequence, the part (and procedure origin UCS) does not rotate either.
One axis is mounted on top of the other. The “base” axis, mounted on the machine, is called the
primary (alpha) axis, and the second axis, mounted on the first one, is called the secondary (beta)
axis.
The following diagrams illustrate several head-head machines. The alpha axis is shown in green,
whereas the beta axis is shown in blue.
These machines have one rotary axis only, mounted on the table. In GPP2, these machines are
defined as table-head (TH), with a “null” head axis (since the head does not really rotate. Hence, the
table axis is the primary (alpha) axis, and the secondary (beta) axis is not used.
CimatronE 10.0 GPP2 User Guide ⎪205
The part rotates with the table, so the procedure origin UCS rotates and moves with each rotation.
These machines have one rotary axis only, mounted on the spindle. In GPP2, such machines are
defined as head-head (HH), with a “null” beta axis. The rotating axis is defined as the primary (alpha)
axis.
Note that axis X (1,0,0) is not the same as axis –X (-1,0,0). The difference is in the direction of
rotation. The direction vector also defines a unique direction of positive and negative rotations, as
illustrated in the following figures.
Z Machine Z Machine
Coordinate System Coordinate System
Y Y
Positive
Direction
Positive
Direction X X
GPP2 also allows users to manually define machine rotation axes. This allows the definition of any
axis direction vector, where predefined axes are not available. Very few machines will require that
capability.
This is a very advanced and very complex GPP2 capability, and should only be used if absolutely
necessary. In order to use a manually-defined axis, the following steps should be followed:
- Assign the (I,J,K) values of the rotation axis to system variables M5_A_I, M5_A_J and M5_A_K
(for the alpha axis) or M5_B_I, M5_B_J and M5_B_K (for the beta axis).
- Assign a second direction vector, perpendicular to the axis (I,J,K) to represent the “zero” vector
of the rotation axis. This is required because each machine axis is actually represented
internally as a full rotation matrix. This “zero” direction vector should be assigned to variables
M5_A_00I, M5_A_00J and M5_A_00K (for the alpha axis) or M5_B_00I, M5_B_00J and
M5_B_00K (for the beta axis).
- Use the predefined constants AX5_MANUAL_A (for the alpha axis) or AX5_MANUAL_B (for the
beta axis) in the machine definition command.
Notes:
1. It is possible to use one predefined axis and one manually-defined axis in the same machine.
2. The “zero” vector of the alpha axis may be any vector perpendicular to the axis itself. However,
the “zero” vector of the beta axis must reside on the same plane as the alpha axis direction.
This is necessary for the GPP2 solver operation.
3. Confused? Call Cimatron support for help in using this advanced feature.
CimatronE 10.0 GPP2 User Guide ⎪209
The primary and secondary axes should be one of the predefined axes listed above.
Examples (only the parameters to the command are shown):
This is probably the most complex part in the 5X machine definition – the relation between the axes
and the machine geometry.
GPP2 uses two vectors to define the relationship between the axes and from the table axis to the
Anchor Point (also known as the “red point”). In rotating head machines, the vectors are used to define
the relationship to the spindle center point.
These vectors are only important for machines with no RTCP – so that GPP2 can do the
necessary corrections itself. With RTCP, these vectors are ignored. However, they always affect
the output to the machine simulator, so it is highly recommended that they are set properly to allow the
use of the machine simulator.
CimatronE 10.0 GPP2 User Guide ⎪211
Table – Table From the center of the alpha From the end of the A vector to the
rotation axis to the center of the Anchor Point.
beta rotation axis
Table – Head From the center of the alpha From the center of the beta
rotation axis to the Anchor rotation axis to the spindle center
Point point.
Head – Head From the center of the alpha From the end of the A vector to the
rotation axis to the center of the spindle center point.
beta rotation axis
The “center of an axis” is not really a single point – it is a line – the rotation axis itself. So, where
should a vector actually start? Surely, picking different points along the alpha rotation axis as the start
point of the A vector will result in different vectors. So, which start point is the right one? Interestingly,
all of them are equally valid. GPP2 has a mechanism that deals with such vectors regardless of their
start point along the axis. Therefore, the most convenient point should be used as the start point (e.g.,
the point just “under” the beta axis).
In table-table or head-head machines, the B vector must start at the end point of the A vector.
CimatronE 10.0 GPP2 User Guide ⎪212
The following diagram shows a simple case of a table-table machine. The alpha axis is around X, and
the beta axis is around Z.
As can be seen from the side view, the A vector extends from the center of the alpha axis to the top
center of the table. The Anchor Point is at the center of the table, so the B vector is zero.
The following diagrams illustrate the A and B vectors in a more complex table-table machine, with an
alpha Z axis and a beta X axis.
The B vector connects the beta rotation axis to the spindle center point. Here, we chose a B vector that is
not perpendicular to the rotation axis. As explained before, the vector can start anywhere along the axis
rotation line, as long as it starts where the A vector ends.
Note that when a tool will be later added to this machine, the tool “vector” will actually be added to the B
vector, since it effectively extends the lever of the beta axis.
Finally, consider the Table-head machine shown below.
The A vector connects the center of rotation to the Anchor Point. As shown here, the Anchor Point is not
centered on the table, so the A vector is not zeroed.
The B vector connects the center of rotation to the spindle center point (and can never be zeroed in
machines with rotating heads).
GPP2 supports machines where the tool is not necessarily aligned with the Z axis. For instance, it is
possible to define a machine with a fixed horizontally mounted tool.
In order to do so, the GPP developer has to define the following system variables, and set them with
the tool direction: M5_TOOL_I, M5_TOOL_J and M5_TOOL_K. By default, these variables are set to
(0,0,1) – the Z axis direction.
Note: the direction vector should point into the tool, not away from the tool. In the standard case, the
tool points down, but the tool vector points up (0,0,1), into the tool.
CimatronE 10.0 GPP2 User Guide ⎪215
In rotating head machines (table-head or head-head), the length of the tool determines how much the
tool tip is moved with each rotation. In fact, the length of the tool should be added to the B vector (the
tool essentially extends that vector).
In rotating head machines, GPP2 automatically adjusts the B vector length to include the tool and
holder length with each tool change. Usually, no handling is required from the GPP developer.
In some cases, the calculated tool length is not accurate (for instance, if the tool was sharpened and is
shorter than its nominal value). In such cases, the user wishes to enter the accurate (measured)
length during the GPP2 interaction.
For that reason, the calculated tool length value may be overridden by the EX2 program during the
TOOL CHANGE block, through the use of the TOOL_TOTAL_LENGTH system variable.
• GPP2 first calculates the total length and sets the variable before going into the TOOL CHANGE
block execution.
• Then, the EX2 program has a chance to modify the value inside the block.
• Only after the TOOL CHANGE block is processed, GPP2 uses the value of the variable to set the
machine geometry.
Recall that all this is only relevant in machines without head RTCP. If the machine has head RTCP,
then it does the correction itself (for the spindle and the tool alike).
Head RTCP applies to machines with a rotating head (one or two axes are in the head). If supported,
the machine controller will adjust the tool position with every rotation of the head, as demonstrated in
the figure below.
Different Spindle
This would positions Without RTCP, GPP2 has to
be the new modify the output position by
Tool Tip Move Diff, when rotating the head.
position
without the With RTCP, the same output
correction position is used – the machine
2 1 3
controller makes the correction
Assume the tool is located at position 1, and needs to be rotated at an angle but still remain at the
same tool tip position. Rotating the head without any correction would result in position 2, far away
from the desired tool tip position. The spindle position must be corrected (moved to the right) in order
to reach position 3.
With Head RTCP, it is the controller that handles the position correction. Without Head RTCP it is
GPP2 that does the same.
For machines with Head RTCP, the M5_RTCP_HEAD variable has to be set to TRUE_. For machines
without Head RTCP, it has to be to FALSE_. The variable can be set dynamically during the run –
GPP2 will adjust its output accordingly.
Table RTCP applies to machines with a rotating table (one or two axes). Rotation of the table actually
has a double effect on tool tip positions:
• The part is rotated; hence the whole procedure UCS is rotated with it. This rotates and modifies
every tool tip point.
• If the REF coordinate system is not located at the center of axis rotation, the REF UCS zero point
is also shifted because of the axis rotation. That translation needs to be corrected on every tool tip
point.
CimatronE 10.0 GPP2 User Guide ⎪217
Table (0,0,0)
Rotation
center
Table RTCP corrects the REF zero point translation (displacement). The controller adjusts the tool
position in order to compensate for the rotation. It does not correct the procedure UCS rotation – that
is handled by GPP2. In machines without table RTCP, GPP2 handles the full correction.
For machines with table RTCP, the M5_RTCP_TAB variable has to be set to TRUE_. For machines
without table RTCP, it has to be to FALSE_.
Machines using the advanced Heidenhain controllers support a full RTCP correction mechanism,
where the machine controller full corrects the tool tip position for every rotation of the head or the
table.
Full RTCP goes beyond the corrections of head RTCP and table RTCP explained above. It also
corrects for the rotation of the REF UCS (in rotating table machines), so that GPP2 does not have to
make any changes to tool tip coordinates as a result of the axes rotations.
In such machines, it is common to turn this feature on and off on the machine. GPP2 must always stay
in synch with the machine RTCP status. In order to turn on the full RTCP in GPP2, the
M5_RTCP_M128 is set to TRUE_. To turn it off, the variable is set to FALSE_. The variable can be set
dynamically during the run – GPP2 will adjust its output accordingly.
CimatronE 10.0 GPP2 User Guide ⎪218
The following diagrams demonstrate the differences between standard GPP2 output (no RTCP at all),
table RTCP (correction of the zero point) and full RTCP (M128, rotation of the coordinate system
itself).
X=35
Z=30
X=-9.87
Z=53.8
X=8.
Z=45.3
X=30
Z=35
These axes can turn indefinitely to either direction. They are completely cyclic, in terms of the angles
they accept. For instance, they can move from +179 degrees to -179 degrees and properly interpret
this motion as a 2 degree CCW rotation.
Cyclic axes should have the angle range defined as a single 360 degrees interval, such as 0 to 360 or
-180 to 180. GPP2 will ensure that the output angles fall into this range.
An axis is defined as cyclic by setting one of the following variables to TRUE_: M5_A_CYCLIC for the
alpha axis, and M5_B_CYCLIC for the beta axis. Defining an axis as cyclic overrides any other setting
(e.g., resettable).
Resettable axes can also rotate indefinitely to either direction. However, unlike cyclic axes, they use a
limited non-cyclic range of angles. For instance, such an axis may use the range of -3000 to +3000
degrees.
Note that the angle limit is a “soft” limit – the axis can rotate on and on in the same direction. However,
when that software limit is reached, the axis must be “reset” to a smaller angle, within a much smaller
range.
Resetting the axis angle has no effect on the axis position or real angle – it is a software reset only.
For instance, the angle 2999 may be reset to 119 (subtracting a number of full 360 cycles) before the
machine can continue its rotation to angle 3001 (which becomes 121 after the reset).
In order to define an axis as resettable, the following variable must be set to TRUE_: M5_A_RESETABLE
for the alpha axis, M5_B_RESETABLE for the beta axis.
Note that these variables are ignored if the axis is defined as cyclic (see above).
The axis reset range must also be defined. The default range is -360 to +360 degrees, but other
ranges are acceptable (e.g., 0 to 360). The reset range is defined with the following variables:
• M5_A_RESET_FROM and M5_A_RESET_TO for the alpha axis
These are the simple axes with a hard limitation on their rotation range. For instance, an axis may be
limited to rotate between -70 and +110 degrees, or between -720 and +720 degrees.
In order to define a limited range axis, both the “cyclic” and “resettable” variables should be set to
FALSE_ (this is also the default setting).
Limited range axes must be rewound (turned back) when they reach their limit. This is handled by
GPP2, which always generates valid angles for these axes. See discussion below regarding 5X
connections that result from such limit conditions.
Note that for resettable axes, the reset angle range must also be defined, as explained above.
With 5X machines, there are often two angle solutions for the same tool orientation. Typically, one is
positive and the other is negative (or else they differ by 180 degrees).
In some machines, one solution is more desirable than the other. For instance, in some table-table
machines, one solution rotates the parts towards the operator, while the other solution rotates the part
away from the operator, where the part is practically hidden by the table. Preferably, the operator
would like to see the part being machined.
GPP2 allows the developer to define the preference for each axis, with the use of the following
variables: M5_A_PREF for the alpha axis, and M5_B_PREF for the beta axis.
Each variable should set assigned one of the following predefined GPP2 constants:
- PREF_NONE No preference
- PREF_POSITIVE Prefer positive angles
- PREF_NEGATIVE Prefer negative angles
Some 5X machine axes treat positive and negative angles contrary to the GPP2 conventions. For
instance, in GPP2, a counter-clockwise rotation (when viewed from the axis “top” point) is a positive
CimatronE 10.0 GPP2 User Guide ⎪223
change in the angle. In some machines, a positive change may result in clockwise rotation.
In some cases, such angle reversal can also be handled by defining a negative axis direction (e.g., -X
instead of X). In other cases, where the axis in question has a Z component (same as the tool itself),
such an approach will not succeed. For instance, it is not possible to use –Z instead of Z in a table-
table machine.
In order to handle such situations, GPP2 allows the reversal of each axis angle. By setting
M5_A_REVERSED (for the alpha axis) or M5_B_REVERSED (for the beta axis) to TRUE_, all output angles
for the corresponding axis will simply be negated.
Note that internally, GPP2 uses its standard axis and angle definition. The reversal is done just prior to
setting the values in A_CURPOS and B_CURPOS, and invoking the relevant EX2 block.
In 5X machines, each rotary axis has a corresponding letter (just like the X, Y and Z linear axes). It is
possible to specify that letter in GPP2, by setting the following variables: M5_A_LETTER for the alpha
axis, M5_B_LETTER for the beta axis.
Using the letter variables inside the EX2 program makes the post-processor more generic. For
instance, consider the following typical lines:
IF_SET (A_CURPOS) OUTPUT " " M5_A_LETTER A_CURPOS; END_IF;
These lines work for any machine, regardless of the specific axis names (A, B or C).
The same letters are also used in the output for the machine simulator – see later section in this
manual.
Note that these variables may contain more than one letter. For instance, “C1” or “C2” may be used
instead of just “C” – depending on the machine requirements.
CimatronE 10.0 GPP2 User Guide ⎪224
REF UCS
Part Zero
X/Y/Z_MACH
Machine Vector
Anchor Table
Point
This is only relevant for machines with no table RTCP. If the table or full RTCP (M128) is used, then
the machine controller handles the corrections by itself.
CimatronE 10.0 GPP2 User Guide ⎪226
Rapid
approach
End of
segment
Beginning
of segment
Feed
motions Rapid
retract
5X Segment
GPP2 optimizes the angles used within each segment, trying to avoid the need to break the cutting
motions because of machine limits.
In addition, it creates the connections between the segments. These connections are “standard” GPP2
connections, and are fully described in the GPP2 Theory of Operation manual. The connections to and
from the segment are not shown in the diagram.
With the advanced 5X procedures (also known as 5X Production or 5X Aerospace), there may be
additional approach and retract motions, depending on the way the procedure was programmed.
With the advanced 5X procedures, it is possible to force the entire procedure to behave as a single
long segment, including all internal rapid motions. This is done by setting the INTERNAL_5X_RAPID
system flag to TRUE_. The flag only affects 5X advanced procedures.
Note that in some machines, GPP2 can optimize the rotary axes motions better if allowed to perform
its own connections between contiguous sections of feed motions (e.g., when axes need to be rotated
or solutions swapped). This behavior is achieved when the INTERNAL_5X_RAPID is turned off. The
downside is that the connections between segments are not the same as seen inside CimatronE.
CimatronE 10.0 GPP2 User Guide ⎪227
Actual arc
Rotation error motion
In order to minimize such errors, GPP2 supports control over the largest rotation angle allowed in
each linear motion step. Clearly, the smaller the arc – the smaller is the difference between the arc
and the linear line.
GPP2 supports an adaptive algorithm to determine the maximum allowed angle in each linear motion
step. If the X5_FEED_BY_TOL variable is set to TRUE_, GPP2 will use the procedure tolerance value as
the basis for calculating the maximum allowed angle. The procedure tolerance is defined by the
PART_TOL (surface tolerance) or CONT_TOL (contour tolerance) variables – the smaller of the two.
Using the procedure tolerance and the rotation radius, GPP2 calculates the maximum angle to use
(per axis), so that the resulting error will be limited to half that tolerance.
In addition, the maximum angles are limited by the following variables:
X5_FEED_MAX_ALPHA – maximum delta angle for the alpha axis
If the numbers derived from the tolerance are higher than these numbers, the smaller numbers are
used.
Finally, the GPP developer can also define a lower limit for the per-step angle, by setting the
X5_FEED_MIN_ALPHA and X5_FEED_MIN_BETA variables. By default, they are set to zero, and have
no effect. If set to positive non-zero values, they can ensure that GPP2 will not break linear motions to
a huge number of very small steps (in case the procedure tolerance is near zero).
CimatronE 10.0 GPP2 User Guide ⎪229
For cases where the GPP developer chose not to use the procedure tolerance to determine the
maximum angles (X5_FEED_BY_TOL is set to FALSE_), then GPP2 uses the numbers provided in the
X5_FEED_MAX_ALPHA and X5_FEED_MAX_BETA variables.
X5_FEED_MIN_ALPHA = 0.05; // but never use steps smaller than 0.05 degree
Effects of RTCP: Machines with RTCP may be able to do the correction by themselves, even if the
rotated angle is relatively large. However, GPP2 will always consider the X5_FEED_MAX_ALPHA and
X5_FEED_MAX_BETA variables, regardless of RTCP status. No single linear motion will have a larger
axis rotation.
However, the procedure tolerance will only be considered for a given axis if RTCP for that axis is off.
3 2
4 3
X_CON_CLEARANCE
5 2 X_CON_RETRACT 1
4
6 1
Step Motion
1 Tangential retract, feed rate (radius controlled by EX2 variable
2 Normal retract, feed rate, to “retract” height (along tool axis)
3 Normal retract, rapid to “clearance” height (along tool axis)
Perform the rotations at the top point
4 Normal approach, rapid, back to “clearance” height (along tool axis)
5 Normal approach, feed rate, to the arc start point
6 Tangential approach, feed rate, at the same radius.
In tangential 5X connection, the motions 1 and 2 are limited to the distance until the next or previous
point (relative to the connection point). The motion is along the direction to the next point (retract) or
from the last point (approach). That way, GPP2 attempts to make a smooth continuation of the cut
(inside the lane).
If there simply isn’t enough space between the middle point and one of the adjacent points, GPP2 will
revert to normal retract or approach.
The normal connection process is somewhat simpler, and takes place as follows.
X5_CON_TANGENT Set to TRUE_ (1) to use tangential retract and approach. Set to
FALSE_ (0) to use normal retract and approach.
X5_CON_RADIUS In tangential connections, this is the radius of the retract and
approach arcs.
X5_CON_RETRACT The length of the feed-rate retract motion (along tool axis).
Applies to both tangential and normal connections.
X5_CON_CLEARANCE The height of the top point above the surface (along tool axis),
where the actual table rotation takes place.
CimatronE 10.0 GPP2 User Guide ⎪232
Solution A Solution B
Head rotates
just a few
degrees
Table rotates
180 degrees
CimatronE 10.0 GPP2 User Guide ⎪233
Clearly, the axis with the smaller rotation here is the head (beta). Suppose that M5_SWAP_INPLACE is
set by the EX2 program to 2.5 degrees, and that the head rotates from -2.0 to +2.0 degrees. In such a
case, GPP2 will perform the move from solution A to solution B without retracting away from the part.
Total Head
Rotation = 2 * β
Head -β +β Head
Position A Position B
β <= M5_SWAP_INPLACE
Notes:
• By default, the value of M5_SWAP_INPLACE is negative, so this feature is never invoked unless the
EX2 program explicitly modifies it to a non-negative value.
• Setting M5_SWAP_INPLACE to exactly 0 will perform an in-place swap only if one axis does not
need to rotate at all (e.g., the head is perfectly vertical, and only the table rotates).
• It is not recommended to perform an in-place solution swap with non-ball tools, since the
intermediary orientations may damage the part (unless one axis does not rotate at all).
• Recall that no collision check can be performed by GPP2. An in-place solution swap with a
relatively large inclination of the head may collide with the part or stock. It is the responsibility of
the PP developer and the user to ensure that this behavior is only used in safe situations.
CimatronE 10.0 GPP2 User Guide ⎪234
M5_A_SWAP_MIN Relevant only if the swap was caused by axis A reaching its
minimum angle.
M5_A_SWAP_MAX Relevant only if the swap was caused by axis A reaching its
maximum angle.
M5_B_SWAP_MIN Relevant only if the swap was caused by axis B reaching its
minimum angle.
M5_B_SWAP_MAX Relevant only if the swap was caused by axis B reaching its
maximum angle.
Notes:
• GPP2 will ignore the setting of these variables for cyclic or resettable axes (such axes never cause
a solution swap). The variables are only considered for axes with hard limits.
• The relevant variables must be “set on” in order for GPP2 to consider them. The EX2 program
must explicitly set them on in addition to assigning them with a value (especially if that value is 0).
• The EX2 program may set one or more of these variables (independently of each other).
• While the variable names may suggest that they represent a range of some sort (min and max),
they do not. They independently refer to swaps caused by reaching the minimum and maximum
axis extreme points.
• GPP2 will look for a toolpath point that is closest to the desired swap point. However, it will not
generate a new point at the exact desired angle. Therefore, the actual swap point may not be
exactly as desired, but just near it.
• GPP2 will attempt to move the swap to the desired angle specified by the relevant control variable.
CimatronE 10.0 GPP2 User Guide ⎪235
However, the success is not guaranteed. If the algorithm fails to find a point close to the desired
angle, the swap will take place at the original position (near the extreme point that caused it).
It is possible to add a random value, within a given range, to the actual swap point. That way, the
swap point in each lane may be slightly shifted to either side, resulting in an even distribution of the
points where the tool has to break contact with the metal. This may add to the final surface quality
(because the connection points are not found on an exact line or curve).
In order to use the random range, the EX2 program needs to set the M5_SWAP_RANGE variable to the
range size. The actual swap point will be shifted to either side by a random number, between zero and
±M5_SWAP_RANGE. For instance, if the desired swap angle was zero, and M5_SWAP_RANGE is 5
degrees, then the actual swap point will be set randomly, anywhere between -5 and +5 degrees.
The M5_SWAP_RANGE variable applies to all the controlled swap positions, if (and only if) set by the
four variables (A or B, min or max) described above.
CimatronE 10.0 GPP2 User Guide ⎪236
GPP2 verifies that the value assigned to the INVERSE_TIME_FEED variable is never larger than the
maximum value that can be formatted for output for the FEED format. This abnormal situation could
happen if the motion length is extremely small.
Whenever the EX2 program needs to use the Inverse Time mode, it can simply output the value of
INVERSE_TIME_FEED instead of MCH_FEED. The MOTION_LENGTH variable is not absolutely
necessary, and is given mostly for reference.
The <position> argument may be one of the following predefined GPP constants:
POS_RESET Sets the output UCS position to (0,0,0) – the default position.
The output UCS zero is the same as the REF UCS zero. This
is the original machine home position.
POS_REF Sets the output UCS position to the position of the REF zero
point (taking the table rotation into consideration). This is the
home position as viewed on the table (or in Cimatron NC).
POS_PROC Sets the output UCS position to the position of the current
procedure UCS. All output coordinates will be referenced to
the procedure UCS (as in CimatronE NC TP list).
POS_BY_VARS Sets the output UCS position to the position stated in the
following three variables: X_NONROT_UCS, Y_NONROT_UCS
and Z_NONROT_UCS. The variables should be set to the
desired position before the command is used.
POS_NO_CHANGE is used when the output UCS position needs to stay unchanged (the command is
used to change the orientation only). The three position variables must not be modified and
POS_NO_CHANGE used.
Making changes to the output UCS position variables (X_NONROT_UCS, etc.) and using
POS_NO_CHANGE will not work as expected. POS_NO_CHANGE is really identical to POS_BY_VARS, so
the position will be changed according to the values in the position variables.
CimatronE 10.0 GPP2 User Guide ⎪241
The <orientation> argument may be one of the following predefined GPP constants:
ROT_WORKPLANE Sets the output UCS orientation to the one calculated with the
CALC_WORKPLANE_UCS statement.
See section on CALC_WORKPLANE_UCS for more detailed
discussion on calculating work planes.
ROT_CURPOS Sets the output UCS to a UCS that is calculated based on the
current (or connection) point orientation. The UCS Z vector is
the current point IJK vector, and the UCS X vector is an
arbitrary vector perpendicular to it.
Also valid inside a connection scenario, using the connection
IJK.
Must be used in conjunction with the VA_CURPOS option of
the CALC_VIRTUAL_ANGLES statement.
ROT_BY_VARS Sets the output UCS orientation to the one defined by the
following six variables: I_NONROT_UCS, J_NONROT_UCS and
K_NONROT_UCS define the UCS Z axis direction, and
IX_NONROT_UCS, JX_NONROT_UCS and KX_NONROT_UCS
define the UCS X axis direction.
The variables should be set to the desired values before the
command is used.
ROT_NO_CHANGE is used when the output UCS orientation needs to stay unchanged (the command is
used to change the position only). The six orientation variables (I_NONROT_UCS, etc.) must not be
modified and ROT_NO_CHANGE used.
CimatronE 10.0 GPP2 User Guide ⎪242
Examples:
SET_OUTPUT_UCS POS_RESET ROT_RESET;
// reset output UCS (this is the default setting)
SET_OUTPUT_UCS POS_PROC ROT_NO_CHANGE;
// shift zero point to the current procedure zero – leave orientation as is
SET_OUTPUT_UCS POS_PROC ROT_PROC;
// output UCS is now identical to the current procedure UCS
SET_OUTPUT_UCS POS_NO_CHANGE ROT_WORKPLANE;
// rotate output UCS according to work plane orientation – leave zero point unchanged
The values of the current GPP output UCS are always shown in the following global system variables:
Each time the SET_OUTPUT_UCS statement is executed, these nine variables are set to reflect the new
output UCS. Note that in some cases, the variables are also used as input to the command (when
POS_BY_VARS is used).
CimatronE 10.0 GPP2 User Guide ⎪243
In addition to these nine variables, GPP2 also updates another set of nine variables, that describe the
same UCS, but ignoring the table rotation. These variables will be needed later to set the machine to
match the GPP settings.
For instance, in order to shift the zero point to the current procedure origin, the machine may need a
“DATUM SHIFT” command. This command needs the position vector before any rotations – this data
will be available in the X_NONROT_UCS, Y_NONROT_UCS and Z_NONROT_UCS variables.
One of the advanced options of the SET_OUTPUT_UCS command is to set the position and/or the
rotation of the output UCS by explicitly setting the UCS by variables. See the POS_BY_VARS and
ROT_BY_VARS options.
When using one of these options, the EX2 program needs to set the output UCS variables
(X_OUTPUT_UCS to Z_OUTPUT_UCS for position, I_OUTPUT_UCS to K_OUTPUT_UCS and
IX_OUTPUT_UCS to KX_OUTPUT_UCS for rotation) before it uses the SET_OUTPUT_UCS command. It
was necessary to define these variables taking into account any table rotation that exists at that
moment. These variables refer to the output UCS in the machine (REF) coordinate system, and thus
include any table rotation and translation.
However, the PP programmer may find it easier to define the “non-rotated” output UCS – the output
UCS as seen on the part itself, ignoring any table rotation. In such a case, GPP2 would apply the table
rotation and translation and simplify the process for the PP developer.
In order to take advantage of this method, the EX2 program needs to set the “non-rotated” output UCS
variables before invoking the SET_OUTPUT_UCS command:
X_NONROT_UCS, Y_NONROT_UCS and Z_NONROT_UCS define the UCS zero position
I_NONROT_UCS, J_NONROT_UCS and K_NONROT_UCS define the UCS Z axis orientation
IX_NONROT_UCS, JX_NONROT_UCS and KX_NONROT_UCS define the UCS X axis orientation
When using the POS_BY_VARS option, the 3 position variables should be set.
When using the ROT_BY_VARS option, the 6 orientation variables should be set.
CimatronE 10.0 GPP2 User Guide ⎪244
X=12
Z=38
REF_UCS_ROTATED
In order for GPP2 to continue and communicate well with the controller, the GPP2 output UCS must
be redefined to be the same as the rotated controller UCS. The new Z axis is easy to tell – it is
aligned with the tool IJK (that’s why the head was rotated in the first place). However, the new X axis
of the controller UCS is not so simple to find. It is rotated with the head, but where to exactly?
GPP2 provides a statement to calculate the machine controller UCS under head rotations. The result
from this calculation is later used to set the output UCS orientation (see examples later).
CALC_WORKPLANE_UCS <mode> <alpha> <beta> ;
CimatronE 10.0 GPP2 User Guide ⎪245
The work plane <mode> may be one of the following predefined GPP2 constants:
WP_BETA Rotate the REF UCS around the machine beta axis only.
This mode is suitable for table-head machines, where only
the head rotation (beta) affects the controller UCS orientation.
WP_ALPHA_BETA Rotate the REF UCS around both the machine alpha and
beta axes. This mode is suitable for head-head machines,
where both axis rotations affect the controller UCS
orientation.
WP_ALPHA Rotate the REF UCS around the machine alpha axis only.
This mode is provided for completeness – it is not clear if it
ever needs to be used.
After use of CALC_WORKPLANE_UCS, GPP2 is typically instructed to rotate its output UCS to the
calculated orientation, using the SET_OUTPUT_UCS command.
Examples:
For a table-head machine
CALC_WORKPLANE_UCS WP_BETA 0 B_CURPOS; // beta only
SET_OUTPUT_UCS POS_NO_CHANGE ROT_WORKPLANE; // set output UCS
For a head-head machine
CALC_WORKPLANE_UCS WP_ALPHA_BETA A_CURPOS B_CURPOS; // alpha & beta
SET_OUTPUT_UCS POS_NO_CHANGE ROT_WORKPLANE; // set output UCS
CimatronE 10.0 GPP2 User Guide ⎪246
VA_CURPOS A UCS that is defined by the current point orientation. The UCS Z
vector is the current point IJK vector, and the UCS X vector is an
arbitrary vector perpendicular to it.
Mostly used in 5X drill, where virtual angles must be used to define
the work plane for each cycle, based on the hole IJK orientation.
Also valid inside a connection scenario, using the connection IJK.
Must be used in conjunction with the ROT_CURPOS constant in the
SET_OUTPUT_UCS statement.
The type and order of rotations is defined in the variable VIRTUAL_AXES, which must be set using
one of the following predefined GPP constants:
The VIRTUAL_AXES variables must be set before the CALC_VIRTUAL_ANGLES statement is used.
Typically, it will be set in the STARTUP block, as part of the machine definition process.
Most known machines use Spatial angles with order X Æ Y Æ Z or Euler angles with order Z Æ Y Æ
X.
The results from the CALC_VIRTUAL_ANGLES statement are as follows:
Examples:
VIRTUAL_AXES = SPATIAL_XYZ;
...
SET_OUTPUT_UCS POS_PROC ROT_PROC; // current procedure UCS
CALC_VIRTUAL_ANGLES VA_PROC; // calculate angles for it
In some case, incremental rotation angles are required, rather than standard ones.
• Standard virtual axes rotation angles define how a “unit” or “world” UCS should be rotated in order
to get to the desired UCS.
• Incremental virtual axes rotation angles define how the currently rotated UCS should be rotated
again in order to get to the desired UCS. The currently rotated UCS is the UCS that was used to
calculate the rotation angles “last time”.
GPP2 supports incremental calculations by setting a new variable, VIRTUAL_ANGLES_INCR, to
TRUE_ (1). By default the variable is set to FALSE_ (0).
GPP2 keeps the UCS used for the “last” calculation. If incremental calculation is turned on, that saved
UCS is used as the “reference” for the next calculation.
This is the last block in each procedure “header” process. The procedure (connection) motions start
immediately after this block.
In that block, the EX2 program already has a lot of information regarding the procedure. It can use this
information in order to make a decision regarding re-configuration. This information includes the
procedure type and name, the number of axes, the tool being used, and the procedure origin. In many
cases, this is enough to make a decision regarding the machine configuration.
Connections take place in several points in GPP2. In most cases, a connection takes place before the
actual procedure motions (immediately after the START PROC block). Connections also take place
between toolpath “segments” in 5X continuous milling, and optionally between cycles in 5X Drill.
The BEGINNING OF CONNECT is a very good place to make decisions based on the target angles of
the rotary axes (given in A_CONNECT and B_CONNECT). For instance, if the table’s tilt angle is above,
CimatronE 10.0 GPP2 User Guide ⎪251
say, 50 degrees, a reconfiguration of the tool orientation may be done to keep the table more
horizontal.
If the REQUEST_RECONFIG flag is set during a BEGINNING OF CONNECT block, the whole connection
process is aborted. Instead, the RECONFIG MACHINE block is invoked. Only after the machine is re-
configured, a new connection starts, taking into account the new configuration (and hence new target
angles).
It is also possible to request reconfiguration in the LINEAR MOTION block, even during feed rate
(cutting) motions. Clearly, this is not the best place to do so, since the tool has to leave the material in
order to do the reconfiguration (which would leave a mark on the material).
If absolutely necessary, the EX2 program can raise the request flag during any linear motion block,
and it will be acknowledged within one or several motions.
In order to minimize the mark on the material, GPP2 will perform an orderly retract from the material
(tangential or normal), exactly as it does when 5X solutions need to be swapped. Once it is far away
from the part, the RECONFIG MACHINE block will be called.
If necessary, GPP2 will make a connection to the new position above the part (that connection may be
necessary due to the reconfiguration), and will approach the cutting point again, in an orderly manner,
before continuing with the procedure motions.
Important note - in addition to requesting a reconfiguration, the EX2 program must also execute the
LINEAR MOTION block (output the coordinates). This toolpath point will not be repeated after re-
configuration.
It is not possible to request re-configuration inside CYCLE blocks. If re-configuration is desired after a
given cycle block, the EX2 program should initiate a connection after the cycle and request re-
configuration in the resulting BEGINNING OF CONNECT block.
The EX2 program should do the following tasks inside that block:
• Output any commands needed to the machine in order to bring it to the new configuration (e.g.,
rotate the head or one of the table axes).
• Re-assign any GPP2 variables (e.g., tool orientation vector) that are relevant to the new machine
definition.
• Call the DEFINE_MACHINE statement, with the new configuration. Note that this call must take
place even if the statement arguments are the same each time. GPP2 reads in many other
variables as response to this command.
CimatronE 10.0 GPP2 User Guide ⎪252
• In some cases, the rotary axes angles must be reset (A_CURPOS, A_LASTPOS, B_CURPOS and
B_LASTPOS). This is especially important when the machine type is being changed (e.g., from
Table-Table to Table-Head), since the actual roles of these variables change completely.
• It is wise to record the new configuration in a user variable (e.g., Vertical vs. Horizontal head) for
future processing.
Head in Horizontal
Position
Head in Vertical
Position
Z
Second Table
Y Axis (Z)
First Table
Axis (X)
The EX2 program may request re-configuration whenever the table X axis becomes too tilted, say
above 60 degrees. By changing the head to the other position, it will be possible to continue
machining the part with a smaller tilt angle.
The machine geometry changes each time the head is switched to a different position. We can usually
assume that the controller will be able to maintain proper position of the tool regardless of the change
(in other words, the zero point does not move). However all the 5X angle calculations change because
of the different tool orientation. The following EX2 statements may be used to re-configure the
machine in both cases.
When changing to Horizontal head:
M5_TOOL_I = 0;
M5_TOOL_J = 1;
M5_TOOL_K = 0;
DEFINE_MACHINE TABLE_TABLE AX5_PX AX5_PZ; // Recalculate
These statements must be executed in the RECONFIG MACHINE block. Of course, other statements
are used to actually instruct the machine to change its head position.
CimatronE 10.0 GPP2 User Guide ⎪254
Rotating Head
(X)
Z
Second Table
Y Axis (Z)
First Table
Axis (X)
When the head axis is locked in place, this machine behaves as a Table-table (X-Z) machine.
However, when the table X axis is locked, the machine behaves like a Table-Head machine (Z-X). It
means that different arguments must be given to the DEFINE_MACHINE statement in each case.
Clearly, it also requires different connection scenarios.
Note that the role of the major angle variable changes. In the Table-Table configuration, A_CURPOS
and A_LASTPOS refer to the table X axis. In the Table-Head configuration, they refer to the table Z
axis. Similar dramatic changes take place regarding B_CURPOS and B_LASTPOS.
Therefore, whenever the configuration is changed, the EX2 program has to modify these variables
according to the new configuration.
CimatronE 10.0 GPP2 User Guide ⎪255
In 5X machines, the relationship between the machine anchor point and the machine REF UCS is
defined by the X/Y/Z_MACH vector.
Note – these variables have no effect on the output code. The do not have to be accurate, and are
only used to bring the simulator to a position that is similar to the safe position.
Note that the linear axes limits are given from the machine-simulator machine zero point (the table
center in most cases). GPP2 considers the part location on the machine table while calculating the
retract motion.
This option can be used to properly simulate the "M140 MB FMAX" Heidenhain command.
Note that the “T” axis cannot be mixed with any other linear axis in the same “move to safe” command.
For instance, MOVE_TO_SAFE = “ZT” is illegal, and will result in a GPP2 runtime error.
The color variables are string variables. It is the EX2 developer responsibility to set them to valid RGB
colors. For instance, if the EX2 developer wishes to change the color of drill cycles to purple, he
should include the following command in the STARTUP block:
ASC_COLOR_CYCLE = “255 0 255”; // Red + Blue make Purple
If required, the five color variables can be set differently for each procedure. For instance, different
colors may be used for 3X and 5X procedures. In order to do that, the color variables may be re-
assigned at the BEGINNING OF PROC block. Note, however, that the use of too many colors is not
recommended.
The “pseudo” connection motions do not truly represent the tool motions during connections. These
motions can be seen when the simulator is invoked. These red lines simply connect toolpath
“segments” (or cycles) to indicate the sequence of toolpath motions.
If the ASC_COLOR_CONNECT variable is set to an empty string, then these pseudo connections are
suppressed.
to output them in the simulator motion file). The digits 1 to 9 represent the additional nine axes.
• For instance, setting the MACH_SIM_ORDER variable to “XYZAB1” tells GPP2 to output the
additional axis 1, under the letter specified in MACH_SIM_LETTER1 and with values provided in
MACH_SIM_AXIS1.
In some cases, the additional axes may be used to actually substitute some of the regular machine
axes. For instance, some machines have two “Z” axes, one extending to a given limit and the other
one that can reach further. In such a case, the data provided by GPP2 in Z_CURPOS may be broken to
two other simulator axes (given any appropriate logic).
MACH_SIM_ORDER = “XY12”; // assume no rotary axes
MACH_SIM_LETTER1 = “Z”; // you can use the letter Z for the new axis!
MACH_SIM_LETTER2 = “W”; // this is the secondary Z axis
In each linear motion block, the value of Z_CURPOS will be broken in two, and the two variables,
MACH_SIM_AXIS1 and MACH_SIM_AXIS2 will be assigned the proper values. The data will be output
to the simulator as a 4-axis linear machine.
The following lines demonstrate such EX2 code, assuming that the major Z axis can reach no more
than 500, and the minor Z axis is used above 500. The lines also demonstrate how to output the G-
code numbers.
Regarding the machine simulator output, there is no need to do anything special with the
MACH_SIM_AXIS1/2 variables. It is enough to set their values.
IF_SET (Z_CURPOS) // Z has changed
IF (Z_CURPOS <= 500) // test value against threshold
MACH_SIM_AXIS1 = Z_CURPOS; // major can handle point
MACH_SIM_AXIS2 = 0; // minor not used
ELSE // Z is above 500
MACH_SIM_AXIS1 = 500; // major reaches 500
MACH_SIM_AXIS2 = Z_CURPOS – 500; // minor does the rest
END_IF;
OUTPUT “ “MACH_SIM_LETTER1 MACH_SIM_AXIS1; // create G-code
OUTPUT “ “MACH_SIM_LETTER1 MACH_SIM_AXIS1;
SET_OFF Z_CURPOS; // set off, for next block!
END_IF;
the variable: SIM_SHOW_GCODE_OUTPUT. If set to TRUE_ the output is changed to be based on the
part zero (not the Machine Simulation zero) and support advanced output modes: WP, RTCP etc’. The
default value is FALSE_ which leaves the output in the standard mode.
GPP2 creates a file for the machine simulator. One option regarding that file is the ability to present
the ‘Move List’ program using G-code coordinate values (which may differ from the actual coordinates
that control the simulator motion, due to RTCP and work-plane use). That option is controlled by the
SIM_SHOW_GCODE_OUTPUT GPP2 variable (when set to TRUE_).
By default, each line in the simulator program shows the block number, followed by the X, Y, Z, A and
C axes. It is possible to customize the output format, controlling the form, content and modality of the
displayed program. Note that this has no effect on the actual simulator motions, only on the way they
are displayed to the user.
The GPP2 string variable, SIM_SHOW_GCODE_FORMAT, defines the output format using regular
characters and special parameter place holders, as follows:
• %X, %Y, %Z, %A, %B: refer to the machine coordinate (X, Y, Z, A and B), including the
corresponding letters (e.g., X30.0). Note that the actual letters used for the A and B axes are
taken from the M5_A_LETTER and M5_B_LETTER variables, respectively.
• %MX, %MY, %MZ, %MA, %MB: refer to the same machine coordinates, but in a modal way,
meaning they will only be output if they have changed since the last line.
• %F: refers to the feed rate (including the letter F, e.g., F300). In rapid motions, instead of the feed
rate, this place holder is replaced by the text found in another GPP2 variable,
SIM_SHOW_GCODE_RAPID (by default: “ “ (nothing)).
• %MF: refers to the feed rate, but in a modal way (only when changed, or when switching between
rapid and feed motions).
• %L: refers to the linear motion code. The actual code is taken from the CODE_LIN_FAST (for rapid)
and CODE_LIN_FEED (for feed), variables respectively. Note that circular motions are converted in
the simulator to linear motions, and will be shown as such.
• %ML: refers to the linear motion code, but in a modal way (basically, when switching between rapid
and feed motions).
• %K: refers to the block number. There is no modal version for this parameter.
• %N: refers to the program sequence number (GPP2 variable SEQ_NUM). There is no modal version
for this parameter.
• %%: can be used to include a single ‘%’ character in the displayed output.
Note: Modal parameters are always displayed on the first procedure motion, regardless of their value
on the last point of the previous procedure.
The default for the new format variable is "BLK %K %X %Y %Z %A %B”.
Example: “%K %ML %MX %MY %MZ %MA %MB %MF”. This will give results that are very similar to the
CimatronE 10.0 GPP2 User Guide ⎪261
The SUPPRESS_SIM_COMMENTS system flag allows the EX2 program to suppress all comments in
the simulator file. If set to TRUE_, the SIM_COMMENT commands are not executed.
SIM_COMMENT can also be used in standard Machine Simulation output mode. In order to block
sim_comment from being output to standard mode, set the following flag:
SUPPRESS_SIM_COMMENTS = TRUE_ ;
since the linear axes do not make any correction for the intermediate translation of the work-piece
caused by table rotation. The start and end positions may be fine, but intermediary points may
cause collision.
• Smart Machine: the motions are interpolated in the “part space” (also known as RTCP). This
means the linear axes are corrected during their motion to compensate for the linear translation
caused by the table rotation. The start and end positions are the same as the “dumb” machine, but
the intermediate trajectory is different. This machine has a better chance of not colliding with the
stock or the part (assuming, of course, the original motion calculated within CimatronE was OK in
that respect).
The following two images demonstrate the behavior of a machine with and without RTCP, when it
performs a rotation of the head. The “dumb” machine (no RTCP) simply performs an arc between the
start and end points, while the “smart” machine (with RTCP) corrects the spindle location throughout
the motion to achieve a straight line motion between the start and end points. Similar behavior can be
shown for rotating table machines.
By default, the machine simulator assumes a smart machine behavior. The in-motion collision check is
actually done in the “part space”, effectively ignoring any intermediate translation caused by table
rotation. This may be fine for some machines, but not true for others.
Note that a given machine may support RTCP in general (M5_RTCP_M128 inside GPP2), meaning it
can accept XYZ tool positions in the part UCS, and yet to perform perfect RTCP inside the linear
motion itself. The start and end points are perfect – but the motion between them does not make
perfect compensation throughout the linear motion.
It is possible to instruct the machine simulation to assume a dumb machine behavior, making the
linear interpolation in the “machine space” and checking intermediate positions for collision.
To do this, use the SIM_IN_MOTION_CHECK system flag. It is a variable of format ANGLES, meaning it
should be set in degrees. It defines the angular step, in degrees, in which the machine simulation will
check for in-motion collisions. For instance, if set to 1.0, and a given linear motion rotates the table by
5 degrees, the machine simulator will divide the motion into five segments and check the intermediate
CimatronE 10.0 GPP2 User Guide ⎪263
6 Report Customization
Permanent This picture is not changed when producing a report (for example a
company logo).
To include this type of picture in the report:
1. Capture the picture.
2. Insert the picture in the required place.
3. This picture can be given any name, but should not include the
string defining changeable pictures (see below).
This picture can be displayed anywhere in the report.
Default This picture is automatically created when the user runs NC Report
using the Standard option.
To include this type of picture in the report:
1. Capture the picture and save it with the following name:
[email protected].
2. Define the picture name and size in the NcReportImage.xml
file. The width and height sets the dimension of the black
frame in the graphics area when using the Standard template
of the NC Report.
3. Insert the picture in the required place.
This picture can be displayed anywhere in the report.
CimatronE 10.0 GPP2 User Guide ⎪271
Pictures List These are additional pictures that are included as per customer
request (for example ISO picture, Standard Views, Stock Used, etc.).
These pictures are captured by the user via the Capture Report
Images tool.
To include this type of picture in the report:
1. Define the picture name(s); i.e. Initial_Stock.
2. Capture each required picture and save it with the following
name:
NcReportGeneralImage@<defined_name>; i.e.
NcReportGeneralImage@Initial_Stock.
3. Define each picture name and size in the NcReportImage.xml
file. The width and height sets the dimension of the black
frame in the graphics area when using the Standard template
of the NC Report.
4. Insert the picture(s) in the required place(s).
These pictures can be displayed anywhere in the report.
Notes:
• The captured images are saved in the folder:
\Cimatron\CimatronE\Data\NC\Report_Images\<elt_document_name>.
• Since a folder containing images is created every time you capture an image, it is recommended to
delete these folders when they are not required.
CimatronE 10.0 GPP2 User Guide ⎪272
Spelling If Microsoft Word identifies the Change the variable name to all
variable name as a spelling CAPITAL letters. Microsoft Word
mistake, it will separate the name usually ignores such words in
from the delimiters. spelling. Alternatively, suppress
spelling.
Formatting If the variable reference contains Make sure the entire variable
more than one format (e.g., reference uses the same format
||USER_NAME|| or (e.g., ||USER_NAME||).
||USER_NAME||), Microsoft
Word will separate the name from
the delimiters.
To double check this issue in case of problems, open the mht template with a neutral editor (i.e.
Microsoft Notepad), search for the required parameter and make sure it meets the rules above. If
spaces or other problematic characters are found, delete them and save the mht file.
CimatronE 10.0 GPP2 User Guide ⎪273
Examples:
-1 "Procedure Unique ID" XML_PROC_UID 0
3207 "Spin " XML_PROC_SPIN 4
55 "Part Surface Offset" XML_SURF_OFF 1
Note the first example, with XML variable name XML_PROC_UID. This is a special name and must be
kept as is in all configuration files. GPP2 is expecting this XML system variable name in order to
properly handle multi-tool procedures.
Spaces, tabs and the comma character can be freely used in the gpp2-xml.ini file. Comments at
the end of each line (starting with //) are also supported.