Scenario Examples

The GPP2 default "long" scenario is internally defined as follows:

CONNECTION_SCENARIO "long"

  MOVE_UP  ( CON_FAST     "Z"      CON_HOME )

  MOVE_    ( CON_FAST     "XYAB"     CON_P2     TRUE_ )

  MOVE_DOWN ( CON_FAST     "Z"       CON_P2     FALSE_ );

It starts with a motion "up" to the home height (Z_HOME). Then, it moves horizontally, in the X, Y, A and B axes, to a point above the target point (P2). This motion can be broken down to multiple linear motions (based on DF2 definitions). Finally, it goes down along the Z axis to the target point, with no special qualifier. All motions are rapid (G01).

Another scenario involving machine control operations may look as follows:

CONNECTION_SCENARIO "my-tool-change"

MOVE_           ( CON_FAST    "AB" CON_P2     FALSE_ )

MACHINE_CONTROL ( "coolant-on" 0  0    "" )

  MOVE_         ( CON_FAST    "XY" CON_P2     FALSE_ )

  MOVE_DOWN     ( CON_FAST    "Z"  CON_P2     TRUE_ );

This scenario can be used instead of the default scenario after a tool change.

First it rotates the alpha and beta axes (assume this is a 5X machine). It does not move the X and Y axes yet.

Next, it invokes the MACHINE CONTROL block with a "coolant-on" qualifier. Presumably, the EX2 statements in that block turn the coolant on.

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.

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".

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