MPR File Format Reference Guide - Variable Definitions
Overview
This is an internal reference guide for understanding MPR (Macro Post Processor) file variables used by HOMAG/Weeke CNC machines. MPR is a parametric programming language that uses macro commands instead of traditional G-code. Use this when troubleshooting post processors or explaining Weeke/HOMAG programming concepts to customers.
File Structure
MPR files consist of:
- File Header
[H- Program metadata and machine settings - Workpiece Definition
<100- Material dimensions and reference points - Processing Commands
<10x- Machining operations (drilling, routing, sawing, etc.) - File Termination
!- End of program marker
Section 1: File Header Variables [H
The file header defines overall program settings and machine configuration.
Version and Format
VERSION
- Purpose: Specifies the MPR file format version
- Format: String (e.g., "4.0 Alpha", "3.5", "4.1")
- Values:
"3.x"= Older MPR format (legacy machines)"4.0"= Modern MPR format"4.0 Alpha"= Development/testing version
- Notes:
- Different machines support different versions
- Older controllers may not accept newer formats
- Always verify version compatibility with customer's machine
Machine Configuration Settings
HP
- Purpose: Horizontal Processing mode
- Format: Integer (0 or 1)
- Values:
1= Horizontal processing enabled (typical for flat panel work)0= Horizontal processing disabled (vertical/edge processing)
- Notes: Indicates whether the machine will process the part laying flat
IN
- Purpose: Initialization mode
- Format: Integer (0 or 1)
- Values:
0= Normal initialization1= Special initialization mode
- Notes: Controls how the machine initializes before starting the program
GX
- Purpose: X-axis global offset or grouping setting
- Format: Numeric (typically 0)
- Units: Millimeters or inches (depends on INCH setting)
- Notes: Used for nesting or multiple-part processing on some machines
BFS
- Purpose: Batch Feed System
- Format: Integer (0 or 1)
- Values:
1= Batch feed enabled0= Batch feed disabled
- Notes: Related to automatic material loading systems
GY
- Purpose: Y-axis global offset or grouping setting
- Format: Numeric (typically 0)
- Units: Millimeters or inches
- Notes: Similar to GX but for Y-axis positioning
GXY
- Purpose: Combined XY grouping or offset
- Format: Numeric (typically 0)
- Notes: May relate to part positioning in nested layouts
UP
- Purpose: Unknown parameter (machine-specific)
- Format: Integer
- Notes: Meaning varies by machine model - check specific machine documentation
FM
- Purpose: Feed Mode or feed method
- Format: Integer
- Values:
1= Standard feed mode2= Alternative feed algorithm (machine-specific)
- Notes: Controls how feed rates are calculated and applied
FW
- Purpose: Feed rate for positioning moves (rapid traverse speed)
- Format: Numeric
- Units: mm/min or m/min (check machine settings)
- Common values: 400-800 (mm/min for positioning)
- Notes: Default rapid traverse speed when moving between operations
ZS
- Purpose: Z-axis Safe height (clearance height)
- Format: Numeric
- Units: Millimeters (or inches if INCH=1)
- Common values: 10-50mm depending on setup
- Notes:
- Height the tool retracts to when moving between operations
- Must be high enough to clear clamps and fixtures
- Too high = wasted time; too low = collision risk
HS
- Purpose: Horizontal Saw or horizontal spindle setting
- Format: Integer (0 or 1)
- Values:
0= Horizontal saw not used1= Horizontal saw active
- Notes: For machines with integrated saw units
OP
- Purpose: Operation mode
- Format: Integer
- Values:
1= Standard operation- Other values may indicate special modes (simulation, setup, etc.)
- Notes: Defines how the machine processes the program
MAT
- Purpose: Material type or machine type identifier
- Format: String
- Common values:
"WEEKE"= Weeke machine"HOMAG"= HOMAG machine"SCM"= SCM machine"MDF"= MDF material"CHIPBOARD"= Particleboard"PLYWOOD"= Plywood
- Notes:
- May affect default feed rates and processing parameters
- Some machines use this for material-specific settings
DN
- Purpose: Default Name or designation
- Format: String
- Common values:
"STANDARD", custom profile names - Notes: May reference a saved machine configuration profile
INCH
- Purpose: Unit system selection
- Format: Integer (0 or 1)
- Values:
0= Metric (millimeters)1= Imperial (inches)
- Notes:
- CRITICAL SETTING - must match Mozaik export settings
- All coordinates in the file follow this unit system
- Mismatch causes parts to be wrong size or wrong location
VIEW
- Purpose: View orientation and mirroring
- Format: String
- Values:
"NOMIRROR"= No mirroring applied"MIRRORX"= Mirror across X-axis"MIRRORY"= Mirror across Y-axis"MIRRORXY"= Mirror across both axes
- Notes: Used when part needs to be flipped or mirrored for processing
ANZ
- Purpose: Anzahl (German: "quantity") - Number of parts to process
- Format: Integer
- Common values: 1 (single part), 2-99 (batch processing)
- Notes: For processing multiple identical parts in one program
BES
- Purpose: Besäumen (German: "edging/trimming")
- Format: Integer (0 or 1)
- Values:
0= No automatic edging1= Edging enabled
- Notes: For machines with integrated edgebanding units
ENT
- Purpose: Entrinden (German: "debarking") or edge treatment
- Format: Integer (0 or 1)
- Values:
0= No edge treatment1= Edge treatment enabled
- Notes: Machine-specific feature, rarely used in cabinet work
Internal Workpiece Variables (Underscore Prefix)
These variables store workpiece dimensions internally. They're typically duplicated in the <100 section in human-readable format.
_BSX
- Purpose: Board Size X (internal) - Material length
- Format: Numeric (decimal)
- Units: Millimeters or inches (depends on INCH setting)
- Notes: Internal variable representing the X-dimension of the workpiece
_BSY
- Purpose: Board Size Y (internal) - Material width
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: Internal variable representing the Y-dimension of the workpiece
_BSZ
- Purpose: Board Size Z (internal) - Material thickness
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: Internal variable representing the Z-dimension (thickness)
_FNX
- Purpose: Front reference point X-coordinate (internal)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Common values: 0 (left edge), BSX/2 (center)
- Notes: Where the X-axis zero point is located on the workpiece
_FNY
- Purpose: Front reference point Y-coordinate (internal)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Common values: 0 (front edge), BSY/2 (center)
- Notes: Where the Y-axis zero point is located on the workpiece
_RNX
- Purpose: Rear reference point X-coordinate (internal)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: For parts with different front/rear reference points
_RNY
- Purpose: Rear reference point Y-coordinate (internal)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: Typically same as FNY for rectangular parts
_RNZ
- Purpose: Rear reference point Z-coordinate (internal)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Common values: 0 (top surface), BSZ (bottom surface)
- Notes: Defines where Z=0 is located
_RX
- Purpose: Reference dimension X (internal copy of BSX)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: Redundant storage of X-dimension
_RY
- Purpose: Reference dimension Y (internal copy of BSY)
- Format: Numeric (decimal)
- Units: Millimeters or inches
- Notes: Redundant storage of Y-dimension
Section 2: Workpiece Definition <100 \WerkStck\
This section defines the actual workpiece (material) being machined. "WerkStck" is German for "workpiece."
Command Identifier
<100
- Purpose: Command code for workpiece definition
- Notes: Always precedes workpiece data in MPR files
- Required at the start of every MPR program
Workpiece Dimension Parameters
LA
- Purpose: Länge (German: "length") - Workpiece length
- Format: String (quoted numeric value)
- Units: Millimeters or inches (depends on INCH setting)
- Notes: This is the X-dimension of the material
BR
- Purpose: Breite (German: "width") - Workpiece width
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: This is the Y-dimension of the material
DI
- Purpose: Dicke (German: "thickness") - Workpiece thickness
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common values:
- Metric: 12mm (1/2"), 18mm (3/4"), 25mm (1")
- Imperial: 0.5", 0.75", 1.0"
- Notes: This is the Z-dimension (material thickness)
Reference Point Parameters
FNX
- Purpose: Front reference point X
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common values: "0" (left edge as origin)
- Notes: Defines where X=0 is located on the part
FNY
- Purpose: Front reference point Y
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common values: "0" (front edge as origin)
- Notes: Defines where Y=0 is located on the part
RNX
- Purpose: Rear reference point X
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: Typically same as FNX for rectangular parts
RNY
- Purpose: Rear reference point Y
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: Typically same as FNY for rectangular parts
RNZ
- Purpose: Rear reference point Z
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common values: "0" (top surface as origin)
- Notes: Z=0 is typically the top surface of the material
Rotation Parameters
AX
- Purpose: Axis rotation or angle X
- Format: String (quoted numeric value)
- Units: Degrees
- Common values: "0" (no rotation)
- Notes: For angled or rotated part setups (rarely used)
AY
- Purpose: Axis rotation or angle Y
- Format: String (quoted numeric value)
- Units: Degrees
- Common values: "0" (no rotation)
- Notes: Rarely used in flat panel processing
Section 3: Machining Operations
Common Operation Command Codes
| Code | German Name | English Translation | Purpose |
|---|---|---|---|
<100 | WerkStck | Workpiece | Workpiece definition |
<101 | Kontur | Contour | Profile milling/routing |
<102 | BohrVert | Vertical Drilling | Holes drilled from top/bottom |
<103 | BohrHoriz | Horizontal Drilling | Holes drilled from edges |
<104 | Nut | Groove | Dado/groove cutting |
<105 | Tasche | Pocket milling | |
<106 | Saege | Saw | Saw cut |
<107 | Fraesen | Milling | General milling/routing |
<108 | Gewinde | Thread | Threading operation |
Vertical Drilling Parameters <102 \BohrVert\
Position Parameters
XA
- Purpose: X-Achse (German: "X-axis") - Hole position along length
- Format: String (quoted numeric value)
- Units: Millimeters or inches (depends on INCH setting)
- Notes:
- Horizontal position of the hole center
- Measured from FNX reference point
- Must be within 0 to LA (workpiece length)
YA
- Purpose: Y-Achse (German: "Y-axis") - Hole position along width
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes:
- Vertical position of the hole center
- Measured from FNY reference point
- Must be within 0 to BR (workpiece width)
Tool and Process Parameters
BM
- Purpose: Bohrer Modus (German: "Drill Mode") or tool type
- Format: String (typically 2 letters)
- Common values:
"LS"= Lochsäge (standard drill)"VHM"= Vollhartmetall (solid carbide drill)"HSS"= High-Speed Steel drill"HW"= Hardwood drill
- Notes: Defines the type of drilling tool to use
TI
- Purpose: Tiefe (German: "depth") - Drilling depth
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes:
- How far the drill penetrates into the material
- For through-holes: TI = DI (thickness) + small clearance
- For blind holes: TI < DI
- Always measured from the drilling surface
DU
- Purpose: Durchmesser (German: "diameter") - Drill bit diameter
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common metric values: 3, 5, 8, 10, 15, 35mm (for shelf pins, hinges, etc.)
- Common imperial values: 1/8", 1/4", 5/16", 3/8", 1/2"
- Notes: Size of the hole being drilled
AN
- Purpose: Typically tool number or angle
- Format: String (quoted numeric value)
- Common meanings:
- Tool number (references machine's tool table)
- Quantity in a pattern
- Angle parameter (machine-specific)
- Notes:
- Exact meaning varies by machine
- Usually refers to tool position in ATC (Automatic Tool Changer)
- Check machine documentation
MI
- Purpose: Mitte (German: "center") or mirror setting
- Format: String (quoted numeric value)
- Values:
"0"= No mirroring"1"= Mirror this operation
- Notes: Used when processing mirrored pairs (left/right cabinet sides)
S_
- Purpose: Seite (German: "side") - Which face to drill
- Format: String (quoted numeric value)
- Values:
"1"= Principal face (top surface)"2"= Secondary face (bottom surface)"3"= Edge face (side)"4"= Opposite edge face
- Notes:
- Defines which surface the hole is drilled from
- Critical for depth calculations
AB
- Purpose: Abstand (German: "distance") or process parameter
- Format: String (quoted numeric value)
- Notes:
- Machine-specific parameter
- May control drill retract distance, peck depth, or other settings
- Check specific machine documentation
WI
- Purpose: Winkel (German: "angle") - Drill angle
- Format: String (quoted numeric value)
- Units: Degrees
- Values:
"0"= 90° vertical drilling (perpendicular to surface)- Non-zero = Angled drilling
- Notes:
- 0° is most common (straight down)
- Angled drilling requires special setup
HP
- Purpose: Unknown - possibly "Hauptprogramm" (main program) flag
- Format: String (quoted numeric value)
- Common values: "0"
- Notes: Machine-specific, check documentation
SP
- Purpose: Spindel Parameter (spindle parameter) or special process
- Format: String (quoted numeric value)
- Values:
"0"= Standard drilling process"1"= Peck drilling"2"= Drill with dwell- Other values = machine-specific cycles
- Notes: May enable special drilling cycles
YVE
- Purpose: Unknown parameter (machine-specific)
- Format: String (quoted numeric value)
- Notes: Likely related to Y-axis positioning or validation
ASG
- Purpose: Aggregate Selection or assignment
- Format: String (quoted numeric value)
- Common values: "1", "2", "3", etc.
- Notes:
- For machines with multiple drilling heads, spindles, or aggregates
- Common on HOMAG machines with drilling blocks
- Selects which aggregate performs the operation
Description Parameters
KAT
- Purpose: Kategorie (German: "category") - Operation type description
- Format: String
- Common values: "Vertical drilling", "Horizontal drilling", "Milling", etc.
- Notes: Human-readable operation type for machine display and documentation
MNM
- Purpose: Machine Name or operation name
- Format: String
- Notes: Displayed on machine screen during operation execution
Machine-Specific M-Parameters
MX, MY, MZ
- Purpose: Machine X/Y/Z offset adjustments
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Common values: "0" (no adjustment)
- Notes:
- Fine-tuning for specific machines or setups
- Used to compensate for machine-specific positioning
MLM
- Purpose: Machine-specific limit or mode
- Format: String (quoted numeric value)
- Common values: "0"
- Notes: Meaning varies by machine model
MXR, MYR, MZR, MLR
- Purpose: Machine X/Y/Z/L Reference mode
- Format: String
- Common values:
"STANDARD", custom reference names - Notes:
- Defines which coordinate system or reference to use
- May reference specific fixtures, pallets, or zero points
- "STANDARD" uses default machine references
_MXF, MXF
- Purpose: Machine X Factor (scaling)
- Format: String (quoted numeric value)
- Common values: "1" (no scaling, 1:1)
- Notes:
- Allows for part scaling if needed (rarely used)
- Values >1 enlarge, values <1 shrink
- Underscore version is internal, non-underscore is user-facing
_MYF, MYF
- Purpose: Machine Y Factor (scaling)
- Format: String (quoted numeric value)
- Common values: "1" (no scaling)
- Notes: Same as MXF but for Y-axis
_MZF, MZF
- Purpose: Machine Z Factor (scaling)
- Format: String (quoted numeric value)
- Common values: "1" (no scaling)
- Notes: Same as MXF but for Z-axis
Horizontal Drilling Parameters <103 \BohrHoriz\
Horizontal drilling commands use similar parameters to vertical drilling with some additions:
Additional Parameters for Horizontal Drilling
KA
- Purpose: Kante (German: "edge") - Which edge to drill from
- Format: String (quoted numeric value)
- Values:
"1"= Front edge (Y=0)"2"= Right edge (X=LA)"3"= Rear edge (Y=BR)"4"= Left edge (X=0)
- Notes: Defines which edge the horizontal hole is drilled from
ZA
- Purpose: Z-Achse (German: "Z-axis") - Height position for horizontal drilling
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes:
- Vertical position along the edge where hole is drilled
- Measured from bottom of material (Z=0)
Contour Milling Parameters <101 \Kontur\
Path Definition Parameters
XE, YE
- Purpose: X-End, Y-End - Endpoint coordinates
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: Ending position of a linear or arc move
XS, YS
- Purpose: X-Start, Y-Start - Starting point coordinates
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: Starting position of a path segment
R
- Purpose: Radius - Arc radius for curved paths
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes:
- For circular/arc interpolation
- Positive = one direction, negative = opposite direction
DIR
- Purpose: Direction - Arc direction
- Format: String
- Values:
"CW"= Clockwise"CCW"= Counter-clockwise
- Notes: Defines which way the arc curves
Groove/Dado Parameters <104 \Nut\
TIE
- Purpose: Tiefe (German: "depth") - Groove depth
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: How deep the groove is cut
BRE
- Purpose: Breite (German: "width") - Groove width
- Format: String (quoted numeric value)
- Units: Millimeters or inches
- Notes: Width of the groove cut
File Termination
!
- Purpose: End of program marker
- Format: Single exclamation mark
- Notes:
- Signals the end of the program to the controller
- Required at the end of every MPR file
- Controller stops reading after this character