Articles in this section

Generic HPGL - Custom options tab

This article explains the contents of the Custom Options tab (within Cutter Tools Configuration) of the Generic HPGL GrandCut driver.

 

Notes

  • This article is intended for operators with basic knowledge of HP Graphics Language (HPGL).
  • The Generic HPGL driver can be used for flatbed cutters compatible with .hpgl files.
  • What varies from one cutter controller to another, are the methods for specifying the cutting tools to be used, the recognition of the layer containing the marks, and how registration marks are drawn.
  • You may be interested in reading:

 

Custom options tab

Resolution

  • Default resolution: 1016 dpi (corresponding to 0.025 mm).
  • Some cutters, such as OptiScout, use a resolution of 2560 dpi.

 

Tool Instructions

HPGL supports instructions for selecting and changing tools. These include commands like SPn for selecting tools, which are explained below:

 

SPn (Select Pen)

  • Used to select a specific tool by its number.
  • Syntax: SP<slot number><tool number>;
  • Examples:
    • SP32; → Selects tool 2 in slot 3.
    • SP99; → Selects tool 99, used for OptiScout.

 

Layer (Contour) Commands

HPGL allows the definition of layer (contour) names and colors.

 

Layer Name (LNn)

  • Syntax: LN<layer name>;
  • Example:
    • LNRegister; → Prints the contour name as "Register".

 

Layer Color (LC r, g, b)

  • Syntax: LC<layer number>,<red>,<green>,<blue>;
  • Examples:
    • LC1,255,0,0; → Layer 1 is red.
    • LC2,0,255,0; → Layer 2 is green.
    • LC3,0,0,255; → Layer 3 is blue.

 

Marks Definition

Defines marks using variables for coordinates and radius:

  • @(X) → X-coordinate.
  • @(Y) → Y-coordinate.
  • @(Radius) → Radius of the circle.

Examples:

  • Pen Up and Move to Position
    • PU; PA 100,100;
      • The tool is lifted and moved to the absolute position 100,100.
  • Draw a Circle at the Coordinates
    • PU; PA@(X),@(Y); CI(@Radius);
      • The pen is lifted, moved to X, Y, and a circle of radius Radius is drawn.
    • PU; PA @(X), @(Y); CI120;
      • Draws a circle with a radius of 3 mm (calculated as 3 / 25.4 * 1016 = 120).

 

  Info

HPGL syntax does not support expressions like PA @(X)-5, @(Y);

Such commands are invalid.

 

Registration Layout Definition

This section forces specific text or instructions to begin the marks (layers) section.

 

File Format

Defines the format of the output file name. Examples:

  • @(FileName)_@(BarcodeHex).plt
    • Produces files like: myJob_1234BEEF.plt.
  • G_@(BarcodeHex)_@(FileName).hgl
    • Produces files like: G_1234BEEF_myJob.hgl.

 

Basic Commands

  • Pen Up (PU;):
    • Lifts the tool and moves to the specified position.
  • Absolute Position (PA x, y;):
    • Moves the tool to an absolute position specified by X and Y coordinates.
  • Circle (CI@;):
    • Draws a circle with a radius specified after CI.

 

  Warning

Always click on the "Validate above texts" button, before clicking on Apply or OK.

If the button is not visible due to the large size of the window on 19” screens, resize the window to make it appear.

 

Was this article helpful?
0 out of 0 found this helpful