HPGL Sample Files

Sample File 1 (HPGL 3D code)

The following is a 5" square. Rapid level .5 inches above material, feed down 60 ipm, cut feed 200 ipm, depth .25 inches. This is for a single head system with manual tool change.

Machine Code Description of Machine Code
;IN; Program Start
ZZ1 3D mode (all motion commands must send 3 coordinates)
PA Forces Absolute Coordinate Mode
SP1 Tool 1 call. Following moves will use tool one.
TCInsert .125 : 1/8" End Mill; "Insert .125 : 1/8" End Mill" will displayed on the keypad. The user will now be able to load the tool manually and Z reference the tool. This line can be sent multiple times in the same file to support manual tool changes.

(This command is optional.)
ZO100,18000 Spindle Speed Set to 18,000 RPM's
PU Position the Z axis
PA0,0,-508 Position X=0.0, Y=0.0, and Z=0.5 inches above Z=0 or above the Material.

(508 HPGL units / 1016) = .5 inches
SF127 Sets the Feed Rate to 300 inches per minute

((127 mm/sec / 25.4) x 60) = 300 inches per minute
PD0,0,-10 Position X=0.0, Y=0.0, and Z=0.01 inches above Z=0 or above the Material.

The PD command should be called before the Z axis is lows the tool into the Material or at the start of a new contour.
- The Auxiliary output for the selected tool is turned on. (This output can be wired to operate a tool misting or cooling unit.)
- The Motion will change from Slew mode (high speed rapid) to Machine mode (Cutting Mode)
- If this is the first PD called in the program the spindle output will come on for the current selected tool.
SF25 Sets the Feed Rate to 60 inches per minute
PD0,0,254 Position X=0.0, Y=0.0, and Z=0.25 inches below Z=0 or into the Material.
SF84 Sets the Feed Rate to 200 inches per minute
PD5080,0,254 Position X=5.0, Y=0.0, and Z=0.25 inches
PD5080,5080,254; Position X=5.0, Y=5.0, and Z=0.25 inches
PD0,5080,254 Position X=0.0, Y=5.0, and Z=0.25 inches
PD0,0,254 Position X=0.0, Y=0.0, and Z=0.25 inches
SF127 Sets the Feed Rate to 300 inches per minute
PA0,0,-508;PU Position X=0.0, Y=0.0, and Z=0.5 inches above Z=0 or above the Material.

The PU command is called at the end of the current contour once the Z axis tool is out of the Material. Completing the current contour.
- The Auxiliary output for the selected tool is turned off..
- The Motion will change from Machine mode (Cutting Mode) to Slew mode (high speed rapid)
PA0,0,-508 Position X=0.0, Y=0.0, and Z=0.5 inches above Z=0 or above the Material.
SP0; End of Job. The spindle is turned off at this time.
Sample File 2 (HPGL 2D code)

This is a simple HPGL 2D file. The user would set all speeds, depths and the tool lift at the keypad. Notice that there is no "G00 C" command.

Machine Code Description of Machine Code
;IN; Program Start
PA Forces Absolute Coordinate Mode
SP1 Tool 1 call. Following moves will use tool one.
PU Moves the Z axis to Tool Lift position that is set at keypad. The tool lift is the distance above the material in reference to Z=0 or the surface of the material.
PA0,0 Position X=0.0, Y=0.0, Z=Tool Lift set at keypad
PD Moves the Z axis to the depth set at the keypad. The depth is the distance into the material in reference to Z=0 or the surface of the material.

The Z axis is lowered the tool into the Material at the start of a new contour when the PD command is called
- The Auxiliary output for the selected tool is turned on. (This output can be wired to operate a tool misting or cooling unit.)
- The Motion will change from Slew mode (high speed rapid) to Machine mode (Cutting Mode)
- If this is the first PD called in the program the spindle output will come on for the current selected tool.
PD5080,0 Position X=5.0, Y=0.0, Z=depth at keypad

(5080 HPGL units / 1016) = 5.0 inches
PD5080,5080 Position X=5.0, Y=5.0, Z=depth at keypad
PD0,5080 Position X=0.0, Y=5.0, Z=depth at keypad
PD0,0 Position X=0.0, Y=0.0, Z=depth at keypad
PU Moves the Z axis to Tool Lift position that is set at keypad.

The PU command is called at the end of the current contour. Completing the current contour.
- The Auxiliary output for the selected tool is turned off..
- The Motion will change from Machine mode (Cutting Mode) to Slew mode (high speed rapid)
PA0,0 Position X=0.0, Y=0.0, Z=Tool Lift set at keypad
SP0; End of Job. The spindle is turned off at this time.

The following is the same file as above with some added 2D commands. All of the speeds and depths are set the same as Sample one. The ZD, ZU, and SF commands can be sent at any time in the file. The PD and PU commands that follow will use the new settings of these commands.

;IN;PA;
SP1;
TCInsert .125 : 1/8" End Mill;
ZO100,18000;
SF84,25;
ZU508;
PU;
PA0,0;
ZD254;
PD;
PD5080,0;
PD5080,5080;
PD0,5080;
PD0,0;
PU;
PA0,0;
SP0;

Sample File 3 (ATC Tool 3)

The following is a program to cut 2 squares with tool 4 and 2 circles with tool 1. The first circle is counter clockwise and the second circle is clockwise. The Squares are 5 inches and the Circle are 4 inches in diameter. The file is in 3d mode and all speeds and feeds are set in the file.

;IN;ZZ1;PA;
SP4;
ZO100,18000;
PU;
PA0,0,-508;
SF127;
PD0,0,-10;
SF25;
PD0,0,254;
SF84;
PD5080,0,254;
PD5080,5080,254;
PD0,5080,254;
PD0,0,254;
SF127;
PA0,0,-508;PU;
ZO100,18000;
PU;
PA6096,0,-508;
SF127;
PD6096,0,-10;
SF25;
PD6096,0,254;
SF84;
PD11176,0,254;
PD11176,5080,254;
PD6096,5080,254;
PD6096,0,254;
SF127;
PA6096,0,-508;PU;
SP1;
ZO100,24000;
PU;
PA6604,2540,-508;
SF127;
PD6604,2540,-10;
SF19;
PD6604,2540,254;
SF42;
AA8636,2540,360.
SF127;
PA6604,2540,-508;PU;
ZO100,24000;
PU;
PA508,2540,-508;
SF127;
PD508,2540,-10;
SF19;
PD508,2540,254;
SF42;
AA2540,2540,-360.
SF127;
PA508,2540,-508;PU;
PA0,0,-508;
SP0;

 

Copyright© 2008, MultiCam Inc. All rights reserved.