Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
34 views104 pages

Machine Sim

Uploaded by

tiago.wilson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views104 pages

Machine Sim

Uploaded by

tiago.wilson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 104

Machine Simulation

GibbsCAM 2009
February 2009, rev 1.4
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-2009 Gibbs and Associates, a Cimatron company. All rights reserved. The Gibbs logo, GibbsCAM,
GibbsCAM logo, CAM von Gibbs, Virtual Gibbs, Gibbs SFP, SolidSurfacer, MTM 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. Microsoft, Windows, 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.

Gibbs and Associates


323 Science Drive
Moorpark, CA 93021

Modif ied: February 10, 2009 5:37 pm


Table of Contents

Table of Contents
INTRODUCTION 1
About Machine Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Comparison of rendering modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

SET UP 7
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Build Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Machine Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Clearance Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
About the MDDs and the MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Home Position - Mills. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Home Position - Lathes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Machine Sim Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Cutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Collisions/Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Slider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

USING BUILD MACHINE 17


Using Build Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Create the Machine Tool CAD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Spindles & Parts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
ToolGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23
Build The Machine Tool Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Setup dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Machine Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Component Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Axis Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Add Component dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Component Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Test Machine dialog box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33
Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Naming Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Axis Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
MTM Axis Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

USING MACHINE SIMULATION 37


The Basic Steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Step 1: Activate Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Step 2: Select a machine tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Step 3: Update the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Step 4: Select Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Step 5: Run the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

i
Table of Contents

Machine Sim Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41


Simulation Rendering Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Mill Toolgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Lathe Toolgroups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Tools Defined with Tool Holders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Mini-Gangs & Extra Holders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

SCRIPTING 57
Machine Sim Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Types of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Machine Sim Scripts Utility Op Script Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Conditional Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Debugging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
About Commands and Redraws. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
PostScript Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
VMMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

MACHINE SIMULATION TUTORIALS 69


Build Machine Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Creating the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Individual Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
Creating the Machine Assembly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
The 1st Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
The Z Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
The Spindle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
The Y Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
The X Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
The Rotary Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
The A Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
The Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
The Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
The Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
The Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Finalizing the Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Missing Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Axis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Setting Machine Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Machine Sim Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
About the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Loading Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Machining XZ Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Machining XZ Backside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
ii
Table of Contents

Using Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87


Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Part Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Loading A Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Setting the Part Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Machine Sim Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

INDEX 93

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. As of version 9.0, all users have access to all modes of CPR and simulation.
However, if you do not have Machine Sim as a part of your license, you cannot load a machine sim model. If
this is the case, machine sim will create a temporary machine kinematic model (no visible components) based
on the MDD and do the simulation with that.

1. A solid model to be cut


2. Solid model of a Machine Tool
3. As assembled machine tree in Machine
Builder
4. Machine Sim in action

Figure 1: Example of a machine assembly file and a part being rendered with Machine Simulation.

3
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 def ining and creating a machine tool while the Machine Sim option
activates the Simulation rendering mode. Typically a machine tool
needs to be created before using Simulation but it may be used without
a machine tool model in Part Mode. At f irst glance Part Mode may seem
to just be Flash CPR. In fact it is not. Using Simulation in Part Mode will
display all inter-operation tool moves that Flash CPR (and the standard
rendering) does not display.

COMPARISON OF RENDERING MODES


Simulation is very different than the traditional GibbsCAM rendering
(“CPR”) and is not the same as Flash CPR. Flash CPR is fairly similar to
the traditional rendering except for the actual image in that it uses the
same part-centric toolpath display as traditional rendering. Simulation
rendering in Part Mode (see “Run Mode” on page 41) displays the inter-operation moves that CPR and Flash
CPR do not show. Simulation in Machine Mode can include an actual machine model. ToolSim, which shows
the tool movement across a model without rendering material removal, is very useful and not found in Flash
CPR.

Traditional CPR Flash CPR “Part Mode” Machine Sim “Machine Mode” Machine Sim

While Flash CPR and Simulation may appear similar, their uses are different. A key difference is the Simulation
capability to display the inter-operation moves of a tool. Flash CPR may be faster than Simulation as it does
not have to render an entire machine model and the moving axes. You may f ind that when checking your part
f ile you use several or all of the rendering types (standard CPR, Flash CPR and Machine Simulation),
depending on your needs.

Simulation, in any 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 f ile.

4
Introduction

Flash CPR without Machine Sim Simulation in “Part Mode”

TMS rendering with Flash CPR TMS rendering with Machine Sim

5
Introduction

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 f ile 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 def ined 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.

Figure 3: Example of a machine whose Tool Change Position and Tool Holder Class are defined in
the MDD and are not user-definable. The Master Clearance plane is still definable.

10
Set Up

MDDS
Each machine assembly that is created must have an custom MDD that def ines 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 f it the machine. Whenever the
MDD is selected in the Document Control dialog, the accompanying machine assembly f ile will be the default
machine for Machine Sim. The MDD should be reviewed after you have created the machine assembly f ile. It is
important that the MDD and machine assembly f ile be consistent in terms of axes def inition. 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.

ABOUT THE MDDS AND THE MDD EDITOR


The axes def inition in the MDD must be consistent with the axes def initions in the machine assembly which is
created using Build Machine. In particular the number and type of axes must match. If an axis is attached to
the machine's table (for a mill) or part-holding spindle (for a lathe) in the machine assembly, then it must be
def ined in the MDD as being assigned to the workpiece (i.e. not assigned to the toolgroup). Conversely, if an
axis is attached to the machine's tool or toolgroup in the machine assembly, then it must be def ined in the
MDD as being assigned to the toolgroup (not to the workpiece).

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 def ined 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 def ines 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 retract position type (e.g.
full retract, preset position, user def ined), and axis retract position. It also includes same tool rotation settings
like axis move order and position.

Home Position - Mills


This class of machines includes 3, 4 and 5-axis mill machines where the part sits on a table. The “Home
Position” for toolgroups in the MDD Editor is measured from the machine’s origin in Build Machine which is
the axis center of rotation or pivot point the table is attached to. In the MDD the Home Position is def ined as

11
Set Up

the distance from the pivot point to the spindle origin. In the Build Machine this is the distance between the
part origin to the pivot point.

1. Pivot Point
2. Spindle Origin
3. Part Origin
4. Pivot Point

Figure 4: Machine positions required for the MDD Editor.

Home Position - Lathes


This class of machines includes anything with a part that can spin. The “Home Position” is the center of the
spindle face. All values should be referenced from here.

12
Set Up

MACHINE SIM SETTINGS


Machine Sim Settings are accessible two ways, either from the
Machine Sim Render Control palette’s contextual menu or
from the File > Preferences menu. When the Machine Sim
Render Control palette is open the Edit Flash CPR Settings…
button opens the Machine Sim Settings dialog box. The
Machine Simulation and Flash CPR preferences are essentially
identical but save separate preference data. The Common
Reference manual discusses these preferences in detail from a
Flash CPR Preferences point-of-view. Be sure to review the
various aspects of these controls including Cutting, Collisions/
Limits, Slider, Feature and Statistics.

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.

Steps Per Update: Steps per Update specif ies the maximum
number of CPR features to render before updating the display.
Large numbers will increase the rendering 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 in a slower rendering. There are separate settings for Chord Height
inch and metric parts. The separate values can only be set from within a part of that
unit type.

Body Chord Height: This option determines the resolution of bodies (part, stock
and f ixtures) in Machine Sim. There are two ways this can be set, either by the
Chord Height option (which is setting a specif ic value), or by the % of Body’s Chord Height option. This
second option uses the value set from the Properties dialog, (accessed by right-clicking on a body.) A
setting of 100% will use the body’s Chord Height while a setting of 10% is 1/10th of the body’s Chord Height
while 1,000% is 10 times the body chord height. Any percentage between 1 and 100,000 is acceptable. As
the percentage is set higher the body will appear rougher but the display will be faster and lower

13
Set Up

percentages mean higher quality but slower response. Note that this setting only affects on-screen display,
not the actual machining.

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 include machine components and non-
machine components. Machine components are objects in the machine assembly that are def ined by Build
Machine. Non-machine components are not in the machine assembly, but are created by Machine Simulation
based on information in the GibbsCAM part f ile. These objects include tools, holders, f ixtures, parts, and
stocks. The active cutting tool and its holder always participate in collision detection when collision detection
is activated. Other objects participate in collision detection based on their inclusion in collision component
groups. Collision component groups are component groups with their collision setting turned on. See
“Component Groups” on page 28 for more information.

Non-machine objects are automatically included in component groups based on their logical attachment to an
object in a component group. For example, a tool and tool holder are logically attached to a turret by virtue of
their assignment to a particular toolgroup and tool position in the tool def inition dialog in GibbsCAM. A part/
stock is assigned to a spindle or chuck in the machine assembly because of the part body (P-body) that is
def ined in the machine model. When determining group membership, f ixtures inherit goup attributes from
the part body associated with the f ixture’s spindle.

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 def ined in the machine assembly for any of the machine
components with axis limits (min/max).

14
Set Up

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
specif ied tolerance will generate a collision alert.

Figure 5: The Clash Console output showing a tool clashing with the stock and a fixture.

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 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.

15
Set Up

FEATURE
Circular Threads: This option renders “circular” threads rather than proper spiraled threads. Enabling this
option will render threads much more quickly.

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

CHAPTER 3 : Using Build Machine


USING BUILD MACHINE
Build Machine is used to def ine and create an assembly
model of a machine that can be used with the Machine
Simulation product to create a highly accurate
visualization of a part program created in GibbsCAM.

Build Machine is used after a solid model has been created


of the machine tool and all of its relative components. The
components are then added to Build Machine, def ining
the hierarchical structure (the model tree) of the machine
and how its components move. After adding all the
components, the tree should look similar to the image to
the right, with several branches representing different
moving parts.

Right clicking on an entry opens a context menu that


provides the ability to Edit a component (using the Add
Component dialog), Delete a component or Show the
component in the workspace. Double clicking a
component in the tree will show a solid and can collapse
or open that branch of the tree.

19
Using Build Machine

CREATE THE MACHINE TOOL CAD MODEL


The f irst step to using Build Machine is to create a GibbsCAM part which contains individual solids
representing each axis and major component of the machine tool. This is 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

Figure 6: An example of a machine tool assembly.

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”

20
Using Build Machine

throughout this 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 def ine 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.

• The part model must be in millimeters.

• For mill parts it is easiest to def ine 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 def ine 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.

• Each moving part should be created in its home or “0” position.

• 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.

SPINDLES & PARTS


Machine components that hold a workpiece (part and/or stock) require special def inition in the machine
assembly. This is so that Machine Simulation knows how to position the workpiece during simulation. A
special machine component called a Part Body (P-body for short) must be def ined in the machine assembly.
The P-body does not have an axis, meaning that if it moves during simulation, it is a result of being attached to
another component that moves.

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.

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.

22
Using Build 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 def ined 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 51 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 def ined 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.
Def ining 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 53 for more information.

23
Using Build Machine

BUILD THE MACHINE TOOL ASSEMBLY


Start Build Machine which is found in the Plug-Ins menu.
When f irst run in a f ile the assembly tree contains only a
Root entry.

Setup: The Setup button opens the Machine Parameters


dialog (see “Setup dialog box” on page 26) which lets you
def ine Machine Parameters including the spindle origin
and the tool change position.

Add: The various components that def ine a machine will


have to be added to the root of the assembly by selecting a
solid and clicking the Add button. Once Add has been
clicked the Add Component dialog opens (see “Add
Component dialog box” on page 29), which provides you with the capability to def ine 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.

Figure 8: Example of starting an assembly tree.

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.

24
Using Build Machine

Save: The Save button can be clicked once you have def ined your machine tool assembly. This opens a dialog
prompting you to select a directory for saving the f ile.Build Machine Interface

The Build Machine option allows you to create a model of a machine tool. Each component (the base of the
machine, the table, etc.) is def ined as a solid model and added to the Build Machine dialog. As the components
are def ined the Build Machine dialog will create a tree that def ines 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
def ine 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.

25
Using Build Machine

SETUP DIALOG BOX


This dialog box is opened when the Setup button is clicked. The Setup dialog box is used to set various
machine parameters such as the spindle or toolgroup origin, the number of toolgroups and workpieces, and to
control grouping of assembly components.

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 def ined separately.

ToolGroup: This item lets you index between the toolgroups so that they can be fully def ined.

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 def ine where the tool or holder attaches to the spindle. This
item must be def ined and the easiest way to do so is to create a point in the part f ile 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.

26
Using Build Machine

Show button: When this button is clicked a crosshair will be displayed at


the Spindle or ToolGroup origin.

Has Turret: This item is used if the machine has a turret or in MTM if the
ToolGroup being def ined is a turret. This item activates the Positions button
which lets you def ine the position of tools in a turret on the machine.

Positions button: This button opens the Turret Positions dialog box which lets
you def ine, among other things, the type of turret and how many tool
positions it has.

Turret Positions
This item lets you def ine 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.

Count: This is how many tool positions are on


the turret.

First: This is the angular position of the f irst


tool.

Step: This value is the angular step to the next


tool position.

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 def ined
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 def ine an additional axis that the
toolgroup uses to move tools into position.

Position: This is the tool position being def ined,


e.g. tool position 3 on a slide.

Primary Value: This is the primary axis position for the tool position being def ined.

27
Using Build Machine

Secondary Axis: This item is used for any toolgroup where one axis is
not enough to def ine the motion needed to position the toolgroup
from one tool to another, such as a mini-gang on a slide.

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.

Secondary Value: This is the secondary position for the tool being def ined, 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 f irst 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.

Figure 10: Setting up a Component 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

28
Using Build Machine

Simulation. The dialog that is accessed from this selection lets you show or hide individual components or the
pre-def ined Component Groups.

Axis Mapping
This item is not currently used.

ADD COMPONENT DIALOG BOX


Click this button to add a model to the tree that def ines the machine. When a component is added to the
Build Machine dialog the Add Component dialog opens. In this dialog each component is given a name, a
parent body (what it is attached to), a color and is def ined and the component is def ined as being in a Fixed
position, as a part that moves along an axis (Translation) or as a part that rotates (Rotation).

Parent: Use this f ield 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.

29
Using Build Machine

Groups button: The Groups button opens a dialog that allows you to assign a
component to any group you have already def ined. 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.

Name: This is the name of the component as it will show up in the Parent list. By
default it is the name of the body. If this is changed, (e.g. “Z” to “Z_Axis”) the new
name will only show up in this dialog. The name of the body will not change. Please note that names should
not include a space.

Axis Label: This item is very important for moving axes and several other components. The f ield 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 f ield are any letter with or without a
number. MTM machine labels are described in the section “MTM Axis Labels” on page 35.

The part must be given a label because the system needs to know where the part is in the
machine assembly. A mill tool holder is assumed to attach to the spindle 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
def ine 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.

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 f ixed relative to its parent
component, e.g. a chuck is f ixed 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 f ields to indicate the Axis direction and the center of
rotation for rotary axes. You can use the “From Selection” button to update the corresponding f ields from
selected geometry.

30
Using Build Machine

Translation: These f ields 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 f ields
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.

X1Y0Z0 or X-1Y0Z0 X0Y1Z0 or X0Y-1Z0 X0Y0Z1 or X0Y0Z-1


X Axis values Y Axis values Z Axis values

To determine whether a value is positive or negative, the


important thing to remember is what is moving. If the
movement is by an axis attached to the tool, the value is
positive. If the movement is by an axis the part is mounted on,
the value is negative. Think about it this way — if the table is
moving to put the tool at a greater X position on the part, then
the table must move in a negative direction.

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.

Axis: The Axis value is a 3D vector def inition. The axis value for the A
axis should be X1Y0Z0, the B axis should be X0Y1Z0 while the C axis
should be X0Y0Z1. Please note that the value should be negative if the
axis moves clockwise or positive if the axis moves counter clockwise.
An easy guideline for most machines is that values for any axis the tool
is attached to should be positive while values for any axis the part is attached to should be negative.

X1Y0Z0 or X-1Y0Z0 X0Y1Z0 or X0Y-1Z0 X0Y0Z1 or X0Y0Z-1


A Axis values B Axis values C Axis values

For getting these values right, it is important to remember


two things: the Right Hand Rule (see the Advanced CS
manual) and which linear axis a rotary axis rotates about
(the A axis wraps around X, the B axis wraps around Y and counter clockwise
the C axis wraps around Z). Remembering these rules will
help you set the proper rotations.

As a refresher, remember that positive rotations about the


X axis move from the Y to the Z axis. Positive rotations
about the Y axis move from the Z to the X axis. Positive
rotations about the Z axis move from the Y to the Y axis.
We reiterate this because if you have a complex machine, getting the rotations correct can be a little
challenging. Usually it is not hard — if the part is rotating, then the values should be negative. If the tool is
rotating, the values should be positive. If you have a machine with some unusual axis arrangements, it may
take a little experimenting to get the positive or negative setting correct.

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.

31
Using Build Machine

Limits: The limits are used to def ine the


minimum and maximum position values
for each axis def ined in any machine
component.

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 def inition. 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.

32
Using Build Machine

TEST MACHINE DIALOG BOX


The model in the Test Machine dialog box can be zoomed and rotated to change the view. The buttons on the
right of the dialog are used to ensure the components align correctly and to test how the corresponding
components move. It is important to test the axis components to ensure they move correctly. If an axis does
not move as expected it will 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.

Be especially careful if the part model is mounted directly on an axis. The Z Translation value may
need to be a “-1” instead of “1” due to a difference between the tool moving and the part moving

33
Using Build Machine

SAVE
The Save button is used to create the simulation model. Select a directory for saving the complete assembly
f ile and enter the f ile name for the model and click OK. The f iles will be generated and the Test Machine
window will display the model you just created.

The save function creates a group of f iles including an ASY f ile, an INI f ile and a FB f ile for each component in
the assembly. Together, these f iles create the machine assembly model. The VNC f ile stores data about these
f iles. If the ASY, INI or FB f iles are changed, the VNC will not know about the changes. The next time the VNC
f ile is opened and modif ications are made, the system will overwrite any changes made to the f iles. Therefore
it is highly recommended that all the f iles 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.

Store all the f iles associated with a machine in one folder, including the machine’s VNC f ile, the
assembly f iles and MDD. This will let you revise a machine f ile, keep track of different machines and
MDDs, and ensure data is not overwritten.

34
Using Build Machine

NAMING CONVENTIONS
AXIS LABELS
When def ining 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.

MTM AXIS LABELS


If a machine has more than the standard X, Y, Z, A, B, C axes then it qualif ies as an MTM-class machine and
the axis labelling becomes more complex. The standard 6 axis labels are replaced by the following conventions.
There are naming conventions for ToolGroups, Spindles and Auxiliary axes.

ToolGroups: Each ToolGroup has its own set of axis labels, X through C and 1 to 99. If a machine has two
ToolGroups the f irst 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.

X1, Y1, Z1, A1, B1, C1 Toolgroup 1 axes (note: rarely is an A axis def ined on an MTM machine)

X2, Y2, Z2, A2, B2, C2 Toolgroup 2 axes

X3, Y3, Z3, A3, B3, C3 Toolgroup 3 axes

...
X99, Y99, Z99, A99, B99, C99 Toolgroup 99 axes

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.

X101, Y101, Z101, A101, B101, C101 Spindle 1 axes

...

X199, Y199, Z199, A199, B199, C199 Spindle 99 axes

Please note that most spindles only have a C axis and sometimes a Z as well, but other axes are possible.
!
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 def ines the
type of auxiliary function.

X201, Y201, Z201, A201, B201, C201 Manual Loader/Unloader axes

X301, Y301, Z301, A301, B301, C301 Auto Bar Feeder axes

X401, Y401, Z401, A401, B401, C401 Auto Chuck axes

X501, Y501, Z501, A501, B501, C501 Bar Feeder axes

X601, Y601, Z601, A601, B601, C601 Bar Puller/Gripper axes

35
Using Build Machine

X701, Y701, Z701, A701, B701, C701 Robot Arm axes

X801, Y801, Z801, A801, B801, C801 Part Catcher axes

X901, Y901, Z901, A901, B901, C901 Tailstock axes

X1001, Y1001, Z1001, A1001, B1001, C1001 Steady Rest axes

X1101, Y1101, Z1101, A1101, B1101, C1101 Part Indexer axes

Please note that auxiliary component assemblies generally only have one
! or two axes but all 6 are available.

36
USING MACHINE SIMULATION
Using Machine Simulation

CHAPTER 4 : Using Machine Simulation


THE BASIC STEPS
This section of the manual details the use of Machine Simulation. There are f ive basic steps, Step 1: Activate
Simulation, Step 2: Select a machine tool, Step 3: Update the Part, Step 4: Select Rendering Options and Step 5:
Run the simulation.

STEP 1: ACTIVATE SIMULATION


Simulation can be activated in two ways. The f irst and quickest way is by right-
clicking on the Render button on the Top Level palette and ensuring that the
render mode is Simulation. When CPR is then activated Simulation will be used.
The second method is by choosing it from the menu bar: Plug-Ins > Mach. Sim-
TMS > Machine Sim. This will open the Machine Simulation Render Control
palette.

STEP 2: SELECT A MACHINE TOOL


Click on the arrow at the bottom right corner of Machine Sim’s Render Control palette and select Load
Machine.

The Machine Sim Models dialog opens, displaying known machine assembly f iles. Select a machine tool from
the list or click on the User Folder button to select a specif ic machine tool folder. The simulation window will
open with the selected machine loaded.

The User Folder location is stored in each user’s system preferences. The machine model name is stored with
the associated part f ile.

39
Using Machine Simulation

STEP 3: UPDATE THE PART


If needed, click on the arrow at the bottom right corner of Machine Sim’s Render Control palette and select
Setup…. This will let you move the origin of the part to match that of the machine assembly f ile. These are
absolute values in part units from the machine origin to the part origin.

A. Machine Origin at center


bottom of the part.
B. Part Origin
1. Negative X Value
2. Negative Y Value
3. Positive Z Value

STEP 4: SELECT RENDERING OPTIONS


Select the options you would like to use during rendering from the Render
Control Menu.

STEP 5: RUN THE SIMULATION


To simulate operations, select the operations you want to simulate, and then
use the simulation buttons.

40
Using Machine Simulation

MACHINE SIM INTERFACE


The basic interface for Simulation is not very different than the standard GibbsCAM Render Control palette. In
fact, the interface is still called Render Control. The differences are the addition of two pull-down selections on
the bottom of the palette (Tool Display and Run Mode) and the options in the menu. Also different are the
results of the rendering. The rendered image is an OpenGL-based 3D part capable of zooming, panning and
rotating without restarting the render.

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 Simulation will display the full machine model and part
(Machine Sim), show only the part (Part Sim) or show the toolpath on the stock (Tool Sim).

To use Machine Mode a machine f ile will need to be selected using the Load Machine option in the Render
Control menu. If your MDD correctly def ines the ToolGroup and Workpiece home positions Simulation can be
run in Machine mode without loading a machine f ile. In Machine mode to aid in the visualization of lathe
41
Using Machine Simulation

spindles, the spindle will rotate while cutting during any lathe turning operation. This rotation is only to assist
in showing the direction of rotation.

In Tool Sim mode, the Render Control has two additional sliders. As with other render modes, the f irst slider
(from top to bottom) controls rendering speed. The second slider moves the tool back and forth through the
render process with a fairly course granularity. The third slider provides a much f iner granularity of control.
The “Show Toolpath” options control the display of the toolpath.

Figure 12: An example of ToolSim. The green lines are the traced toolpath and
the orange lines are the rapid moves.

Render Control Menu: This menu provides control over the appearance and content of the Simulation
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 “Simulation Rendering Options”.

42
Using Machine Simulation

SIMULATION RENDERING OPTIONS


Set Op Start/Stop #s... This option opens a dialog to specify an
operation at which to start rendering and/or set a stop point
where rendering will stop and wait for you to start it again. The
Start At Op option can be used when operations have already been
rendered once and you would like to skip operations you have
already seen. For example, you have a part with 10 operations and
you know the f irst 7 operations are correct and render correctly
but need to modify operations 8-10. Using this option you can skip
operations 1-7 and start at 8. As long as the tool or operation
information for the f irst 7 operations does not change the
rendering will jump to operation 8. The Stop Before Op option
will cease rendering before the operation you specify. If you press
the Play button rendering will begin again.

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 specif ied in the Set Op Start/Stop #s dialog.

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 specif ied 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.

Transparent Stock: This option will produce a translucent stock, providing visualization of areas hidden by a
wall. This option will slow down rendering speed.

Transparent Fixture: This option will produce a translucent f ixture bodies, providing visualization of areas
hidden by walls. This option will slow down rendering speed.

Skip Pecks: This option increases render speed by not showing small retracts in a drilling operation that uses
pecks.

Skip Unselected Ops: This option will only render the currently selected operations. The operations are still
generated. This option simply reduces the rendering time.

43
Using Machine Simulation

Tool Motion on Target Body: This option provides a non-cutting simulation of the tool motion. Selecting this
option will increase the speed of the simulation where the display of material removal is not as important as
what the tool is doing.

Op Color Mode: This option lets you utilize color to enhance the
functionality of CPR and Simulation. The corresponding options
sub-dialog has 3 color modes, Cut Color (which is the default behavior
and the same as earlier versions of the software), Tool Number and Op
Number. The color of the remaining material changes with each operation
or tool. This way you can see what areas of the part were machined by
each operation, tool or selected op. The color palette is generated
automatically to create a set of colors that are readily distinguishable from
one another. Double clicking a color allows you to change it.

Figure 13: Example of Cut Color, Tool Number and Op Number use.

Show Toolpath: This option is available in Tool Sim. The rendering options can
be accessed either by clicking on the options arrow next to the speed control
or by right mouse clicking on the Render Control title bar. These options let
you can choose how much of the toolpath will remain on the screen as the tool
follows the toolpath (0, 1, 5 or 100%). Trace Operation will draw one operation
at a time. Trace From Run will clear the previous toolpath and begin redrawing
if the user stops the render midway through and restarts.

Collision Checking: This option enables Machine Sim’s checking of collision


events. The result of a collision event is controlled by setting the “Collisions/
Limits” parameters under “Machine Sim Settings”. The tolerances for collision
detection are set in the Preferences. If the Collisions/Limits is set to “Log To
Display” then a report detailing any “collisions” is generated. The report, which
includes when the collision occurs (Time), the XYZ value of the collision (Location), which operation and
which tool is involved, may be saved out as a text f ile. Additionally, the Prim 1 section details whether a Tool or

44
Using Machine Simulation

Holder was involved while the Prim 2 section reports whether the collision was with Stock or a Fixture. Using
this option will slow down rendering speed.

Show Rapid Tool: The tool is rendered in a different color to show when it is Rapiding when this option is
enabled.

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 f ile 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 f iles. Select the machine
you wish to use and click OK.

45
Using Machine Simulation

Setup… This option is used if the part f ile does not lie properly
within the machine space. This will occur if the part’s origin is not at
the center and bottom of the workspace def inition. To reposition the
part to the machine space def ine the distance from the machine
origin to the part origin. These are absolute values in part units from
the machine origin to the part origin.

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 f ile. You may control the components individually and/or by the groups set in Build
Machine. As with workgroups and coordinate systems, the eye icon lets you show or hide a component.
Additionally you may set it to a specif ic transparency level from 0 (invisible) to 255 (solid).

Show Machine: This item turns on (or off) the display of all of the selected machine’s bodies.

POV Lock: The choices here all control how the part (or part/machine) move during the simulation sequence.
This gives the user control over how the virtual camera moves around the scene, def ining the point of view
during animation.

The choices available for Point of View Lock will be different depending on the rendering mode. For CPR, Part
Sim and Tool Sim, the options are Fixed Part, Tool Rotary Axes, Tool Linear Axes and Tool Rotary & Linear

46
Using Machine Simulation

Axes. For Machine Sim, the choices are Operator, Part, Machine Component, Tool Rotary Axes, Tool Linear
Axes and Tool Rotary and Linear Axes.

Don’t Preload Subspindles: The initial stock on the subspindle is pre-calculated, by default, anytime Simulation
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 Simulation’s use of system resources and aid
rendering, especially on slower machines.

Reload Simulation: This option will restart the Simulation session.

Settings: This option opens the Machine Sim Settings dialog. While this dialog is essentially the same as the
Flash CPR Rendering Preferences, they save separate data f iles. These preferences are detailed in “Machine Sim
Settings” section beginging on page 13.

47
Using Machine Simulation

Create Facet Body: This function turns the current cut rendered condition into a facet
body. The facet body will appear in the workspace as a transparent body. One of the
few uses of facet bodies is that they can be set as stock for “display only” purposes, i.e.
they cannot be used as a stock condition for creating toolpath but they can be shown
in rendering for Flash CPR sessions. Looking at the properties dialog you can see that
essentially nothing can be done but setting the body as a part, f ixture or stock. Setting
a facet body as stock can be quite useful for saving a rendered condition so you can
instantly get to later operations.

Figure 14: Example of a Facet Body used as stock.

48
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 def ining 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 specif ied in the Build
Machine Setup (see below). The machine assembly f ile has been def ined with all of the components
referenced from the machine CS, #1 in the images below. The turret is def ined in the Add Component dialog
box as a rotary axis and the rotation point (#2 below and Figure 16) is referenced from the machine CS. The
turret’s datum point or mounting point for tools (#3 below and Figure 17) is set in the Setup dialog box. The
point can be set and seen by clicking on the From Selection and Show buttons.

Figure 15: Illustration of the example setup.

49
Using Machine Simulation

Figure 16: The turret’s center of rotation definition.

Figure 17: The tool’s mounting point on the turret.

We will focus on four basic tool setups: mill OD & Face


orientations and lathe OD & Face/ID orientations. The image to
the right is an example of the as rendered in Machine Sim with
the tools fully set up. We will focus on tools #3 (an OD drill), #6
(a face-oriented mill thread tool, #13 (a cut-off tool) and #20 (an
ID oriented insert).

A point has been added at the approximate location of each tool


position that represents the Spindle/ToolGroup Origin (also
referred to as the datum point) when that tool is in position to
cut. Any tool shift information is made relative to this point.
Looking back at Figure 15 we can see more clearly that the datum
point floats in the space for a tool holder or on the face of the
turret, depending on the tool. We can also see that face-oriented

50
Using Machine Simulation

tools will need to be offset in Xr to be in place while the OD oriented tools will need to be offset in Z.
Additionally, other offsets or turret shifts may need to be applied.

1. Tool Offset in Xr
2. Tool Offset in Z
3. Turret Shift in Z
4. Turret Shift in Xr

Figure 18: 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 def ined by setting the Spindle/ToolGroup Origin in the Setup dialog box of
Build Machine.

For mill toolgroups, the tool should be offset in Z only. There are two methods to def ine 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.

51
Using Machine Simulation

Mill Tools - Face


Here we are using the tool in position #6 as an example. In order to get the tooltip in the correct location we
need to apply a tool offset value. The distance from the datum point to the center of the mount hole is 30mm
or 1.181 inches. In the Turret Shift dialog we enter an Xr offset value of -1.181.

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

52
Using Machine Simulation

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.

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 def inition. 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 def ined 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 thickness. This tool setup is fairly easy, we simply need to enter

53
Using Machine Simulation

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.

Lathe Tools - ID & Face


Here we are using tool #20 as an example. In order to get the tooltip in the correct location we need to apply a
tool offset value. This tool setup is a little more complex as the tool holder shifts the insert in Z and the
distance from the datum point to the center of the 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.

54
Using Machine Simulation

Tools Defined with Tool Holders


All tools will be def ined with holders if the tool is going to be used in Machine Sim, so that the tool is
displayed connected to the toolgroup.

Mini-Gangs & Extra Holders


If a tool is ganged or if there is an extra holder block of some sort, you will need to apply a Turret Shift so that
Machine Sim is aware of the extra moves the toolgroup must take to get the tooltip to the correct position.

55
Using Machine Simulation

56
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 specif ic 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 f ile. 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 f iles
should be placed in the machine model folder, in a sub folder called “scripts”.

The Machine Sim Scripts are interpreted, meaning that the text f ile 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 Script language supports local and global
variables, simple math operations, and conditional logic commands. The scripting language is not case
sensitive.

59
Scripting

TYPES OF SCRIPTS
There are f ive 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 f irst 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 60

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 60

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 f irst 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.

MACHINE SIM SCRIPTS UTILITY OP SCRIPT NAMES


The Machine Sim Scripts that are executed as a result of utility data in the program (i.e. start scripts, end
scripts and timebased scripts) use “base name” of the utility op with a suff ix of _script. They are not case
sensitive, but we recommend the use of capitalization as shown for readability. For utility operations with
different subtypes, e.g. LoadSpindleBarFeed_script and LoadSpindleRobot_script, the main utility op
type can be used for any subtype. If a subtype script is present, it will be used instead of the main utility op
script.

The current list of Utility operation script names follows.

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 †

60
Scripting

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 †

† designates the Main Utility Op Type

COMMANDS
The scripting language includes the following script commands:

MoveTo: This command moves (animates) bodies along their axes to a position with a specif ied number of
animation steps. This command can accept multiple bodes at the same time. The specif ied axes will move
simultaneously.

MoveTo [Z102] [Z901] -50 Step 10 Delay 50


This will move the bodies “Z102” and “Z901” along their axes by -50 units in 10 steps with a 50 millisecond
delay between steps.

GoTo: This command statically repositions (“pops”) bodies to a new axes position.This command can accept
multiple bodes at the same time. The specif ied axes will move simultaneously.

GoTo [Z102] [Z901] 0


This will move the body “Z102” and “Z901” to their “0” position.

SetPos: This command functions the same as GoTo but does not have redraw at the end.

Redraw: This command forces a redraw.

Delay: This delays a specif ied number of milliseconds.

Delay 500
This will delay the system for half a second.

Load: Loads a part for the specif ied P body. Can do it invisibly if optional “Vis 0” is specif ied.

Load P1 Vis 0
Part 1 is loaded invisibly

Unload: Unloads the part that’s standing in for the specif ied P body

SetVis: This command sets the visibility of one or more bodies. Use 0 for invisible, 1 for translucent and 2 for
opaque.

SetVis Z101 Y101 2


This will make the bodies “Z101” and “Y101” visible.

61
Scripting

SetPartVis: Shows or hides a part

SetVar: This command def ines a variable and sets its value.

SetVar #InitDist = 5.1


the variable #InitDist is def ined and set equal to 5.1. The units are part units.

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 specif ied) 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.

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

Conditional expressions (the test in an IF statement) only support relational operators (<,<=,>,>=,=,<>), but
the left and right sides may be complex arithmetic expressions.

62
Scripting

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>.

Print "Z axis position: "


PrintLn %Z
Script Console output: Z axis position: -43.002149

Print "Tailstock position offset from op z-position target: "


PrintLn %Z901 - @ZPosition
Script Console output: Tailstock position offset from op z-position target: 26.0

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.

PrintLn "This is a test."


Script Console output: This is a test.

PrintLn 100 * -100


Script Console output: -10000

PrintLn "In reset script"


Print "Z102 = " %Z102
PrintLn "and (Z102 + 10) * 2 – 150 = " (%Z102 + 10) * 2 – 150
Script console output:
In reset script
Z102 = 0 and (Z102 + 10) * 2 – 150 = -130

About Commands and Redraws


The screen is not automatically redrawn after each scripting command. The behavior is as follows:

• 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.

63
Scripting

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 /.

() (parentheses): Parentheses are used for controlling the order of operations.

VARIABLES
The scripting language allows for local, global, and operation def ined variables. Local variables are def ined by,
used, and scoped internally to an MS Script. Global variables are def ined either in a Script, or as part of a
globally available environment that is created and managed dynamically by Machine Simulation. Operation
def ined variables represent utility operation data that is supplied by the user when a utility op is created (e.g.
ZPosition)

• Local variables are formatted as:

#variablename

• Global variables, which are read-only, are formatted as:

&variablename (e.g. &MMToPartUnits)

The following is a list of the def ined available global variables.

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

Lathe: 0=contour, 1=rough, 2=thread, 3=drill, 4=utility, any other value=none


&OpToolGroup
&ToolType 0=mill, 1=lathe, any other value=none
&LToolOffset
&MMToPartUnits
&P1OffsetZ
&P2OffsetZ

• Global variables can also be user-def ined. These are formatted as:

$variablename (e.g. $calcvar1)

64
Scripting

• Axis value variables, which are read-only, are formatted as:

%variablename (e.g. %X102, which will return the current position of the spindle2 X axis.) To set an axis
value, use the SetPos command.

• Operation variables are formatted as:

@variablename (e.g.@ZPosition)

The following is a list of the def ined available operation variables.

Variable Utility Op Data Comment


@USERFLOW "UserFlow"
@USERWORKPIECE "UserWorkPiece"
@MOVESTOOL "MovesTool" This f ield's presence and contents tell us that this op moves the
tool
@ATHOME "AtHome" This f ield's presence and contents tells us that this op is at
home
@STARTOFFPART "StartOffPart" This f ield's presence and contents tells us that this tool starts
“off part”
@ENDOFFPART "EndOffPart" This f ield's presence and contents tells us that this tool ends
“off part”
@CSORIENTS "CSOrients" This f ield's presence and contents tells us that this Op’s CS
orients the part/tool
@ORIENTA "OrientA" If this f ield exists it contains A orientation
@ORIENTB "OrientB" If this f ield exists it contains B orientation
@ORIENTC "OrientC" If this f ield exists it contains C orientation
@TIME "Time"
@FEEDRATE "FeedRate"
@FEEDDIST "FeedDistance"
@ZCLEARANCE "ZClearance"
@XPOSITION "XPosition"
@ZGRIP "ZGrip"
@ZRETRACT "ZRetract"
@XDROP "XDrop"
@ZDROP "ZDrop"
@FROMWORKPIECE "FromWorkPiece"
@TOWORKPIECE "ToWorkPiece"
@ORIENTATION "Orientation"
@CSYNCHED "CSynched"
@WITHPART "WithPart"
@ZINITFACEPOS "ZInitialFacePos"
@ZPOSITION "ZPosition"
@AFTERSHIFT "AfterShift"

65
Scripting

Variable Utility Op Data Comment


@OPENCOLLET "OpenCollet"
@SPINDLESPEED "SpindleSpeed"
@SPINDLEON "SpindleOn"
@FORWARD "Forward"
@SHIFTORIGIN "ShiftOrigin"
@PARTSHIFTDIST "PartShiftDistance"
@SUBINUNLOAD "SubInUnload"
@PARTINMAIN "PartInMain"
@PARTINSUB "PartInSub"
@MAINLOADED "MainLoaded"
@TOOLGROUP "ToolGroup"
@NEWPOS "NewPos"
@XNEW "XNew"
@XVALUE "XValue"
@ZNEW "ZNew"
@ZVALUE "ZValue"
@CSSPINDLEZX "CSSpindleZX"
@TOOLTIP "ToolTip"
@AUTOREMOVE "AutoRemove"
@TORQUESENSING "TorqueSensing"
@TORQUEVAL "TorqueVal"
@PULLBACK "PullBack"
@SPINUNLOADED "SpinUnloaded"
@FULLRETURN "FullReturn"
@POSTSX "PosTSX"
@POSTSZ "PosTSZ"
@MACHMODE "MachineMode"
@XCLEARANCE "XClearance"
@STEADYRESTNUM "SteadyRestNum"
@ZGRIP_ALT "ZGripAlt" A calculated value
@ZCLEARANCE_ALT "ZClearanceAlt" A calculated value
@PARTSHIFTDIST_ALT "PartShiftDistAlt" A calculated value
@LATHEMODE "LatheMode" Switch to Lathe mode
@RECREATEOP "RecreateOp" This will recreate the operation

66
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:

SetVar(<variablename>=<value>)
RunScript(<scriptname>)

Please note that SetVar can only be used for global variables and the global variable pref ix ‘$’ must not be
used.

Example: A script named MoveWAxis_script.txt was created and you want to call it after Operation 3. This
script requires a variable named $h to be set to 100. Operation 3’s At Op End f ield is edited to include the
following.

SetVar(h=100)
RunScript(MoveWAxis)

67
Scripting

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 def ined 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 def inition and
positioning of axes, such as a subspindle, in the program based on standard 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 def ines axis motion for utility ops that relies on the presence of axes
def ined 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 def ined 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 specif ically 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.

68
MACHINE SIMULATION
TUTORIALS
Machine Simulation

CHAPTER 6 : Machine Simulation


BUILD MACHINE TUTORIAL
In this tutorial we will create solid models (shown to the right) that will be used for a Machine Simulation
machine assembly f ile. We will start with a pre-existing VNC f ile that contains the geometry required to
create solid models. These solid models will def ine the machine that will be used by Machine Simulation.

1. Base
2. Table
3. A Axis
4. Rotary_Body
5. X_Axis
6. Y_Axis
7. Z_Axis
8. Spindle

Creating the Model


• 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 f ile. 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 def ined.

CREATING THE MODEL


Individual Components
This is a Fadal-style 4-axis vertical mill. The table is mounted to the A Axis which is
on the X axis which is on the Y axis. There are two existing bodies in the f ile,
“90+0+-90”, the extruded numbers, and “Arrow”. These bodies will help show the
rotation of the A Axis.

• In the YZ plane extrude the Base geometry by X+:300, X-:–300. Name this body
“Base”.

• In the YZ plane extrude the Table geometry by X+:+350, X-:–350. Name this body “Table”.

• In the YZ plane create a 360mm diameter cylinder that is 50mm deep, extending from
X+350 to X+400. Name this body “A Axis”.

71
Machine Simulation

Note there is a space in the name.

It is extremely important to properly align bodies that represent rotary axes about
their center of rotation. If possible, it is recommended that you model the rotary
! axes with a cylindrical rather than a cube shape to more easily conf irm the rotation
is correct when using Build Machine.

• In the YZ plane extrude the Rotary Body geometry by X+:+600, X-:+400. Name this body
“Rotary_Body”.

• In the XZ plane extrude the X Axis geometry by D+:+0, D-:-500. Name this body
“X_Axis”.

• In the XZ plane extrude the Y Axis geometry by D+:0, D-:-600.

• Perform a non-destructive subtraction of the X Axis model from the Y Axis


model. Name the new body “Y_Axis” and delete the original Y Axis extrusion.
Creating the Model

We will now create the bodies mounted on the Z axis.

• In the XZ plane extrude the Z Axis shape from D+:0 to D-:–470.

• From the XY plane create a cube with dimensions


as shown.

• Round the bottom edges that are parallel to the Y


axis by 50mm.

• Round the top edges as shown by 130mm.

• Add the extrusion and rounded bodies. Name this


body “Z_Axis”.

• In the XZ plane revolve the Spindle geometry 360°.


Name this body “Spindle”.

• To create the tool, switch to the XY plane, define a


15mm diameter cylinder that is 80mm long from the
bottom of the spindle. Name this body “Tool”.

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”.

The actual size is unimportant as this is just a placeholder.

72
Machine Simulation

CREATING THE MACHINE ASSEMBLY


The 1st Component
It is useful to add the models in the order in which they are attached. This will help you keep things
organized. It is logical to add the base of the model f irst.

• Choose Plug-Ins > Machine Simulation > Build


Machine.

When the dialog is f irst opened the only entry is


“Root”. This item (which is not editable) is the base
for all branches and components.

• Select the Base body and click the Add button.

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

Creating the Machine Assembly


as the model.

• Select Root in the Parent menu.

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.

• Select the Fixed button.

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.

73
Machine Simulation

• Enter the RGB Color values as shown.

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.

• Click the OK button.

The component has been added, we will now add more components.

The Z Axis
• Select the Z_Axis body and click the Add button.
Creating the Machine Assembly

• Select Base as the Parent.

• Enter “Z” as the Axis Label.

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.

• Set the color to G 150 B 150.

This is a teal color.

• Click the Transition button.

This tells the system that the model represents a linear axis. We now need to def ine the Axis.

• Enter “1” in the Z text box.

74
Machine Simulation

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 f ields that are
not used by an axis get a value of “0”.

• Click the OK button.

The component has been added, we will now add more components.

The Spindle
• Select the Spindle body and click
the Add button.

• Set the Parent to Z_Axis.

• Click the Fixed button.

The spindle is not an axis, while

Creating the Machine Assembly


it does spin, it does not move so
it is Fixed.

• Set the color to R 150, which is


dark red.

• Click the OK button.

75
Machine Simulation

The Tool
• Select the Tool body and click the
Add button.

• Set the Parent to Spindle.

• Click the Fixed button.

• Set the color to R 255 G 255,


which is bright yellow.

• Click the OK button.

The Build Machine window should look like the image to


the right. Let’s see what the machine assembly looks like
at this point.

• Click the Save button.


Creating the Machine Assembly

• Select a location to save the file and name it “4 Axis


Vertical.asy”.

Once you’ve selected a location to save the assembly f ile


the Test Machine window opens, allowing you to view
the model and its axes. Clicking the model allows you to
rotate it with the mouse. The scroll wheel zooms the
model.

• Click the arrows on either side of the Z to move


the axis.

The less than button moves the Z axis down


while the greater than button moves the axis
up. If you get different results the Z value needs
to be changed from a negative to a positive 1.

• Close this window to continue adding components.

76
Machine Simulation

The Y Axis
• Select the Y_Axis body and click the Add button.

Creating the Machine Assembly


• Select Base as the Parent.

• Enter “Y” as the Axis Label.

• Set the color to G 75 B 150.

This is a medium blue color.

• Click on the Transition button.

• Enter “-1” in the Y text box.

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.

• Click the OK button.

77
Machine Simulation

The X Axis
• Select the X_Axis body and click
the Add button.

• Select Y_Axis as the Parent.

• Enter “X” as the Axis Label.

• Set the color to R 75 G 150.

This is a lime green color.

• Click on the Transition button.

• Enter “-1” in the X text box.

Again a negative 1 is used


because the axis moves to its
Creating the Machine Assembly

left (a negative move) to get the part into a “higher” relative position to the tool.

• Click the OK button.

The Rotary Body


• Select the Rotary_Body model
and click the Add button.

• Set the Parent to X_Axis.

• Click the Fixed button.

• Set the color to R 150 G 150,


which is yellow.

• Click the OK button.

78
Machine Simulation

The A Axis
• Select the A Axis body and click
the Add button.

• Select Rotary_Body as the


Parent.

• Enter “A” as the Axis Label.

• Set the color to R 150 G 75


which is an orange color.

• Click the Rotation button.

• Enter “1” in the X text box.

• Click the OK button.

Creating the Machine Assembly


The Table
• Select the Table model and click
the Add button.

• Set the Parent to A Axis.

• Click the Fixed button.

• Set the color to R 150 B 75,


which is maroon.

• Click the OK button.

The Part
• Select the Part model and click
the Add button.

• Set the Parent to Table.

• Set the Axis Label to P.

The part must be given a label


so that the system knows where
to place part f iles in Machine
Sim.

• Click the Fixed button.

• Set the color to B 255, which is blue.

• Click the OK button.

79
Machine Simulation

The Arrow
• Select the Arrow model and click
the Add button.

• Set the Parent to Rotary_Body.

• Click the Fixed button.

• Set the color to R 255, G 255, B


255, which is white.

• Click the OK button.

The Numbers
• Select the 90+0+-90 model (the
numbers) and click the Add
button.
Creating the Machine Assembly

• Set the Parent to A Axis.

Since the A-Axis moves, the


numbers will rotate with the A Axis, giving a visual
clue as to where the table is. While the arrow and
numbers are not a part of the machine, they can be
helpful to add to a model.

• Click the Fixed button.

• Set the color to white (R 255, G 255, B 255).

• Click the OK button.

The component tree looks good, with two


branches (one for each moving section of the
machine) and no unattached components.

80
Machine Simulation

FINALIZING THE ASSEMBLY


Missing Components
• Click the Save button so we can test our
assembly file.

• Resave the existing assembly file.

It would seem that we have a problem. The A


Axis is missing from the assembly f ile. The
problem is that the component has a space in
its name.

• Close the Test Machine window, right-click


the A Axis component and select Edit.

• Change the Name to A_Axis. and click OK.

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

Finalizing the Assembly


component. Changing the name of a
component breaks associativity, because the
system lets you easily swap out components of
the same name.

• Right-click the Table component and select Edit.

• Change the Parent to A_Axis. and click OK.

• Right-click the 90+0+-90 component and select Edit.

• Change the Parent to A_Axis. and click OK.

The component tree should have two complete branches.

81
Machine Simulation

Axis Testing
• Click Save to save the assembly and test the
components.

• Click the Greater Than button next to the X


to see the X axis body move in a negative direction
along the axis.

The greater than button moves the part in a


negative direction relative to the tool. Each
click on the Greater Than button represents a
move to a position that is greater than the
current X position. Each click on the Less Than
button represents a move to a position that is
less than the current X position.

• Click the Less Than button next to the Y to


see the Y axis body move in a positive direction
along the axis.
Finalizing the Assembly

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.

• Click the Greater Than button next to the A.

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.

• Close the Test Machine window, right click the A_Axis component and select Edit.

• Change the X Axis value to “-1” then click OK.

You may be wondering why we set a negative value


here. The important thing to remember is which item
is moving — is it the tool or the table? Since the moves
are relative to the spindle origin the table will move in
negative X so the tool is positioned in a greater X
position. If the tool was moving, it would move in a
positive X direction to move to a greater X position.

• Click the Save button to save the assembly file and open
the Test Machine window.

82
Machine Simulation

• Click the Greater Than


button next to the A.

The table now rotates toward


the positive Y axis, or away
from our view which is
correct. Our assembly f ile
works.

• Close the Test Machine


window.

Setting Machine Parame-


ters
• Click the Setup button.

Certain data regarding the


machine must be set. The
most important of which is
the Spindle Origin.

Finalizing the Assembly


• Switch to the XY plane if necessary and switch to WG1: Base.

There is a point in this workgroup that has been created at the spindle origin. This point will be used to
load the position.

• Select the point and click the Spindle Origin From Selection button.

83
Machine Simulation

The other f ields will be handled by the MDD.

• Click the OK button to close the dialog.

• Close the Build Machine dialog and save the part file as it is complete.

Please note that the assembly f ile 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 Def inition
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.
Finalizing the Assembly

84
Machine Simulation

MACHINE SIM TUTORIAL


CREATING THE PART
About the Part
This part starts with a stock body, a part model, and three f ixture models. The part
already has four tools and operations. We will load some processes and create several
simple machining operations primarily for visualization of the part. We will then
render the part in Machine Sim. The part is set up on a Four Axis Vertical Mill that
rotates about the A axis. As with all tutorials, the part is an aluminum alloy. We will
be using the Flash CPR rendering for the images of this part.

• Open the file MachineSim.vnc, located in the Part Files\Machine Sim


Required folder that was installed with GibbsCAM.

If you render the part, you can see that we do a pre-mill hole, followed by
drilling to the bottom of the hole, roughing the pocket and completing the
operations by f inishing the pocket.

Enabling the Show Tool Holder option in the toolbar will include the

Creating the Part


mill tool holders in Flash CPR. Enabling this capability is optional, but can
be very useful.

Loading Processes
We will now load the processes to f inish the machining of this part.

• From the Processes menu select Set Directory… and


choose the Machine Sim Required folder.

The Processes menu should now have an entry with a


sub-menu showing the available processes.

If you already have a processes directory selected,


you may wish to move the Machine Sim Required
! processes to a directory of your choosing, rather
than giving the system a new location for
processes.

85
Machine Simulation

Machining XZ Plane
• Load the MachineSim1 process.

This loads a single tool and three process tiles.

• Set the Machining CS in the Rotate tab to the XZ plane.

• Switch to CS2, the XZ plane and select the point that lies in that CS (at Y0,
centered above the hole).

• Create the toolpath.

This will drill and mill thread the hole.

Machining XZ Backside
• Delete the existing process tiles and deselect the operations we just created.

• Load the MachineSim2 process.

This loads two drills and two process tiles.


Creating the Part

• Change the Machining CS of these processes to XZ backside.

• Switch to CS3, select the two points that lie above the holes.

• Create the toolpath.

This will drill and chamfer the holes.

86
Machine Simulation

• Delete the existing process tiles and deselect the existing operations.

• Load the MachineSim3 process.

This loads a f inish endmill and a process tile.

• Turn on the Profiler.

• Set the machining markers as shown.

Be sure to use the Single Feature Cut function. Offsetting the markers by
5mm will start the tool off of the part.

• Create the toolpath.

This will machine the slot in four passes.

If you enabled the Show Tool Holder option you probably noticed that the
tools have holders even though we did not set any. The saved processes
include tool holder data. While the holders are not essential for Flash CPR,
they are useful. The display of the holders can be considered crucial when

Using Machine Sim


using Machine Sim.

USING MACHINE SIM


The Machine Sim product has two primary modes, Part Sim and Machine Sim. Part Sim is very useful in
that it shows all inter-operation moves of a tool (and holder) around a part, but is not that much different
from Flash CPR in that it is still a part-centric view. The advantage is that it does not require a machine
assembly f ile. Machine Sim however shows everything about part and the machine’s movement (except
tool changes).

Preferences
Let’s look at our rendering options before we use Machine Sim.

• Deselect all solids.

• Select Machine Sim from the Plug-Ins menu.

When Machine Sim f irst opens you will see the stock body and
f ixtures. Unless you have changed the Preferences, the
workspace is a gradient rather than black.

The Render Control palette looks almost identical to the


standard dialog but with the addition of two buttons and a
menu, designated by an arrow pointing to the right.

87
Machine Simulation

• Open the menu in the Machine Sim Render Control palette.

This menu provides access to numerous Machine Sim options.

• Set the options as shown.

This should only require you to select the Transparent Stock and
Transparent Fixture options.

• Choose the menu again and select Settingts.

• Select all of the Collision options.

This will let us know in several ways if we happen to


experience a collision. A collision is interference
between the tool or holder and any part of the machine
or a f ixture. Cutting too deep into a part is not a
Using Machine Sim

collision, that is a gouge.

The Cutting values can be adjusted to better match the


power of your computer or the desired responsiveness
versus rendering speed.

• Close the Settings when you are done.

88
Machine Simulation

Part Sim
Machine Sim can be used without a machine assembly f ile. 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 f irst 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 f ixtures allows us to see what the tools and holders are doing without
rotating the part.

• Select the Solid Tool option in the Render Control palette.

• 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).

At top speed we will not see many of the subtleties of the tool movement, (unless you have a very slow
computer).

Using Machine Sim


• Render the operations.

If the rendering is too slow, move the Speed Control to a faster speed.
Note how you can see all of the cut stock.

• Turn off the Transparent Stock option.

The rendering will start again.

• When the rendering is complete. rotate the current view


so that you see the threaded hole and the tool.

If your mouse has a scroll wheel, click and hold the


wheel down. Then move the mouse to rotate the
current view.

Like standard CPR, Part sim shows the tool moving


about the part. Now let’s get into Machine Sim, where
we see how things really are.

89
Machine Simulation

Loading A Machine
Before Machine Sim can be used, a machine assembly f ile
must be selected. If you are going to create your own machine
assembly f ile and have not done the “Build Machine Tutorial”
on page 71 it is recommended that you complete that tutorial
before continuing this tutorial. For information on creating a
machine assembly f ile see the chapter “Using Build Machine”
starting on page 17. If you will not be creating your own
machine assembly (i.e. someone else in your company is
tasked with that responsibility), we have included a
completed version of the machine assembly that you can use.

• Open the Render Control palette menu and choose Load


Machine > Browse.

The Machine Sim Models dialog opens. This dialog is


used to f ind and select machine assembly f iles. By
default the system will f ind any assembly f iles 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.
Using Machine Sim

• Click the User Folder button.

90
Machine Simulation

A dialog will open allowing you to navigate to the location of the machine assembly f ile you created. If
you did not create an assembly f ile you can choose the folder 4 Axis Vertical Mill Machine File that is in
the same folder as the MachineSim.vnc f ile.

• Select Machine Sim Tutorial Machine and click OK.

The Gibbs window will include the machine model but we have something to take care of f irst.

Using Machine Sim


Setting the Part Origin
When Machine Sim is activated it checks to see if a part has been used with the machine before. This is
because the part and the machine need to have matching origins. to ensure this, a dialog comes up if the
part has not been used in Machine Sim before.

• Set the Part Origin to X-20, Y-20.

Since the part’s origin is in the bottom left corner it is not


centered on the table — it is too far in +X and +Y. We need to
move it to the center of the part, which in this case is half the
size of the 40x40mm part.

• Switch to isometric view and zoom out until you see the entire
machine.

The part should be centered on the table. It is very important that the system
knows where the part origin is relative to the machine’s origin. Not def ining
this properly could lead to interference between the tool and the machine or
part. If you do not properly def ine where the part is upon f irst activating
Machine Sim, you can always select the Setup… option from the Machine Sim
menu on the Render Control palette.

91
Machine Simulation

Machine Sim Rendering


When Machine Sim is f irst activated, the spindle should be empty. As soon as the rendering is started a
tool is loaded and the rendering begins.

• Select the Transparent Tool option.

• Set the render speed to about the 1/4 speed mark and click the Play button.

Both the tool and the holder are now displayed by the system. Note
that selecting the transparent tool option applies to both the tool and
holder.

When the operations on the front face need to be rendered the table
moves down in Y and the A Axis rotates into position. Throughout the
rendering process the X and Y axis move as needed. Note that even the
threads are rendered.

When the operations on the back need to be rendered the table moves up in Y
and the A Axis rotates into position. When complete the rendering process
stops at the end of the operations. Sending the tool home and unloading the
tool is not rendered as that is not a part of the operations we def ine.
Using Machine Sim

• If you want to inspect the rendered part, you can zoom, pan and rotate the part as
needed without restarting the rendering.

• Save the file as it is complete.

Posting the f ile requires a custom post for the machine.

92
INDEX
Index

Component Movement: 24, 33


NUMERICS Component Type: 30
3D vector definition: 31 Editing: 19, 24
Name of: 30
Coordinate Systems: 20
A Create Facet Body: 48
Add button: 24, 29 CS requirements: 22
Add Component dialog: 24, 29–30, 33 Cut Part Chord Height: 13
Alert Types, of collisions: 15 Cut Part Rendering: 4
Assembly, of components: 20
At End Op: 59
At Start Op: 59 D
Axis Datum point: 49–50
auxiliary, def. by VMM: 68 Define Custom Colors: 30
Defining & assigning: 11 Delay: 63
Increment: 27–28
Delay command: 61
Label: 30
Delay, in MoveTo: 61
Testing the model: 33
Type: 27 Don’t Preload Subspindles: 47
Axis Limits: 32, 45, 68
Axis motion, of Utility Ops: 68 E
Axis Type: 28
Edit components: 19, 24
Explicit Script: 60
B
Body Chord Height: 13 F
Build Machine: 4, 19, 25
First, turret position: 27
Fixed component: 30
C Flash CPR: 4
CAD application: 20 From Selection: 30
ChangeTool command: 62–63
Check Machine Travel Limits: 45 G
Circular Threads: 16
Ganged Tools: 55
Collision Checking: 28, 44
GoTo: 63
Collision events: 44–45
GoTo command: 61
Collisions: 14–15
Greater Than button: 33
Alert Types: 15
Detection: 32
Color: 30 H
Comment field: 30
Has Limits: 32
Components: 19–20
Component Groups: 14, 28–29 Has Turret: 27, 53

95
Index

Home position: 22
O
Op Color Mode: 44
I OpenGL: 41
Implicit Script: 60 Origin: 20, 22
Inter-Operation Moves: 4

P
L Parent: 29
Lathe parts: 22 Part Body: 22
Length Out of Holder: 51 Labels: 26
Less Than button: 33 Part Mode: 4
Load command: 61, 63 Part Origin: 46
Load Machine: 39, 41, 45 Part Sim: 41
Part units: 22
P-body: 22
M Pivot distances: 11
Machine assembly: 14 Plug-Ins menu: 4, 24, 39
Machine Component Objects: 14 Position, tool in turret: 27
Machine Component Visibility: 46 Postscript: 59, 67
Machine CS: 20 POV Lock: 46
Machine Mode: 4, 41 Preferences: 47
Machine Parameters dialog: 24 Prim 1: 44
Machine Sim: 4, 41 Prim 2: 45
Machine Space: 46 Primary Value, axis position: 27
Machine Tool: 4, 20 Primary Value, turret position: 27
MachSim Axis: 27 Print command: 63
MDD: 11, 68 PrintLn command: 63
Mill parts: 22
Model Tree: 19, 24–25, 29
Moves, intra-operation: 11 R
MoveTo: 63 Redraw command: 61
MoveTo command: 61, 63 Reload Simulation: 47
MTM parts: 22, 26 Remove button: 24
MTM, Machine Parameter checkbox: 26 Render Control: 39, 41
Menu: 42
Rendrering colors: 44
N Reparent: 63
Names, of components: 20, 30 Reparent command: 62
Non-Cutting simulation: 44 Reposition the part: 46
Non-machine components: 14 RGB: 30

96
Index

Root: 24 Stock body: 22


Rotary axes: 11 Stop Before Load/Unload: 43
Rotation: 31 Stop Before Op: 43
Rotation component: 30
Run Mode: 41
T
Table, axes and: 11
S Test Axis components: 33
Save button: 25, 34 Test button: 24
Scripting: 59–61, 68 Test Machine window: 34
Conditionals: 62 Time-based Script: 60
Operation Variables: 64–65
TMS: 4
Operators: 64
Tolerance, of collision settings: 15
Redraws: 63
Utility Op Script Names: 60 Tool
Display: 41
Variables: 64
invisible, transparent or solid: 41
Scripts, types of: 60
Tool Display: 41
Secondary Axis, turret position: 27
Tool Holder Length: 49
Secondary Value: 28
Tool Holders: 55
Select machine assembly: 45
Tool Motion on Target Body: 44
Set Op Start/Stop #s: 43
Tool Movement: 4
SetPartVis command: 62–63
Tool Offset
SetPos command: 61, 63 Lathe: 53
Setup button: 24, 26, 46 Mill: 51
Setup…: 40 Tool Sim: 41–42
SetVar command: 62 Toolchanges: 11
SetVis command: 61, 63 ToolGroup: 11
Show Machine: 46 Count: 26
Show Op: 43 Origin: 26
Show Rapid Tool: 45 ToolGroup spinner: 26
Show Time: 43 Tools, defining: 49
Show Toolpath: 44 Trace From Run: 44
Simulation: 39 Trace Operation: 44
Skip Pecks: 43 Translation: 31
Component: 30
Skip Unselected Ops: 43
Transparent Fixture: 43
Spindle Origin: 26
Transparent Stock: 43
Spindle, part holding: 11
Turret Shift: 55
Spindle/ToolGroup Origin: 49–51, 53
Start At Op: 43
Step, turret position: 27 U
Steps Per Update: 13 Unload command: 61, 63

97
Index

Use Op Stop: 43
Use Tool / Holder Length: 68
from MDD: 51
Use Tool/Holder Length: 49
Used for Collision Checking: 28
Utility Data: 59
Utility Op End Script: 60
Utility Op Start Script: 60
Utility Operations: 68

V
Variables
Global: 64
Global, user defined: 64–65
Local: 64
Operation: 65
Visible, compenent setting: 30
VMM: 68

W
Workpiece: 11, 22
Count: 26

Z
Zero position: 32

98

You might also like