GO2cam Pascal API
Process/Macros Documentation

Macro Definition

A macro is a PASCAL program interpreted by GO2cam. It replaces a standard GO2cam cycle with a user‑defined cycle.
Macros are stored in the directory ./process.

There are four kinds of macros:

HOLES Macros

Use DRILLING , REAMING , TAPPING and COUNTER BORING.
File extensions: *.PAP, *.SAP

TOOLPATH Macros (Milling)

Use the TOOLPATH cycle for milling.
File extensions: *.TRA, *.SRA

TOOLPATH Macros (Turning)

Use the TOOLPATH cycle for turning.
File extensions: *.TTA, *.STA

Approach–Return Macros

Used by cycles such as CONTOURING , POCKETING, etc.
File extensions: *.APP, *.SPP

A macro consists of two parts:

  1. Panel definition
    Parameters displayed to the user; default values may be set.
  2. Execution
    GO2cam executes and generates the toolpath defined in the PASCAL file.

Macros may also create technological functions (e.g., STOP) along the toolpath, similar to built‑in GO2cam behaviors.


Using Macros

Point‑to‑Point Macros

Used to create multiple machining cycles by selecting a single point (e.g., on a grid or around a circle).

Procedures:

  • PPI_PARAMETRE_PROCESSUS — Panel definition
  • PPI_MACRO_PROCESSUS — Machining creation

Toolpath Macros

Used to define custom toolpaths using linear (G1) and circular (G2/G3) movements.

Procedures:

  • PPI_PARAMETRE_PROCESSUS — Panel definition
  • PPI_MACRO_PROCESSUS — Toolpath creation
    Radius compensation (G41/G42) or center‑tool mode (G40) applies to G‑code coordinates.
  • PPI_MACRO_CENTRE_OUTIL_PROCESSUS — Tool‑center toolpath (simulation)
    This function is unnecessary if the toolpath created in PPI_MACRO_PROCESSUS already uses tool‑center mode.

Approach / Return Macros

Used to create toolpaths connecting:

  • An approach point to the first toolpath element
  • The last toolpath element to a return point

Approach and return points can be modified using PASCAL.

PASCAL files are selected in the technology settings of cycles such as:

  • POCKET
  • FACING 1
  • CONTOURING
  • REWORK
  • All EDM cycles

If no PASCAL file is selected, approach/return paths are generated by the post‑processor.

A macro may also define technological functions inserted along the generated toolpath.

Optional “Tool‑Center” Procedures

Required only when the toolpath is defined in tool‑center mode, especially for simulation if the initial toolpath is part‑based.

Procedures:

  • PPI_PARAMETRE_PROCESSUS — Panel definition
  • PPI_APPROCHE_PROCESSUS — Generate approach toolpath
  • PPI_RETOUR_PROCESSUS — Generate return toolpath
  • PPI_APPROCHE_CENTRE_OUTIL_PROCESSUS — Approach (tool‑center)
  • PPI_RETOUR_CENTRE_OUTIL_PROCESSUS — Return (tool‑center)
  • PPI_FONCTION_PROCESSUS — Create technological functions such as STOP

Files Used by Macros

Configuration File

  • dat/RES_IPRO.DAT — Defines all functions and constants used by the interpreter

Error File

  • tmp/PASCAL.ERR — Contains interpretation errors

Process Files

  • process/std/*.PAP — Standard hole macros
  • process/std/*.TRA — Standard milling toolpath macros
  • process/std/*.TTA — Standard turning toolpath macros
  • process/std/*.APP — Standard approach/return macros

or for custom:

  • process/specif/*.SAP — Custom hole macros
  • process/specif/*.SRA — Custom milling toolpath macros
  • process/specif/*.STA — Custom turning toolpath macros
  • process/specif/*.SPP — Custom approach/return macros

Important : A TOOLPATH macro must always begin and end with approach and return points. These points are essential—for example, they are used in radius compensation calculations.

Shared Functions

Some functions are common to MACROS, PROCESSUS, WORKSHOP, and POST‑PROCESSOR.
They are defined in Shared SPI Functions and begin with prefixes such as:

Topics covered include:

  • Memory allocation
  • File management
  • Calculations
  • Messaging
  • System calls
  • And more…