Categories: AdhesiveManufacturing
On this page... (hide)
- 1. Toolpath Generation Script
- 2. Indenting Functions
- 2.1 beginprogram
- 2.2 cleanblade
- 2.3 dwell
- 2.4 endprogram
- 2.5 indentpattern
- 2.6 linearmove
- 2.7 move
- 2.8 newline
- 2.9 optionalstop
- 2.10 planesurface
- 2.11 rapidmove
- 2.12 requiredstop
- 2.13 setfeed
- 3. Profile Definitions
- 4. Visualization
overview paragraph
folder structure notes
1. Toolpath Generation Script
1.1 Format
1.2 Examples
SampleIndent Base
directmetal_r2
2. Indenting Functions
2.1 beginprogram
Description
beginprogram
opens a file in text mode for writing, and writes the boilerplate G-code used for initializing the CNC machine. The file is defined as a global variable, so that subsequent calls to functions generating G-code don't need to keep passing the file handle.
Parameters
Name | Type | Comment |
---|---|---|
number | integer | Haas program number; should be five digits including leading zeros. |
name | string | Bare filename; extension will be automatically added. |
offset | string | Work offset to use, e.g. G154 P57 . |
description | string | Program comment; will appear at top of file. |
Options
None.
2.2 cleanblade
Description
cleanblade
generates G-code that will wipe the blade clean using the brush on the block machining pallet. Requries a work coordinate system to be defined for the location of the cleaning brush.
Parameters
Name | Type | Comment |
---|---|---|
machiningOffset | string | Work offset to use for machining, e.g. G154 P57 . |
cleaningOffset | string | Work offset to use for cleaning, e.g. G154 P56 . |
varargin | cell array | key-value pairs for optional parameters. |
Options
Name | Type | Default | Comment |
---|---|---|---|
movefeed | float | 50 | Feedrate in IPM for non-cleaning motions. |
cleanfeed | float | 25 | Feedrate in IPM for cleaning motions. |
bladelength | float | 3 | Length of blade in inches. |
extra | float | 0.8 | Additional distance in inches to feed when cleaning to clear brushes with back of blade. |
xclear | float | -0.25 | X-coordinate in machining WCS to move to prior to move to Z-clear plane in cleaning WCS. |
repeats | int | 1 | Number of cleaning passes over blade. |
2.3 dwell
Description
dwell
Writes the G-code for a dwell; for short dwell times, this is used to force the machine to exactly hit commanded coordinates without smoothing the corner.
Parameters
Name | Type | Comment |
---|---|---|
dwelltime | float | Time to dwell, in seconds. |
Options
None.
2.4 endprogram
Description
endprogram
writes G-code to return the machine to the home position, and then ends the program. This function will print an estimate of the time required for machining, and close the text file.
Parameters
None.
Options
None.
2.5 indentpattern
Description
endprogram
writes G-code to return the machine to the home position, and then ends the program. This function will print an estimate of the time required for machining, and close the text file.
Parameters
Name | Type | Default | Comment |
---|---|---|---|
xlength | 0.0024 | Total length of pattern (inches) | |
xspace | |||
zdepth | |||
indentangle | |||
indentspeed | 2 | Feed during indenting and retracting (inches/minute) | |
dwelltime | 0.02 | Time to pause at the bottom and top of each indentation (seconds) | |
dechiplength | |||
retractangle | |||
zdechipheight | |||
zmoldsurface | |||
requiredstop | bool | false | If true, places a required stop at the end of the pattern, if false, places optional stop |
Options
None.
2.6 linearmove
Description
linearmove
generates G-code to linearly move to the specified coordinates in the current work coordinate system. This will use a G01
command at the current programmed feedrate. Internally uses move
to calculate which if any of the axes to move.
Parameters
Name | Type | Comment |
---|---|---|
x | float | Destination X-coordinate in current coordinate system. |
y | float | Destination Y-coordinate in current coordinate system. |
z | float | Destination Z-coordinate in current coordinate system. |
Options
None.
2.7 move
Description
move
is called by linearmove
and rapidmove
, and computes which if any of the coordinates have changed. The function returns the calculated distance of the move, and a string of coordinates.
Parameters
Name | Type | Comment |
---|---|---|
x | float | Destination X-coordinate in current coordinate system. |
y | float | Destination Y-coordinate in current coordinate system. |
z | float | Destination Z-coordinate in current coordinate system. |
Options
None.
2.8 newline
Description
newline
is a utility function to generate a newline in the output G-code. This is also used to end G-code blocks.
Parameters
None.
Options
None.
2.9 optionalstop
Description
optionalstop
generates G-code for an optional program stop. This will pause execution of the G-code if the optional stop switch is active until CYCLE START
is pressed.
Parameters
None.
Options
None.
2.10 planesurface
Description
planesurface
generates G-code that performs an orthogonal machining operation to plane an area flat. Unmatched options will be passed through to cleanblade
if blade cleaning is enabled.
Parameters
Name | Type | Comment |
---|---|---|
varargin | cell array | key-value list of options. |
Options
Name | Type | Default | Comment |
---|---|---|---|
xlength | float | 1.0 | Total length in inches to plane. |
zdepth | float | 0.00 | Depth in inches below mold surface to perform the planing operation at. |
indentangle | float | 48 | Angle of indent trajectory measured counterclockwise from the +x direction. |
speed | float | 2.0 | Feed in IPM for planing operations. |
dechiplength | float | 0.0400 | Distance to move in the x direction for dechipping trajectory. |
retractangle | float | 60 | Angle of retract trajectory measured counterclockwise from the +x direction. |
zdechipheight | float | 0.0008 | Height above the mold surface for dechipping. |
zmoldsurface | float | 0.00 | Z location in inches of the mold surface in the machining work coordinate system. |
requiredstop | boolean | false | If true, changes optional stops after operation to required stops. |
cleanblade | boolean | false | If true, adds a blade cleaning cycle after the planing operation. |
machiningOffset | string | empty | Must be specified if cleanblade is true. Work offset to use for machining, e.g. G154 P57 . |
cleaningOffset | string | empty | Must be specified if cleanblade is true. Work offset to use for cleaning, e.g. G154 P56 . |
2.11 rapidmove
Description
rapidmove
generates G-code to linearly move to the specified coordinates in the current work coordinate system. This will use a G00
command at the current rapid feedrate. This is not guaranteed to move in a straight line to the target position. Internally uses move
to calculate which if any of the axes to move.
Parameters
Name | Type | Comment |
---|---|---|
x | float | Destination X-coordinate in current coordinate system. |
y | float | Destination Y-coordinate in current coordinate system. |
z | float | Destination Z-coordinate in current coordinate system. |
Options
None.
2.12 requiredstop
Description
requiredstop
generates G-code for a required program stop. This will pause execution of the G-code until CYCLE START
is pressed.
Parameters
None.
Options
None.
2.13 setfeed
Description
setfeed
generates G-code to set the active feedrate for all G01
commands.
Parameters
None.
Options
None.
3. Profile Definitions
note: "unique" folder contains features that are not intended to be patterned, but machined once each.
3.1 Format
3.2 Examples
BaseProfile
Options
backwardsPRofilewrapper
Options
4. Visualization
plottrajectory, both for .nc files and for toolpaths
Page last modified on April 18, 2024, at 11:14 AM