Documente Academic
Documente Profesional
Documente Cultură
GibbsCAM 2007
September 2007
Proprietary Notice
This document contains propriety information of Gibbs and Associates and is to be used
only pursuant to and in conjunction with the license granted to the licensee with respect to
the accompanying Gibbs and Associates licensed software. Except as expressly permitted in
the license, no part of this document may be reproduced, transmitted, transcribed, stored
in a retrieval system, or translated into any language or computer language, in any form or
by any means, electronic, magnetic, optical, chemical, manual or otherwise, without the
prior expressed written permission from Gibbs and Associates or a duly authorized
representative thereof.
It is strongly advised that users carefully review the license in order to understand the
rights and obligations related to this licensed software and the accompanying
documentation.
Use of the computer software and the user documentation has been provided pursuant to a
Gibbs and Associates licensing agreement.
©2004-2007 Gibbs and Associates. All rights reserved. The Gibbs logo, GibbsCAM,
GibbsCAM logo, Virtual Gibbs, Gibbs SFP, MTM, SolidSurfacer, and “Powerfully Simple.
Simply Powerful.” are either trademark(s) or registered trademark(s) of Gibbs and
Associates in the United States and/or other countries. Windows Vista and the Windows
logo are trademarks or registered trademarks of Microsoft Corporation in the United States
and/or other countries. All other brand or product names are trademarks or registered
trademarks of their respective owners. Contains Autodesk® RealDWG by Autodesk, Inc.,
Copyright © 1998-2006 Autodesk, Inc. All rights reserved.
Thanks to Bill Gibbs, Chris Romes, Daniel Remenak and Jim Strong for their input and
assistance.
Table of Contents
INTRODUCTION 1
About Machine Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Comparison of rendering modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SET UP 7
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Build Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Machine Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Clearance Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
About the MDDs and the MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Home Position - Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Home Position - Lathes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Machine Sim Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Cutting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Collisions/Limits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
SCRIPTING 59
Machine Sim Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Types of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Machine Sim Scripts Utility Op Script Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Conditional Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Debugging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
About Commands and Redraws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
PostScript Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
VMMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
ii
Table of Contents
The Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
The Y Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
The X Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
The Rotary Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
The A Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
The Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
The Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
The Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
The Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Finalizing the Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Missing Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Axis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Setting Machine Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Machine Sim Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Creating the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
About the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Loading Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Machining XZ Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Machining XZ Backside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Using Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Part Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Loading A Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
Setting the Part Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Machine Sim Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
INDEX 105
iii
Table of Contents
iv
INTRODUCTION
Introduction
CHAPTER 1 : Introduction
ABOUT MACHINE SIMULATION
The Machine Simulation option is a 3D representation of a Machine Tool, the parts and
cutting tools which supplements the standard rendering component of GibbsCAM.
Machine Simulation provides a machine-centric view of what is happening as opposed to
the standard rendering which is part-centric. Also included with this option is Machine
Builder, a tool to create the models that represent the machine tool. Machine Simulation
supports lathe, mill, Mill/Turn, Advanced CS, rotary mill, Tombstone Machining System
and most Multi-Task Machining parts.
3
Introduction
Figure 1: Example of a machine assembly file and a part being rendered with Machine
Simulation.
4
Introduction
OVERVIEW
Machine Simulation is accessed from the Cut Part
Render button on the main palette or the Plug-Ins
menu. Build Machine opens the interface for
defining and creating a machine tool while the
Machine Sim option activates the Machine
Simulation rendering mode. Typically a machine
tool needs to be created before using Machine Sim
but it may be used without a machine tool model in
Part Mode. At first glance Part Mode may seem to
just be Flash CPR. In fact it is not. Using Machine
Sim in Part Mode will display all inter-operation tool
moves that Flash CPR (and the standard rendering)
does not display.
Traditional CPR Flash CPR “Part Mode” Machine Sim “Machine Mode” Machine Sim
While Flash CPR and Machine Sim may appear similar, their uses are different. A key
difference is the Machine Sim capability to display the inter-operation moves of a tool.
5
Introduction
Flash CPR may be faster than Machine Sim as it does not have to render an entire machine
model and the moving axes. You may find that when checking your part file you use several
or all of the rendering types (standard CPR, Flash CPR and Machine Simulation),
depending on your needs.
Machine Sim, in either mode, will show all of the part instances in a TMS multi-part setup
where standard CPR and Flash CPR only show the single part as programmed in the VNC
file.
TMS rendering with Flash CPR TMS rendering with Machine Sim
6
SET UP
Set Up
CHAPTER 2 : Set Up
OVERVIEW
Machine Simulation does not really affect part set-up, except that each machine assembly
requires a custom MDD, which can streamline some of the choices you make when setting
up a part including the rotary set-up and the post processor selection.
BUILD MACHINE
With Build Machine we will be creating a machine assembly file that represents a machine
tool. The representation of the machine can be as simple as just a base, each axis and
primary components, such as the table, or it may be very complex, down to modeling the
control’s buttons and dials. The level of complexity is up to you. When creating the model
you should be sure to create a workspace big enough to contain the entire machine.
Figure 2: Examples of machine models. Some are very complex, others are very basic.
All machines must be defined in millimeters but the part can be inch or metric. The
machine assembly will be scaled to work with inch parts.
9
Set Up
MACHINE SIMULATION
Clearance Planes
The MDD associated with a machine should reflect the machine’s and the post’s retract
behavior so that Machine Sim shows what will really happen on the machine. For most
posts the tool will go home, in some cases the render will only show ZCP1.
MDDS
Each machine assembly that is created must have an custom MDD that defines that
machine including the tool change position, the range of motion of the axes and other data.
In the case of many fairly simple machines you can start with an existing, standard MDD
and modify the data to fit the machine. Whenever the MDD is selected in the Document
Control dialog, the accompanying machine assembly file will be the default machine for
Machine Sim. The MDD should be reviewed after you have created the machine assembly
file. It is important that the MDD and machine assembly file be consistent in terms of axes
definition. This includes number and type of axes, the axes position, orientation and order.
See the MDD Editor documentation for information on creating an MDD.
In addition to the default machine, the MDD for a Machine Simulation model can set other
information. For example, the rotary information for a 4 or 5-axis machine will be pre-
determined, meaning that it does not need to be set each time a part is created. The tool
change position may be pre-set, depending on your machine and preference. Also, the
default post processor is set by the Machine Sim MDD.
10
Set Up
If there are two rotary axes that are connected to each other (i.e. both are on the table, or
both are on the too), then the mounting order in the MDD must match the parent/child
relationship defined in the machine assembly. For example, if the A axis is mounted on the
B axis in the MDD, then the corresponding A axis must be a child of the B axis in the
machine assembly.
Other areas to review for MDD/machine assembly consistency include: pivot distances (i.e.
rotary axes locations), axes directions including positive/negative for both linear and rotary
axes, and axes names.
The MDD also defines behavior and positions for tool changes and other moves between
operations. Many of these moves are not displayed in Cut Part Rendering, but all moves are
displayed in Machine Simulation, so it is important that this information be correct in the
MDD if any part using a particular MDD is going to be used in Machine Simulation. This
includes tool change settings like axis priority, axis touchingly position type (e.g. full
retract, preset position, user defined), and axis touchingly position. It also includes same
tool rotation settings like axis move order and position.
11
Set Up
1. Pivot Point
2. Spindle Origin
3. Part Origin
4. Pivot Point
CUTTING
The cutting options section allow you to
control the quality and responsiveness of
Machine Sim. Please note that the Machine
Sim preferences are stored with the part.
This means that if you change the
preferences but open a part that has an
older set of preferences, it will override the
changes you have made.
speed but will result in a rougher rendering animation. With large numbers the tool may
appear to jump ahead of rendering, which will suddenly snap to the tool. This may be jerky,
but can be rather fast. A low number provides a smooth animation, but may be slow.
Cut Part Chord Height: This setting is the resolution for the cut part
displayed in Flash CPR. The smaller the value, the higher quality of
the display and the more resources needed by the system, resulting Chord Height
in a slower rendering. There are separate settings for inch and
metric parts. The separate values can only be set from within a part
of that unit type.
COLLISIONS/LIMITS
The items found in the Collisions/Limits section of the dialog provide control over how the
system reports collision errors while rendering. Any combination of the alert methods may
be used to inform the user when a collision occurs.
Please note that the Collision Checking option (found in the Render Control
! palette’s menu) must be activated for the system to check for collisions.
A collision in Machine Simulation occurs whenever any two objects contact each other
during the simulation that are not supposed to touch. Objects in Machine Simulation
13
Set Up
Machine simulation collisions are detected when collision detection is set on, and any of
the following conditions occur:
• The cutting portion of a tool contacts the part/stock while in rapid mode
• The non-cutting portion of a tool or holder contacts the part/stock while cutting
• Any object that is part of a collision component group contacts any object that is part of
a different collision component group
• Any axis position exceeds the axis limit as defined in the machine assembly for any of
the machine components with axis limits (min/max).
Alert Types: You may choose any or all of the various feedback methods that alert you to a
collision. The Beep option provides an audible alert, Log To Display will output an error in
the Clash Console log window and Stock Flash provides a visual alert to the error by
flashing the rendered stock. Stop Animation will cause the rendering to stop when a
collision is detected.
Tolerance: The Tolerance setting allows a different value for metric and inch parts. Any
collision within the specified tolerance will generate a collision alert.
SLIDER
The items in this section affects the responsiveness and quality of the rendering by
controlling the maximum step distance between features in rendering. These values are
14
Set Up
Figure 5: The Clash Console output showing a tool clashing with the stock and a fixture.
used with the speed slider on the rendering palette. The fastest speed jumps the tool from
feature to feature using these settings. Lowering the speed will scale the distances between
features. Please note that this does not affect toolpath, only the rendered part. These
settings can have a very large impact on the rendering speed versus quality.
Length: The Length value sets the maximum distance between rendered linear moves. Let
us imagine a linear cut where the tool will traverse 400mm in a straight line. Using the
default settings of 200mm, the display will show this move in two steps when the slider is
set to its maximum (fastest) value. If the linear cut was less then 200mm long the rendering
shows the cut in one step, at the start and end of the cut.
Angle: The Angle values can have an especially big impact on rotary operations. Like the
Length setting, this value controls the rendering steps between features, in this case for
angular moves. A low number will create very small angles in rotations, resulting in a
smooth image while a high number can create a rendered part that is not smooth but is
very fast.
Auto Range: This option will disable the Length values and will instead use the size of the
stock (length, width and height separately) to set the maximum feed and rapid lengths. The
maximum value for feeds will be set to 1/10th of the largest stock dimension and rapids are
double that value. The smallest step that the system will take when rendering is 1/100th of
the smallest dimension of the stock.
FEATURE
Circular Threads: This option renders “circular” threads rather than proper spiraled threads.
Enabling this option will render threads much more quickly.
15
Set Up
STATISTICS
When the Statistics option is enabled a
window opens when you activate Machine
Sim. The window logs the current
framerate for your machine as well as any
logged errors for the CPR session.
16
USING BUILD MACHINE
Using Build Machine
19
Using Build Machine
an assembly of the components. Note that the solids may be created in another CAD
application and imported into GibbsCAM.
1. Base
2. X Axis
3. Y Axis
4. Z Axis
5. Rotary Body
6. A Axis
7. Table
8. Head
9. Spindle
For convenience, it is recommended that each body is given a descriptive name such as
“Y_axis”, “Spindle” and “Table”. If a body will represent an axis, giving the body the name of
the axis will make things easier when building the assembly of components.
The origin for the machine model is very important as it is a reference for several values. A
coordinate system must be created that represents the spindle or table face. The origin of
the CS should be at the spindle face origin or the top-center of the table. The CS should be
aligned as the machine is, i.e. if the machine is off vertical by 30 degrees, so should the
Machine CS. This CS will be referred to as the “machine origin CS” throughout this
20
Using Build Machine
document. All of the bodies in the assembly must be assigned to this “machine origin”
coordinate system.
Figure 7: Example of a machine’s XY plane (A) and Machine CS plane (B) where the
horizontal and vertical axes are shaded for emphasis. The Machine CS plane is used
for alignment of bodies and for all reference values.
21
Using Build Machine
Make sure to define the part origin at a location that is easy to identify on the machine tool,
for example the center of the table or the spindle face for lathe-type machines.
• For mill parts it is easiest to define the center of the table at the origin and then
create the non-moving bodies.
• For lathe, mill/turn and MTM setups it is easiest to define the spindle face at the
origin and then create the non-moving bodies.
• All bodies should lie in the same coordinate system, CS1 or ideally a CS that is
aligned to the spindle face or table top.
T
I • Each moving part should be created in its home or “0” position.
P
S • Create Points and Lines to identify the center location and direction of the rotary
axes.
• Create a point identifying the tool attachment position. For a mill this is the
spindle face, for a lathe this is the place on the turret where the tool holder
attaches.
• When the MDD Editor setting Use Tool Holder Length is active the Z axis
position will be corrected automatically during simulation to take in account
tool/holder length & tool attachment position.
The P-body is a machine component made from any solid body (usually a cylinder or a
rectangular solid) and is given an label of P or Px, where x is any integer number. This
special P naming tells machine simulation that the P-body is not to be displayed directly in
the simulation, but the P-body is to be replaced by the actual machined part/stock during
the simulation.
22
Using Build Machine
Mill machines: For a mill it is typical that the P-body is a child of the machine component
representing the machine's table, meaning that it is attached to the table.
Lathe machines: For a lathe, it is typical that the P-body is a child of the machine
component representing the machine's part spindle (or collet, bushing, or chuck).
MTM setups: For MTM machines, it is possible that there will be more than one P-body,
corresponding to the number of parts that can be machined simultaneously in the
machine.
TOOLGROUPS
Understanding how to properly set up tools and positions is vital to getting Machine Sim to
render correctly. The method for displaying tools in machine simulation is different
depending on whether the machine is a mill or a lathe. For this discussion, “lathe” includes
all lathe machines, Mill/Turn machines, and MTM machines, as defined by the MDD.
Mill machines: Mills will only show the currently active tool, which is the tool that is loaded
in the tool spindle at any given time. See the section “Mill Toolgroups” on page 53 for more
information.
Lathe machines: Lathes will typically show all tools that are loaded into the lathe's
toolgroup(s) at the start of the NC program. One exception to this is that a lathe can have a
toolgroup defined as a mill-style toolgroup, commonly known as an Automatic Tool
Changing head or ATC. An ATC toolgroup in a lathe will display tools in the same way that
a mill will display tools, namely, to show only the currently active tool at any given time.
Defining a toolgroup as an ATC in a lathe involves turning off the “Has Turret” setting in
the machine setup dialog in Build Machine. See the section “Lathe Toolgroups” on page 56
for more information.
23
Using Build Machine
24
Using Build Machine
what the body represents and any movement associated with the component. Right
clicking an entry in the tree lets you edit a component once the parameters have been set.
Remove: The Remove button will delete a selected component from the assembly tree.
Test: The Test button opens a window that lets you view the assembly and test the
machine’s moving parts to ensure the proper motion.
Save: The Save button can be clicked once you have defined your machine tool assembly.
This opens a dialog prompting you to select a directory for saving the file.
Machine dialog. As the components are defined the Build Machine dialog will create a tree
that defines the machine tool and its parts. When ready to be saved, the model’s moving
parts can be tested. Once complete, the model will be available for Machine Simulation.
Figure 9: The Build Machine window in its initial state and with components added.
In addition to the Build Machine window, there are several other windows and dialog boxes
that are used to define a machine. These are all accessed from the Build Machine window
and are described in the following sections. These include the Setup dialog box, the Add
Component dialog box, and the Test Machine dialog box.
26
Using Build Machine
Machine Parameter
MTM: This item is selected if the machine being created will be used for lathe, mill/turn or
MTM. It activates the toolgroup count and interprets the spindle/toolgroup as a toolgroup
tool attach position. If this option is not checked the setup is for a mill.
ToolGroup Count: This is the number of toolgroups on the machine. The origin of each
toolgroup needs to be defined separately.
ToolGroup: This item lets you index between the toolgroups so that they can be fully
defined.
27
Using Build Machine
Workpiece Count: This is the number of workpieces on the machine. The origin is a milling
spindle. The model should contain a part body, either with the label “P” for a mill or simple
lathe setup or with the label “Px” where “x” is an integer between 1 and 100.
Spindle/ToolGroup Origin: This item is used to define where the tool or holder attaches to
the spindle. This item must be defined and the easiest way to do so is to create a point in
the part file that lies at the spindle origin using the From Selection button.
From Selection button: Clicking this button loads the coordinates of a selected point
that represents the origin. The CS used by the points in these parameters should be the
same one that the bodies used by the machine components are assigned to.
Turret Positions
This item lets you define a
turret by setting how many
tool positions are on the
turret, what position they
are in and the axis of motion
the turret moves in.
28
Using Build Machine
MachSim Axis: This uses the axis label assigned to the turret in the Add Component dialog
box. To create a turret you add the turret solid as a component, and give it an axis label and
a vector. The turret will turn around the vector, and axis label needs to go here to get it to
move correctly.
Axis Type: Choose the way the turret indexes from one tool to the next. The options include
Rotary/Shortest (the machine indexes in the shortest possible direction), Rotary + (the
machine indexes only in an incremental angle), Rotary – (the machine indexes only in a
decremental angle) and Linear.
Axis Increment: This is the angle or linear distance between tools that the turret must take
to index from one tool to the next.
Advanced Setup
Selecting this option allows
you to set a custom Primary
Value for each turret position,
as defined by the “Count”
setting. This is required if the
tool positions are note evenly
spaced in the turret or spindle.
Activating the Secondary Axis
option allows you to define an
additional axis that the
toolgroup uses to move tools into position.
Position: This is the tool position being defined, e.g. tool position 3 on a slide.
Primary Value: This is the primary axis position for the tool position being defined.
Axis Increment: This is the angle or linear distance between tools that the turret must
take to index from one tool to the next.
29
Using Build Machine
Secondary Value: This is the secondary position for the tool being defined, e.g. tool
position 2 in a mini-gang.
Component Groups
The Component Groups function allows you to group machine components together. The
grouping has two uses. The first use is for collision checking, the second use is for
controlling component visibility. By default there are two groups. Right clicking on the
group list allows you to Add, Edit or Delete a group.
Collision Checking
The Used for Collision Checking option states that items in the group will be used when
Collision Checking is active. This means that components that may not otherwise be
checked for collisions, such as sheet metal, will be checked. Items within a component
group will not be checked against each other (beyond the normal tool-part interference)
but the group as a whole can be tested against tool and part interference as well as other
groups consisting of things that are not ordinarily tested like steady rests, the machine’s
sheet metal, the table or chucks.
It is recommended that all items within a flow that are connected together, such as a
chuck, spindle, x-axis and z-axis on a common 3-axis mill, be put in the same Component
Group. As previously stated, items within a component group are not checked against each
other. This can be very convenient on models with faces that meet or overlap.
Controlling Visibility
Components can be grouped so you can easily show or hide them while rendering. As with
the Collision Checking option, a component is assigned to a group from the Add
Component dialog box. Machine Component Visibility is one of the options available in the
right mouse menu when you are in Machine Simulation. The dialog that is accessed from
this selection lets you show or hide individual components or the pre-defined Component
Groups.
30
Using Build Machine
Axis Mapping
This item is not currently used.
31
Using Build Machine
Parent: Use this field to select the Parent Component, which is the
component on which this item will be mounted. The list will
contain the names of each body in the part. Please note that all
bodes that will be a parent must have a unique name for the
system to work properly.
Groups button: The Groups button opens a dialog that allows you
to assign a component to any group you have already defined. This
lets a component be collision checked and/or easily shown or
hidden as a part of the group. Select one or more groups and close
the dialog. The group assignment is automatically saved.
Axis Label: This item is very important for moving axes and several other components. The
field corresponds to the programmed axis, for example “X” is entered for the for the X axis
of the Machine while “A” is entered for a machine’s A axis. Additionally, the model that
represents the part must be given a label of “P” or “Px” where x is a number from 1-100. All
entries are case sensitive. Valid entries for this field are any letter with or without a
number. MTM machine labels are described in the section “MTM Axis Labels” on page 38.
T The part must be given a label because the system needs to know where the part is
I in the machine assembly. A mill tool holder is assumed to attach to the spindle
P origin.
Comment: This section may be used to annotate the component. This is the only place the
comment is used.
Color: You may simply enter the RGB (Red Green Blue) values (which are 0-255 with 0 being
no color and 255 being pure red, green or blue) or you may use the Color button to select a
color for the component. Simply select one of the Basic Colors and click the OK button.
The Define Custom Colors button provides access to a much more complete spectrum of
colors. You may define the RGB (Red Green Blue) values or use your mouse to select a color
from the spectrum and adjust the darkness using the slider. When you click the OK button,
the RGB values in the Add Component dialog will be updated.
32
Using Build Machine
Visible: This sets the default visibility of the component. Component visibility can be
toggled at runtime from the Component Visibility dialog.
Component Type
Those buttons determine the component type. Use “Fixed” if the component is fixed
relative to its parent component, e.g. a chuck is fixed relative to a spindle. Use “Translation”
for linear axes (X, Y, Z) Use “Rotation” for rotary axes (A, B, C). Each component will be
represented with an icon corresponding to the component type, as shown to the right.
Type Icon
Fixed
Translation
Rotation
If the component is not “Fixed”, use the corresponding fields to indicate the Axis direction
and the center of rotation for rotary axes. You can use the “From Selection” button to
update the corresponding fields from selected geometry.
Translation: These fields are used to specify an axis a component moves along and the
direction in which it travels. For orthogonal axes systems, a value of “-1” or “1” is entered
for the appropriate axis, all other fields are to be given a value of “0”. A value of “-1” states
that the initial movement of the axis will be in a negative direction while a value of “1” states
the initial movement is in a positive direction. Please note that all vectors must be
normalized.
33
Using Build Machine
Rotation: The rotation section has two parameters, one for the actual axis of rotation, the
other for specifying where the axis of rotation is relative to the machine origin.
Center: The Center value is the center of rotation relative to the machine origin. The
easiest way to get this data is to select the point that represents the center of rotation
and click the From Selection button. This will set the X, Y and Z values automatically.
34
Using Build Machine
For each axis, the zero position is assumed to be the position where the component is
placed in the machine model when the model is saved and the machine assembly is
created. From this zero position the component will move in a positive or negative
direction based on the axis definition. This is true for both linear and rotary axes.
For axes that are not limited (for example a C axis on a typical lathe spindle), the Has Limits
setting should be unchecked (off).
For axes that have either a minimum or maximum limit value, the Has Limits setting should
be checked (on). This enables both the Min and Max values which should be set to the
appropriate value for the machine. It is not possible to enable only a Min or a Max. If the
Has Limits item is checked, both Min and Max must be set. If limits are set for an axis,
anytime the position of that axis exceeds either of the limit values during machine
simulation, a collision event is generated. If collision detection is set on, then the collision
alert will be triggered. A component does not need to be included in a collision component
group for an axis limit exceed collision event to be generated.
35
Using Build Machine
need to be edited in the Add Component dialog. Watch closely to ensure the tool rotates
properly with the spindle and that the rotary axes move in the correct direction.
Figure 11: An example of a built machine ready for its axes to be tested.
Each axis can be tested by clicking on an arrow key associated with an axis. The Less Than
button will move an axis in the negative direction. The Greater Than button will
move an axis in the positive direction. Clicking these buttons function as if the machine
was fed incremental g-code, or jogging the machine. If the model moves in a direction that
is not expected, e.g. a rotary axis moves in a clockwise direction when the Greater Than
button (a positive rotation) is clicked, then the values set in the Add Component dialog
will need to be changed.
36
Using Build Machine
SAVE
The Save button is used to create the simulation model. Select a directory for saving the
complete assembly file and enter the file name for the model and click OK. The files will be
generated and the Test Machine window will display the model you just created.
The save function creates a group of files including an ASY file, an INI file and a FB file for
each component in the assembly. Together, these files create the machine assembly model.
The VNC file stores data about these files. If the ASY, INI or FB files are changed, the VNC
will not know about the changes. The next time the VNC file is opened and modifications
are made, the system will overwrite any changes made to the files. Therefore it is highly
recommended that all the files associated with the machine be stored in the same folder.
This includes the VNC, saved assembly data and MDD. Each revision of a model should
include a new VNC.
T Store all the files associated with a machine in one folder, including the machine’s
I VNC file, the assembly files and MDD. This will let you revise a machine file, keep
P track of different machines and MDDs, and ensure data is not overwritten.
NAMING CONVENTIONS
AXIS LABELS
When defining a moving component you must specify the axis in which the component
moves. Axis labels are case sensitive and must be a letter with or without a number, e.g. “X”,
“Z”, “A”, “B”, “x2” and “X2”. If the component is to be a parent it must have a unique name.
37
Using Build Machine
ToolGroups: Each ToolGroup has its own set of axis labels, X through C and 1 to 99. If a
machine has two ToolGroups the first uses the labels X1, Y1, Z1, A1, B1, C1 and the second
ToolGroup uses the labels X2, Y2, Z2, A2, B2, C2. This allows a theoretical limit of 99
individual ToolGroups.
Spindles: Each spindle has its own set of axis labels, X through C and 101 to 199. If a machine has two
spindles the first uses the labels X101, Y101, Z101, A101, B101, C101 and the second spindle uses the
labels X102, Y102, Z102, A102, B102, C102. This allows a theoretical limit of 99 individual spindles.
Auxiliary Axes: Auxiliary functions are typically set through Utility operations. Each
auxiliary function, such as a bar feeder or part catcher, has its own set of axis labels, X
through C. The number that follows defines the type of auxiliary function.
38
Using Build Machine
39
USING MACHINE
SIMULATION
Using Machine Simulation
The Machine Sim Models dialog opens, displaying known machine assembly files. Select a
machine tool from the list or click on the User Folder button to select a specific machine
tool folder. The simulation window will open with the selected machine loaded.
41
Using Machine Simulation
The User Folder location is stored in each user’s system preferences. The machine model
name is stored with the associated part file.
42
Using Machine Simulation
1. Tool Display
2. Run Mode
3. Render Control
menu
Tool Display: The Tool Display option is similar to the traditional rendering option of
showing an invisible tool, a transparent tool or a solid tool. As with standard rendering, the
hidden tool produces the fastest rendering while the solid tool is the slowest of the options.
Run Mode: The Run Mode option shows whether Machine Sim will display the full machine
model and part (Machine Sim) or show only the part (Part Sim). To use Machine Mode a
machine file will need to be selected using the Load Machine option in the Render Control
menu. If your MDD correctly defines the ToolGroup and Workpiece home positions
Machine Sim can be run in Machine mode without loading a machine file. In Machine
43
Using Machine Simulation
mode to aid in the visualization of lathe spindles, the spindle will rotate while cutting
during any lathe turning operation. This rotation is only to assist in showing the direction
of rotation.
Render Control Menu: This menu provides control over the appearance and content of the
Machine Sim rendering. The Render Control menu is largely the same as the standard and
Flash CPR rendering modes. The options in this menu are fully detailed in the section
“Machine Sim Rendering Options”.
Use Op Stop: Placing a check mark on this option activates the Start At Op option.
Removing the check mark will disable the start point specified in the Set Op Start/Stop #s
dialog.
44
Using Machine Simulation
Stop Before Load/Unload: Placing a check mark on this option activates the Stop Before Op
option. Removing the check mark will disable the stop point specified in the Set Op Start/
Stop #s dialog.
Show Time: This will set the Current Display to show the elapsed cut time.
Show Op: This will set the Current Display to show the current operation number.
45
Using Machine Simulation
involved while the Prim 2 section reports whether the collision was with Stock or a Fixture.
Using this option will slow down rendering speed.
Check Machine Travel Limits: This setting enables Machine Sim to check for any axis motion
that is beyond the limits set in any machine component. If an axis limit is exceeded, a
collision event is generated in the same way that it is generated when two components
collide. The result of an axis limit exceeded event is controlled by the Collisions/Limits
settings in the Machine Sim Settings dialog.
Load Machine: This option allows you to select which machine assembly file will be used for
the current part. Once selected, the same machine will automatically be used for the part
until a different machine is selected. Clicking User Folder allows you to select a directory
that contains machine assembly files. Select the machine you wish to use and click OK.
46
Using Machine Simulation
A. Machine Origin
at center bottom
of the part.
B. Part Origin
1. Negative X Value
2. Negative Y Value
3. Positive Z Value
Machine Component Visibility: This option opens a dialog box that lets you control the
visibility of components in the machine assembly file. You may control the components
individually and/or by the groups set in Build Machine. As with workgroups and coordinate
47
Using Machine Simulation
systems, the eye icon lets you show or hide a component. Additionally you may set it to a
specific transparency level from 0 (invisible) to 255 (solid).
Don’t Preload Subspindles: The initial stock on the subspindle is pre-calculated, by default,
anytime Machine Sim is activated or rewound. By selecting this option the calculation of
the subspindle stock is deferred until after the main spindle cutting has been simulated.
This can reduce Machine Sim’s use of system resources and aid rendering, especially on
slower machines.
Reload Simulation: This option will restart the Machine Sim session.
48
Using Machine Simulation
49
Using Machine Simulation
50
Using Machine Simulation
TOOLS
SETUP
Understanding how to properly set up tools and positions is vital to getting Machine Sim to
render correctly. This section discusses defining tools for Machine Sim. Information on
setting up toolgroups within the machine assembly is discussed in the “ToolGroups”
section beginging on page 23.
In this section we will go over how one machine’s toolgroup was set up. The machine is a
relatively standard two turret two spindle MTM-type machine. The MDD for this machine
will handle the tool holder length so the user will not have to calculate the tool tip’s
distance from the mount point. The Use Tool/Holder Length value in the MDD can be set
to X0, Y0, Z0 because the mount point is known and specified in the Build Machine Setup
(see below). The machine assembly file has been defined with all of the components
referenced from the machine CS, #1 in the images below. The turret is defined in the Add
Component dialog box as a rotary axis and the rotation point (#2 below and Figure 14) is
referenced from the machine CS. The turret’s datum point or mounting point for tools (#3
below and Figure 15) is set in the Setup dialog box. The point can be set and seen by
clicking on the From Selection and Show buttons.
51
Using Machine Simulation
52
Using Machine Simulation
1. Tool Offset in Xr
2. Tool Offset in Z
3. Turret Shift in Z
4. Turret Shift in Xr
Figure 16: The Turret Shift dialog. It is important to be aware of the difference between the
tool offset values and the Turret Shift values.
Mill Toolgroups
Tools are attached to a mill toolgroup during machining when the tool becomes the active
cutting tool. The tool is positioned at the location defined by setting the Spindle/
ToolGroup Origin in the Setup dialog box of Build Machine.
53
Using Machine Simulation
For mill toolgroups, the tool should be offset in Z only. There are two methods to define the
Z offset of a mill tool. One method is to use the tool Z offset value from the tool dialog,
meaning the length out of holder plus the distance the tool holder sticks out of the
toolgroup. The other method is to let machine simulation calculate the Z offset by using
the tool holder length and the “Length Out of Holder”.
To enable machine simulation to calculate the Z offset for tools in a mill toolgroup, there is
a setting in the MDD that must be turned on. This setting is called “Use Tool / Holder
Length” and is one of the toolgroup settings in the MDD. When this option is checked the
tool and holder (if available) are positioned so that the tool and holder stick out from the
spindle at the spindle face. The tool shift offsets are applied from that default position. If
the option is not checked then the tool tip center is shown at the spindle face, offset by the
tool shift offsets.
54
Using Machine Simulation
If we were not using the MDD’s capability of calculating the tool & holder length we would
also need to add a Z offset. The tool length out of the holder is 1.2 inches and t has a tool
holder of some length. We would need to know the gauge length of the holder to calculate
the Z offset properly. In the Turret Shift dialog we would enter an Xr offset value of -1.181
and a Z offset of 1.2+(gaugle length) inches.
Mill Tools - OD
Here we are using the tool in position #3 as an example. In order to get the tooltip in the
correct location we need to apply a tool offset value. In this case, as the hole for the holders
is OD aligned, we will need to offset the tool in Z. The distance from the datum point to the
center of the mount hole is 50mm or 1.9685 inches. In the Turret Shift dialog we enter an
tool offset value of -1.9685 in Z.
55
Using Machine Simulation
Lathe Toolgroups
Tools are attached to a lathe toolgroup during machine simulation as a result of the
information in the tool dialog. The tool dialog holds the toolgroup number and the tool
position within the toolgroup. In the setup dialog, enabling the “Has Turret” option
activates the tool position definition. This allows the machine assembly to store
information about the tool positions in a toolgroup. Each position is numbered, and the
position number is matched to the tool dialog position numbers to display each tool in the
proper position.
The tool is attached to the toolgroup so that when the tool's position is moved into place
for cutting, the tool is at the tool attachment position of the toolgroup. This attachment
position is defined by using the Spindle/ToolGroup Origin setting in the Setup dialog box of
Build Machine.
The tool offset values from the tool dialog is used to adjust the tool position in the
toolgroup from the tool attachment position. This means that if the tool offset values for a
given tool are set to zero, the tool control point (typically the tool insert tip) is displayed at
the tool attachment position. A common place on the toolgroup for the tool attachment
position is the corner of the turret closest to the spindle that the toolgroup will address
during machining. The tool offset values are used to position the tool tip at the correct
offset from the tool attachment position, considering the length and width of the tool
holder and any tool adapter block or live tool assembly that is required.
Lathe Tools - OD
Here we are using tool #13 as an example. In order to get the tooltip in the correct location
we need to apply a tool offset value. The system automatically aligns the tooltip to the front
of the spindle and sets an offset so the touch off point is correct based on the tool
56
Using Machine Simulation
thickness. This tool setup is fairly easy, we simply need to enter the tool holder length,
which in this case is 4 inches. In the Turret Shift dialog we simply enter an Xr offset value of 4.
57
Using Machine Simulation
mount hole is 30mm or 1.181 inches. The holder is three inches long. so we enter a Z offset of
3 inches and an Xr offset value of -1.181 in the Turret Shift dialog.
58
SCRIPTING
Scripting
CHAPTER 5 : Scripting
MACHINE SIM SCRIPTS
A simple but powerful scripting/macro capability is available in Machine Sim. This
functionality allows you to create customized Machine Sim motion that simulate the
motion of the real machine. These scripted macro programs (called “Scripts”) provide a
source for motion that is not known or managed by GibbsCAM at the detail level required
to show a realistic simulation of utility operations for a given machine. In this way you can
spend as much time as is necessary creating a very detailed and specific type of simulation
for the utility operations of a given machine, e.g. to show the movement of tailstock and
steady rests and to show the precise motion of the jaws on a chuck.
The Machine Sim Scripts are executed by Machine Sim whenever a utility operation is
encountered during the replay of the operations in the VNC file. Machine Sim scripts can
also be called directly via a command in the At Start Op or At End Op comments of the
Utility Data of any operation (e.g. postscript). The script files should be placed in the
machine model folder, in a sub folder called “scripts”.
The Machine Sim Scripts are interpreted, meaning that the text file containing the script
commands will be read and parsed sequentially (except for conditional commands) at the
time of execution. Each script command will cause a Machine Sim action. The Machine Sim
61
Scripting
Script language supports local and global variables, simple math operations, and
conditional logic commands. The scripting language is not case sensitive.
TYPES OF SCRIPTS
There are five different types of scripts:
Utility Op Start Script: This type of script is executed when a utility op of the same name as
the script is encountered at the start of the first path feature of the utility op. This type of
script is a “one-shot” script, where all other Machine Simulation motion is suspended, and
the script is run serially. Start Scripts are stored in the sub-folder /scripts/startscript.
A list of these scripts can be found in the section “Machine Sim Scripts Utility Op Script
Names” on page 62
Utility Op End Script: This type of script is executed when a utility op of the same name as
the script is encountered at the end of the last path feature of the utility op. This type of
script is a “one-shot” script, where all other Machine Simulation motion is suspended, and
the script is run serially. End Scripts are stored in the sub-folder /scripts/endscript. A
list of these scripts can be found in the section “Machine Sim Scripts Utility Op Script
Names” on page 62
Time-based Script: This type of script is executed when a utility op of the same name as the
script is encountered at the start of the first path feature of the utility op. This type of script
is a synchronous script, meaning the motion of the script is time-synched to all other
Machine Simulation motion, and the script is run in parallel. Time-based Scripts are stored
in the sub-folder /scripts/timebased.
Explicit Script: This type of script is executed when an explicit call to the script is made from
postscript commands in any GibbsCAM operation, i.e. the At Op Start or At Op End utility
data. These scripts are run as one-shot scripts at the feature containing the runscript
command. These scripts are stored in the sub-folder /scripts.
Implicit Script: This type of script is executed by default at particular key points in the
machine simulation. Currently this includes a Start Machine Sim script, Change Tool script
and an End Machine Sim script. These scripts are run as one-shot scripts at the feature
containing the runscript command. These scripts are stored in the sub-folder /scripts.
62
Scripting
can be used for any subtype. If a subtype script is present, it will be used instead of the main
utility op script.
LoadSpindle_script † UnLoadSpindle_script †
LoadSpindleManual_script UnLoadSpindleManual_script
LoadSpindleAutoBarFeed_script UnLoadSpindleAutoChuck_script
LoadSpindleAutoChuck_script UnLoadSpindlePartCatcher_script
LoadSpindleBarFeed_script UnLoadSpindleGripper_script
LoadSpindleBarPull_script UnLoadSpindleRobot_script
LoadSpindleSubSpinPull_script UnLoadSpindlePartDrop_script
LoadSpindleRobot_script UnLoadSpindlePushOut_script
TailstockIn_script † SubSpindleOnPart_script †
TailstockOut_script † SubSpindleReturn_script †
PosTailstock_script †
PartShift_script † SteadyRestIn_script †
PartShiftManual_script SteadyRestOut_script †
PartShiftAutoChuck_script PosSteadyRest_script †
PartShiftBarFeed_script CatcherIn_script †
PartShiftAutoBarFeed_script CatcherOut_script †
PartShiftBarPull_script PartIndex_script †
PartShiftSubSpinPull_script MoveTool_script †
PartShiftRobot_script AllStop_script †
MachMode_script †
COMMANDS
The scripting language includes the following script commands:
MoveTo: This command moves (animates) bodies along their axes to a position with a
specified number of animation steps. This command can accept multiple bodes at the same
time. The specified axes will move simultaneously.
GoTo: This command statically repositions (“pops”) bodies to a new axes position.This
command can accept multiple bodes at the same time. The specified axes will move
simultaneously.
63
Scripting
SetPos: This command functions the same as GoTo but does not have redraw at the end.
Delay 500
This will delay the system for half a second.
Load: Loads a part for the specified P body. Can do it invisibly if optional “Vis 0” is specified.
Load P1 Vis 0
Part 1 is loaded invisibly
Unload: Unloads the part that’s standing in for the specified P body
SetVis: This command sets the visibility of one or more bodies. Use 0 for invisible, 1 for
translucent and 2 for opaque.
ChangeTool: This command changes a tool. It is typically used for machines with an ATC to
more correctly render the tool change. Normally a tool change occurs just before an
operation. If you are scripting an ATC’s motion to the tool port and back to the part the
system will, by default, only change to the new tool just before the new op starts. This
command lets you force the new tool to be drawn at a more appropriate time.
Reparent: This command assigns the owner of a part to a P body so that it can be moved. It
effectively “attaches” the part to a body (the parent body to the P body specified) so that if
that body moves, the part moves with it, as in the case when a subspindle pulls the part out
of the spindle.
64
Scripting
Reparent P1 P2
This assigns the ownership of the part in P1 to the P2 body and its parent.
Conditional Commands
The scripting language includes the following conditional logic commands.
IF
ELSE
ENDIF
Debugging Commands
Print <stuff>: This command writes the contents of <stuff> to the Machine Sim Statistics
console (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a script
expression can be used as <stuff>.
PrintLn <stuff>: This command writes the contents of <stuff> to the Machine Sim Statistics
console (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a script
expression can be used as <stuff>. PrintLn adds a line break after <stuff> where Print does
not.
• GoTo and MoveTo do a redraw at the end of the command. MoveTo may do several
redraws, one after each scene it automatically creates have been composed.
• SetPos, SetVis, Load, Unload, Reparent, ChangeTool, SetPartVis may change the
graphic state of simulation, but a redraw is not automatically done at their completion.
This allows a user to do multiple-command scene composition, and then show the
results using Redraw when the scene is ready.
• GoTo, MoveTo and Delay may do an automatic redraw at the beginning of the
command if the graphic state has been changed since the last redraw. This would be
triggered by SetPos, SetVis, Load, Unload, Reparent, ChangeTool or SetPartVis.
OPERATORS
The scripting language includes the following math operators:
+ (plus sign): This performs an addition of the variables on both sides of the +.
- (minus sign): This performs a subtraction of the variable on the right of the – from the
variable on the left of the –.
* (multiply sign): This performs a multiplication of the variables on both sides of the *.
/ (division sign): This performs a division of the variable on the left of the / by the variable
on the right of the /.
VARIABLES
The scripting language allows for local, global, and operation defined variables. Local
variables are defined by, used, and scoped internally to an MS Script. Global variables are
defined either in a Script, or as part of a globally available environment that is created and
managed dynamically by Machine Simulation. Operation defined variables represent utility
operation data that is supplied by the user when a utility op is created (e.g. ZPosition)
#variablename
66
Scripting
Variable Data
&PartUnit 0=metric, 1=english
&OpType 0=mill, 1=lathe, any other value=none
&OpSubType Mill: 0=drill, 1=Contour, 2=Pocket, 3=Thread Mill, 4=Surface, Any
other value=none
%variablename (e.g. %X102, which will return the current position of the spindle2 X
axis.) To set an axis value, use the SetPos command.
@variablename (e.g.@ZPosition)
67
Scripting
68
Scripting
69
Scripting
POSTSCRIPT COMMANDS
Machine Sim Scripts allows for commands that are manually typed into the postscript (the
At Start Op or At End Op utility data) or that are included in an Add Gcode Utility
operation. These commands include:
MDD EDITOR
MDDS
• The length of the mill tool is affected by the MDD setting called “Use Tool / Holder
Length”. When this option is checked the tool and holder (if available) are positioned
so that the tool and holder stick out from the spindle at the spindle face. The tool shift
offsets are applied from that default position. If the option is not checked then the tool
tip center is shown at the spindle face, offset by the tool shift offsets.
• The axis limits defined in the MDD are used by Machine Builder and Machine Sim.
VMMS
VMM defined auxiliary axes: With customization, VMM's are now able to support the
definition and positioning of axes, such as a subspindle, in the program based on standard
70
Scripting
behavior of utility operations. This allows for motion that does not result from machining
operations to be handled by Machine Sim without the need for scripts for axes. The VMM
defines axis motion for utility ops that relies on the presence of axes defined in the machine
model. If the axes are present in the machine model, machine sim will move these axes
whenever a utility operation that controls these axes is encountered. These newly defined
axes will be tracked internally by GibbsCAM and controlled by Machine Sim. In this way,
standard motion for utility ops can be programmed either generically or specifically by a
VMM, and a resulting motion will occur in Machine Simulation, with or without the use of
an accompanying Machine Sim Script. Additionally, the VMM can specify that a part is to
be reparented in a utility operation. This allows for a smooth, synchronous transition of a
part from one spindle to another without the use of special scripts.
Please note that VMM upgrades are required for Machine Sim to function correctly on
multi-spindle machines as scripts cannot handle subspindle moves.
71
Scripting
72
MACHINE SIMULATION
TUTORIALS
Tutorials On Machine Simulation – Build Machine Tutorial
1. Base
2. Table
3. A Axis
4. Rotary_Body
5. X_Axis
6. Y_Axis
7. Z_Axis
8. Spindle
Tutorials
• Open the file “4 Axis Vertical Mill.vnc” found in the Machine Sim - Required folder
that is installed with the sample parts.
You will likely be prompted about the system creating an MDD for this file. That is to
be expected, as a custom MDD was created to represent this machine assembly.
Without the custom MDD the linear and rotary motions may not be properly
defined.
75
Tutorials On Machine Simulation – Build Machine Tutorial
• In the YZ plane extrude the Base geometry by X+:300, X-:–300. Name this body
“Base”.
76
Tutorials On Machine Simulation – Build Machine Tutorial
• Round the bottom edges that are parallel to the Y axis by 50mm.
The radius and length of the tool is not important as this is simply a placeholder.
• Create a cube that is smaller than the table to represent the part and name this
body “Part”.
77
Tutorials On Machine Simulation – Build Machine Tutorial
This will open the Add Component dialog which lets you add the body to the
assembly tree.
Note that the Name of the component is the same as the model.
Creating the Machine Assembly – The 1st Component
It is vital to state what each body attaches to. As all other components in the machine
model eventually attach to the base, the base shall be used as the basis, the root, of
the assembly.
This states the this model is stationary, based on what it is attached to. Since it is
attached to the root, the Base is the foundation upon which all other components
will move.
78
Tutorials On Machine Simulation – Build Machine Tutorial
The values Red 100 Green 100 Blue 100 will make the base gray. The color of the
model may seem relatively unimportant, but being able to clearly distinguish
between components can be very important. A good color selection can help this.
The component has been added, we will now add more components.
The Z Axis
Select the Z_Axis body and click the Add button.
If a body represents a linear or rotary axis it must be given an Axis Label, legitimate
entries are X, Y, Z, A, B or C and capitalization is critical.
79
Tutorials On Machine Simulation – Build Machine Tutorial
This tells the system that the model represents a linear axis. We now need to define
the Axis.
A value is entered in the box that represents the component’s axis. The Direction tells
the system whether the axis moves in a positive or negative direction from its 0
position. Typically only a single axis is selected using an entry of “1” for a positive
move and “-1” for a negative move. All fields that are not used by an axis get a value
of “0”.
The component has been added, we will now add more components.
The Spindle
• Select the
Spindle body
and click the
Add button.
• Click the
Fixed button.
The spindle is
not an axis, while it does spin, it does not move so it is Fixed.
80
Tutorials On Machine Simulation – Build Machine Tutorial
The Tool
• Select the
Tool body and
click the Add
button.
• Click the
81
Tutorials On Machine Simulation – Build Machine Tutorial
negative to a positive 1.
82
Tutorials On Machine Simulation – Build Machine Tutorial
The Y Axis
• Select the Y_Axis body and click the Add button.
Negative 1 is entered because the Y axis part must move in a negative direction along
its axis so that the tool is in a “higher” relative position to the part along the Y axis.
The X Axis
• Select the
X_Axis body
and click the
Add button.
• Select Y_Axis
as the Parent.
Creating the Machine Assembly – The Rotary Body
• Enter “X” as
the Axis Label.
This is a lime
green color.
Again a negative 1 is used because the axis moves to its left (a negative move) to get
the part into a “higher” relative position to the tool.
• Click the
Fixed button.
84
Tutorials On Machine Simulation – Build Machine Tutorial
The A Axis
• Select the A
Axis body and
click the Add
button.
• Enter “A” as
the Axis Label.
• Click the
Rotation
button.
85
Tutorials On Machine Simulation – Build Machine Tutorial
The Table
• Select the
Table model
and click the
Add button.
• Click the
Creating the Machine Assembly – The Part
Fixed button.
The Part
• Select the
Part model
and click the
Add button.
The part must be given a label so that the system knows where to place part files in
Machine Sim.
86
Tutorials On Machine Simulation – Build Machine Tutorial
The Arrow
• Select the
Arrow model
and click the
Add button.
The Numbers
• Select the
90+0+-90
model (the
numbers) and
click the Add
button.
87
Tutorials On Machine Simulation – Build Machine Tutorial
88
Tutorials On Machine Simulation – Build Machine Tutorial
Note that the Table, Part and 90+0+-90 components are now associated with the
Root. We need to change the Parent of the Table component. Changing the name of a
component breaks associativity, because the system lets you easily swap out
components of the same name.
89
Tutorials On Machine Simulation – Build Machine Tutorial
Axis Testing
• Click Save to save the
assembly and test the
components.
• Click the Less Than button next to the Y to see the Y axis body move in a
positive direction along the axis.
The Less Than button represents a move to a position that is less than the current Y
position. Each click on the Greater Than button represents a move to a position that
is more than the current Y position.
This should cause the A axis body rotate in a positive direction. The axis is actually
rotating in a negative direction. We need to change the Rotation value.
90
Tutorials On Machine Simulation – Build Machine Tutorial
• Close the Test Machine window, right click the A_Axis component and select
Edit.
• Click the Save button to save the assembly file and open the Test Machine
window.
91
Tutorials On Machine Simulation – Build Machine Tutorial
• Click the
Greater
Than
button
next to the
A.
Finalizing the Assembly – Setting Machine Parameters
The table
now rotates
toward the
positive Y
axis, or away
from our
view which
is correct.
Our
assembly
file works.
• Close the
Test
Machine window.
Certain data regarding the machine must be set. The most important of which is the
Spindle Origin.
There is a point in this workgroup that has been created at the spindle origin. This
point will be used to load the position.
92
Tutorials On Machine Simulation – Build Machine Tutorial
• Select the point and click the Spindle Origin From Selection button.
• Close the Build Machine dialog and save the part file as it is complete.
Please note that the assembly file does not represent the limits of the machine’s axes.
This and other information including the tool change position is handled by the
MDD (Machine Definition Document) associated with the machine. Each machine
built with Build Machine must have a custom-built MDD. for more information on
this, see the MDD Editor documentation. In that manual we will make an MDD
associated with this machine.
93
Tutorials On Machine Simulation – Machine Sim Tutorial
aluminum alloy. We will be using the Flash CPR rendering for the
images of this part.
Loading Processes
We will now load the processes to finish the machining of this part.
Machining XZ Plane
• Load the MachineSim1 process.
Machining XZ Backside
• Delete the existing process tiles and deselect the
operations we just created.
• Switch to CS3, select the two points that lie above the
holes.
95
Tutorials On Machine Simulation – Machine Sim Tutorial
96
Tutorials On Machine Simulation – Machine Sim Tutorial
Preferences
Let’s look at our rendering options before we use
Machine Sim.
97
Tutorials On Machine Simulation – Machine Sim Tutorial
speed.
Part Sim
Machine Sim can be used without a
machine assembly file. This mode is
referred to as “Part Sim” or “Part Mode”.
If a machine is not loaded, Machine Sim
automatically uses this mode. Part Sim
can also be selected if a machine is
loaded. Let’s look at Part Sim before we load a machine. We will render the part using
Part Sim first for familiarization.
• From the isometric view, zoom out a little and move the part
so that the fixture is at the bottom of your window.
Zooming out will allow you to see the tools and holders better.
The transparent stock and fixtures allows us to see what the
tools and holders are doing without rotating the part.
• Turn the rendering Speed Control down to the first mark on the speed
control (this is the 1/4 speed mark, which is 1/4 of the way from the
left).
98
Tutorials On Machine Simulation – Machine Sim Tutorial
At top speed we will not see many of the subtleties of the tool movement, (unless you
have a very slow computer).
99
Tutorials On Machine Simulation – Machine Sim Tutorial
Loading A Machine
Before Machine Sim can be used, a machine
assembly file must be selected. If you are
going to create your own machine assembly
file and have not done the “Build Machine
Tutorial” on page 75 it is recommended
that you complete that tutorial before
continuing this tutorial. For information on
creating a machine assembly file see the
chapter “Using Build Machine” starting on
page 17. If you will not be creating your own
Using Machine Sim – Loading A Machine
The Machine Sim Models dialog opens. This dialog is used to find and select machine
assembly files. By default the system will find any assembly files stored in the
Installation folder (..\Program Files \Gibbs\GibbsCAM\[#]\MachineSim) or the
Application Folder (..\ Documents and Settings\All Users\ Application
Data\Gibbs\GibbsCAM\ [#]\MachineSim). Additionally, you can specify a directory
where you choose to store your machine models.
100
Tutorials On Machine Simulation – Machine Sim Tutorial
A dialog will open allowing you to navigate to the location of the machine assembly
file you created. If you did not create an assembly file you can choose the folder 4
Axis Vertical Mill Machine File that is in the same folder as the MachineSim.vnc file.
The Gibbs window will include the machine model but we have something to take
care of first.
101
Tutorials On Machine Simulation – Machine Sim Tutorial
• Switch to isometric view and zoom out until you see the
entire machine.
• Set the render speed to about the 1/4 speed mark and click the Play
button.
102
Tutorials On Machine Simulation – Machine Sim Tutorial
103
Tutorials On Machine Simulation – Machine Sim Tutorial
Using Machine Sim – Machine Sim Rendering
104
INDEX
Index
Alert Types: 14
NUMERICS Detection: 34
3D vector definition: 32 Color: 31
Comment field: 31
Components: 19–20
A Component Groups: 14, 28–29
Add button: 24, 29 Component Movement: 24, 34
Add Component dialog: 24, 29, 31, 34–35 Component Type: 31
Alert Types, of collisions: 14 Editing: 19, 24
Assembly, of components: 20 Name of: 31
At End Op: 61 Coordinate Systems: 20
At Start Op: 61 Create Facet Body: 49
Axis CS requirements: 22
auxiliary, def. by VMM: 70 Cut Part Rendering: 5
Defining & assigning: 11
Increment: 27–28
Label: 31 D
Testing the model: 35 Datum point: 51–53
Type: 27 Define Custom Colors: 31
Axis Limits: 33–34, 46, 70 Delay: 66
Axis motion, of Utility Ops: 71 Delay command: 64
Axis Type: 28 Delay, in MoveTo: 63
Don’t Preload Subspindles: 48
B
Build Machine: 5, 19, 25 E
Edit components: 19, 24
C Explicit Script: 62
CAD application: 20
ChangeTool command: 64, 66 F
Check Machine Travel Limits: 46 First, turret position: 27
Collision Checking: 28, 45 Fixed component: 31
Collision events: 45–46 Flash CPR: 5
Collisions: 13–14 From Selection: 32
107
Index
Machine Space: 47
G Machine Tool: 5, 19
Ganged Tools: 58 MachSim Axis: 27
GoTo: 66 MDD: 11, 70
GoTo command: 63 Mill parts: 23
Greater Than button: 35 Model Tree: 19, 23, 25, 29
Moves, intra-operation: 11
H MoveTo: 66
MoveTo command: 63, 66
Has Limits: 33
MTM parts: 23, 26
Has Turret: 26, 56
MTM, Machine Parameter checkbox: 26
Home position: 22
I N
Names, of components: 20, 31
Implicit Script: 62
Non-Cutting simulation: 45
Inter-Operation Moves: 5
Non-machine components: 14
L
O
Lathe parts: 23
OpenGL: 43
Length Out of Holder: 54
Origin: 20, 22
Less Than button: 35
Load command: 64, 66
Load Machine: 41, 43, 46 P
Parent: 29–30
T
S Table, axes and: 11
Save button: 24, 35 Test Axis components: 34
Scripting: 61–63, 71 Test button: 24
Conditionals: 65
Test Machine window: 35
Operation Variables: 67–68
Operators: 66 Time-based Script: 62
109
Index
U
Unload command: 64, 66
Use Op Stop: 44
Use Tool / Holder Length: 70
from MDD: 54
Use Tool/Holder Length: 51
Used for Collision Checking: 28
Utility Data: 61
Utility Op End Script: 62
110