Tool and Holder Functions

Tool and holder functions provide control over the management and configuration of tools and their holders within the simulation. These functions support dynamic tool/holder creation, tool change sequences, color settings, and gouge testing.

$FMSADDTOOL

Manage additional active tools

$FMSBTC

Indicates the start of a tool change sequence

$FMSCOLR

Color definition for dynamic tools and holders

$FMSETC

Indicates the end of a tool change sequence

$FMSGOUG

Manage gouge testing status

$FMSHLD

Dynamic holder creation

$FMSPCK

Get pocket number associated with the tool

$FMSTOOL

Dynamic tool creation

The $FMSADDTOOL Function

\textbf{{\char36}FMSADDTOOL}\textbf{(}\icamhsp{0.707mm}\mathit{tool\text{-}axis\text{-}id}\icamhsp{0.707mm}\bigl[,\mathit{pocket\text{-}id}\,\bigr]\icamhsp{0.707mm}\raise0.05ex\hbox{$\begin{pmatrix}\!,\!\begin{array}{l}\mathit{part\text{-}id}\\\textbf{OFF}\end{array}\!\end{pmatrix}$}\icamhsp{0.707mm}\textbf{)}

Manage additional active tools

Returns: Numeric

The $FMSADDTOOL function identifies an additional cutting tool that operates in conjunction with the primary tool, using the same machine axes. It is typically used in machines with multiple spindles that machine duplicate parts simultaneously. The tool-axis-id or tool-axis-id/pocket-id pair specifies the additional tool to be activated or deactivated.

To activate a tool, provide a part-id indicating the part on which the tool’s movements should be applied. To deactivate a previously activated tool, specify OFF or use a value of 0 in place of the part-id.

The $FMSBTC Function

\textbf{{\char36}FMSBTC}\textbf{(}\icamhsp{0.707mm}\icamhsp{0.707mm}\textbf{)}

Beginning of tool change

Returns: Numeric (always returns 1)

The $FMSBTC function is used to indicate the beginning of a tool change. When in continuous animation mode and the “Motion step during Tool Change” setting is active, the animation mode will switch to the Motion Step format. The animation mode will switch back to continuous when the $FMSETC function is later called to indicate the end of the tool change.

The $FMSCOLR Function

\textbf{{\char36}FMSCOLR}\textbf{(}\ldots\textbf{)}

Define the material properties

Returns: Numeric (always returns 1)

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\textbf{START},\mathtt{\char39}\mathit{name}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathtt{\char39}\mathit{property}\,\mathtt{\char39},\mathit{parameter\text{-}list}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\textbf{END}\icamhsp{0.707mm}\textbf{)}

The $FMSCOLR function provides the ability to define the material properties of dynamically created tools, holders, parts and fixtures, using same functionality as can be found in the Simulation»Material dialog.

To define a color, first call $FMSCOLR(START,name) where name is a string constant or variable defining the name of the custom color. This name can subsequently be used in $FMSTOOL, $FMSHLD, $FMSPART and $FMSFIXTURE properties that take a color name.

Next, call $FMSCOLR(property,parameter-list) once for each color property to be defined, where the property name is specified using a string constant or variable containing the name of the property. Available properties and their parameter values are:

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{AMBIENT}\mathbf{\,'},\mathit{red},\icamhsp{0.707mm}\mathit{blue},\icamhsp{0.707mm}\mathit{green}\icamhsp{0.707mm}\textbf{)}

The color of the environment. The red, green and blue parameters are values in the range 0-255. The default ambient color is black (0,0,0).

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{DIFFUSE}\mathbf{\,'},\mathit{red},\icamhsp{0.707mm}\mathit{blue},\icamhsp{0.707mm}\mathit{green}\icamhsp{0.707mm}\textbf{)}

The color of the object. Default is black.

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{SPECULAR}\mathbf{\,'},\mathit{red},\icamhsp{0.707mm}\mathit{blue},\icamhsp{0.707mm}\mathit{green}\icamhsp{0.707mm}\textbf{)}

The color shown in reflections. Default is black.

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{SHININESS}\mathbf{\,'},\mathit{value}\icamhsp{0.707mm}\textbf{)}

The degree of shininess in the range 0-100. Default is 0 (not shiny).

\textbf{{\char36}FMSCOLR}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{TRANSPARENCY}\mathbf{\,'},\mathit{value}\icamhsp{0.707mm}\textbf{)}

The degree of transparency in the range 0-100. Default is 0 (opaque).

Lastly, call $FMSCOLR(END) to complete the color definition.

The $FMSETC Function

\textbf{{\char36}FMSETC}\textbf{(}\icamhsp{0.707mm}\icamhsp{0.707mm}\textbf{)}

End of a tool change

Returns: Numeric (always returns 1)

The $FMSETC function is used to indicate the end of a tool change. When in continuous animation mode, and the “Motion step during Tool Change” setting is active, the animation mode will switch to the Motion Step format when the $FMSBTC function is called. The animation mode will switch back to continuous when the $FMSETC function is later called to indicate the end of the tool change.

The $FMSGOUG Function

\textbf{{\char36}FMSGOUG}\textbf{(}\icamhsp{0.707mm}\bigl[\,\mathit{n}\,\bigr]\icamhsp{0.707mm}\textbf{)}

Returns the current gouge testing status

Returns: Numeric

The $FMSGOUG function returns the current gouge testing status between the cutting portion of the tool and the part. A return value of 0 (zero) means gouge testing is disabled; a return value of 1 (one) means it is enabled.

Optionally, you can change the gouge testing status by specifying n: use 0 to disable testing, or 1 to enable it.

The $FMSHLD Function

\textbf{{\char36}FMSHLD}\textbf{(}\ldots\textbf{)}

Holder properties

Returns: Numeric, String or Sequence

There are three forms of the $FMSHLD function. CLEAR clears all holder definitions from the holder table. RETURN obtains holder information. START-END creates new holder definitions.

Clear holder table

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\textbf{CLEAR},\textbf{ALL}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSHLD function removes all holder definitions from the holder table. It always returns the value 1.

Get holder properties

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\textbf{RETURN},\icamhsp{0.707mm}\mathtt{\char39}\mathit{holder}\,\mathtt{\char39},\icamhsp{0.707mm}\mathtt{\char39}\mathit{property\text{-}list}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSHLD function returns requested properties of a holder where holder is a string constant or variable defining the name of the holder and property-list is a string constant or variable defining a comma separated case insensitive list of properties to be returned. Returned holder properties can be either numeric values or strings. Multiple property values are returned as a sequence. Linear properties are returned in the current machine units.

The following holder properties can be queried:

property

Common holder properties

TYPE

1:profile, 2:generic

PARENT

Parent holder name string, blank if none

UNITS

Units of holder definition (informational) 1:inch, 25.4:mm

Profile holder properties

PT0

Spindle contact distance along holder axis

PT1

Tool contact distance along holder axis

Generic holder properties

ACTASAHEAD

Holder acts as a head for tool comp. purposes 0:no, 1:yes

SPINDLE

Sequence of xyz spindle contact distances from holder origin

SPINDLE.X

Spindle contact x-axis distance from holder origin

SPINDLE.Y

Spindle contact y-axis distance from holder origin

SPINDLE.Z

Spindle contact z-axis distance from holder origin

TOOL

Sequence of xyz tool contact distances from holder origin

TOOL.X

Tool contact x-axis distance from holder origin

TOOL.Y

Tool contact y-axis distance from holder origin

TOOL.Z

Tool contact z-axis distance from holder origin

TOOL.A

Tool rotation around x-axis relative to the holder tool contact point

TOOL.B

Tool rotation around y-axis relative to the holder tool contact point

TOOL.C

Tool rotation around z-axis relative to the holder tool contact point

Create new holder

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\textbf{START},\mathtt{\char39}\mathit{name}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathtt{\char39}\mathit{property}\,\mathtt{\char39},\mathit{parameter\text{-}list}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\textbf{END}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSHLD function provides the ability to create a new holder. To create a holder, first call $FMSHLD(START,name) where name is a string constant or variable defining the name of the holder. This name can subsequently be used in the $FMSTOOL 'HOLDER' property.

Next, call $FMSHLD(property,parameter-list) once for each holder property to be defined, where the property name is specified using a string constant or variable containing the name of the property. Available properties and their parameter values are:

For profile holders:

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{REVOLVED}\mathbf{\,'},\mathit{profile}\icamhsp{0.707mm}\bigl[,\mathit{crprofile}\,\bigr]\icamhsp{0.707mm}\textbf{)}

Specifies a “Profile” holder type. The profile is a sequence containing the xz values of the profile to be swept around a {0,0,1} axis. The optional crprofile is a sequence of corner radius values to apply to the corresponding vertices of the profile (trailing zero values can be omitted).

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{PT0}\mathbf{\,'},\mathit{distance}\icamhsp{0.707mm}\textbf{)}

Specifies the spindle contact point distance along the {0,0,1} holder axis. This is where the holder is attached to its parent. Default is zero.

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{PT1}\mathbf{\,'},\mathit{distance}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact point distance along the {0,0,1} holder axis. This is where the tool (or child holder) is attached to the holder. Default is zero.

For generic holders:

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{STL}\mathbf{\,'},\mathtt{\char39}\mathit{filename}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies a “Generic” mesh holder type. The filename is a string constant or variable specifying the ASCII STL file containing the mesh geometry of the holder.

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{PROFILE}\mathbf{\,'},\mathit{profile}\icamhsp{0.707mm}\bigl[,\mathit{crprofile}\,\bigr]\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{EXTRUDED}\mathbf{\,'},\mathit{distance}\icamhsp{0.707mm}\textbf{)}

Specifies a “Generic” extruded holder type. The profile is a sequence containing the xy values of the holder profile to be extruded for the specified distance along the {0,0,1} holder axis. The optional crprofile is a sequence of corner radius values to apply to the corresponding vertices of the profile (trailing zero values can be omitted).

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{MATRIX}\mathbf{\,'},\mathit{matrix}\icamhsp{0.707mm}\textbf{)}

Specifies the position and orientation of the holder geometry (mesh or extruded) using a 12 element matrix sequence. The matrix must be defined before any STLs to which it applies.

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{SPINDLE}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the spindle contact xyz offset from the holder origin. This is where the holder is attached to its parent. Default is (0,0,0).

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{TOOL}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z},\icamhsp{0.707mm}\mathit{a},\icamhsp{0.707mm}\mathit{b},\icamhsp{0.707mm}\mathit{c}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the holder origin and the tool abc orientation in degrees (a is rotation around the x-axis, b around the y-axis and c around the z-axis). This is where the tool (or child holder) is attached to the holder. Default is (0,0,0,0,0,0).

Common properties for all holders:

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{UNITS}\mathbf{\,'},\mathit{value}\icamhsp{0.707mm}\textbf{)}

Specifies the units of measure for the holder (1:inch, 25.4:mm). Default units are current machine units.

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLOR}\mathbf{\,'},\mathtt{\char39}\mathit{colorname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the color of the holder, which must have previously been defined using the $FMSCOLR function.

\textbf{{\char36}FMSHLD}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{PARENT}\mathbf{\,'},\mathtt{\char39}\mathit{holdername}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the name of another holder to which the current one is mated.

Lastly, call $FMSHLD(END) to complete the holder definition.

When creating holders, all three forms of the $FMSHLD function (START, property, and END) always return the value 1.

The $FMSPCK Function

\textbf{{\char36}FMSPCK}\textbf{(}\icamhsp{0.707mm}\mathit{n}\icamhsp{0.707mm}\textbf{)}

Returns the component ID of the pocket associated with tool number

Returns: Numeric

The $FMSPCK function returns the numeric component ID of the pocket associated with tool number n, or zero if there is no associated pocket.

The $FMSTOOL Function

\textbf{{\char36}FMSTOOL}\textbf{(}\ldots\textbf{)}

Tool properties

Returns: Numeric, String or Sequence

There are four forms of the $FMSTOOL function. CLEAR clears all tool definitions from the tool table. RETURN obtains tool information. START-END creates new tool definitions. COPY creates a copy of an existing tool with a new id.

Clear tool table

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\textbf{CLEAR},\textbf{ALL}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSTOOL function removes all tool definitions from the tool table. It always returns the value 1.

Get tool properties

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\textbf{RETURN},\mathit{tool},\mathtt{\char39}\mathit{property\text{-}list}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSTOOL function returns requested properties of a tool where tool is the tool number as defined in Virtual Machine and property-list is a string constant or variable defining a comma separated case insensitive list of properties to be returned. Returned tool properties can be either numeric values or strings. Multiple property values are returned as a sequence. Linear properties are returned in the current machine units.

The following tool properties can be queried:

property

Common tool properties

NAME

Tool name string, blank if none

TYPE

1:mill, 2:lathe, 3:probe, 4:additive

SUBTYPE

Value varies depending on TYPE

GL

Sequence of xyz gage lengths

GL.X

X axis gage length

GL.Y

Y axis gage length

GL.Z

Z axis gage length

HOLDER

Holder name string, blank if none

TCD

Sequence of zero or more Diameter compensation offsets

TCF

Sequence of zero or more Fixture compensation offsets

TCL

Sequence of zero or more Length compensation offsets

UNITS

Units of holder definition (informational) 1:inch, 25.4:mm

Mill tool properties

SUBTYPE

1:end-mill, 2:ball, 3:bull, 4:drill, 5:apt, 6:profile, 7:generic

D

Tool diameter

R

Tool radius (D/2)

L

Tool length

FL

Flute length

CR

Corner radius

BA

Bottom angle (degrees)

SA

Side angle (degrees)

BO

Body offset

N

Number of flutes or teeth

SL

Shank length

SD

Shank diameter

LEFT

1:left-hand, 0:unknown, -1:right-hand

RIGHT

1:right-hand, 0:unknown, -1:left-hand

USAGE

1:finishing, 2:semi-finishing, 3:roughing

Lathe tool properties

SUBTYPE

1:round, 2:trigon, 3:diamond, 4:symmetric, 5:thread, 6:groove, 7:profile, 8:generic

R

Inscribed circle radius

D

Inscribed circle diameter (R*2)

J

Joint radius

H

Insert height

SA

Clearance (side) angle (degrees)

N

Number of sides

CR

Corner radius

A

Internal angle (degrees)

TW

Tooth width

TH

Tooth height

TO

Tooth offset

TC

Tooth clearance

LEFT

1:left-hand, 0:unknown, -1:right-hand

RIGHT

1:right-hand, 0:unknown, -1:left-hand

USAGE

1:finishing, 2:semi-finishing, 3:roughing

Probe tool properties

SUBTYPE

1:straight, 2:star, 3:generic

R

Probe tip radius

D

Probe tip diameter (R*2)

SL

Stylus length

SD

Stylus diameter

H

Height of star component

W

Width of star component

Additive tool properties

SUBTYPE

1:profile, 2:generic

Create new tool

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\textbf{START},\mathit{tool}\icamhsp{0.707mm}\raise0.03ex\hbox{$\Bigl[,\mathit{pocket}\,\bigl[,\mathit{toolaxis}\,\bigr]\,\Bigr]$}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathtt{\char39}\mathit{property}\,\mathtt{\char39},\mathit{parameter\text{-}list}\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\textbf{END}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSTOOL function provides the ability to create a new tool. To create a tool, first call $FMSTOOL(START,tool) where tool is a numeric constant or variable defining the tool number. Specify an optional pocket number if the tool is to be assigned to a specific tool pocket on the machine. On machines having multiple tool holding devices with duplicate pocket numbers, specify the pocket's toolaxis ID to uniquely identify it.

Next, call $FMSTOOL(property,value_list) once for each tool property to be defined, where the property name is specified using a string constant or variable containing the name of the property. Available properties and their parameter values are:

../../_images/fmstool.png

For milling tools:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{MILL}\mathbf{\,'},\mathit{t}\icamhsp{0.707mm}\raise0.03ex\hbox{$\,\Bigl[,\mathit{d},\mathit{r}\,\bigl[,\mathit{e},\mathit{f},\mathit{a},\mathit{b}\,\bigr],\mathit{h}\,\Bigr]$}\icamhsp{0.707mm}\textbf{)}

Specifies a parametrically defined milling tool, where t is an integer constant or variable that defines the type of tool. The number of required APT cutter parameters shown in the image is dependent upon the tool type, as follows:

1:

End mill, requires 3 or 7 cutter parameters.

2:

Ball nose, requires 3 or 7 cutter parameters.

3:

Bull nose, requires 3 or 7 cutter parameters.

4:

Drill, requires 7 cutter parameters.

5:

APT, requires 7 cutter parameters.

6:

Profile, no cutter parameters. Requires a PROFILE (see below).

7:

Generic, no cutter parameters. Requires an STL or INSERT (see below).

Milling tool types 1 to 5 accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{FLUTE}\mathbf{\,'},\mathit{length}\icamhsp{0.707mm}\textbf{)}

Specifies the flute length of the tool, measured from the tool tip to the tool top.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{BODYOFF}\mathbf{\,'},\mathit{radius}\icamhsp{0.707mm}\textbf{)}

Specifies the relief to apply between the tool body and the tool diameter.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLORBODY}\mathbf{\,'},\mathtt{\char39}\mathit{colorname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the color of the body portion of the tool, which must have previously been defined using the $FMSCOLR function.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{SHANK}\mathbf{\,'},\mathit{length},\icamhsp{0.707mm}\mathit{diameter}\icamhsp{0.707mm}\textbf{)}

Specifies the length and diameter of the shank portion of the tool. The length of the shank is measured with respect to the holder or spindle mount point.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLORSHANK}\mathbf{\,'},\mathtt{\char39}\mathit{colorname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the color of the shank portion of the tool, which must have previously been defined using the $FMSCOLR function.

Profile milling tools (type 6) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{REVOLVED}\mathbf{\,'},\mathit{profile}\icamhsp{0.707mm}\bigl[,\mathit{crprofile}\,\bigr]\icamhsp{0.707mm}\textbf{)}

Specifies a profile to use. The profile is a sequence containing the xy values of the profile to be swept around a {0,0,1} axis. The optional crprofile is a sequence of corner radius values to apply to the corresponding vertices of the profile (trailing zero values can be omitted). By default the profile is cutting.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{CUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent profiles define the cutting edge of the revolved tool.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{NONCUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent profiles define the non-cutting edge of the revolved tool.

Generic milling tools (type 7) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{STL}\mathbf{\,'},\mathtt{\char39}\mathit{filename}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies a mesh to use. The filename is a string constant or variable specifying the STL file containing the mesh geometry.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{INSERT}\mathbf{\,'},\mathit{id}\icamhsp{0.707mm}\textbf{)}

Specifies a mesh to use. The id is an integer representing an existing lathe insert tool id.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{DUPLICATE}\mathbf{\,'},\mathit{count},\icamhsp{0.707mm}\mathit{angle}\icamhsp{0.707mm}\textbf{)}

Specifies a mesh repetitive instances around the tool axis of revolution. The count is an integer representing the number of instances of the mesh repeated around the tool. The angle is the offset angle of the first mesh instance.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{MATRIX}\mathbf{\,'},\mathit{matrix}\icamhsp{0.707mm}\textbf{)}

Specifies the position and orientation of the insert geometry using a 12 element matrix sequence. The matrix must be defined before the STL.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{OFFSET}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the mesh origin. This is the tool control point. Default is (0,0,0).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{CUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent meshes define the cutting mesh of the generic tool.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{NONCUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent meshes define the non-cutting mesh of the generic tool.

For lathe inserts:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{TURN}\mathbf{\,'},\mathit{type}\icamhsp{0.707mm}\bigl[,\mathit{ic},\mathit{j},\mathit{h},\mathit{a},\mathit{n},\mathit{cr},\mathit{t},\mathit{tw},\mathit{th},\mathit{to},\mathit{tc}\,\bigr]\icamhsp{0.707mm}\textbf{)}

Specifies a parametrically defined lathe tool insert, where type is an integer constant or variable that defines the type of insert. The number of required parameters is dependent upon the insert type, as follows:

1:

Round, requires ic, j, h and a.

2:

Trigon, requires ic, j, h, a, cr and t. n is ignored (always 3).

3:

Diamond, requires ic, j, h, a, cr and t. n is ignored (always 4).

4:

Symmetrical, requires ic, j, h, a, n and cr.

5:

Thread, requires all parameters.

6:

Groove, requires all parameters.

7:

Profile, no parameters. Requires a PROFILE (see below)

8:

Generic, no parameters. Requires an STL (see below).

The parameter names match those that can be found in the lathe tool builder dialog:

ic:

Inscribed circle radius (i: Length for Groove insert)

j:

Joint radius

h:

Height

a:

Clearance angle

n:

Number of sides

cr:

Corner radius

t:

Internal angle

tw:

Tooth width

th:

Tooth height

to:

Tooth offset

tc:

Tooth clearance

Profile lathe inserts (type 7) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\textbf{PROFILE}\mathbf{\,'},\mathit{profile}\icamhsp{0.707mm}\bigl[,\mathit{crprofile}\,\bigr]\icamhsp{0.707mm}\textbf{)}
\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{EXTRUDED}\mathbf{\,'},\mathit{distance}\icamhsp{0.707mm}\textbf{)}

Specifies a profile to use. The profile is a sequence containing the xy values of the insert profile to be extruded for the specified height. The optional crprofile is a sequence of corner radius values to apply to the corresponding vertices of the profile (trailing zero values can be omitted). The angle is the clearance angle along the side of the insert.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{OFFSET}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the profile origin. This is where the insert is attached to the holder. Default is (0,0,0).

Generic lathe inserts (type 8) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{STL}\mathbf{\,'},\mathtt{\char39}\mathit{filename}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies a mesh to use. The filename is a string constant or variable specifying the STL file containing the mesh geometry of the insert.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{MATRIX}\mathbf{\,'},\mathit{matrix}\icamhsp{0.707mm}\textbf{)}

Specifies the position and orientation of the insert geometry using a 12 element matrix sequence. The matrix must be defined before the STL.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{OFFSET}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the mesh origin. This is where the insert is attached to the holder. Default is (0,0,0).

For probe tools:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{PROBE}\mathbf{\,'},\mathit{type},\icamhsp{0.707mm}\mathit{sl},\icamhsp{0.707mm}\mathit{sd}\icamhsp{0.707mm}\bigl[,\mathit{h},\mathit{w}\,\bigr],\icamhsp{0.707mm}\mathit{r}\icamhsp{0.707mm}\textbf{)}

Specifies a probe tool, where type is an integer constant or variable that defines the type of probe. The number of required parameters is dependent upon the probe type, as follows:

1:

Straight, requires sl, sd, and r.

2:

Star, requires sl, sd, h, w and r.

The parameter names match those that can be found in the probe tool builder dialog:

sl:

Stylus length

sd:

Stylus diameter

h:

Height

w:

Width

r:

Probe ball radius

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLORBODY}\mathbf{\,'},\mathtt{\char39}\mathit{colorname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the color of the body portion of the probe, which must have previously been defined using the $FMSCOLR function.

For additive tools:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{ADDITIVE}\mathbf{\,'},\mathit{type}\icamhsp{0.707mm}\textbf{)}

Specifies an additive tool, where type is an integer constant or variable that defines the type of additive tool, as follows:

1:

Profile. Requires a PROFILE (see below)

2:

Generic. Requires an STL (see below).

Profile additive (type 1) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{REVOLVED}\mathbf{\,'},\mathit{profile}\icamhsp{0.707mm}\bigl[,\mathit{crprofile}\,\bigr]\icamhsp{0.707mm}\textbf{)}

Specifies a profile to use. The profile is a sequence containing the xy values of the profile to be swept around a {0,0,1} axis. The optional crprofile is a sequence of corner radius values to apply to the corresponding vertices of the profile (trailing zero values can be omitted). By default the profile is additive.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{OFFSET}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the profile origin. This is the tool control point relative to the holder. Y is ignored for profile tool. Default is (0,0,0).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{CUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent profiles define the additive edge of the revolved tool. Only one additive profile is supported.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{NONCUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent profiles define the non-additive edge of the revolved tool.

Generic additive (type 2) accept the following:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{STL}\mathbf{\,'},\mathtt{\char39}\mathit{filename}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specified a mesh to use. The filename is a string constant or variable specifying the STL file containing the mesh geometry.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{MATRIX}\mathbf{\,'},\mathit{matrix}\icamhsp{0.707mm}\textbf{)}

Specifies the position and orientation of the STL geometry using a 12 element matrix sequence. The matrix must be defined before the STL.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{OFFSET}\mathbf{\,'},\mathit{x},\icamhsp{0.707mm}\mathit{y},\icamhsp{0.707mm}\mathit{z}\icamhsp{0.707mm}\textbf{)}

Specifies the tool contact xyz offset from the mesh origin. This is the tool control point. Default is (0,0,0).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{CUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent meshes define the additive mesh of the revolved tool. Only one additive mesh is supported.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{NONCUTTING}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies that subsequent meshes define the non-additive mesh of the revolved tool.

Common properties for all tools:

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{NAME}\mathbf{\,'},\mathtt{\char39}\mathit{toolname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the name of the tool.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{UNITS}\mathbf{\,'},\mathit{value}\icamhsp{0.707mm}\textbf{)}

Specifies the units of measure for the tool (1:inch, 25.4:mm). Default units are current machine units.

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{LEFT}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies a left hand cutting tool or insert (ignored with probe tools).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{RIGHT}\mathbf{\,'}\icamhsp{0.707mm}\textbf{)}

Specifies a right hand cutting tool or insert (ignored with probe tools).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{USAGE}\mathbf{\,'},\mathit{value}\icamhsp{0.707mm}\textbf{)}

Specifies the intended use of the tool, which can be one of the following values: 0 for finishing (the default); 1 for semi-finishing; and 2 for roughing (ignored with probe tools).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLORCUTTER}\mathbf{\,'},\mathtt{\char39}\mathit{colorname}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the color of the cutting portion of the tool, insert or probe tip, which must have previously been defined using the $FMSCOLR function (ignored with probe tools).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COLORCUT}\mathbf{\,'},\mathit{red},\icamhsp{0.707mm}\mathit{blue},\icamhsp{0.707mm}\mathit{green}\icamhsp{0.707mm}\textbf{)}

Specifies the color to show on the in-process stock for cuts created with this tool. The red, green and blue parameters are values in the range 0-255. If a color is not defined, then VM will automatically assign one (ignored with probe tools).

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{HOLDER}\mathbf{\,'},\mathtt{\char39}\mathit{holdername}\,\mathtt{\char39}\icamhsp{0.707mm}\textbf{)}

Specifies the name of the holder to which the tool, insert or probe is mated.

Lastly, call $FMSTOOL(END) to complete the tool definition.

When creating tools, all three forms of the $FMSTOOL function (START, property, and END) always return the value 1.

Copy tool

\textbf{{\char36}FMSTOOL}\textbf{(}\icamhsp{0.707mm}\mathbf{'}\textbf{COPY}\mathbf{\,'},\mathit{tool},\icamhsp{0.707mm}\mathit{copy}\icamhsp{0.707mm}\raise0.03ex\hbox{$\Bigl[,\mathit{pocket}\,\bigl[,\mathit{toolaxis}\,\bigr]\,\Bigr]$}\icamhsp{0.707mm}\textbf{)}

This form of the $FMSTOOL function provides the ability to create a new tool by copying an existing tool, where tool is a numeric constant or variable referencing an existing tool number and copy is a numeric constant or variable defining the new tool number. Specify an optional pocket number if the tool is to be assigned to a specific tool pocket on the machine. On machines having multiple tool holding devices with duplicate pocket numbers, specify the pocket's toolaxis ID to uniquely identify it.

The COPY form of the $FMSTOOL function always returns the value 1.