Blocks and Qualifiers

GPP2 is a programming environment based on toolpath blocks and execution of specific code in response to each block. The code is defined in the post-processor EX2 file, and is executed when each block is invoked.

Some blocks have optional qualifiers, which may affect the required output. For instance, the TOOL CHANGE block has a qualifier called first, which is used on the first time the block is called (first tool change).

When GPP2 executes a block with a qualifier, it follows the following algorithm:

  • It first looks for a block definition in the EX2 program that includes the specific qualifier (for instance, TOOL CHANGE: first:). If that block is found, the commands listed in it are executed.

  • If such a block does not exist in the EX2 program, GPP2 looks for the same block but without the qualifier (the generic block, for instance, TOOL CHANGE:). If such a block is found, it is executed.

  • If no generic block is found, nothing is executed, and GPP2 moves on to the next toolpath block.

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 back 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, because they represent different things. 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.

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.