117
Machine Simulation GibbsCAM 2007 September 2007

Machine Simulation

Embed Size (px)

Citation preview

Page 1: Machine Simulation

Machine SimulationGibbsCAM 2007

September 2007

Page 2: Machine Simulation

Proprietary NoticeThis document contains propriety information of Gibbs and Associates and is to be used only pursuant to and in conjunction with the license granted to the licensee with respect to the accompanying Gibbs and Associates licensed software. Except as expressly permitted in the license, no part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, magnetic, optical, chemical, manual or otherwise, without the prior expressed written permission from Gibbs and Associates or a duly authorized representative thereof.

It is strongly advised that users carefully review the license in order to understand the rights and obligations related to this licensed software and the accompanying documentation.

Use of the computer software and the user documentation has been provided pursuant to a Gibbs and Associates licensing agreement.

©2004-2007 Gibbs and Associates. All rights reserved. The Gibbs logo, GibbsCAM, GibbsCAM logo, Virtual Gibbs, Gibbs SFP, MTM, SolidSurfacer, and “Powerfully Simple. Simply Powerful.” are either trademark(s) or registered trademark(s) of Gibbs and Associates in the United States and/or other countries. Windows Vista and the Windows logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. All other brand or product names are trademarks or registered trademarks of their respective owners. Contains Autodesk® RealDWG by Autodesk, Inc., Copyright © 1998-2006 Autodesk, Inc. All rights reserved.

Written by Will Gaffga

Thanks to Bill Gibbs, Chris Romes, Daniel Remenak and Jim Strong for their input and assistance.

Printed in the United States of America

Gibbs and Associates323 Science Drive

Moorpark, CA 93021

Modified: August 29, 2007 5:38 pm

Page 3: Machine Simulation

Table of Contents

Table of Contents

INTRODUCTION 1About Machine Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Comparison of rendering modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

SET UP 7Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Build Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Machine Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Clearance Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

About the MDDs and the MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Home Position - Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Home Position - Lathes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Machine Sim Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Cutting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Collisions/Limits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

USING BUILD MACHINE 17Using Build Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Create the Machine Tool CAD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Spindles & Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22ToolGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23

Build The Machine Tool Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23Build Machine Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25

Setup dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Machine Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Component Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Axis Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Add Component dialog box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Component Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Test Machine dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

Naming Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Axis Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

i

Page 4: Machine Simulation

Table of Contents

MTM Axis Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

USING MACHINE SIMULATION 39The Basic Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Step 1: Activate Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Step 2: Select a machine tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Step 3: Update the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Step 4: Select Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Step 5: Run the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Machine Sim Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Machine Sim Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51

Mill Toolgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53Lathe Toolgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Tools Defined with Tool Holders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Mini-Gangs & Extra Holders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

SCRIPTING 59Machine Sim Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Types of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Machine Sim Scripts Utility Op Script Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Conditional Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65Debugging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65About Commands and Redraws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66PostScript Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70VMMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

MACHINE SIMULATION TUTORIALS 73Build Machine Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Creating the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Individual Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

Creating the Machine Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77The 1st Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77The Z Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79The Spindle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

ii

Page 5: Machine Simulation

Table of Contents

The Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81The Y Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83The X Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84The Rotary Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84The A Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85The Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86The Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86The Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87The Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Finalizing the Assembly. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Missing Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Axis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Setting Machine Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Machine Sim Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Creating the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

About the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Loading Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Machining XZ Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Machining XZ Backside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

Using Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Part Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Loading A Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Setting the Part Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Machine Sim Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

INDEX 105

iii

Page 6: Machine Simulation

Table of Contents

iv

Page 7: Machine Simulation

INTRODUCTION

Page 8: Machine Simulation
Page 9: Machine Simulation

Introduction

CHAPTER 1 :

Introduction

ABOUT MACHINE SIMULATIONThe Machine Simulation option is a 3D representation of a Machine Tool, the parts andcutting tools which supplements the standard rendering component of GibbsCAM.Machine Simulation provides a machine-centric view of what is happening as opposed tothe standard rendering which is part-centric. Also included with this option is MachineBuilder, a tool to create the models that represent the machine tool. Machine Simulationsupports lathe, mill, Mill/Turn, Advanced CS, rotary mill, Tombstone Machining Systemand most Multi-Task Machining parts.

1. A solid model to be cut2. Solid model of a

Machine Tool3. As assembled machine

tree in Machine Builder4. Machine Sim in action

3

Page 10: Machine Simulation

Introduction

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

4

Page 11: Machine Simulation

Introduction

OVERVIEWMachine Simulation is accessed from the Cut PartRender button on the main palette or the Plug-Insmenu. Build Machine opens the interface fordefining and creating a machine tool while theMachine Sim option activates the MachineSimulation rendering mode. Typically a machinetool needs to be created before using Machine Simbut it may be used without a machine tool model inPart Mode. At first glance Part Mode may seem tojust be Flash CPR. In fact it is not. Using MachineSim in Part Mode will display all inter-operation toolmoves that Flash CPR (and the standard rendering)does not display.

COMPARISON OF RENDERING MODESMachine Sim is very different than the traditional GibbsCAM rendering (“CPR”) and is notthe same as Flash CPR. Flash CPR is fairly similar to the traditional rendering except for theactual image in that it uses the same part-centric toolpath display as traditional rendering.Machine Sim rendering in Part Mode (see “Run Mode” on page 43) displays the inter-operation moves that CPR and Flash CPR do not show. Machine Sim in Machine Mode caninclude an actual machine model. Additionally, a function that simply shows the toolmovement across a model without rendering material removal (“Tool Motion on TargetBody”) is very useful and not found in Flash CPR. This function will significantly speed upthe machining display.

While Flash CPR and Machine Sim may appear similar, their uses are different. A keydifference is the Machine Sim capability to display the inter-operation moves of a tool.

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

5

Page 12: Machine Simulation

Introduction

Flash CPR may be faster than Machine Sim as it does not have to render an entire machinemodel and the moving axes. You may find that when checking your part file you use severalor all of the rendering types (standard CPR, Flash CPR and Machine Simulation),depending on your needs.

Machine Sim, in either mode, will show all of the part instances in a TMS multi-part setupwhere standard CPR and Flash CPR only show the single part as programmed in the VNCfile.

Flash CPR without Machine Sim Machine Sim in “Part Mode”

TMS rendering with Flash CPR TMS rendering with Machine Sim

6

Page 13: Machine Simulation

SET UP

Page 14: Machine Simulation
Page 15: Machine Simulation

Set Up

CHAPTER 2 :

Set Up

OVERVIEWMachine Simulation does not really affect part set-up, except that each machine assemblyrequires a custom MDD, which can streamline some of the choices you make when settingup a part including the rotary set-up and the post processor selection.

BUILD MACHINEWith Build Machine we will be creating a machine assembly file that represents a machinetool. The representation of the machine can be as simple as just a base, each axis andprimary components, such as the table, or it may be very complex, down to modeling thecontrol’s buttons and dials. The level of complexity is up to you. When creating the modelyou should be sure to create a workspace big enough to contain the entire machine.

All machines must be defined in millimeters but the part can be inch or metric. Themachine assembly will be scaled to work with inch parts.

Figure 2: Examples of machine models. Some are very complex, others are very basic.

9

Page 16: Machine Simulation

Set Up

MACHINE SIMULATIONClearance PlanesThe MDD associated with a machine should reflect the machine’s and the post’s retractbehavior so that Machine Sim shows what will really happen on the machine. For mostposts the tool will go home, in some cases the render will only show ZCP1.

MDDSEach machine assembly that is created must have an custom MDD that defines thatmachine 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 MDDand modify the data to fit the machine. Whenever the MDD is selected in the DocumentControl dialog, the accompanying machine assembly file will be the default machine forMachine Sim. The MDD should be reviewed after you have created the machine assemblyfile. It is important that the MDD and machine assembly file be consistent in terms of axesdefinition. 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 otherinformation. 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 toolchange position may be pre-set, depending on your machine and preference. Also, thedefault post processor is set by the Machine Sim MDD.

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

Page 17: Machine Simulation

Set Up

ABOUT THE MDDS AND THE MDD EDITORThe axes definition in the MDD must be consistent with the axes definitions in themachine assembly which is created using Build Machine. In particular the number and typeof axes must match. If an axis is attached to the machine's table (for a mill) or part-holdingspindle (for a lathe) in the machine assembly, then it must be defined in the MDD as beingassigned to the workpiece (i.e. not assigned to the toolgroup). Conversely, if an axis isattached to the machine's tool or toolgroup in the machine assembly, then it must bedefined 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, orboth are on the too), then the mounting order in the MDD must match the parent/childrelationship defined in the machine assembly. For example, if the A axis is mounted on theB axis in the MDD, then the corresponding A axis must be a child of the B axis in themachine 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 rotaryaxes, and axes names.

The MDD also defines behavior and positions for tool changes and other moves betweenoperations. Many of these moves are not displayed in Cut Part Rendering, but all moves aredisplayed in Machine Simulation, so it is important that this information be correct in theMDD if any part using a particular MDD is going to be used in Machine Simulation. Thisincludes tool change settings like axis priority, axis touchingly position type (e.g. fullretract, preset position, user defined), and axis touchingly position. It also includes sametool rotation settings like axis move order and position.

Home Position - MillsThis 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’sorigin in Build Machine which is the axis center of rotation or pivot point the table isattached to. In the MDD the Home Position is defined as the distance from the pivot pointto the spindle origin. In the Build Machine this is the distance between the part origin tothe pivot point.

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

11

Page 18: Machine Simulation

Set Up

MACHINE SIM SETTINGSMachine Sim Settings are accessible twoways, either from the Machine Sim RenderControl palette’s contextual menu or fromthe File > Preferences menu. When theMachine Sim Render Control palette is openthe Edit Flash CPR Settings… button opensthe Machine Sim Settings dialog box. TheMachine Simulation and Flash CPRpreferences are essentially identical butsave separate preference data. TheCommon Reference manual discusses thesepreferences in detail from a Flash CPRPreferences point-of-view.

CUTTINGThe cutting options section allow you tocontrol the quality and responsiveness ofMachine Sim. Please note that the MachineSim preferences are stored with the part.This means that if you change thepreferences but open a part that has anolder set of preferences, it will override thechanges you have made.

Steps Per Update: Steps per Updatespecifies the maximum number of CPRfeatures to render before updating the display. Large numbers will increase the rendering

1. Pivot Point2. Spindle Origin3. Part Origin4. Pivot Point

Figure 4: Machine positions required for the MDD Editor.

12

Page 19: Machine Simulation

Set Up

speed but will result in a rougher rendering animation. With large numbers the tool mayappear 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 partdisplayed in Flash CPR. The smaller the value, the higher quality ofthe display and the more resources needed by the system, resultingin a slower rendering. There are separate settings for inch andmetric parts. The separate values can only be set from within a partof that unit type.

Body Chord Height: This option determines the resolution ofbodies (part, stock and fixtures) in Machine Sim. There are two ways this can be set,either by the Chord Height option (which is setting a specific value), or by the % ofBody’s Chord Height option. This second option uses the value set from the Propertiesdialog, (accessed by right-clicking on a body.) A setting of 100% will use the body’sChord 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 befaster and lower percentages mean higher quality but slower response. Note that thissetting only affects on-screen display, not the actual machining.

COLLISIONS/LIMITSThe items found in the Collisions/Limits section of the dialog provide control over how thesystem reports collision errors while rendering. Any combination of the alert methods maybe used to inform the user when a collision occurs.

A collision in Machine Simulation occurs whenever any two objects contact each otherduring the simulation that are not supposed to touch. Objects in Machine Simulation

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

Chord Height

13

Page 20: Machine Simulation

Set Up

include machine components and non-machine components. Machine components areobjects in the machine assembly that are defined by Build Machine. Non-machinecomponents are not in the machine assembly, but are created by Machine Simulationbased on information in the GibbsCAM part file. These objects include tools, holders,fixtures, parts, and stocks. The active cutting tool and its holder always participate incollision detection when collision detection is activated. Other objects participate incollision detection based on their inclusion in collision component groups. Collisioncomponent groups are component groups with their collision setting turned on. See“Component Groups” on page 30 for more information.

Non-machine objects are automatically included in component groups based on theirlogical attachment to an object in a component group. For example, a tool and tool holderare logically attached to a turret by virtue of their assignment to a particular toolgroup andtool position in the tool definition dialog in GibbsCAM. A part/stock is assigned to aspindle or chuck in the machine assembly because of the part body (P-body) that is definedin the machine model. A fixture is assigned to the table (mill) or the part holding spindle(lathe) based on the CS and Spindle number of the fixture body in GibbsCAM.

Machine simulation collisions are detected when collision detection is set on, and any ofthe 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 ofa different collision component group

• Any axis position exceeds the axis limit as defined in the machine assembly for any ofthe machine components with axis limits (min/max).

Alert Types: You may choose any or all of the various feedback methods that alert you to acollision. The Beep option provides an audible alert, Log To Display will output an error inthe Clash Console log window and Stock Flash provides a visual alert to the error byflashing the rendered stock. Stop Animation will cause the rendering to stop when acollision is detected.

Tolerance: The Tolerance setting allows a different value for metric and inch parts. Anycollision within the specified tolerance will generate a collision alert.

SLIDERThe items in this section affects the responsiveness and quality of the rendering bycontrolling the maximum step distance between features in rendering. These values are

14

Page 21: Machine Simulation

Set Up

used with the speed slider on the rendering palette. The fastest speed jumps the tool fromfeature to feature using these settings. Lowering the speed will scale the distances betweenfeatures. Please note that this does not affect toolpath, only the rendered part. Thesesettings can have a very large impact on the rendering speed versus quality.

Length: The Length value sets the maximum distance between rendered linear moves. Letus imagine a linear cut where the tool will traverse 400mm in a straight line. Using thedefault settings of 200mm, the display will show this move in two steps when the slider isset to its maximum (fastest) value. If the linear cut was less then 200mm long the renderingshows 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 theLength setting, this value controls the rendering steps between features, in this case forangular moves. A low number will create very small angles in rotations, resulting in asmooth image while a high number can create a rendered part that is not smooth but isvery fast.

Auto Range: This option will disable the Length values and will instead use the size of thestock (length, width and height separately) to set the maximum feed and rapid lengths. Themaximum value for feeds will be set to 1/10th of the largest stock dimension and rapids aredouble that value. The smallest step that the system will take when rendering is 1/100th ofthe smallest dimension of the stock.

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

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

15

Page 22: Machine Simulation

Set Up

STATISTICSWhen the Statistics option is enabled awindow opens when you activate MachineSim. The window logs the currentframerate for your machine as well as anylogged errors for the CPR session.

16

Page 23: Machine Simulation

USING BUILD MACHINE

Page 24: Machine Simulation
Page 25: Machine Simulation

Using Build Machine

CHAPTER 3 :

Using Build Machine

USING BUILD MACHINEBuild Machine is used to define andcreate an assembly model of a machinethat can be used with the MachineSimulation product to create a highlyaccurate visualization of a part programcreated in GibbsCAM.

Build Machine is used after a solidmodel has been created of the machinetool and all of its relative components.The components are then added toBuild Machine, defining thehierarchical structure (the model tree)of the machine and how itscomponents move. After adding all thecomponents, the tree should looksimilar to the image to the right, withseveral branches representing differentmoving parts.

Right clicking on an entry opens acontext menu that provides the abilityto Edit a component (using the AddComponent dialog), Delete acomponent or Show the component inthe workspace. Double clicking acomponent in the tree will show a solid and can collapse or open that branch of the tree.

CREATE THE MACHINE TOOL CAD MODELThe first step to using Build Machine is to create a GibbsCAM part which containsindividual solids representing each axis and major component of the machine tool. This is

19

Page 26: Machine Simulation

Using Build Machine

an assembly of the components. Note that the solids may be created in another CADapplication and imported into GibbsCAM.

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 ofthe 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. Acoordinate system must be created that represents the spindle or table face. The origin ofthe CS should be at the spindle face origin or the top-center of the table. The CS should bealigned as the machine is, i.e. if the machine is off vertical by 30 degrees, so should theMachine CS. This CS will be referred to as the “machine origin CS” throughout this

1. Base2. X Axis3. Y Axis4. Z Axis5. Rotary Body6. A Axis7. Table8. Head9. Spindle

Figure 6: An example of a machine tool assembly.

20

Page 27: Machine Simulation

Using Build Machine

document. All of the bodies in the assembly must be assigned to this “machine origin”coordinate system.

Figure 7: Example of a machine’s XY plane (A) and Machine CS plane (B) where the horizontal and vertical axes are shaded for emphasis. The Machine CS plane is used for alignment of bodies and for all reference values.

21

Page 28: Machine Simulation

Using Build Machine

Make sure to define the part origin at a location that is easy to identify on the machine tool,for example the center of the table or the spindle face for lathe-type machines.

SPINDLES & PARTSMachine components that hold a workpiece (part and/or stock) require special definitionin the machine assembly. This is so that Machine Simulation knows how to position theworkpiece during simulation. A special machine component called a Part Body (P-body forshort) must be defined 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 anothercomponent that moves.

The P-body is a machine component made from any solid body (usually a cylinder or arectangular solid) and is given an label of P or Px, where x is any integer number. Thisspecial P naming tells machine simulation that the P-body is not to be displayed directly inthe simulation, but the P-body is to be replaced by the actual machined part/stock duringthe simulation.

TIPS

• The part model must be in millimeters.

• For mill parts it is easiest to define the center of the table at the origin and thencreate the non-moving bodies.

• For lathe, mill/turn and MTM setups it is easiest to define the spindle face at theorigin and then create the non-moving bodies.

• All bodies should lie in the same coordinate system, CS1 or ideally a CS that isaligned 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 rotaryaxes.

• Create a point identifying the tool attachment position. For a mill this is thespindle face, for a lathe this is the place on the turret where the tool holderattaches.

• When the MDD Editor setting Use Tool Holder Length is active the Z axisposition will be corrected automatically during simulation to take in accounttool/holder length & tool attachment position.

22

Page 29: Machine Simulation

Using Build Machine

Mill machines: For a mill it is typical that the P-body is a child of the machine componentrepresenting 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 machinecomponent 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 themachine.

TOOLGROUPSUnderstanding how to properly set up tools and positions is vital to getting Machine Sim torender correctly. The method for displaying tools in machine simulation is differentdepending on whether the machine is a mill or a lathe. For this discussion, “lathe” includesall lathe machines, Mill/Turn machines, and MTM machines, as defined by the MDD.

Mill machines: Mills will only show the currently active tool, which is the tool that is loadedin the tool spindle at any given time. See the section “Mill Toolgroups” on page 53 for moreinformation.

Lathe machines: Lathes will typically show all tools that are loaded into the lathe'stoolgroup(s) at the start of the NC program. One exception to this is that a lathe can have atoolgroup defined as a mill-style toolgroup, commonly known as an Automatic ToolChanging head or ATC. An ATC toolgroup in a lathe will display tools in the same way thata mill will display tools, namely, to show only the currently active tool at any given time.Defining a toolgroup as an ATC in a lathe involves turning off the “Has Turret” setting inthe machine setup dialog in Build Machine. See the section “Lathe Toolgroups” on page 56for more information.

23

Page 30: Machine Simulation

Using Build Machine

BUILD THE MACHINE TOOL ASSEMBLYStart Build Machine which is found inthe Plug-Ins menu. When first run in afile the assembly tree contains only aRoot entry.

Setup: The Setup button opens theMachine Parameters dialog (see “Setupdialog box” on page 27) which lets youdefine Machine Parameters includingthe spindle origin and the tool changeposition.

Add: The various components thatdefine a machine will have to be added to the root of the assembly by selecting a solid andclicking the Add button. Once Add has been clicked the Add Component dialog opens (see“Add Component dialog box” on page 31), which provides you with the capability to define

24

Page 31: Machine Simulation

Using Build Machine

what the body represents and any movement associated with the component. Rightclicking an entry in the tree lets you edit a component once the parameters have been set.

Remove: The Remove button will delete a selected component from the assembly tree.

Test: The Test button opens a window that lets you view the assembly and test themachine’s moving parts to ensure the proper motion.

Save: The Save button can be clicked once you have defined your machine tool assembly.This opens a dialog prompting you to select a directory for saving the file.

BUILD MACHINE INTERFACEThe Build Machine option allows you to create a model of a machine tool. Each component(the base of the machine, the table, etc.) is defined as a solid model and added to the Build

Figure 8: Example of starting an assembly tree.

25

Page 32: Machine Simulation

Using Build Machine

Machine dialog. As the components are defined the Build Machine dialog will create a treethat defines the machine tool and its parts. When ready to be saved, the model’s movingparts can be tested. Once complete, the model will be available for Machine Simulation.

In addition to the Build Machine window, there are several other windows and dialog boxesthat are used to define a machine. These are all accessed from the Build Machine windowand are described in the following sections. These include the Setup dialog box, the AddComponent dialog box, and the Test Machine dialog box.

Figure 9: The Build Machine window in its initial state and with components added.

26

Page 33: Machine Simulation

Using Build Machine

SETUP DIALOG BOXThis dialog box is opened when the Setup button is clicked. The Setup dialog box is used toset various machine parameters such as the spindle or toolgroup origin, the number oftoolgroups and workpieces, and to control grouping of assembly components.

Machine ParameterMTM: This item is selected if the machine being created will be used for lathe, mill/turn orMTM. It activates the toolgroup count and interprets the spindle/toolgroup as a toolgrouptool 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 eachtoolgroup needs to be defined separately.

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

27

Page 34: Machine Simulation

Using Build Machine

Workpiece Count: This is the number of workpieces on the machine. The origin is a millingspindle. The model should contain a part body, either with the label “P” for a mill or simplelathe setup or with the label “Px” where “x” is an integer between 1 and 100.

Spindle/ToolGroup Origin: This item is used to define where the tool or holder attaches tothe spindle. This item must be defined and the easiest way to do so is to create a point inthe part file that lies at the spindle origin using the From Selection button.

From Selection button: Clicking this button loads the coordinates of a selected pointthat represents the origin. The CS used by the points in these parameters should be thesame one that the bodies used by the machine components are assigned to.

Show button: When this button is clicked a crosshairwill be displayed at the Spindle or ToolGroup origin.

Has Turret: This item is used if the machine has a turret orin MTM if the ToolGroup being defined is a turret. Thisitem activates the Positions button which lets you definethe position of tools in a turret on the machine.

Positions button: This button opens the Turret Positionsdialog box which lets you define, among other things, thetype of turret and how many tool positions it has.

Turret PositionsThis item lets you define aturret by setting how manytool positions are on theturret, what position theyare in and the axis of motionthe turret moves in.

Count: This is how many toolpositions are on the turret.

First: This is the angularposition of the first tool.

Step: This value is theangular step to the next toolposition.

28

Page 35: Machine Simulation

Using Build Machine

MachSim Axis: This uses the axis label assigned to the turret in the Add Component dialogbox. To create a turret you add the turret solid as a component, and give it an axis label anda vector. The turret will turn around the vector, and axis label needs to go here to get it tomove correctly.

Axis Type: Choose the way the turret indexes from one tool to the next. The options includeRotary/Shortest (the machine indexes in the shortest possible direction), Rotary + (themachine indexes only in an incremental angle), Rotary – (the machine indexes only in adecremental angle) and Linear.

Axis Increment: This is the angle or linear distance between tools that the turret must taketo index from one tool to the next.

Advanced SetupSelecting this option allowsyou to set a custom PrimaryValue for each turret position,as defined by the “Count”setting. This is required if thetool positions are note evenlyspaced in the turret or spindle.Activating the Secondary Axisoption allows you to define anadditional axis that thetoolgroup uses to move tools into position.

Position: This is the tool position being defined, e.g. tool position 3 on a slide.

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

Secondary Axis: This item is used for any toolgroupwhere one axis is not enough to define the motionneeded to position the toolgroup from one tool toanother, such as a mini-gang on a slide.

Axis Type: Choose the way the turret indexesfrom one tool to the next. The options includeRotary/Shortest (the machine indexes in theshortest possible direction), Rotary + (the machine indexes only in an incrementalangle), 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 musttake to index from one tool to the next.

29

Page 36: Machine Simulation

Using Build Machine

Secondary Value: This is the secondary position for the tool being defined, e.g. toolposition 2 in a mini-gang.

Component GroupsThe Component Groups function allows you to group machine components together. Thegrouping has two uses. The first use is for collision checking, the second use is forcontrolling component visibility. By default there are two groups. Right clicking on thegroup list allows you to Add, Edit or Delete a group.

Collision CheckingThe Used for Collision Checking option states that items in the group will be used whenCollision Checking is active. This means that components that may not otherwise bechecked for collisions, such as sheet metal, will be checked. Items within a componentgroup 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 othergroups consisting of things that are not ordinarily tested like steady rests, the machine’ssheet metal, the table or chucks.

It is recommended that all items within a flow that are connected together, such as achuck, spindle, x-axis and z-axis on a common 3-axis mill, be put in the same ComponentGroup. As previously stated, items within a component group are not checked against eachother. This can be very convenient on models with faces that meet or overlap.

Controlling VisibilityComponents can be grouped so you can easily show or hide them while rendering. As withthe Collision Checking option, a component is assigned to a group from the AddComponent dialog box. Machine Component Visibility is one of the options available in theright mouse menu when you are in Machine Simulation. The dialog that is accessed fromthis selection lets you show or hide individual components or the pre-defined ComponentGroups.

Figure 10: Setting up a Component Group.

30

Page 37: Machine Simulation

Using Build Machine

Axis MappingThis item is not currently used.

ADD COMPONENT DIALOG BOXClick this button to add a model to the tree that defines the machine. When a componentis added to the Build Machine dialog the Add Component dialog opens. In this dialog eachcomponent is given a name, a parent body (what it is attached to), a color and is definedand the component is defined as being in a Fixed position, as a part that moves along anaxis (Translation) or as a part that rotates (Rotation).

31

Page 38: Machine Simulation

Using Build Machine

Parent: Use this field to select the Parent Component, which is thecomponent on which this item will be mounted. The list willcontain the names of each body in the part. Please note that allbodes that will be a parent must have a unique name for thesystem to work properly.

Groups button: The Groups button opens a dialog that allows youto assign a component to any group you have already defined. Thislets a component be collision checked and/or easily shown orhidden as a part of the group. Select one or more groups and closethe dialog. The group assignment is automatically saved.

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

Axis Label: This item is very important for moving axes and several other components. Thefield corresponds to the programmed axis, for example “X” is entered for the for the X axisof the Machine while “A” is entered for a machine’s A axis. Additionally, the model thatrepresents the part must be given a label of “P” or “Px” where x is a number from 1-100. Allentries are case sensitive. Valid entries for this field are any letter with or without anumber. MTM machine labels are described in the section “MTM Axis Labels” on page 38.

Comment: This section may be used to annotate the component. This is the only place thecomment is used.

Color: You may simply enter the RGB (Red Green Blue) values (which are 0-255 with 0 beingno color and 255 being pure red, green or blue) or you may use the Color button to select acolor 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 ofcolors. You may define the RGB (Red Green Blue) values or use your mouse to select a colorfrom 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.

TIP

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.

32

Page 39: Machine Simulation

Using Build Machine

Visible: This sets the default visibility of the component. Component visibility can betoggled at runtime from the Component Visibility dialog.

Component TypeThose buttons determine the component type. Use “Fixed” if the component is fixedrelative to its parent component, e.g. a chuck is fixed relative to a spindle. Use “Translation”for linear axes (X, Y, Z) Use “Rotation” for rotary axes (A, B, C). Each component will berepresented with an icon corresponding to the component type, as shown to the right.

If the component is not “Fixed”, use the corresponding fields to indicate the Axis directionand the center of rotation for rotary axes. You can use the “From Selection” button toupdate the corresponding fields from selected geometry.

Translation: These fields are used to specify an axis a component moves along and thedirection in which it travels. For orthogonal axes systems, a value of “-1” or “1” is enteredfor the appropriate axis, all other fields are to be given a value of “0”. A value of “-1” statesthat the initial movement of the axis will be in a negative direction while a value of “1” statesthe initial movement is in a positive direction. Please note that all vectors must benormalized.

To determine whether a value is positive ornegative, the important thing to rememberis what is moving. If the movement is by anaxis attached to the tool, the value ispositive. If the movement is by an axis thepart is mounted on, the value is negative.Think about it this way — if the table ismoving to put the tool at a greater Xposition on the part, then the table mustmove in a negative direction.

Type Icon

Fixed

Translation

Rotation

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

X Axis values Y Axis values Z Axis values

33

Page 40: Machine Simulation

Using Build Machine

Rotation: The rotation section has two parameters, one for the actual axis of rotation, theother for specifying where the axis of rotation is relative to the machine origin.

Axis: The Axis value is a 3D vector definition. Theaxis value for the A axis should be X1Y0Z0, the Baxis should be X0Y1Z0 while the C axis should beX0Y0Z1. Please note that the value should benegative if the axis moves clockwise or positive ifthe axis moves counter clockwise. An easy guideline for most machines is that valuesfor any axis the tool is attached to should be positive while values for any axis the part isattached to should be negative.

For getting these values right, it isimportant to remember two things: theRight Hand Rule (see the Advanced CSmanual) and which linear axis a rotaryaxis rotates about (the A axis wrapsaround X, the B axis wraps around Yand the C axis wraps around Z).Remembering these rules will help youset the proper rotations.

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

Center: The Center value is the center of rotation relative to the machine origin. Theeasiest way to get this data is to select the point that represents the center of rotationand click the From Selection button. This will set the X, Y and Z values automatically.

Limits: The limits areused to define theminimum and maximum

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

A Axis values B Axis values C Axis values

counter clockwise

34

Page 41: Machine Simulation

Using Build Machine

position values for each axis defined in any machine component.

For each axis, the zero position is assumed to be the position where the component isplaced in the machine model when the model is saved and the machine assembly iscreated. From this zero position the component will move in a positive or negativedirection based on the axis definition. This is true for both linear and rotary axes.

For axes that are not limited (for example a C axis on a typical lathe spindle), the Has Limitssetting should be unchecked (off).

For axes that have either a minimum or maximum limit value, the Has Limits setting shouldbe checked (on). This enables both the Min and Max values which should be set to theappropriate value for the machine. It is not possible to enable only a Min or a Max. If theHas 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 machinesimulation, a collision event is generated. If collision detection is set on, then the collisionalert will be triggered. A component does not need to be included in a collision componentgroup for an axis limit exceed collision event to be generated.

TEST MACHINE DIALOG BOXThe 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 correctlyand to test how the corresponding components move. It is important to test the axiscomponents to ensure they move correctly. If an axis does not move as expected it will

35

Page 42: Machine Simulation

Using Build Machine

need to be edited in the Add Component dialog. Watch closely to ensure the tool rotatesproperly with the spindle and that the rotary axes move in the correct direction.

Each axis can be tested by clicking on an arrow key associated with an axis. The Less Thanbutton will move an axis in the negative direction. The Greater Than button willmove an axis in the positive direction. Clicking these buttons function as if the machinewas fed incremental g-code, or jogging the machine. If the model moves in a direction thatis not expected, e.g. a rotary axis moves in a clockwise direction when the Greater Thanbutton (a positive rotation) is clicked, then the values set in the Add Component dialogwill need to be changed.

Figure 11: An example of a built machine ready for its axes to be tested.

TIP

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

36

Page 43: Machine Simulation

Using Build Machine

SAVEThe Save button is used to create the simulation model. Select a directory for saving thecomplete assembly file and enter the file name for the model and click OK. The files will begenerated and the Test Machine window will display the model you just created.

The save function creates a group of files including an ASY file, an INI file and a FB file foreach component in the assembly. Together, these files create the machine assembly model.The VNC file stores data about these files. If the ASY, INI or FB files are changed, the VNCwill not know about the changes. The next time the VNC file is opened and modificationsare made, the system will overwrite any changes made to the files. Therefore it is highlyrecommended that all the files associated with the machine be stored in the same folder.This includes the VNC, saved assembly data and MDD. Each revision of a model shouldinclude a new VNC.

NAMING CONVENTIONSAXIS LABELSWhen defining a moving component you must specify the axis in which the componentmoves. 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.

TIP

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

37

Page 44: Machine Simulation

Using Build Machine

MTM AXIS LABELSIf a machine has more than the standard X, Y, Z, A, B, C axes then it qualifies as an MTM-class machine and the axis labelling becomes more complex. The standard 6 axis labels arereplaced 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 amachine has two ToolGroups the first uses the labels X1, Y1, Z1, A1, B1, C1 and the secondToolGroup uses the labels X2, Y2, Z2, A2, B2, C2. This allows a theoretical limit of 99individual ToolGroups.

Spindles: Each spindle has its own set of axis labels, X through C and 101 to 199. If a machine has twospindles the first uses the labels X101, Y101, Z101, A101, B101, C101 and the second spindle uses thelabels X102, Y102, Z102, A102, B102, C102. This allows a theoretical limit of 99 individual spindles.

Auxiliary Axes: Auxiliary functions are typically set through Utility operations. Eachauxiliary function, such as a bar feeder or part catcher, has its own set of axis labels, Xthrough C. The number that follows defines the type of auxiliary function.

X1, Y1, Z1, A1, B1, C1Toolgroup 1 axes (note: rarely is an A axis defined on an MTMmachine)

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

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.

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

38

Page 45: Machine Simulation

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.

39

Page 46: Machine Simulation

USING MACHINE SIMULATION

Page 47: Machine Simulation
Page 48: Machine Simulation

Using Machine Simulation

CHAPTER 4 : Using Machine Simulation

THE BASIC STEPSThis section of the manual details the use of Machine Simulation.

STEP 1: ACTIVATE MACHINE SIMMachine Sim can be activated in two ways. The first andquickest way is by right-clicking on the Render button on theTop Level palette and ensuring that the render mode isMachine Sim. When CPR is then activated Machine Sim willbe used. The second method is by choosing it from the menubar: Plug-Ins > Mach. Sim-TMS > Machine Sim. This willopen the Machine Simulation Render Control palette.

STEP 2: SELECT A MACHINE TOOLClick on the arrow at the bottom right corner of Machine Sim’s Render Control palette andselect Load Machine.

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

41

Page 49: Machine Simulation

Using Machine Simulation

The User Folder location is stored in each user’s system preferences. The machine modelname is stored with the associated part file.

STEP 3: UPDATE THE PART If needed, click on the arrow at the bottom right corner of Machine Sim’s Render Controlpalette and select Setup…. This will let you move the origin of the part to match that of themachine assembly file. These are absolute values in part units from the machine origin tothe part origin.

STEP 4: SELECT RENDERING OPTIONSSelect the options you would like to use during renderingfrom the Render Control Menu.

STEP 5: RUN THE SIMULATIONTo simulate operations, select the operations you want tosimulate, and then use the simulation buttons.

A. Machine Origin at center bottom of the part.

B. Part Origin1. Negative X Value2. Negative Y Value3. Positive Z Value

42

Page 50: Machine Simulation

Using Machine Simulation

MACHINE SIM INTERFACEThe basic interface for Machine Simulation is not very different than the standardGibbsCAM Render Control palette. In fact, the interface is still called Render Control. Thedifferences are the addition of two pull-down selections on the bottom of the palette (ToolDisplay and Run Mode) and the options in the menu. Also different are the results of therendering. The rendered image is an OpenGL-based 3D part capable of zooming, panningand rotating without restarting the render.

Tool Display: The Tool Display option is similar to the traditional rendering option ofshowing an invisible tool, a transparent tool or a solid tool. As with standard rendering, thehidden tool produces the fastest rendering while the solid tool is the slowest of the options.

Run Mode: The Run Mode option shows whether Machine Sim will display the full machinemodel and part (Machine Sim) or show only the part (Part Sim). To use Machine Mode amachine file will need to be selected using the Load Machine option in the Render Controlmenu. If your MDD correctly defines the ToolGroup and Workpiece home positionsMachine Sim can be run in Machine mode without loading a machine file. In Machine

1. Tool Display2. Run Mode3. Render Control

menu

43

Page 51: Machine Simulation

Using Machine Simulation

mode to aid in the visualization of lathe spindles, the spindle will rotate while cuttingduring any lathe turning operation. This rotation is only to assist in showing the directionof rotation.

Render Control Menu: This menu provides control over the appearance and content of theMachine Sim rendering. The Render Control menu is largely the same as the standard andFlash CPR rendering modes. The options in this menu are fully detailed in the section“Machine Sim Rendering Options”.

MACHINE SIM RENDERING OPTIONSSet Op Start/Stop #s... This option opens a dialog to specify an operation at which to startrendering and/or set a stop point where rendering will stop and wait for you to start itagain. The Start At Op option can be used when operations have already been renderedonce and you would like to skip operations you have already seen. For example, you have apart with 10 operations and you know the first 7 operations are correct and render correctlybut need to modify operations 8-10. Using this option you can skip operations 1-7 and startat 8. As long as the tool or operation information for the first 7 operations does not changethe rendering will jump to operation 8. The Stop Before Op option will cease renderingbefore 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 specified in the Set Op Start/Stop #sdialog.

44

Page 52: Machine Simulation

Using Machine Simulation

Stop Before Load/Unload: Placing a check mark on this option activates the Stop Before Opoption. Removing the check mark will disable the stop point specified in the Set Op Start/Stop #s dialog.

Show Time: This will set the Current Display to show the elapsed cut time.

Show Op: This will set the Current Display to show the current operation number.

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

Transparent Fixture: This option will produce atranslucent fixture bodies, providing visualization of areashidden by walls. This option will slow down renderingspeed.

Skip Pecks: This option increases render speed by notshowing small retracts in a drilling operation that usespecks.

Skip Unselected Ops: This option will only render thecurrently selected operations. The operations are stillgenerated. This option simply reduces the rendering time.

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

Collision Checking: This option enables Machine Sim’schecking of collision events. The result of a collision eventis controlled by setting the “Collisions/Limits” parametersunder “Machine Sim Settings”. The tolerances for collision detection are set in thePreferences. 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), theXYZ value of the collision (Location), which operation and which tool is involved, may besaved out as a text file. Additionally, the Prim 1 section details whether a Tool or Holder was

45

Page 53: Machine Simulation

Using Machine Simulation

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

Check Machine Travel Limits: This setting enables Machine Sim to check for any axis motionthat is beyond the limits set in any machine component. If an axis limit is exceeded, acollision event is generated in the same way that it is generated when two componentscollide. The result of an axis limit exceeded event is controlled by the Collisions/Limitssettings in the Machine Sim Settings dialog.

Load Machine: This option allows you to select which machine assembly file will be used forthe current part. Once selected, the same machine will automatically be used for the partuntil a different machine is selected. Clicking User Folder allows you to select a directorythat contains machine assembly files. Select the machine you wish to use and click OK.

46

Page 54: Machine Simulation

Using Machine Simulation

Setup… This option is used if the part file does notlie properly within the machine space. This willoccur if the part’s origin is not at the center andbottom of the workspace definition. To repositionthe part to the machine space define the distancefrom the machine origin to the part origin. Theseare absolute values in part units from the machineorigin to the part origin.

Machine Component Visibility: This option opens a dialog box that lets you control thevisibility of components in the machine assembly file. You may control the componentsindividually and/or by the groups set in Build Machine. As with workgroups and coordinate

A. Machine Origin at center bottom of the part.

B. Part Origin1. Negative X Value2. Negative Y Value3. Positive Z Value

47

Page 55: Machine Simulation

Using Machine Simulation

systems, the eye icon lets you show or hide a component. Additionally you may set it to aspecific transparency level from 0 (invisible) to 255 (solid).

Don’t Preload Subspindles: The initial stock on the subspindle is pre-calculated, by default,anytime Machine Sim is activated or rewound. By selecting this option the calculation ofthe subspindle stock is deferred until after the main spindle cutting has been simulated.This can reduce Machine Sim’s use of system resources and aid rendering, especially onslower machines.

Reload Simulation: This option will restart the Machine Sim session.

48

Page 56: Machine Simulation

Using Machine Simulation

Settings: This option opens the MachineSim Settings dialog. While this dialog isessentially the same as the Flash CPRRendering Preferences, they save separatedata files. These preferences are detailed in“Machine Sim Settings” section begingingon page 12.

Create Facet Body: This function turns thecurrent cut rendered condition into a facet body. The facet bodywill appear in the workspace as a transparent body. One of the fewuses 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 creatingtoolpath but they can be shown in rendering for Flash CPRsessions. Looking at the properties dialog you can see thatessentially nothing can be done but setting the body as a part,fixture or stock. Setting a facet body as stock can be quite useful forsaving a rendered condition so you can instantly get to lateroperations.

49

Page 57: Machine Simulation

Using Machine Simulation

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

50

Page 58: Machine Simulation

Using Machine Simulation

TOOLSSETUPUnderstanding how to properly set up tools and positions is vital to getting Machine Sim torender correctly. This section discusses defining tools for Machine Sim. Information onsetting 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 arelatively standard two turret two spindle MTM-type machine. The MDD for this machinewill handle the tool holder length so the user will not have to calculate the tool tip’sdistance from the mount point. The Use Tool/Holder Length value in the MDD can be setto X0, Y0, Z0 because the mount point is known and specified in the Build Machine Setup(see below). The machine assembly file has been defined with all of the componentsreferenced from the machine CS, #1 in the images below. The turret is defined in the AddComponent dialog box as a rotary axis and the rotation point (#2 below and Figure 14) isreferenced from the machine CS. The turret’s datum point or mounting point for tools (#3below and Figure 15) is set in the Setup dialog box. The point can be set and seen byclicking on the From Selection and Show buttons.

Figure 13: Illustration of the example setup.

51

Page 59: Machine Simulation

Using Machine Simulation

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

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

52

Page 60: Machine Simulation

Using Machine Simulation

We will focus on four basic tool setups: millOD & Face orientations and lathe OD & Face/ID orientations. The image to the right is anexample of the as rendered in Machine Simwith the tools fully set up. We will focus ontools #3 (an OD drill), #6 (a face-oriented millthread tool, #13 (a cut-off tool) and #20 (an IDoriented insert).

A point has been added at the approximatelocation of each tool position that representsthe Spindle/ToolGroup Origin (also referredto as the datum point) when that tool is inposition to cut. Any tool shift information ismade relative to this point. Looking back atFigure 13 we can see more clearly that thedatum point floats in the space for a toolholder or on the face of the turret, dependingon the tool. We can also see that face-orientedtools will need to be offset in Xr to be in placewhile the OD oriented tools will need to be offset in Z. Additionally, other offsets or turretshifts may need to be applied.

Mill ToolgroupsTools are attached to a mill toolgroup during machining when the tool becomes the activecutting tool. The tool is positioned at the location defined by setting the Spindle/ToolGroup Origin in the Setup dialog box of Build Machine.

1. Tool Offset in Xr2. Tool Offset in Z3. Turret Shift in Z4. Turret Shift in Xr

Figure 16: The Turret Shift dialog. It is important to be aware of the difference between the tool offset values and the Turret Shift values.

53

Page 61: Machine Simulation

Using Machine Simulation

For mill toolgroups, the tool should be offset in Z only. There are two methods to define theZ 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 thetoolgroup. The other method is to let machine simulation calculate the Z offset by usingthe 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 isa setting in the MDD that must be turned on. This setting is called “Use Tool / HolderLength” and is one of the toolgroup settings in the MDD. When this option is checked thetool and holder (if available) are positioned so that the tool and holder stick out from thespindle at the spindle face. The tool shift offsets are applied from that default position. Ifthe option is not checked then the tool tip center is shown at the spindle face, offset by thetool shift offsets.

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

54

Page 62: Machine Simulation

Using Machine Simulation

If we were not using the MDD’s capability of calculating the tool & holder length we wouldalso need to add a Z offset. The tool length out of the holder is 1.2 inches and t has a toolholder of some length. We would need to know the gauge length of the holder to calculatethe Z offset properly. In the Turret Shift dialog we would enter an Xr offset value of -1.181and a Z offset of 1.2+(gaugle length) inches.

Mill Tools - ODHere we are using the tool in position #3 as an example. In order to get the tooltip in thecorrect location we need to apply a tool offset value. In this case, as the hole for the holdersis OD aligned, we will need to offset the tool in Z. The distance from the datum point to thecenter of the mount hole is 50mm or 1.9685 inches. In the Turret Shift dialog we enter antool offset value of -1.9685 in Z.

55

Page 63: Machine Simulation

Using Machine Simulation

Lathe ToolgroupsTools are attached to a lathe toolgroup during machine simulation as a result of theinformation in the tool dialog. The tool dialog holds the toolgroup number and the toolposition within the toolgroup. In the setup dialog, enabling the “Has Turret” optionactivates the tool position definition. This allows the machine assembly to storeinformation about the tool positions in a toolgroup. Each position is numbered, and theposition number is matched to the tool dialog position numbers to display each tool in theproper position.

The tool is attached to the toolgroup so that when the tool's position is moved into placefor cutting, the tool is at the tool attachment position of the toolgroup. This attachmentposition is defined by using the Spindle/ToolGroup Origin setting in the Setup dialog box ofBuild Machine.

The tool offset values from the tool dialog is used to adjust the tool position in thetoolgroup from the tool attachment position. This means that if the tool offset values for agiven tool are set to zero, the tool control point (typically the tool insert tip) is displayed atthe tool attachment position. A common place on the toolgroup for the tool attachmentposition is the corner of the turret closest to the spindle that the toolgroup will addressduring machining. The tool offset values are used to position the tool tip at the correctoffset from the tool attachment position, considering the length and width of the toolholder and any tool adapter block or live tool assembly that is required.

Lathe Tools - ODHere we are using tool #13 as an example. In order to get the tooltip in the correct locationwe need to apply a tool offset value. The system automatically aligns the tooltip to the frontof the spindle and sets an offset so the touch off point is correct based on the tool

56

Page 64: Machine Simulation

Using Machine Simulation

thickness. This tool setup is fairly easy, we simply need to enter the tool holder length,which in this case is 4 inches. In the Turret Shift dialog we simply enter an Xr offset value of 4.

Lathe Tools - ID & FaceHere we are using tool #20 as an example. In order to get the tooltip in the correct locationwe need to apply a tool offset value. This tool setup is a little more complex as the toolholder shifts the insert in Z and the distance from the datum point to the center of the

57

Page 65: Machine Simulation

Using Machine Simulation

mount hole is 30mm or 1.181 inches. The holder is three inches long. so we enter a Z offset of3 inches and an Xr offset value of -1.181 in the Turret Shift dialog.

Tools Defined with Tool HoldersAll tools will be defined with holders if the tool is going to be used in Machine Sim, so thatthe tool is displayed connected to the toolgroup.

Mini-Gangs & Extra HoldersIf a tool is ganged or if there is an extra holder block of some sort, you will need to apply aTurret Shift so that Machine Sim is aware of the extra moves the toolgroup must take to getthe tooltip to the correct position.

58

Page 66: Machine Simulation

SCRIPTING

Page 67: Machine Simulation
Page 68: Machine Simulation

Scripting

CHAPTER 5 : Scripting

MACHINE SIM SCRIPTSA simple but powerful scripting/macro capability is available in Machine Sim. Thisfunctionality allows you to create customized Machine Sim motion that simulate themotion of the real machine. These scripted macro programs (called “Scripts”) provide asource for motion that is not known or managed by GibbsCAM at the detail level requiredto show a realistic simulation of utility operations for a given machine. In this way you canspend as much time as is necessary creating a very detailed and specific type of simulationfor the utility operations of a given machine, e.g. to show the movement of tailstock andsteady 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 isencountered during the replay of the operations in the VNC file. Machine Sim scripts canalso be called directly via a command in the At Start Op or At End Op comments of theUtility Data of any operation (e.g. postscript). The script files should be placed in themachine model folder, in a sub folder called “scripts”.

The Machine Sim Scripts are interpreted, meaning that the text file containing the scriptcommands will be read and parsed sequentially (except for conditional commands) at thetime of execution. Each script command will cause a Machine Sim action. The Machine Sim

61

Page 69: Machine Simulation

Scripting

Script language supports local and global variables, simple math operations, andconditional logic commands. The scripting language is not case sensitive.

TYPES OF SCRIPTSThere are five different types of scripts:

Utility Op Start Script: This type of script is executed when a utility op of the same name asthe script is encountered at the start of the first path feature of the utility op. This type ofscript is a “one-shot” script, where all other Machine Simulation motion is suspended, andthe 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 ScriptNames” on page 62

Utility Op End Script: This type of script is executed when a utility op of the same name asthe script is encountered at the end of the last path feature of the utility op. This type ofscript is a “one-shot” script, where all other Machine Simulation motion is suspended, andthe script is run serially. End Scripts are stored in the sub-folder /scripts/endscript. Alist of these scripts can be found in the section “Machine Sim Scripts Utility Op ScriptNames” on page 62

Time-based Script: This type of script is executed when a utility op of the same name as thescript is encountered at the start of the first path feature of the utility op. This type of scriptis a synchronous script, meaning the motion of the script is time-synched to all otherMachine Simulation motion, and the script is run in parallel. Time-based Scripts are storedin the sub-folder /scripts/timebased.

Explicit Script: This type of script is executed when an explicit call to the script is made frompostscript commands in any GibbsCAM operation, i.e. the At Op Start or At Op End utilitydata. These scripts are run as one-shot scripts at the feature containing the runscriptcommand. These scripts are stored in the sub-folder /scripts.

Implicit Script: This type of script is executed by default at particular key points in themachine simulation. Currently this includes a Start Machine Sim script, Change Tool scriptand an End Machine Sim script. These scripts are run as one-shot scripts at the featurecontaining the runscript command. These scripts are stored in the sub-folder /scripts.

MACHINE SIM SCRIPTS UTILITY OP SCRIPT NAMESThe 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 asuffix of _script. They are not case sensitive, but we recommend the use of capitalizationas shown for readability. For utility operations with different subtypes, e.g.LoadSpindleBarFeed_script and LoadSpindleRobot_script, the main utility op type

62

Page 70: Machine Simulation

Scripting

can be used for any subtype. If a subtype script is present, it will be used instead of the mainutility op script.

The current list of Utility operation script names follows.

† designates the Main Utility Op Type

COMMANDSThe scripting language includes the following script commands:

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

MoveTo [Z102] [Z901] -50 Step 10 Delay 50This will move the bodies “Z102” and “Z901” along their axes by -50 units in 10 steps witha 50 millisecond delay between steps.

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

LoadSpindle_script †LoadSpindleManual_scriptLoadSpindleAutoBarFeed_scriptLoadSpindleAutoChuck_scriptLoadSpindleBarFeed_scriptLoadSpindleBarPull_scriptLoadSpindleSubSpinPull_scriptLoadSpindleRobot_script

UnLoadSpindle_script †UnLoadSpindleManual_script UnLoadSpindleAutoChuck_scriptUnLoadSpindlePartCatcher_scriptUnLoadSpindleGripper_scriptUnLoadSpindleRobot_scriptUnLoadSpindlePartDrop_scriptUnLoadSpindlePushOut_script

TailstockIn_script †TailstockOut_script †PosTailstock_script †

SubSpindleOnPart_script †SubSpindleReturn_script †

PartShift_script †PartShiftManual_script PartShiftAutoChuck_scriptPartShiftBarFeed_scriptPartShiftAutoBarFeed_scriptPartShiftBarPull_scriptPartShiftSubSpinPull_scriptPartShiftRobot_script

SteadyRestIn_script †SteadyRestOut_script †PosSteadyRest_script †

CatcherIn_script †CatcherOut_script †PartIndex_script †MoveTool_script †AllStop_script †MachMode_script †

63

Page 71: Machine Simulation

Scripting

GoTo [Z102] [Z901] 0This 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 specified number of milliseconds.

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

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

Load P1 Vis 0Part 1 is loaded invisibly

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

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

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

SetPartVis: Shows or hides a part

SetVar: This command defines a variable and sets its value.

SetVar #InitDist = 5.1the variable #InitDist is defined 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 tomore correctly render the tool change. Normally a tool change occurs just before anoperation. If you are scripting an ATC’s motion to the tool port and back to the part thesystem will, by default, only change to the new tool just before the new op starts. Thiscommand 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. Iteffectively “attaches” the part to a body (the parent body to the P body specified) so that ifthat body moves, the part moves with it, as in the case when a subspindle pulls the part outof the spindle.

64

Page 72: Machine Simulation

Scripting

Reparent P1 P2This assigns the ownership of the part in P1 to the P2 body and its parent.

Conditional CommandsThe scripting language includes the following conditional logic commands.

IFELSEENDIF

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

Debugging CommandsPrint <stuff>: This command writes the contents of <stuff> to the Machine Sim Statisticsconsole (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a scriptexpression can be used as <stuff>.

Print "Z axis position: "PrintLn %ZScript Console output: Z axis position: -43.002149

Print "Tailstock position offset from op z-position target: "PrintLn %Z901 - @ZPositionScript 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 Statisticsconsole (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a scriptexpression can be used as <stuff>. PrintLn adds a line break after <stuff> where Print doesnot.

PrintLn "This is a test."Script Console output: This is a test.

PrintLn 100 * -100Script Console output: -10000

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

65

Page 73: Machine Simulation

Scripting

About Commands and RedrawsThe screen is not automatically redrawn after each scripting command. The behavior is asfollows:

• GoTo and MoveTo do a redraw at the end of the command. MoveTo may do severalredraws, one after each scene it automatically creates have been composed.

• SetPos, SetVis, Load, Unload, Reparent, ChangeTool, SetPartVis may change thegraphic 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 theresults using Redraw when the scene is ready.

• GoTo, MoveTo and Delay may do an automatic redraw at the beginning of thecommand if the graphic state has been changed since the last redraw. This would betriggered by SetPos, SetVis, Load, Unload, Reparent, ChangeTool or SetPartVis.

OPERATORSThe 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 thevariable 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 variableon the right of the /.

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

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

Local variables are formatted as:

#variablename

66

Page 74: Machine Simulation

Scripting

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

&variablename (e.g. &MMToPartUnits)

The following is a list of the defined available global variables.

Global variables can also be user-defined. These are formatted as:

$variablename (e.g. $calcvar1)

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

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

Operation variables are formatted as:

@variablename (e.g.@ZPosition)

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

67

Page 75: Machine Simulation

Scripting

The following is a list of the defined available operation variables.

Variable Utility Op Data Comment

@USERFLOW "UserFlow"@USERWORKPIECE "UserWorkPiece"@MOVESTOOL "MovesTool" This field's presence and contents tell us

that this op moves the tool@ATHOME "AtHome" This field's presence and contents tells us

that this op is at home@STARTOFFPART "StartOffPart" This field's presence and contents tells us

that this tool starts “off part”@ENDOFFPART "EndOffPart" This field's presence and contents tells us

that this tool ends “off part”@CSORIENTS "CSOrients" This field's presence and contents tells us

that this Op’s CS orients the part/tool@ORIENTA "OrientA" If this field exists it contains A orientation@ORIENTB "OrientB" If this field exists it contains B orientation@ORIENTC "OrientC" If this field 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"

68

Page 76: Machine Simulation

Scripting

@CSYNCHED "CSynched"@WITHPART "WithPart"@ZINITFACEPOS "ZInitialFacePos"@ZPOSITION "ZPosition"@AFTERSHIFT "AfterShift"@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"

Variable Utility Op Data Comment

69

Page 77: Machine Simulation

Scripting

POSTSCRIPT COMMANDSMachine Sim Scripts allows for commands that are manually typed into the postscript (theAt Start Op or At End Op utility data) or that are included in an Add Gcode Utilityoperation. These commands include:

SetVar (<variablename> = <value>)RunScript (<scriptname> <variable1> = <value1> <variable2> = <value2> …)

MDD EDITORMDDS• 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 positionedso that the tool and holder stick out from the spindle at the spindle face. The tool shiftoffsets are applied from that default position. If the option is not checked then the tooltip center is shown at the spindle face, offset by the tool shift offsets.

• The axis limits defined in the MDD are used by Machine Builder and Machine Sim.

VMMSVMM defined auxiliary axes: With customization, VMM's are now able to support thedefinition and positioning of axes, such as a subspindle, in the program based on standard

@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

Variable Utility Op Data Comment

70

Page 78: Machine Simulation

Scripting

behavior of utility operations. This allows for motion that does not result from machiningoperations to be handled by Machine Sim without the need for scripts for axes. The VMMdefines axis motion for utility ops that relies on the presence of axes defined in the machinemodel. If the axes are present in the machine model, machine sim will move these axeswhenever a utility operation that controls these axes is encountered. These newly definedaxes will be tracked internally by GibbsCAM and controlled by Machine Sim. In this way,standard motion for utility ops can be programmed either generically or specifically by aVMM, and a resulting motion will occur in Machine Simulation, with or without the use ofan accompanying Machine Sim Script. Additionally, the VMM can specify that a part is tobe reparented in a utility operation. This allows for a smooth, synchronous transition of apart from one spindle to another without the use of special scripts.

Please note that VMM upgrades are required for Machine Sim to function correctly onmulti-spindle machines as scripts cannot handle subspindle moves.

71

Page 79: Machine Simulation

Scripting

72

Page 80: Machine Simulation

MACHINE SIMULATION TUTORIALS

Page 81: Machine Simulation
Page 82: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

CHAPTER 6 : Machine Simulation Tutorials

Tu

tor

ials

BUILD MACHINE TUTORIALIn this tutorial we will create solid models (shown to the right) that will be used for aMachine Simulation machine assembly file. We will start with a pre-existing VNC filethat contains the geometry required to create solid models. These solid models willdefine the machine that will be used by Machine Simulation.

• Open the file “4 Axis Vertical Mill.vnc” found in the Machine Sim - Required folder that is installed with the sample parts.

You will likely be prompted about the system creating an MDD for this file. That is tobe expected, as a custom MDD was created to represent this machine assembly.Without the custom MDD the linear and rotary motions may not be properlydefined.

CREATING THE MODELIndividual ComponentsThis is a Fadal-style 4-axis vertical mill. The table is mounted tothe A Axis which is on the X axis which is on the Y axis. There aretwo existing bodies in the file, “90+0+-90”, the extruded numbers,and “Arrow”. These bodies will help show the rotation of the AAxis.

1. Base2. Table3. A Axis4. Rotary_Body5. X_Axis6. Y_Axis7. Z_Axis8. Spindle

75

Page 83: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Mo

de

l –

In

div

idu

al

Co

mp

on

en

ts

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

Note there is a space in the name.

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

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.

!

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 confirm the rotation is correct when using Build Machine.

76

Page 84: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e 1

st Co

mp

on

en

t

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

CREATING THE MACHINE ASSEMBLYThe 1st ComponentIt is useful to add the models in the order in which they are attached. This will help youkeep things organized. It is logical to add the base of the model first.

• Choose Plug-Ins > Machine Simulation > Build Machine.

When the dialog is first openedthe only entry is “Root”. This item(which is not editable) is the basefor all branches and components.

• Select the Base body and click the Add button.

77

Page 85: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

1st

Co

mp

on

en

t

This will open the Add Component dialog which lets you add the body to theassembly tree.

Note that the Name of the component is the same 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 machinemodel eventually attach to the base, the base shall be used as the basis, the root, ofthe assembly.

• Select the Fixed button.

This states the this model is stationary, based on what it is attached to. Since it isattached to the root, the Base is the foundation upon which all other componentswill move.

• Enter the RGB Color values as shown.

78

Page 86: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e Z

Ax

is

The values Red 100 Green 100 Blue 100 will make the base gray. The color of themodel may seem relatively unimportant, but being able to clearly distinguishbetween 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.

• 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, legitimateentries are X, Y, Z, A, B or C and capitalization is critical.

• Set the color to G 150 B 150.

79

Page 87: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

Sp

ind

le

This is a teal color.

• Click the Transition button.

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

• Enter “1” in the Z text box.

A value is entered in the box that represents the component’s axis. The Direction tellsthe system whether the axis moves in a positive or negative direction from its 0position. Typically only a single axis is selected using an entry of “1” for a positivemove and “-1” for a negative move. All fields that are not used by an axis get a valueof “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 isnot an axis, while 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.

80

Page 88: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e T

oo

l

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 looklike the image to the right. Let’s seewhat the machine assembly looks likeat this point.

• Click the Save button.

• Select a location to save the file and name it “4 Axis Vertical.asy”.

Once you’ve selected a location to savethe assembly file the Test Machinewindow opens, allowing you to view themodel and its axes. Clicking the modelallows you to rotate it with the mouse. The scroll wheel zooms the model.

81

Page 89: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

To

ol

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

The less than buttonmoves the Z axis down whilethe greater than buttonmoves the axis up. If you getdifferent results the Z valueneeds to be changed from anegative to a positive 1.

• Close this window to continue adding components.

82

Page 90: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e Y

Ax

is

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

• 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 alongits axis so that the tool is in a “higher” relative position to the part along the Y axis.

• Click the OK button.

83

Page 91: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

Ro

tar

y B

od

y

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 limegreen 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 left (a negative move) to getthe 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.

84

Page 92: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e A

Ax

is

• Set the color to R 150 G 150, which is yellow.

• Click the OK button.

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.

85

Page 93: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

Pa

rt

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 files inMachine Sim.

• Click the Fixed button.

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

• Click the OK button.

86

Page 94: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

ting

the

Ma

ch

ine

Asse

mb

ly –

Th

e N

um

be

rs

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.

• Set the Parent to A Axis.

87

Page 95: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Cr

ea

tin

g t

he

Ma

ch

ine

Ass

em

bly

– T

he

Nu

mb

er

s

Since the A-Axis moves, thenumbers will rotate with the AAxis, giving a visual clue as towhere the table is. While thearrow and numbers are not a partof the machine, they can behelpful 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 eachmoving section of the machine)and no unattached components.

88

Page 96: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Fin

aliz

ing

the

Asse

mb

ly –

Missin

g C

om

po

ne

nts

FINALIZING THE ASSEMBLYMissing Components• Click the Save button so

we can test our assembly file.

• Resave the existing assembly file.

It would seem that we have aproblem. The A Axis ismissing from the assemblyfile. The problem is that thecomponent has a space in itsname.

• 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 theRoot. We need to change the Parent of the Table component. Changing the name of acomponent breaks associativity, because the system lets you easily swap outcomponents 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.

89

Page 97: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Fin

ali

zin

g t

he

Ass

em

bly

– A

xis

Te

stin

g

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 buttonmoves the part in a negativedirection relative to the tool.Each click on the GreaterThan button represents amove to a position that isgreater than the current Xposition. Each click on theLess Than button represents amove to a position that is lessthan 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.

The Less Than button represents a move to a position that is less than the current Yposition. Each click on the Greater Than button represents a move to a position thatis 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 actuallyrotating in a negative direction. We need to change the Rotation value.

90

Page 98: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Fin

aliz

ing

the

Asse

mb

ly –

Ax

is Te

sting

• 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 negativevalue here. The important thing to remember iswhich item is moving — is it the tool or thetable? Since the moves are relative to thespindle origin the table will move in negative Xso the tool is positioned in a greater X position.If the tool was moving, it would move in apositive X direction to move to a greater X position.

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

91

Page 99: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Fin

ali

zin

g t

he

Ass

em

bly

– S

ett

ing

Ma

ch

ine

Pa

ra

me

ter

s

• Click the Greater Than button next to the A.

The tablenow rotatestoward thepositive Yaxis, or awayfrom ourview whichis correct.Ourassemblyfile works.

• Close the Test Machine window.

Setting Machine Parameters• Click the Setup button.

Certain data regarding the machine must be set. The most important of which is theSpindle Origin.

• 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. Thispoint will be used to load the position.

92

Page 100: Machine Simulation

Tutorials On Machine Simulation – Build Machine Tutorial

Fin

aliz

ing

the

Asse

mb

ly –

Se

tting

Ma

ch

ine

Pa

ra

me

ter

s

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

The other fields 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 file does not represent the limits of the machine’s axes.This and other information including the tool change position is handled by theMDD (Machine Definition Document) associated with the machine. Each machinebuilt with Build Machine must have a custom-built MDD. for more information onthis, see the MDD Editor documentation. In that manual we will make an MDDassociated with this machine.

93

Page 101: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Cr

ea

tin

g t

he

Pa

rt

– L

oa

din

g P

ro

ce

sse

s

MACHINE SIM TUTORIALCREATING THE PARTAbout the PartThis part starts with a stock body, a part model, and three fixturemodels. The part already has four tools and operations. We will loadsome processes and create several simple machining operationsprimarily for visualization of the part. We will then render the partin Machine Sim. The part is set up on a Four Axis Vertical Mill thatrotates about the A axis. As with all tutorials, the part is analuminum alloy. We will be using the Flash CPR rendering for theimages 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-millhole, followed by drilling to the bottom of the hole,roughing the pocket and completing the operations byfinishing the pocket.

Enabling the Show Tool Holder option in the toolbarwill include the mill tool holders in Flash CPR. Enablingthis capability is optional, but can be very useful.

Loading ProcessesWe will now load the processes to finish the machining of this part.

• From the Processes menu select Set Directory… and choose the Machine Sim Required folder.

The Processes menu should nowhave an entry with a sub-menushowing 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.

94

Page 102: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Cr

ea

ting

the

Pa

rt –

Ma

ch

inin

g X

Z B

ac

ksid

e

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.

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

95

Page 103: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usi

ng

Ma

ch

ine

Sim

– M

ac

hin

ing

XZ

Ba

ck

sid

e

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

• Load the MachineSim3 process.

This loads a finish endmill and a process tile.

• Turn on the Profiler.

• Set the machining markers as shown.

Be sure to use the Single Feature Cut function. Offsettingthe 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 probablynoticed that the tools have holders even though we didnot set any. The saved processes include tool holder data.While the holders are not essential for Flash CPR, theyare useful. The display of the holders can be considered crucial when using MachineSim.

USING MACHINE SIMThe Machine Sim product has two primary modes, Part Sim and Machine Sim. Part Simis very useful in that it shows all inter-operation moves of a tool (and holder) around apart, 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 file. Machine Sim howevershows everything about part and the machine’s movement (except tool changes).

96

Page 104: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usin

g M

ac

hin

e S

im –

Pr

efe

re

nc

es

PreferencesLet’s look at our rendering options before we useMachine Sim.

• Deselect all solids.

• Select Machine Sim from the Plug-Ins menu.

When Machine Sim first opens you will see thestock body and fixtures. Unless you havechanged the Preferences, the workspace is agradient rather than black.

The Render Control palette looks almostidentical to the standard dialog but with theaddition of two buttons and a menu,designated by an arrow pointing to the right.

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

This menu provides access to numerous MachineSim options.

• Set the options as shown.

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

• Choose the menu again and select Settingts.

97

Page 105: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usi

ng

Ma

ch

ine

Sim

– P

ar

t S

im

• Select all of the Collision options.

This will let us know in several ways ifwe happen to experience a collision.A collision is interference betweenthe tool or holder and any part of themachine or a fixture. Cutting toodeep into a part is not a collision, thatis a gouge.

The Cutting values can be adjusted tobetter match the power of yourcomputer or the desiredresponsiveness versus renderingspeed.

• Close the Settings when you are done.

Part SimMachine Sim can be used without amachine assembly file. This mode isreferred to as “Part Sim” or “Part Mode”.If a machine is not loaded, Machine Simautomatically uses this mode. Part Simcan also be selected if a machine isloaded. Let’s look at Part Sim before we load a machine. We will render the part usingPart Sim first for familiarization.

• From the isometric view, zoom out a little and move the part so that the fixture is at the bottom of your window.

Zooming out will allow you to see the tools and holders better.The transparent stock and fixtures allows us to see what thetools 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).

98

Page 106: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usin

g M

ac

hin

e S

im –

Pa

rt S

im

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

• Render the operations.

If the rendering is too slow, move the Speed Control toa faster speed. Note how you can see all of the cutstock.

• 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, clickand hold the wheel down. Then movethe mouse to rotate the current view.

Like standard CPR, Part sim showsthe tool moving about the part. Nowlet’s get into Machine Sim, where wesee how things really are.

99

Page 107: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usi

ng

Ma

ch

ine

Sim

– L

oa

din

g A

Ma

ch

ine

Loading A MachineBefore Machine Sim can be used, a machineassembly file must be selected. If you aregoing to create your own machine assemblyfile and have not done the “Build MachineTutorial” on page 75 it is recommendedthat you complete that tutorial beforecontinuing this tutorial. For information oncreating a machine assembly file see thechapter “Using Build Machine” starting onpage 17. If you will not be creating your ownmachine assembly (i.e. someone else inyour company is tasked with thatresponsibility), we have included acompleted version of the machine assemblythat 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 find and select machineassembly files. By default the system will find any assembly files stored in theInstallation folder (..\Program Files \Gibbs\GibbsCAM\[#]\MachineSim) or theApplication Folder (..\ Documents and Settings\All Users\ ApplicationData\Gibbs\GibbsCAM\ [#]\MachineSim). Additionally, you can specify a directorywhere you choose to store your machine models.

100

Page 108: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usin

g M

ac

hin

e S

im –

Se

tting

the

Pa

rt O

rig

in

• Click the User Folder button.

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

• Select Machine Sim Tutorial Machine and click OK.

The Gibbs window will include the machine model but we have something to takecare of first.

Setting the Part OriginWhen Machine Sim is activated it checks to see if a part has been used with the machinebefore. This is because the part and the machine need to have matching origins. toensure 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 leftcorner it is not centered on the table — it istoo far in +X and +Y. We need to move it tothe center of the part, which in this case ishalf the size of the 40x40mm part.

101

Page 109: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usi

ng

Ma

ch

ine

Sim

– M

ac

hin

e S

im R

en

de

rin

g

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

The part should be centered on the table. It is veryimportant that the system knows where the part origin isrelative to the machine’s origin. Not defining this properlycould lead to interference between the tool and themachine or part. If you do not properly define where thepart is upon first activating Machine Sim, you can alwaysselect the Setup… option from the Machine Sim menu onthe Render Control palette.

Machine Sim RenderingWhen Machine Sim is first activated, the spindle should beempty. 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 bythe system. Note that selecting the transparent tooloption applies to both the tool and holder.

When the operations on the front face need to berendered the table moves down in Y and the A Axisrotates into position. Throughout the renderingprocess the X and Y axis move as needed. Note thateven the threads are rendered.

102

Page 110: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usin

g M

ac

hin

e S

im –

Ma

ch

ine

Sim

Re

nd

er

ing

When the operations on the back need to be rendered thetable moves up in Y and the A Axis rotates into position.When complete the rendering process stops at the end ofthe operations. Sending the tool home and unloading thetool is not rendered as that is not a part of the operations wedefine.

• 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 file requires a custom post for the machine.

103

Page 111: Machine Simulation

Tutorials On Machine Simulation – Machine Sim Tutorial

Usi

ng

Ma

ch

ine

Sim

– M

ac

hin

e S

im R

en

de

rin

g

104

Page 112: Machine Simulation

INDEX

Page 113: Machine Simulation
Page 114: Machine Simulation

Index

NUMERICS3D vector definition: 32

AAdd button: 24, 29Add Component dialog: 24, 29, 31, 34–35Alert Types, of collisions: 14Assembly, of components: 20At End Op: 61At Start Op: 61Axis

auxiliary, def. by VMM: 70Defining & assigning: 11Increment: 27–28Label: 31Testing the model: 35Type: 27

Axis Limits: 33–34, 46, 70Axis motion, of Utility Ops: 71Axis Type: 28

BBuild Machine: 5, 19, 25

CCAD application: 20ChangeTool command: 64, 66Check Machine Travel Limits: 46Collision Checking: 28, 45Collision events: 45–46Collisions: 13–14

Alert Types: 14Detection: 34

Color: 31Comment field: 31Components: 19–20

Component Groups: 14, 28–29Component Movement: 24, 34Component Type: 31Editing: 19, 24Name of: 31

Coordinate Systems: 20Create Facet Body: 49CS requirements: 22Cut Part Rendering: 5

DDatum point: 51–53Define Custom Colors: 31Delay: 66Delay command: 64Delay, in MoveTo: 63Don’t Preload Subspindles: 48

EEdit components: 19, 24Explicit Script: 62

FFirst, turret position: 27Fixed component: 31Flash CPR: 5From Selection: 32

107

Page 115: Machine Simulation

Index

GGanged Tools: 58GoTo: 66GoTo command: 63Greater Than button: 35

HHas Limits: 33Has Turret: 26, 56Home position: 22

IImplicit Script: 62Inter-Operation Moves: 5

LLathe parts: 23Length Out of Holder: 54Less Than button: 35Load command: 64, 66Load Machine: 41, 43, 46

MMachine assembly: 14Machine Component Objects: 14Machine Component Visibility: 47Machine CS: 20Machine Mode: 5, 43Machine Parameters dialog: 23Machine Sim: 5, 43

Machine Space: 47Machine Tool: 5, 19MachSim Axis: 27MDD: 11, 70Mill parts: 23Model Tree: 19, 23, 25, 29Moves, intra-operation: 11MoveTo: 66MoveTo command: 63, 66MTM parts: 23, 26MTM, Machine Parameter checkbox: 26

NNames, of components: 20, 31Non-Cutting simulation: 45Non-machine components: 14

OOpenGL: 43Origin: 20, 22

PParent: 29–30Part Body: 22–23

Labels: 26Part Mode: 5Part Origin: 47Part Sim: 43Part units: 22P-body: 22–23Pivot distances: 11

108

Page 116: Machine Simulation

Index

Plug-Ins menu: 5, 23, 41Position, tool in turret: 28Postscript: 61, 70Preferences: 49Prim 1: 45Prim 2: 46Primary Value, axis position: 28Primary Value, turret position: 27Print command: 65PrintLn command: 65

RRedraw command: 64Reload Simulation: 48Remove button: 24Render Control: 41, 43

Menu: 44Reparent: 66Reparent command: 64Reposition the part: 47RGB: 31Root: 23Rotary axes: 11Rotation: 32Rotation component: 31Run Mode: 43

SSave button: 24, 35Scripting: 61–63, 71

Conditionals: 65Operation Variables: 67–68Operators: 66

Redraws: 66Utility Op Script Names: 63Variables: 66

Scripts, types of: 62Secondary Axis, turret position: 27Secondary Value: 28Select machine assembly: 46Set Op Start/Stop #s: 44SetPartVis command: 64, 66SetPos command: 64, 66Setup button: 23, 26, 47Setup…: 42SetVar command: 64SetVis command: 64, 66Show Op: 45Show Time: 45Skip Pecks: 45Skip Unselected Ops: 45Spindle Origin: 26Spindle, part holding: 11Spindle/ToolGroup Origin: 51–53, 56Start At Op: 44Step, turret position: 27Stock body: 22Stop Before Load/Unload: 45Stop Before Op: 44

TTable, axes and: 11Test Axis components: 34Test button: 24Test Machine window: 35Time-based Script: 62

109

Page 117: Machine Simulation

Index

TMS: 6Tolerance, of collision settings: 14Tool

Display: 43invisible, transparent or solid: 43

Tool Display: 43Tool Holder Length: 51Tool Holders: 58Tool Motion on Target Body: 5, 45Tool Movement: 5Tool Offset

Lathe: 56Mill: 54

Toolchanges: 11ToolGroup: 11

Count: 26Origin: 26

ToolGroup spinner: 26Tools, defining: 51Translation: 32

Component: 31Transparent Fixture: 45Transparent Stock: 45Turret Shift: 58

UUnload command: 64, 66Use Op Stop: 44Use Tool / Holder Length: 70

from MDD: 54Use Tool/Holder Length: 51Used for Collision Checking: 28Utility Data: 61Utility Op End Script: 62

Utility Op Start Script: 62Utility Operations: 71

VVariables

Global: 67Global, user defined: 67Local: 66Operation: 67

Visible, compenent setting: 31VMM: 70

WWorkpiece: 11, 22

Count: 26

ZZero position: 33

110