Machine Simulation GibbsCAM 2007 September 2007
Proprietary Notice This document contains propriety information of Gibbs and Associates and is to be used only pursuant to and in conjunction with the license granted to the licensee with respect to the accompanying Gibbs and Associates licensed software. Except as expressly permitted in the license, no part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, electronic, magnetic, optical, chemical, manual or otherwise, without the prior expressed written permission from Gibbs and Associates or a duly authorized representative thereof. It is strongly advised that users carefully review the license in order to understand the rights and obligations related to this licensed software and the accompanying documentation. Use of the computer software and the user documentation has been provided pursuant to a Gibbs and Associates licensing agreement. ©2004-2007 Gibbs and Associates. All rights reserved. The Gibbs logo, GibbsCAM, GibbsCAM logo, Virtual Gibbs, Gibbs SFP, MTM, SolidSurfacer, and “Powerfully Simple. Simply Powerful.” are either trademark(s) or registered trademark(s) of Gibbs and Associates in the United States and/or other countries. Windows Vista and the Windows logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. All other brand or product names are trademarks or registered trademarks of their respective owners. Contains Autodesk® RealDWG by Autodesk, Inc., Copyright © 1998-2006 Autodesk, Inc. All rights reserved. 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 Associates 323 Science Drive Moorpark, CA 93021 Modified: August 29, 2007 5:38 pm
Table of Contents
Table of Contents INTRODUCTION
1
About Machine Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Comparison of rendering modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
SET UP
7
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Build Machine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Machine Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Clearance Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 About the MDDs and the MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Home Position - Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Home Position - Lathes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Machine Sim Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Cutting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Collisions/Limits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Feature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
USING BUILD MACHINE
17
Using Build Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Create the Machine Tool CAD Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Spindles & Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 ToolGroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Build The Machine Tool Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23 Build Machine Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Setup dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Machine Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Component Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Axis Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Add Component dialog box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Component Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Test Machine dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 Naming Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Axis Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 i
Table of Contents
MTM Axis Labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
USING MACHINE SIMULATION
39
The Basic Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Step 1: Activate Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Step 2: Select a machine tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Step 3: Update the Part. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Step 4: Select Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Step 5: Run the simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Machine Sim Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Machine Sim Rendering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 Setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 Mill Toolgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Lathe Toolgroups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Tools Defined with Tool Holders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Mini-Gangs & Extra Holders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
SCRIPTING
59
Machine Sim Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Types of Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Machine Sim Scripts Utility Op Script Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Conditional Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Debugging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 About Commands and Redraws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 PostScript Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 MDD Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 MDDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 VMMs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
MACHINE SIMULATION TUTORIALS
73
Build Machine Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Creating the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Individual Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Creating the Machine Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 The 1st Component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 The Z Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 The Spindle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 ii
Table of Contents
The Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 The Y Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 The X Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 The Rotary Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 The A Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 The Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 The Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 The Arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 The Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Finalizing the Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Missing Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Axis Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Setting Machine Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Machine Sim Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Creating the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 About the Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Loading Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Machining XZ Plane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Machining XZ Backside . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Using Machine Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Preferences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Part Sim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Loading A Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100 Setting the Part Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Machine Sim Rendering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
INDEX
105
iii
Table of Contents
iv
INTRODUCTION
Introduction
CHAPTER 1 : Introduction ABOUT MACHINE SIMULATION The Machine Simulation option is a 3D representation of a Machine Tool, the parts and cutting tools which supplements the standard rendering component of GibbsCAM. Machine Simulation provides a machine-centric view of what is happening as opposed to the standard rendering which is part-centric. Also included with this option is Machine Builder, a tool to create the models that represent the machine tool. Machine Simulation supports lathe, mill, Mill/Turn, Advanced CS, rotary mill, Tombstone Machining System and most Multi-Task Machining parts. 1. A solid model to be cut 2. Solid model of a Machine Tool 3. As assembled machine tree in Machine Builder 4. Machine Sim in action
3
Introduction
Figure 1: Example of a machine assembly file and a part being rendered with Machine Simulation.
4
Introduction
OVERVIEW Machine Simulation is accessed from the Cut Part Render button on the main palette or the Plug-Ins menu. Build Machine opens the interface for defining and creating a machine tool while the Machine Sim option activates the Machine Simulation rendering mode. Typically a machine tool needs to be created before using Machine Sim but it may be used without a machine tool model in Part Mode. At first glance Part Mode may seem to just be Flash CPR. In fact it is not. Using Machine Sim in Part Mode will display all inter-operation tool moves that Flash CPR (and the standard rendering) does not display.
COMPARISON OF RENDERING MODES Machine Sim is very different than the traditional GibbsCAM rendering (“CPR”) and is not the same as Flash CPR. Flash CPR is fairly similar to the traditional rendering except for the actual image in that it uses the same part-centric toolpath display as traditional rendering. Machine Sim rendering in Part Mode (see “Run Mode” on page 43) displays the interoperation moves that CPR and Flash CPR do not show. Machine Sim in Machine Mode can include an actual machine model. Additionally, a function that simply shows the tool movement across a model without rendering material removal (“Tool Motion on Target Body”) is very useful and not found in Flash CPR. This function will significantly speed up the machining display.
Traditional CPR
Flash CPR
“Part Mode” Machine Sim “Machine Mode” Machine Sim
While Flash CPR and Machine Sim may appear similar, their uses are different. A key difference is the Machine Sim capability to display the inter-operation moves of a tool. 5
Introduction
Flash CPR may be faster than Machine Sim as it does not have to render an entire machine model and the moving axes. You may find that when checking your part file you use several or all of the rendering types (standard CPR, Flash CPR and Machine Simulation), depending on your needs.
Flash CPR without Machine Sim
Machine Sim in “Part Mode”
Machine Sim, in either mode, will show all of the part instances in a TMS multi-part setup where standard CPR and Flash CPR only show the single part as programmed in the VNC file.
TMS rendering with Flash CPR
6
TMS rendering with Machine Sim
SET UP
Set Up
CHAPTER 2 : Set Up OVERVIEW Machine Simulation does not really affect part set-up, except that each machine assembly requires a custom MDD, which can streamline some of the choices you make when setting up a part including the rotary set-up and the post processor selection.
BUILD MACHINE With Build Machine we will be creating a machine assembly file that represents a machine tool. The representation of the machine can be as simple as just a base, each axis and primary components, such as the table, or it may be very complex, down to modeling the control’s buttons and dials. The level of complexity is up to you. When creating the model you should be sure to create a workspace big enough to contain the entire machine.
Figure 2: Examples of machine models. Some are very complex, others are very basic. All machines must be defined in millimeters but the part can be inch or metric. The machine assembly will be scaled to work with inch parts.
9
Set Up
MACHINE SIMULATION Clearance Planes The MDD associated with a machine should reflect the machine’s and the post’s retract behavior so that Machine Sim shows what will really happen on the machine. For most posts the tool will go home, in some cases the render will only show ZCP1.
Figure 3: Example of a machine whose Tool Change Position and Tool Holder Class are defined in the MDD and are not userdefinable. The Master Clearance plane is still definable.
MDDS Each machine assembly that is created must have an custom MDD that defines that machine including the tool change position, the range of motion of the axes and other data. In the case of many fairly simple machines you can start with an existing, standard MDD and modify the data to fit the machine. Whenever the MDD is selected in the Document Control dialog, the accompanying machine assembly file will be the default machine for Machine Sim. The MDD should be reviewed after you have created the machine assembly file. It is important that the MDD and machine assembly file be consistent in terms of axes definition. This includes number and type of axes, the axes position, orientation and order. See the MDD Editor documentation for information on creating an MDD. In addition to the default machine, the MDD for a Machine Simulation model can set other information. For example, the rotary information for a 4 or 5-axis machine will be predetermined, meaning that it does not need to be set each time a part is created. The tool change position may be pre-set, depending on your machine and preference. Also, the default post processor is set by the Machine Sim MDD. 10
Set Up
ABOUT THE MDDS AND THE MDD EDITOR The axes definition in the MDD must be consistent with the axes definitions in the machine assembly which is created using Build Machine. In particular the number and type of axes must match. If an axis is attached to the machine's table (for a mill) or part-holding spindle (for a lathe) in the machine assembly, then it must be defined in the MDD as being assigned to the workpiece (i.e. not assigned to the toolgroup). Conversely, if an axis is attached to the machine's tool or toolgroup in the machine assembly, then it must be defined in the MDD as being assigned to the toolgroup (not to the workpiece). If there are two rotary axes that are connected to each other (i.e. both are on the table, or both are on the too), then the mounting order in the MDD must match the parent/child relationship defined in the machine assembly. For example, if the A axis is mounted on the B axis in the MDD, then the corresponding A axis must be a child of the B axis in the machine assembly. Other areas to review for MDD/machine assembly consistency include: pivot distances (i.e. rotary axes locations), axes directions including positive/negative for both linear and rotary axes, and axes names. The MDD also defines behavior and positions for tool changes and other moves between operations. Many of these moves are not displayed in Cut Part Rendering, but all moves are displayed in Machine Simulation, so it is important that this information be correct in the MDD if any part using a particular MDD is going to be used in Machine Simulation. This includes tool change settings like axis priority, axis touchingly position type (e.g. full retract, preset position, user defined), and axis touchingly position. It also includes same tool rotation settings like axis move order and position.
Home Position - Mills This class of machines includes 3, 4 and 5-axis mill machines where the part sits on a table. The “Home Position” for toolgroups in the MDD Editor is measured from the machine’s origin in Build Machine which is the axis center of rotation or pivot point the table is attached to. In the MDD the Home Position is defined as the distance from the pivot point to the spindle origin. In the Build Machine this is the distance between the part origin to the pivot point.
Home Position - Lathes This class of machines includes anything with a part that can spin. The “Home Position” is the center of the spindle face. All values should be referenced from here.
11
Set Up
1. 2. 3. 4.
Pivot Point Spindle Origin Part Origin Pivot Point
Figure 4: Machine positions required for the MDD Editor.
MACHINE SIM SETTINGS Machine Sim Settings are accessible two ways, either from the Machine Sim Render Control palette’s contextual menu or from the File > Preferences menu. When the Machine Sim Render Control palette is open the Edit Flash CPR Settings… button opens the Machine Sim Settings dialog box. The Machine Simulation and Flash CPR preferences are essentially identical but save separate preference data. The Common Reference manual discusses these preferences in detail from a Flash CPR Preferences point-of-view.
CUTTING The cutting options section allow you to control the quality and responsiveness of Machine Sim. Please note that the Machine Sim preferences are stored with the part. This means that if you change the preferences but open a part that has an older set of preferences, it will override the changes you have made. Steps Per Update: Steps per Update specifies the maximum number of CPR features to render before updating the display. Large numbers will increase the rendering 12
Set Up
speed but will result in a rougher rendering animation. With large numbers the tool may appear to jump ahead of rendering, which will suddenly snap to the tool. This may be jerky, but can be rather fast. A low number provides a smooth animation, but may be slow. Cut Part Chord Height: This setting is the resolution for the cut part displayed in Flash CPR. The smaller the value, the higher quality of the display and the more resources needed by the system, resulting in a slower rendering. There are separate settings for inch and metric parts. The separate values can only be set from within a part of that unit type.
Chord Height
Body Chord Height: This option determines the resolution of bodies (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 % of Body’s Chord Height option. This second option uses the value set from the Properties dialog, (accessed by right-clicking on a body.) A setting of 100% will use the body’s Chord Height while a setting of 10% is 1/10th of the body’s Chord Height while 1,000% is 10 times the body chord height. Any percentage between 1 and 100,000 is acceptable. As the percentage is set higher the body will appear rougher but the display will be faster and lower percentages mean higher quality but slower response. Note that this setting only affects on-screen display, not the actual machining.
COLLISIONS/LIMITS
The items found in the Collisions/Limits section of the dialog provide control over how the system reports collision errors while rendering. Any combination of the alert methods may be used to inform the user when a collision occurs.
!
Please note that the Collision Checking option (found in the Render Control palette’s menu) must be activated for the system to check for collisions.
A collision in Machine Simulation occurs whenever any two objects contact each other during the simulation that are not supposed to touch. Objects in Machine Simulation 13
Set Up
include machine components and non-machine components. Machine components are objects in the machine assembly that are defined by Build Machine. Non-machine components are not in the machine assembly, but are created by Machine Simulation based on information in the GibbsCAM part file. These objects include tools, holders, fixtures, parts, and stocks. The active cutting tool and its holder always participate in collision detection when collision detection is activated. Other objects participate in collision detection based on their inclusion in collision component groups. Collision component groups are component groups with their collision setting turned on. See “Component Groups” on page 30 for more information. Non-machine objects are automatically included in component groups based on their logical attachment to an object in a component group. For example, a tool and tool holder are logically attached to a turret by virtue of their assignment to a particular toolgroup and tool position in the tool definition dialog in GibbsCAM. A part/stock is assigned to a spindle or chuck in the machine assembly because of the part body (P-body) that is defined in 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 of the following conditions occur: •
The cutting portion of a tool contacts the part/stock while in rapid mode
•
The non-cutting portion of a tool or holder contacts the part/stock while cutting
•
Any object that is part of a collision component group contacts any object that is part of a different collision component group
•
Any axis position exceeds the axis limit as defined in the machine assembly for any of the machine components with axis limits (min/max).
Alert Types: You may choose any or all of the various feedback methods that alert you to a collision. The Beep option provides an audible alert, Log To Display will output an error in the Clash Console log window and Stock Flash provides a visual alert to the error by flashing the rendered stock. Stop Animation will cause the rendering to stop when a collision is detected. Tolerance: The Tolerance setting allows a different value for metric and inch parts. Any collision within the specified tolerance will generate a collision alert.
SLIDER The items in this section affects the responsiveness and quality of the rendering by controlling the maximum step distance between features in rendering. These values are 14
Set Up
Figure 5: The Clash Console output showing a tool clashing with the stock and a fixture. used with the speed slider on the rendering palette. The fastest speed jumps the tool from feature to feature using these settings. Lowering the speed will scale the distances between features. Please note that this does not affect toolpath, only the rendered part. These settings can have a very large impact on the rendering speed versus quality. Length: The Length value sets the maximum distance between rendered linear moves. Let us imagine a linear cut where the tool will traverse 400mm in a straight line. Using the default settings of 200mm, the display will show this move in two steps when the slider is set to its maximum (fastest) value. If the linear cut was less then 200mm long the rendering shows the cut in one step, at the start and end of the cut.
Angle: The Angle values can have an especially big impact on rotary operations. Like the Length setting, this value controls the rendering steps between features, in this case for angular moves. A low number will create very small angles in rotations, resulting in a smooth image while a high number can create a rendered part that is not smooth but is very fast. Auto Range: This option will disable the Length values and will instead use the size of the stock (length, width and height separately) to set the maximum feed and rapid lengths. The maximum value for feeds will be set to 1/10th of the largest stock dimension and rapids are double that value. The smallest step that the system will take when rendering is 1/100th of the smallest dimension of the stock.
FEATURE Circular Threads: This option renders “circular” threads rather than proper spiraled threads. Enabling this option will render threads much more quickly. 15
Set Up
STATISTICS
When the Statistics option is enabled a window opens when you activate Machine Sim. The window logs the current framerate for your machine as well as any logged errors for the CPR session.
16
USING BUILD MACHINE
Using Build Machine
CHAPTER 3 : Using Build Machine USING BUILD MACHINE Build Machine is used to define and create an assembly model of a machine that can be used with the Machine Simulation product to create a highly accurate visualization of a part program created in GibbsCAM. Build Machine is used after a solid model has been created of the machine tool and all of its relative components. The components are then added to Build Machine, defining the hierarchical structure (the model tree) of the machine and how its components move. After adding all the components, the tree should look similar to the image to the right, with several branches representing different moving parts. Right clicking on an entry opens a context menu that provides the ability to Edit a component (using the Add Component dialog), Delete a component or Show the component in the workspace. Double clicking a component in the tree will show a solid and can collapse or open that branch of the tree.
CREATE THE MACHINE TOOL CAD MODEL The first step to using Build Machine is to create a GibbsCAM part which contains individual solids representing each axis and major component of the machine tool. This is
19
Using Build Machine
an assembly of the components. Note that the solids may be created in another CAD application and imported into GibbsCAM. 1. 2. 3. 4. 5. 6. 7. 8. 9.
Base X Axis Y Axis Z Axis Rotary Body A Axis Table Head Spindle
Figure 6: An example of a machine tool assembly. For convenience, it is recommended that each body is given a descriptive name such as “Y_axis”, “Spindle” and “Table”. If a body will represent an axis, giving the body the name of the axis will make things easier when building the assembly of components. The origin for the machine model is very important as it is a reference for several values. A coordinate system must be created that represents the spindle or table face. The origin of the CS should be at the spindle face origin or the top-center of the table. The CS should be aligned as the machine is, i.e. if the machine is off vertical by 30 degrees, so should the Machine CS. This CS will be referred to as the “machine origin CS” throughout this
20
Using Build Machine
document. All of the bodies in the assembly must be assigned to this “machine origin” coordinate system.
Figure 7: Example of a machine’s XY plane (A) and Machine CS plane (B) where the horizontal and vertical axes are shaded for emphasis. The Machine CS plane is used for alignment of bodies and for all reference values.
21
Using Build Machine
Make sure to define the part origin at a location that is easy to identify on the machine tool, for example the center of the table or the spindle face for lathe-type machines.
T I P S
•
The part model must be in millimeters.
•
For mill parts it is easiest to define the center of the table at the origin and then create the non-moving bodies.
•
For lathe, mill/turn and MTM setups it is easiest to define the spindle face at the origin and then create the non-moving bodies.
•
All bodies should lie in the same coordinate system, CS1 or ideally a CS that is aligned to the spindle face or table top.
•
Each moving part should be created in its home or “0” position.
•
Create Points and Lines to identify the center location and direction of the rotary axes.
•
Create a point identifying the tool attachment position. For a mill this is the spindle face, for a lathe this is the place on the turret where the tool holder attaches.
•
When the MDD Editor setting Use Tool Holder Length is active the Z axis position will be corrected automatically during simulation to take in account tool/holder length & tool attachment position.
SPINDLES & PARTS Machine components that hold a workpiece (part and/or stock) require special definition in the machine assembly. This is so that Machine Simulation knows how to position the workpiece during simulation. A special machine component called a Part Body (P-body for short) must be 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 another component that moves. The P-body is a machine component made from any solid body (usually a cylinder or a rectangular solid) and is given an label of P or Px, where x is any integer number. This special P naming tells machine simulation that the P-body is not to be displayed directly in the simulation, but the P-body is to be replaced by the actual machined part/stock during the simulation.
22
Using Build Machine
Mill machines: For a mill it is typical that the P-body is a child of the machine component representing the machine's table, meaning that it is attached to the table. Lathe machines: For a lathe, it is typical that the P-body is a child of the machine component representing the machine's part spindle (or collet, bushing, or chuck). MTM setups: For MTM machines, it is possible that there will be more than one P-body, corresponding to the number of parts that can be machined simultaneously in the machine.
TOOLGROUPS Understanding how to properly set up tools and positions is vital to getting Machine Sim to render correctly. The method for displaying tools in machine simulation is different depending on whether the machine is a mill or a lathe. For this discussion, “lathe” includes all lathe machines, Mill/Turn machines, and MTM machines, as defined by the MDD. Mill machines: Mills will only show the currently active tool, which is the tool that is loaded in the tool spindle at any given time. See the section “Mill Toolgroups” on page 53 for more information. Lathe machines: Lathes will typically show all tools that are loaded into the lathe's toolgroup(s) at the start of the NC program. One exception to this is that a lathe can have a toolgroup defined as a mill-style toolgroup, commonly known as an Automatic Tool Changing head or ATC. An ATC toolgroup in a lathe will display tools in the same way that a mill will display tools, namely, to show only the currently active tool at any given time. Defining a toolgroup as an ATC in a lathe involves turning off the “Has Turret” setting in the machine setup dialog in Build Machine. See the section “Lathe Toolgroups” on page 56 for more information.
23
Using Build Machine
BUILD THE MACHINE TOOL ASSEMBLY Start Build Machine which is found in the Plug-Ins menu. When first run in a file the assembly tree contains only a Root entry. Setup: The Setup button opens the Machine Parameters dialog (see “Setup dialog box” on page 27) which lets you define Machine Parameters including the spindle origin and the tool change position. Add: The various components that define a machine will have to be added to the root of the assembly by selecting a solid and clicking the Add button. Once Add has been clicked the Add Component dialog opens (see “Add Component dialog box” on page 31), which provides you with the capability to define
24
Using Build Machine
what the body represents and any movement associated with the component. Right clicking an entry in the tree lets you edit a component once the parameters have been set.
Figure 8: Example of starting an assembly tree. Remove: The Remove button will delete a selected component from the assembly tree. Test: The Test button opens a window that lets you view the assembly and test the machine’s moving parts to ensure the proper motion. 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 INTERFACE The Build Machine option allows you to create a model of a machine tool. Each component (the base of the machine, the table, etc.) is defined as a solid model and added to the Build 25
Using Build Machine
Machine dialog. As the components are defined the Build Machine dialog will create a tree that defines the machine tool and its parts. When ready to be saved, the model’s moving parts can be tested. Once complete, the model will be available for Machine Simulation.
Figure 9: The Build Machine window in its initial state and with components added. In addition to the Build Machine window, there are several other windows and dialog boxes that are used to define a machine. These are all accessed from the Build Machine window and are described in the following sections. These include the Setup dialog box, the Add Component dialog box, and the Test Machine dialog box.
26
Using Build Machine
SETUP DIALOG BOX This dialog box is opened when the Setup button is clicked. The Setup dialog box is used to set various machine parameters such as the spindle or toolgroup origin, the number of toolgroups and workpieces, and to control grouping of assembly components.
Machine Parameter MTM: This item is selected if the machine being created will be used for lathe, mill/turn or MTM. It activates the toolgroup count and interprets the spindle/toolgroup as a toolgroup tool attach position. If this option is not checked the setup is for a mill. ToolGroup Count: This is the number of toolgroups on the machine. The origin of each toolgroup needs to be defined separately. ToolGroup: This item lets you index between the toolgroups so that they can be fully defined.
27
Using Build Machine
Workpiece Count: This is the number of workpieces on the machine. The origin is a milling spindle. The model should contain a part body, either with the label “P” for a mill or simple lathe setup or with the label “Px” where “x” is an integer between 1 and 100. Spindle/ToolGroup Origin: This item is used to define where the tool or holder attaches to the spindle. This item must be defined and the easiest way to do so is to create a point in the part file that lies at the spindle origin using the From Selection button. From Selection button: Clicking this button loads the coordinates of a selected point that represents the origin. The CS used by the points in these parameters should be the same one that the bodies used by the machine components are assigned to. Show button: When this button is clicked a crosshair will be displayed at the Spindle or ToolGroup origin. Has Turret: This item is used if the machine has a turret or in MTM if the ToolGroup being defined is a turret. This item activates the Positions button which lets you define the position of tools in a turret on the machine. Positions button: This button opens the Turret Positions dialog box which lets you define, among other things, the type of turret and how many tool positions it has.
Turret Positions
This item lets you define a turret by setting how many tool positions are on the turret, what position they are in and the axis of motion the turret moves in. Count: This is how many tool positions are on the turret. First: This is the angular position of the first tool. Step: This value is the angular step to the next tool position.
28
Using Build Machine
MachSim Axis: This uses the axis label assigned to the turret in the Add Component dialog box. To create a turret you add the turret solid as a component, and give it an axis label and a vector. The turret will turn around the vector, and axis label needs to go here to get it to move correctly. Axis Type: Choose the way the turret indexes from one tool to the next. The options include Rotary/Shortest (the machine indexes in the shortest possible direction), Rotary + (the machine indexes only in an incremental angle), Rotary – (the machine indexes only in a decremental angle) and Linear. Axis Increment: This is the angle or linear distance between tools that the turret must take to index from one tool to the next. Advanced Setup Selecting this option allows you to set a custom Primary Value for each turret position, as defined by the “Count” setting. This is required if the tool positions are note evenly spaced in the turret or spindle. Activating the Secondary Axis option allows you to define an additional axis that the toolgroup uses to move tools into position. Position: This is the tool position being defined, e.g. tool position 3 on a slide. Primary Value: This is the primary axis position for the tool position being defined. Secondary Axis: This item is used for any toolgroup where one axis is not enough to define the motion needed to position the toolgroup from one tool to another, such as a mini-gang on a slide. Axis Type: Choose the way the turret indexes from one tool to the next. The options include Rotary/Shortest (the machine indexes in the shortest possible direction), Rotary + (the machine indexes only in an incremental angle), Rotary – (the machine indexes only in a decremental angle) and Linear. Axis Increment: This is the angle or linear distance between tools that the turret must take to index from one tool to the next. 29
Using Build Machine
Secondary Value: This is the secondary position for the tool being defined, e.g. tool position 2 in a mini-gang.
Component Groups The Component Groups function allows you to group machine components together. The grouping has two uses. The first use is for collision checking, the second use is for controlling component visibility. By default there are two groups. Right clicking on the group list allows you to Add, Edit or Delete a group.
Figure 10: Setting up a Component Group.
Collision Checking
The Used for Collision Checking option states that items in the group will be used when Collision Checking is active. This means that components that may not otherwise be checked for collisions, such as sheet metal, will be checked. Items within a component group will not be checked against each other (beyond the normal tool-part interference) but the group as a whole can be tested against tool and part interference as well as other groups consisting of things that are not ordinarily tested like steady rests, the machine’s sheet metal, the table or chucks. It is recommended that all items within a flow that are connected together, such as a chuck, spindle, x-axis and z-axis on a common 3-axis mill, be put in the same Component Group. As previously stated, items within a component group are not checked against each other. This can be very convenient on models with faces that meet or overlap.
Controlling Visibility
Components can be grouped so you can easily show or hide them while rendering. As with the Collision Checking option, a component is assigned to a group from the Add Component dialog box. Machine Component Visibility is one of the options available in the right mouse menu when you are in Machine Simulation. The dialog that is accessed from this selection lets you show or hide individual components or the pre-defined Component Groups. 30
Using Build Machine
Axis Mapping This item is not currently used.
ADD COMPONENT DIALOG BOX Click this button to add a model to the tree that defines the machine. When a component is added to the Build Machine dialog the Add Component dialog opens. In this dialog each component is given a name, a parent body (what it is attached to), a color and is defined and the component is defined as being in a Fixed position, as a part that moves along an axis (Translation) or as a part that rotates (Rotation).
31
Using Build Machine
Parent: Use this field to select the Parent Component, which is the component on which this item will be mounted. The list will contain the names of each body in the part. Please note that all bodes that will be a parent must have a unique name for the system to work properly.
Groups button: The Groups button opens a dialog that allows you to assign a component to any group you have already defined. This lets a component be collision checked and/or easily shown or hidden as a part of the group. Select one or more groups and close the dialog. The group assignment is automatically saved. Name: This is the name of the component as it will show up in the Parent list. By default it is the name of the body. If this is changed, (e.g. “Z” to “Z_Axis”) the new name will only show up in this dialog. The name of the body will not change. Please note that names should not include a space. Axis Label: This item is very important for moving axes and several other components. The field corresponds to the programmed axis, for example “X” is entered for the for the X axis of the Machine while “A” is entered for a machine’s A axis. Additionally, the model that represents the part must be given a label of “P” or “Px” where x is a number from 1-100. All entries are case sensitive. Valid entries for this field are any letter with or without a number. MTM machine labels are described in the section “MTM Axis Labels” on page 38.
T I P
The part must be given a label because the system needs to know where the part is in the machine assembly. A mill tool holder is assumed to attach to the spindle origin.
Comment: This section may be used to annotate the component. This is the only place the comment is used. Color: You may simply enter the RGB (Red Green Blue) values (which are 0-255 with 0 being no color and 255 being pure red, green or blue) or you may use the Color button to select a color for the component. Simply select one of the Basic Colors and click the OK button. The Define Custom Colors button provides access to a much more complete spectrum of colors. You may define the RGB (Red Green Blue) values or use your mouse to select a color from the spectrum and adjust the darkness using the slider. When you click the OK button, the RGB values in the Add Component dialog will be updated. 32
Using Build Machine
Visible: This sets the default visibility of the component. Component visibility can be toggled at runtime from the Component Visibility dialog.
Component Type Those buttons determine the component type. Use “Fixed” if the component is fixed relative to its parent component, e.g. a chuck is fixed relative to a spindle. Use “Translation” for linear axes (X, Y, Z) Use “Rotation” for rotary axes (A, B, C). Each component will be represented with an icon corresponding to the component type, as shown to the right. Type
Icon
Fixed Translation Rotation If the component is not “Fixed”, use the corresponding fields to indicate the Axis direction and the center of rotation for rotary axes. You can use the “From Selection” button to update the corresponding fields from selected geometry. Translation: These fields are used to specify an axis a component moves along and the direction in which it travels. For orthogonal axes systems, a value of “-1” or “1” is entered for the appropriate axis, all other fields are to be given a value of “0”. A value of “-1” states that the initial movement of the axis will be in a negative direction while a value of “1” states the initial movement is in a positive direction. Please note that all vectors must be normalized. X1Y0Z0 or X-1Y0Z0
X0Y1Z0 or X0Y-1Z0
X0Y0Z1 or X0Y0Z-1
X Axis values
Y Axis values
Z Axis values
To determine whether a value is positive or negative, the important thing to remember is what is moving. If the movement is by an axis attached to the tool, the value is positive. If the movement is by an axis the part is mounted on, the value is negative. Think about it this way — if the table is moving to put the tool at a greater X position on the part, then the table must move in a negative direction. 33
Using Build Machine
Rotation: The rotation section has two parameters, one for the actual axis of rotation, the other for specifying where the axis of rotation is relative to the machine origin. Axis: The Axis value is a 3D vector definition. The axis value for the A axis should be X1Y0Z0, the B axis should be X0Y1Z0 while the C axis should be X0Y0Z1. Please note that the value should be negative if the axis moves clockwise or positive if the axis moves counter clockwise. An easy guideline for most machines is that values for any axis the tool is attached to should be positive while values for any axis the part is attached to should be negative. X1Y0Z0 or X-1Y0Z0
X0Y1Z0 or X0Y-1Z0
X0Y0Z1 or X0Y0Z-1
A Axis values
B Axis values
C Axis values
For getting these values right, it is important to remember two things: the Right Hand Rule (see the Advanced CS manual) and which linear axis a rotary axis rotates about (the A axis wraps around X, the B axis wraps around Y and the C axis wraps around Z). Remembering these rules will help you set the proper rotations.
counter clockwise
As a refresher, remember that positive rotations about the X axis move from the Y to the Z axis. Positive rotations about the Y axis move from the Z to the X axis. Positive rotations about the Z axis move from the Y to the Y axis. We reiterate this because if you have a complex machine, getting the rotations correct can be a little challenging. Usually it is not hard — if the part is rotating, then the values should be negative. If the tool is rotating, the values should be positive. If you have a machine with some unusual axis arrangements, it may take a little experimenting to get the positive or negative setting correct. Center: The Center value is the center of rotation relative to the machine origin. The easiest way to get this data is to select the point that represents the center of rotation and click the From Selection button. This will set the X, Y and Z values automatically. Limits: The limits are used to define the minimum and maximum
34
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 is placed in the machine model when the model is saved and the machine assembly is created. From this zero position the component will move in a positive or negative direction based on the axis definition. This is true for both linear and rotary axes. For axes that are not limited (for example a C axis on a typical lathe spindle), the Has Limits setting should be unchecked (off). For axes that have either a minimum or maximum limit value, the Has Limits setting should be checked (on). This enables both the Min and Max values which should be set to the appropriate value for the machine. It is not possible to enable only a Min or a Max. If the Has Limits item is checked, both Min and Max must be set. If limits are set for an axis, anytime the position of that axis exceeds either of the limit values during machine simulation, a collision event is generated. If collision detection is set on, then the collision alert will be triggered. A component does not need to be included in a collision component group for an axis limit exceed collision event to be generated.
TEST MACHINE DIALOG BOX The model in the Test Machine dialog box can be zoomed and rotated to change the view. The buttons on the right of the dialog are used to ensure the components align correctly and to test how the corresponding components move. It is important to test the axis components to ensure they move correctly. If an axis does not move as expected it will
35
Using Build Machine
need to be edited in the Add Component dialog. Watch closely to ensure the tool rotates properly with the spindle and that the rotary axes move in the correct direction.
Figure 11: An example of a built machine ready for its axes to be tested. Each axis can be tested by clicking on an arrow key associated with an axis. The Less Than button will move an axis in the negative direction. The Greater Than button will move an axis in the positive direction. Clicking these buttons function as if the machine was fed incremental g-code, or jogging the machine. If the model moves in a direction that is not expected, e.g. a rotary axis moves in a clockwise direction when the Greater Than button (a positive rotation) is clicked, then the values set in the Add Component dialog will need to be changed.
T I P 36
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
Using Build Machine
SAVE
The Save button is used to create the simulation model. Select a directory for saving the complete assembly file and enter the file name for the model and click OK. The files will be generated and the Test Machine window will display the model you just created.
The save function creates a group of files including an ASY file, an INI file and a FB file for each component in the assembly. Together, these files create the machine assembly model. The VNC file stores data about these files. If the ASY, INI or FB files are changed, the VNC will not know about the changes. The next time the VNC file is opened and modifications are made, the system will overwrite any changes made to the files. Therefore it is highly recommended that all the files associated with the machine be stored in the same folder. This includes the VNC, saved assembly data and MDD. Each revision of a model should include a new VNC.
T I P
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.
NAMING CONVENTIONS AXIS LABELS When defining a moving component you must specify the axis in which the component moves. Axis labels are case sensitive and must be a letter with or without a number, e.g. “X”, “Z”, “A”, “B”, “x2” and “X2”. If the component is to be a parent it must have a unique name. 37
Using Build Machine
MTM AXIS LABELS If a machine has more than the standard X, Y, Z, A, B, C axes then it qualifies as an MTMclass machine and the axis labelling becomes more complex. The standard 6 axis labels are replaced by the following conventions. There are naming conventions for ToolGroups, Spindles and Auxiliary axes. ToolGroups: Each ToolGroup has its own set of axis labels, X through C and 1 to 99. If a machine has two ToolGroups the first uses the labels X1, Y1, Z1, A1, B1, C1 and the second ToolGroup uses the labels X2, Y2, Z2, A2, B2, C2. This allows a theoretical limit of 99 individual ToolGroups.
X2, Y2, Z2, A2, B2, C2
Toolgroup 1 axes (note: rarely is an A axis defined on an MTM machine) Toolgroup 2 axes
X3, Y3, Z3, A3, B3, C3
Toolgroup 3 axes
X1, Y1, Z1, A1, B1, C1
... X99, Y99, Z99, A99, B99, C99 Toolgroup 99 axes
Spindles: Each spindle has its own set of axis labels, X through C and 101 to 199. If a machine has two spindles the first uses the labels X101, Y101, Z101, A101, B101, C101 and the second spindle uses the labels X102, Y102, Z102, A102, B102, C102. This allows a theoretical limit of 99 individual spindles. X101, Y101, Z101, A101, B101, C101
Spindle 1 axes
... X199, Y199, Z199, A199, B199, C199 Spindle 99 axes
!
Please note that most spindles only have a C axis and sometimes a Z as well, but other axes are possible.
Auxiliary Axes: Auxiliary functions are typically set through Utility operations. Each auxiliary function, such as a bar feeder or part catcher, has its own set of axis labels, X through C. The number that follows defines the type of auxiliary function. X201, Y201, Z201, A201, B201, C201
Manual Loader/Unloader axes
X301, Y301, Z301, A301, B301, C301
Auto Bar Feeder axes
X401, Y401, Z401, A401, B401, C401
Auto Chuck axes
X501, Y501, Z501, A501, B501, C501
Bar Feeder axes
X601, Y601, Z601, A601, B601, C601
Bar Puller/Gripper axes
38
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
USING MACHINE SIMULATION
Using Machine Simulation
CHAPTER 4 : Using Machine Simulation THE BASIC STEPS This section of the manual details the use of Machine Simulation.
STEP 1: ACTIVATE MACHINE SIM Machine Sim can be activated in two ways. The first and quickest way is by right-clicking on the Render button on the Top Level palette and ensuring that the render mode is Machine Sim. When CPR is then activated Machine Sim will be used. The second method is by choosing it from the menu bar: Plug-Ins > Mach. Sim-TMS > Machine Sim. This will open the Machine Simulation Render Control palette.
STEP 2: SELECT A MACHINE TOOL
Click on the arrow at the bottom right corner of Machine Sim’s Render Control palette and select Load Machine.
The Machine Sim Models dialog opens, displaying known machine assembly files. Select a machine tool from the list or click on the User Folder button to select a specific machine tool folder. The simulation window will open with the selected machine loaded. 41
Using Machine Simulation
The User Folder location is stored in each user’s system preferences. The machine model name is stored with the associated part file.
STEP 3: UPDATE THE PART
If needed, click on the arrow at the bottom right corner of Machine Sim’s Render Control palette and select Setup…. This will let you move the origin of the part to match that of the machine assembly file. These are absolute values in part units from the machine origin to the part origin.
A. Machine Origin at center bottom of the part. B. Part Origin 1. Negative X Value 2. Negative Y Value 3. Positive Z Value
STEP 4: SELECT RENDERING OPTIONS Select the options you would like to use during rendering from the Render Control Menu.
STEP 5: RUN THE SIMULATION To simulate operations, select the operations you want to simulate, and then use the simulation buttons.
42
Using Machine Simulation
MACHINE SIM INTERFACE The basic interface for Machine Simulation is not very different than the standard GibbsCAM Render Control palette. In fact, the interface is still called Render Control. The differences are the addition of two pull-down selections on the bottom of the palette (Tool Display and Run Mode) and the options in the menu. Also different are the results of the rendering. The rendered image is an OpenGL-based 3D part capable of zooming, panning and rotating without restarting the render. 1. Tool Display 2. Run Mode 3. Render Control menu
Tool Display: The Tool Display option is similar to the traditional rendering option of showing an invisible tool, a transparent tool or a solid tool. As with standard rendering, the hidden tool produces the fastest rendering while the solid tool is the slowest of the options.
Run Mode: The Run Mode option shows whether Machine Sim will display the full machine model and part (Machine Sim) or show only the part (Part Sim). To use Machine Mode a machine file will need to be selected using the Load Machine option in the Render Control menu. If your MDD correctly defines the ToolGroup and Workpiece home positions Machine Sim can be run in Machine mode without loading a machine file. In Machine 43
Using Machine Simulation
mode to aid in the visualization of lathe spindles, the spindle will rotate while cutting during any lathe turning operation. This rotation is only to assist in showing the direction of rotation.
Render Control Menu: This menu provides control over the appearance and content of the Machine Sim rendering. The Render Control menu is largely the same as the standard and Flash CPR rendering modes. The options in this menu are fully detailed in the section “Machine Sim Rendering Options”.
MACHINE SIM RENDERING OPTIONS Set Op Start/Stop #s... This option opens a dialog to specify an operation at which to start rendering and/or set a stop point where rendering will stop and wait for you to start it again. The Start At Op option can be used when operations have already been rendered once and you would like to skip operations you have already seen. For example, you have a part with 10 operations and you know the first 7 operations are correct and render correctly but need to modify operations 8-10. Using this option you can skip operations 1-7 and start at 8. As long as the tool or operation information for the first 7 operations does not change the rendering will jump to operation 8. The Stop Before Op option will cease rendering before the operation you specify. If you press the Play button rendering will begin again.
Use Op Stop: Placing a check mark on this option activates the Start At Op option. Removing the check mark will disable the start point specified in the Set Op Start/Stop #s dialog. 44
Using Machine Simulation
Stop Before Load/Unload: Placing a check mark on this option activates the Stop Before Op option. Removing the check mark will disable the stop point specified in the Set Op Start/ Stop #s dialog.
Show Time: This will set the Current Display to show the elapsed cut time. Show Op: This will set the Current Display to show the current operation number. Transparent Stock: This option will produce a translucent stock, providing visualization of areas hidden by a wall. This option will slow down rendering speed. Transparent Fixture: This option will produce a translucent fixture bodies, providing visualization of areas hidden by walls. This option will slow down rendering speed. Skip Pecks: This option increases render speed by not showing small retracts in a drilling operation that uses pecks. Skip Unselected Ops: This option will only render the currently selected operations. The operations are still generated. This option simply reduces the rendering time. Tool Motion on Target Body: This option provides a noncutting simulation of the tool motion. Selecting this option will increase the speed of the simulation where the display of material removal is not as important as what the tool is doing. Collision Checking: This option enables Machine Sim’s checking of collision events. The result of a collision event is controlled by setting the “Collisions/Limits” parameters under “Machine Sim Settings”. The tolerances for collision detection are set in the Preferences. If the Collisions/Limits is set to “Log To Display” then a report detailing any “collisions” is generated. The report, which includes when the collision occurs (Time), the XYZ value of the collision (Location), which operation and which tool is involved, may be saved out as a text file. Additionally, the Prim 1 section details whether a Tool or Holder was 45
Using Machine Simulation
involved while the Prim 2 section reports whether the collision was with Stock or a Fixture. Using this option will slow down rendering speed.
Check Machine Travel Limits: This setting enables Machine Sim to check for any axis motion that is beyond the limits set in any machine component. If an axis limit is exceeded, a collision event is generated in the same way that it is generated when two components collide. The result of an axis limit exceeded event is controlled by the Collisions/Limits settings in the Machine Sim Settings dialog. Load Machine: This option allows you to select which machine assembly file will be used for the current part. Once selected, the same machine will automatically be used for the part until a different machine is selected. Clicking User Folder allows you to select a directory that contains machine assembly files. Select the machine you wish to use and click OK.
46
Using Machine Simulation
Setup… This option is used if the part file does not lie properly within the machine space. This will occur if the part’s origin is not at the center and bottom of the workspace definition. To reposition the part to the machine space define the distance from the machine origin to the part origin. These are absolute values in part units from the machine origin to the part origin. A. Machine Origin at center bottom of the part. B. Part Origin 1. Negative X Value 2. Negative Y Value 3. Positive Z Value
Machine Component Visibility: This option opens a dialog box that lets you control the visibility of components in the machine assembly file. You may control the components individually and/or by the groups set in Build Machine. As with workgroups and coordinate
47
Using Machine Simulation
systems, the eye icon lets you show or hide a component. Additionally you may set it to a specific transparency level from 0 (invisible) to 255 (solid).
Don’t Preload Subspindles: The initial stock on the subspindle is pre-calculated, by default, anytime Machine Sim is activated or rewound. By selecting this option the calculation of the subspindle stock is deferred until after the main spindle cutting has been simulated. This can reduce Machine Sim’s use of system resources and aid rendering, especially on slower machines. Reload Simulation: This option will restart the Machine Sim session.
48
Using Machine Simulation
Settings: This option opens the Machine Sim Settings dialog. While this dialog is essentially the same as the Flash CPR Rendering Preferences, they save separate data files. These preferences are detailed in “Machine Sim Settings” section beginging on page 12.
Create Facet Body: This function turns the current cut rendered condition into a facet body. The facet body will appear in the workspace as a transparent body. One of the few uses of facet bodies is that they can be set as stock for “display only” purposes, i.e. they cannot be used as a stock condition for creating toolpath but they can be shown in rendering for Flash CPR sessions. Looking at the properties dialog you can see that essentially nothing can be done but setting the body as a part, fixture or stock. Setting a facet body as stock can be quite useful for saving a rendered condition so you can instantly get to later operations.
49
Using Machine Simulation
Figure 12: Example of a Facet Body used as stock.
50
Using Machine Simulation
TOOLS SETUP Understanding how to properly set up tools and positions is vital to getting Machine Sim to render correctly. This section discusses defining tools for Machine Sim. Information on setting up toolgroups within the machine assembly is discussed in the “ToolGroups” section beginging on page 23. In this section we will go over how one machine’s toolgroup was set up. The machine is a relatively standard two turret two spindle MTM-type machine. The MDD for this machine will handle the tool holder length so the user will not have to calculate the tool tip’s distance from the mount point. The Use Tool/Holder Length value in the MDD can be set to X0, Y0, Z0 because the mount point is known and specified in the Build Machine Setup (see below). The machine assembly file has been defined with all of the components referenced from the machine CS, #1 in the images below. The turret is defined in the Add Component dialog box as a rotary axis and the rotation point (#2 below and Figure 14) is referenced from the machine CS. The turret’s datum point or mounting point for tools (#3 below and Figure 15) is set in the Setup dialog box. The point can be set and seen by clicking on the From Selection and Show buttons.
Figure 13: Illustration of the example setup.
51
Using Machine Simulation
Figure 14: The turret’s center of rotation definition.
Figure 15: The tool’s mounting point on the turret.
52
Using Machine Simulation
We will focus on four basic tool setups: mill OD & Face orientations and lathe OD & Face/ ID orientations. The image to the right is an example of the as rendered in Machine Sim with the tools fully set up. We will focus on tools #3 (an OD drill), #6 (a face-oriented mill thread tool, #13 (a cut-off tool) and #20 (an ID oriented insert). A point has been added at the approximate location of each tool position that represents the Spindle/ToolGroup Origin (also referred to as the datum point) when that tool is in position to cut. Any tool shift information is made relative to this point. Looking back at Figure 13 we can see more clearly that the datum point floats in the space for a tool holder or on the face of the turret, depending on the tool. We can also see that face-oriented tools will need to be offset in Xr to be in place while the OD oriented tools will need to be offset in Z. Additionally, other offsets or turret shifts may need to be applied. 1. 2. 3. 4.
Tool Offset in Xr Tool Offset in Z Turret Shift in Z Turret Shift in Xr
Figure 16: The Turret Shift dialog. It is important to be aware of the difference between the tool offset values and the Turret Shift values.
Mill Toolgroups Tools are attached to a mill toolgroup during machining when the tool becomes the active cutting tool. The tool is positioned at the location defined by setting the Spindle/ ToolGroup Origin in the Setup dialog box of Build Machine. 53
Using Machine Simulation
For mill toolgroups, the tool should be offset in Z only. There are two methods to define the Z offset of a mill tool. One method is to use the tool Z offset value from the tool dialog, meaning the length out of holder plus the distance the tool holder sticks out of the toolgroup. The other method is to let machine simulation calculate the Z offset by using the tool holder length and the “Length Out of Holder”. To enable machine simulation to calculate the Z offset for tools in a mill toolgroup, there is a setting in the MDD that must be turned on. This setting is called “Use Tool / Holder Length” and is one of the toolgroup settings in the MDD. When this option is checked the tool and holder (if available) are positioned so that the tool and holder stick out from the spindle at the spindle face. The tool shift offsets are applied from that default position. If the option is not checked then the tool tip center is shown at the spindle face, offset by the tool shift offsets.
Mill Tools - Face
Here we are using the tool in position #6 as an example. In order to get the tooltip in the correct location we need to apply a tool offset value. The distance from the datum point to the center of the mount hole is 30mm or 1.181 inches. In the Turret Shift dialog we enter an Xr offset value of -1.181.
54
Using Machine Simulation
If we were not using the MDD’s capability of calculating the tool & holder length we would also need to add a Z offset. The tool length out of the holder is 1.2 inches and t has a tool holder of some length. We would need to know the gauge length of the holder to calculate the Z offset properly. In the Turret Shift dialog we would enter an Xr offset value of -1.181 and a Z offset of 1.2+(gaugle length) inches.
Mill Tools - OD
Here we are using the tool in position #3 as an example. In order to get the tooltip in the correct location we need to apply a tool offset value. In this case, as the hole for the holders is OD aligned, we will need to offset the tool in Z. The distance from the datum point to the center of the mount hole is 50mm or 1.9685 inches. In the Turret Shift dialog we enter an tool offset value of -1.9685 in Z.
55
Using Machine Simulation
Lathe Toolgroups Tools are attached to a lathe toolgroup during machine simulation as a result of the information in the tool dialog. The tool dialog holds the toolgroup number and the tool position within the toolgroup. In the setup dialog, enabling the “Has Turret” option activates the tool position definition. This allows the machine assembly to store information about the tool positions in a toolgroup. Each position is numbered, and the position number is matched to the tool dialog position numbers to display each tool in the proper position. The tool is attached to the toolgroup so that when the tool's position is moved into place for cutting, the tool is at the tool attachment position of the toolgroup. This attachment position is defined by using the Spindle/ToolGroup Origin setting in the Setup dialog box of Build Machine. The tool offset values from the tool dialog is used to adjust the tool position in the toolgroup from the tool attachment position. This means that if the tool offset values for a given tool are set to zero, the tool control point (typically the tool insert tip) is displayed at the tool attachment position. A common place on the toolgroup for the tool attachment position is the corner of the turret closest to the spindle that the toolgroup will address during machining. The tool offset values are used to position the tool tip at the correct offset from the tool attachment position, considering the length and width of the tool holder and any tool adapter block or live tool assembly that is required.
Lathe Tools - OD
Here we are using tool #13 as an example. In order to get the tooltip in the correct location we need to apply a tool offset value. The system automatically aligns the tooltip to the front of the spindle and sets an offset so the touch off point is correct based on the tool
56
Using Machine Simulation
thickness. This tool setup is fairly easy, we simply need to enter the tool holder length, which in this case is 4 inches. In the Turret Shift dialog we simply enter an Xr offset value of 4.
Lathe Tools - ID & Face
Here we are using tool #20 as an example. In order to get the tooltip in the correct location we need to apply a tool offset value. This tool setup is a little more complex as the tool holder shifts the insert in Z and the distance from the datum point to the center of the
57
Using Machine Simulation
mount hole is 30mm or 1.181 inches. The holder is three inches long. so we enter a Z offset of 3 inches and an Xr offset value of -1.181 in the Turret Shift dialog.
Tools Defined with Tool Holders All tools will be defined with holders if the tool is going to be used in Machine Sim, so that the tool is displayed connected to the toolgroup.
Mini-Gangs & Extra Holders If a tool is ganged or if there is an extra holder block of some sort, you will need to apply a Turret Shift so that Machine Sim is aware of the extra moves the toolgroup must take to get the tooltip to the correct position.
58
SCRIPTING
Scripting
CHAPTER 5 : Scripting MACHINE SIM SCRIPTS A simple but powerful scripting/macro capability is available in Machine Sim. This functionality allows you to create customized Machine Sim motion that simulate the motion of the real machine. These scripted macro programs (called “Scripts”) provide a source for motion that is not known or managed by GibbsCAM at the detail level required to show a realistic simulation of utility operations for a given machine. In this way you can spend as much time as is necessary creating a very detailed and specific type of simulation for the utility operations of a given machine, e.g. to show the movement of tailstock and steady rests and to show the precise motion of the jaws on a chuck. The Machine Sim Scripts are executed by Machine Sim whenever a utility operation is encountered during the replay of the operations in the VNC file. Machine Sim scripts can also be called directly via a command in the At Start Op or At End Op comments of the Utility Data of any operation (e.g. postscript). The script files should be placed in the machine model folder, in a sub folder called “scripts”.
The Machine Sim Scripts are interpreted, meaning that the text file containing the script commands will be read and parsed sequentially (except for conditional commands) at the time of execution. Each script command will cause a Machine Sim action. The Machine Sim 61
Scripting
Script language supports local and global variables, simple math operations, and conditional logic commands. The scripting language is not case sensitive.
TYPES OF SCRIPTS There are five different types of scripts: Utility Op Start Script: This type of script is executed when a utility op of the same name as the script is encountered at the start of the first path feature of the utility op. This type of script is a “one-shot” script, where all other Machine Simulation motion is suspended, and the script is run serially. Start Scripts are stored in the sub-folder /scripts/startscript. A list of these scripts can be found in the section “Machine Sim Scripts Utility Op Script Names” on page 62 Utility Op End Script: This type of script is executed when a utility op of the same name as the script is encountered at the end of the last path feature of the utility op. This type of script is a “one-shot” script, where all other Machine Simulation motion is suspended, and the script is run serially. End Scripts are stored in the sub-folder /scripts/endscript. A list of these scripts can be found in the section “Machine Sim Scripts Utility Op Script Names” on page 62 Time-based Script: This type of script is executed when a utility op of the same name as the script is encountered at the start of the first path feature of the utility op. This type of script is a synchronous script, meaning the motion of the script is time-synched to all other Machine Simulation motion, and the script is run in parallel. Time-based Scripts are stored in the sub-folder /scripts/timebased. Explicit Script: This type of script is executed when an explicit call to the script is made from postscript commands in any GibbsCAM operation, i.e. the At Op Start or At Op End utility data. These scripts are run as one-shot scripts at the feature containing the runscript command. These scripts are stored in the sub-folder /scripts. Implicit Script: This type of script is executed by default at particular key points in the machine simulation. Currently this includes a Start Machine Sim script, Change Tool script and an End Machine Sim script. These scripts are run as one-shot scripts at the feature containing the runscript command. These scripts are stored in the sub-folder /scripts.
MACHINE SIM SCRIPTS UTILITY OP SCRIPT NAMES The Machine Sim Scripts that are executed as a result of utility data in the program (i.e. start scripts, end scripts and timebased scripts) use “base name” of the utility op with a suffix of _script. They are not case sensitive, but we recommend the use of capitalization as shown for readability. For utility operations with different subtypes, e.g. LoadSpindleBarFeed_script and LoadSpindleRobot_script, the main utility op type 62
Scripting
can be used for any subtype. If a subtype script is present, it will be used instead of the main utility op script. The current list of Utility operation script names follows. LoadSpindle_script † LoadSpindleManual_script LoadSpindleAutoBarFeed_script LoadSpindleAutoChuck_script LoadSpindleBarFeed_script LoadSpindleBarPull_script LoadSpindleSubSpinPull_script LoadSpindleRobot_script
UnLoadSpindle_script † UnLoadSpindleManual_script UnLoadSpindleAutoChuck_script UnLoadSpindlePartCatcher_script UnLoadSpindleGripper_script UnLoadSpindleRobot_script UnLoadSpindlePartDrop_script UnLoadSpindlePushOut_script
TailstockIn_script † TailstockOut_script † PosTailstock_script †
SubSpindleOnPart_script † SubSpindleReturn_script †
PartShift_script † PartShiftManual_script PartShiftAutoChuck_script PartShiftBarFeed_script PartShiftAutoBarFeed_script PartShiftBarPull_script PartShiftSubSpinPull_script PartShiftRobot_script
SteadyRestIn_script † SteadyRestOut_script † PosSteadyRest_script † CatcherIn_script † CatcherOut_script † PartIndex_script † MoveTool_script † AllStop_script † MachMode_script †
† designates the Main Utility Op Type
COMMANDS The scripting language includes the following script commands: MoveTo: This command moves (animates) bodies along their axes to a position with a specified number of animation steps. This command can accept multiple bodes at the same time. The specified axes will move simultaneously. MoveTo [Z102] [Z901] -50 Step 10 Delay 50 This will move the bodies “Z102” and “Z901” along their axes by -50 units in 10 steps with a 50 millisecond delay between steps. GoTo: This command statically repositions (“pops”) bodies to a new axes position.This command can accept multiple bodes at the same time. The specified axes will move simultaneously. 63
Scripting
GoTo [Z102] [Z901] 0 This will move the body “Z102” and “Z901” to their “0” position. SetPos: This command functions the same as GoTo but does not have redraw at the end. Redraw: This command forces a redraw. Delay: This delays a specified number of milliseconds. Delay 500 This will delay the system for half a second. Load: Loads a part for the specified P body. Can do it invisibly if optional “Vis 0” is specified. Load P1 Vis 0 Part 1 is loaded invisibly Unload: Unloads the part that’s standing in for the specified P body SetVis: This command sets the visibility of one or more bodies. Use 0 for invisible, 1 for translucent and 2 for opaque. SetVis Z101 Y101 2 This 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.1 the 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 to more correctly render the tool change. Normally a tool change occurs just before an operation. If you are scripting an ATC’s motion to the tool port and back to the part the system will, by default, only change to the new tool just before the new op starts. This command lets you force the new tool to be drawn at a more appropriate time. Reparent: This command assigns the owner of a part to a P body so that it can be moved. It effectively “attaches” the part to a body (the parent body to the P body specified) so that if that body moves, the part moves with it, as in the case when a subspindle pulls the part out of the spindle. 64
Scripting
Reparent P1 P2 This assigns the ownership of the part in P1 to the P2 body and its parent.
Conditional Commands The scripting language includes the following conditional logic commands. IF ELSE ENDIF Conditional expressions (the test in an IF statement) only support relational operators (<,<=,>,>=,=,<>), but the left and right sides may be complex arithmetic expressions.
Debugging Commands Print <stuff>: This command writes the contents of <stuff> to the Machine Sim Statistics console (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a script expression can be used as <stuff>. Print "Z axis position: " PrintLn %Z Script Console output: Z axis position: -43.002149 Print "Tailstock position offset from op z-position target: " PrintLn %Z901 - @ZPosition Script Console output: Tailstock position offset from op z-position target: 26.0 PrintLn <stuff>: This command writes the contents of <stuff> to the Machine Sim Statistics console (Machine Sim Settings -> Statistics... checkbox). Either a string literal or a script expression can be used as <stuff>. PrintLn adds a line break after <stuff> where Print does not. PrintLn "This is a test." Script Console output: This is a test. PrintLn 100 * -100 Script Console output: -10000 PrintLn "In reset script" Print "Z102 = " %Z102 PrintLn "and (Z102 + 10) * 2 – 150 = " (%Z102 + 10) * 2 – 150 Script console output: In reset script Z102 = 0 and (Z102 + 10) * 2 – 150 = -130 65
Scripting
About Commands and Redraws The screen is not automatically redrawn after each scripting command. The behavior is as follows: •
GoTo and MoveTo do a redraw at the end of the command. MoveTo may do several redraws, one after each scene it automatically creates have been composed.
•
SetPos, SetVis, Load, Unload, Reparent, ChangeTool, SetPartVis may change the graphic state of simulation, but a redraw is not automatically done at their completion. This allows a user to do multiple-command scene composition, and then show the results using Redraw when the scene is ready.
•
GoTo, MoveTo and Delay may do an automatic redraw at the beginning of the command if the graphic state has been changed since the last redraw. This would be triggered by SetPos, SetVis, Load, Unload, Reparent, ChangeTool or SetPartVis.
OPERATORS The scripting language includes the following math operators: + (plus sign): This performs an addition of the variables on both sides of the +. - (minus sign): This performs a subtraction of the variable on the right of the – from the variable on the left of the –. * (multiply sign): This performs a multiplication of the variables on both sides of the *. / (division sign): This performs a division of the variable on the left of the / by the variable on the right of the /. () (parentheses): Parentheses are used for controlling the order of operations.
VARIABLES The scripting language allows for local, global, and operation defined variables. Local variables are defined by, used, and scoped internally to an MS Script. Global variables are defined either in a Script, or as part of a globally available environment that is created and managed dynamically by Machine Simulation. Operation defined variables represent utility operation data that is supplied by the user when a utility op is created (e.g. ZPosition) Local variables are formatted as: #variablename 66
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. 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
<oolOffset &MMToPartUnits &P1OffsetZ &P2OffsetZ 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 X axis.) To set an axis value, use the SetPos command. Operation variables are formatted as: @variablename (e.g.@ZPosition)
67
Scripting
The following is a list of the defined available operation variables. Variable
Utility Op Data
@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
Comment
Scripting
Variable
Utility Op Data
@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"
Comment
69
Scripting
Variable
Utility Op Data
Comment
@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
POSTSCRIPT COMMANDS Machine Sim Scripts allows for commands that are manually typed into the postscript (the At Start Op or At End Op utility data) or that are included in an Add Gcode Utility operation. These commands include: SetVar ( = ) RunScript (<scriptname> = = …)
MDD EDITOR MDDS •
The length of the mill tool is affected by the MDD setting called “Use Tool / Holder Length”. When this option is checked the tool and holder (if available) are positioned so that the tool and holder stick out from the spindle at the spindle face. The tool shift offsets are applied from that default position. If the option is not checked then the tool tip center is shown at the spindle face, offset by the tool shift offsets.
•
The axis limits defined in the MDD are used by Machine Builder and Machine Sim.
VMMS VMM defined auxiliary axes: With customization, VMM's are now able to support the definition and positioning of axes, such as a subspindle, in the program based on standard 70
Scripting
behavior of utility operations. This allows for motion that does not result from machining operations to be handled by Machine Sim without the need for scripts for axes. The VMM defines axis motion for utility ops that relies on the presence of axes defined in the machine model. If the axes are present in the machine model, machine sim will move these axes whenever a utility operation that controls these axes is encountered. These newly defined axes will be tracked internally by GibbsCAM and controlled by Machine Sim. In this way, standard motion for utility ops can be programmed either generically or specifically by a VMM, and a resulting motion will occur in Machine Simulation, with or without the use of an accompanying Machine Sim Script. Additionally, the VMM can specify that a part is to be reparented in a utility operation. This allows for a smooth, synchronous transition of a part from one spindle to another without the use of special scripts. Please note that VMM upgrades are required for Machine Sim to function correctly on multi-spindle machines as scripts cannot handle subspindle moves.
71
Scripting
72
MACHINE SIMULATION TUTORIALS
Tutorials On Machine Simulation – Build Machine Tutorial
CHAPTER 6 : Machine Simulation Tutorials BUILD MACHINE TUTORIAL In this tutorial we will create solid models (shown to the right) that will be used for a Machine Simulation machine assembly file. We will start with a pre-existing VNC file that contains the geometry required to create solid models. These solid models will define the machine that will be used by Machine Simulation. 1. 2. 3. 4. 5. 6. 7. 8.
Base Table A Axis Rotary_Body X_Axis Y_Axis Z_Axis Spindle
Tutorials
•
Open the file “4 Axis Vertical Mill.vnc” found in the Machine Sim - Required folder that is installed with the sample parts. You will likely be prompted about the system creating an MDD for this file. That is to be expected, as a custom MDD was created to represent this machine assembly. Without the custom MDD the linear and rotary motions may not be properly defined.
CREATING THE MODEL Individual Components This is a Fadal-style 4-axis vertical mill. The table is mounted to the A Axis which is on the X axis which is on the Y axis. There are two existing bodies in the file, “90+0+-90”, the extruded numbers, and “Arrow”. These bodies will help show the rotation of the A Axis.
75
Creating the Model – Individual Components
Tutorials On Machine Simulation – Build Machine Tutorial
•
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.
!
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.
•
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.
76
Tutorials On Machine Simulation – Build Machine Tutorial
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 ASSEMBLY The 1st Component It is useful to add the models in the order in which they are attached. This will help you keep things organized. It is logical to add the base of the model first. •
Choose Plug-Ins > Machine Simulation > Build Machine. When the dialog is first opened the only entry is “Root”. This item (which is not editable) is the base for all branches and components.
•
Select the Base body and click the Add button.
77
Creating the Machine Assembly – The 1st Component
•
Tutorials On Machine Simulation – Build Machine Tutorial
This will open the Add Component dialog which lets you add the body to the assembly tree.
Creating the Machine Assembly – The 1st Component
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 machine model eventually attach to the base, the base shall be used as the basis, the root, of the assembly.
•
Select the Fixed button. This states the this model is stationary, based on what it is attached to. Since it is attached to the root, the Base is the foundation upon which all other components will move.
•
78
Enter the RGB Color values as shown.
Tutorials On Machine Simulation – Build Machine Tutorial
The values Red 100 Green 100 Blue 100 will make the base gray. The color of the model may seem relatively unimportant, but being able to clearly distinguish between components can be very important. A good color selection can help this. •
Click the OK button. The component has been added, we will now add more components.
•
Select the Z_Axis body and click the Add button.
•
Select Base as the Parent.
•
Enter “Z” as the Axis Label.
Creating the Machine Assembly – The Z Axis
The Z Axis
If a body represents a linear or rotary axis it must be given an Axis Label, legitimate entries are X, Y, Z, A, B or C and capitalization is critical. •
Set the color to G 150 B 150. 79
Tutorials On Machine Simulation – Build Machine Tutorial
This is a teal color. •
Click the Transition button. This tells the system that the model represents a linear axis. We now need to define the Axis.
Creating the Machine Assembly – The Spindle
•
Enter “1” in the Z text box. A value is entered in the box that represents the component’s axis. The Direction tells the system whether the axis moves in a positive or negative direction from its 0 position. Typically only a single axis is selected using an entry of “1” for a positive move and “-1” for a negative move. All fields that are not used by an axis get a value of “0”.
•
Click the OK button. The component has been added, we will now add more components.
The Spindle •
Select the Spindle body and click the Add button.
•
Set the Parent to Z_Axis.
•
Click the Fixed button. The spindle is not an axis, while 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
Tutorials On Machine Simulation – Build Machine Tutorial
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.
Creating the Machine Assembly – The Tool
•
The Build Machine window should look like the image to the right. Let’s see what the machine assembly looks like at this point. •
Click the Save button.
•
Select a location to save the file and name it “4 Axis Vertical.asy”. Once you’ve selected a location to save the assembly file the Test Machine window opens, allowing you to view the model and its axes. Clicking the model allows you to rotate it with the mouse. The scroll wheel zooms the model.
81
Tutorials On Machine Simulation – Build Machine Tutorial
Creating the Machine Assembly – The Tool
•
Click the arrows on either side of the Z to move the axis. The less than button moves the Z axis down while the greater than button moves the axis up. If you get different results the Z value needs to be changed from a negative to a positive 1.
•
82
Close this window to continue adding components.
Tutorials On Machine Simulation – Build Machine Tutorial
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.
Creating the Machine Assembly – The Y Axis
•
This is a medium blue color. •
Click on the Transition button.
•
Enter “-1” in the Y text box. Negative 1 is entered because the Y axis part must move in a negative direction along its axis so that the tool is in a “higher” relative position to the part along the Y axis.
•
Click the OK button. 83
Tutorials On Machine Simulation – Build Machine Tutorial
Creating the Machine Assembly – The Rotary Body
The X Axis •
Select the X_Axis body and click the Add button.
•
Select Y_Axis as the Parent.
•
Enter “X” as the Axis Label.
•
Set the color to R 75 G 150. This is a lime green color.
•
Click on the Transition button.
•
Enter “-1” in the X text box. Again a negative 1 is used because the axis moves to its left (a negative move) to get the part into a “higher” relative position to the tool.
•
Click the OK button.
The Rotary Body •
Select the Rotary_Body model and click the Add button.
•
Set the Parent to X_Axis.
•
Click the Fixed button.
84
Tutorials On Machine Simulation – Build Machine Tutorial
•
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.
Creating the Machine Assembly – The A Axis
•
85
Tutorials On Machine Simulation – Build Machine Tutorial
Creating the Machine Assembly – The Part
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 in Machine Sim.
•
Click the Fixed button.
•
Set the color to B 255, which is blue.
•
Click the OK button.
86
Tutorials On Machine Simulation – Build Machine Tutorial
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.
Creating the Machine Assembly – The Numbers
•
The Numbers •
Select the 90+0+-90 model (the numbers) and click the Add button.
•
Set the Parent to A Axis.
87
Tutorials On Machine Simulation – Build Machine Tutorial
Creating the Machine Assembly – The Numbers
Since the A-Axis moves, the numbers will rotate with the A Axis, giving a visual clue as to where the table is. While the arrow and numbers are not a part of the machine, they can be helpful to add to a model. •
Click the Fixed button.
•
Set the color to white (R 255, G 255, B 255).
•
Click the OK button. The component tree looks good, with two branches (one for each moving section of the machine) and no unattached components.
88
Tutorials On Machine Simulation – Build Machine Tutorial
FINALIZING THE ASSEMBLY Missing Components
Click the Save button so we can test our assembly file.
•
Resave the existing assembly file. It would seem that we have a problem. The A Axis is missing from the assembly file. The problem is that the component has a space in its name.
•
Close the Test Machine window, right-click the A Axis component and select Edit.
•
Change the Name to A_Axis. and click OK. Note that the Table, Part and 90+0+-90 components are now associated with the Root. We need to change the Parent of the Table component. Changing the name of a component breaks associativity, because the system lets you easily swap out components of the same name.
•
Right-click the Table component and select Edit.
•
Change the Parent to A_Axis. and click OK.
•
Right-click the 90+0+-90 component and select Edit.
•
Change the Parent to A_Axis. and click OK. The component tree should have two complete branches.
89
Finalizing the Assembly – Missing Components
•
Tutorials On Machine Simulation – Build Machine Tutorial
Finalizing the Assembly – Axis Testing
Axis Testing •
Click Save to save the assembly and test the components.
•
Click the Greater Than button next to the X to see the X axis body move in a negative direction along the axis. The greater than button moves the part in a negative direction relative to the tool. Each click on the Greater Than button represents a move to a position that is greater than the current X position. Each click on the Less Than button represents a move to a position that is less than the current X position.
•
Click the Less Than button next to the Y to see the Y axis body move in a positive direction along the axis. The Less Than button represents a move to a position that is less than the current Y position. Each click on the Greater Than button represents a move to a position that is more than the current Y position.
•
Click the Greater Than button
next to the A.
This should cause the A axis body rotate in a positive direction. The axis is actually rotating in a negative direction. We need to change the Rotation value.
90
Tutorials On Machine Simulation – Build Machine Tutorial
Close the Test Machine window, right click the A_Axis component and select Edit.
•
Change the X Axis value to “-1” then click OK.
Finalizing the Assembly – Axis Testing
•
You may be wondering why we set a negative value here. The important thing to remember is which item is moving — is it the tool or the table? Since the moves are relative to the spindle origin the table will move in negative X so the tool is positioned in a greater X position. If the tool was moving, it would move in a positive X direction to move to a greater X position. •
Click the Save button to save the assembly file and open the Test Machine window.
91
Tutorials On Machine Simulation – Build Machine Tutorial
Finalizing the Assembly – Setting Machine Parameters
•
Click the Greater Than button next to the A. The table now rotates toward the positive Y axis, or away from our view which is correct. Our assembly file 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 the Spindle 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. This point will be used to load the position.
92
Tutorials On Machine Simulation – Build Machine Tutorial
•
Select the point and click the Spindle Origin From Selection button.
•
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 the MDD (Machine Definition Document) associated with the machine. Each machine built with Build Machine must have a custom-built MDD. for more information on this, see the MDD Editor documentation. In that manual we will make an MDD associated with this machine.
93
Finalizing the Assembly – Setting Machine Parameters
The other fields will be handled by the MDD.
Tutorials On Machine Simulation – Machine Sim Tutorial
MACHINE SIM TUTORIAL CREATING THE PART
Creating the Part – Loading Processes
About the Part This part starts with a stock body, a part model, and three fixture models. The part already has four tools and operations. We will load some processes and create several simple machining operations primarily for visualization of the part. We will then render the part in Machine Sim. The part is set up on a Four Axis Vertical Mill that rotates about the A axis. As with all tutorials, the part is an aluminum alloy. We will be using the Flash CPR rendering for the images of this part. •
Open the file MachineSim.vnc, located in the Part Files\Machine Sim Required folder that was installed with GibbsCAM. If you render the part, you can see that we do a pre-mill hole, followed by drilling to the bottom of the hole, roughing the pocket and completing the operations by finishing the pocket. Enabling the Show Tool Holder option in the toolbar will include the mill tool holders in Flash CPR. Enabling this capability is optional, but can be very useful.
Loading Processes We will now load the processes to finish the machining of this part. •
From the Processes menu select Set Directory… and choose the Machine Sim Required folder. The Processes menu should now have an entry with a sub-menu showing the available processes.
! 94
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.
Tutorials On Machine Simulation – Machine Sim Tutorial
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.
Creating the Part – Machining XZ Backside
•
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
Tutorials On Machine Simulation – Machine Sim Tutorial
•
Delete the existing process tiles and deselect the existing operations.
•
Load the MachineSim3 process.
Using Machine Sim – Machining XZ Backside
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. Offsetting the markers by 5mm will start the tool off of the part.
•
Create the toolpath. This will machine the slot in four passes. If you enabled the Show Tool Holder option you probably noticed that the tools have holders even though we did not set any. The saved processes include tool holder data. While the holders are not essential for Flash CPR, they are useful. The display of the holders can be considered crucial when using Machine Sim.
USING MACHINE SIM The Machine Sim product has two primary modes, Part Sim and Machine Sim. Part Sim is very useful in that it shows all inter-operation moves of a tool (and holder) around a part, but is not that much different from Flash CPR in that it is still a part-centric view. The advantage is that it does not require a machine assembly file. Machine Sim however shows everything about part and the machine’s movement (except tool changes).
96
Tutorials On Machine Simulation – Machine Sim Tutorial
Preferences Let’s look at our rendering options before we use Machine Sim. •
Deselect all solids.
•
Select Machine Sim from the Plug-Ins menu.
Using Machine Sim – Preferences
When Machine Sim first opens you will see the stock body and fixtures. Unless you have changed the Preferences, the workspace is a gradient rather than black.
The Render Control palette looks almost identical to the standard dialog but with the addition of two buttons and a menu, designated by an arrow pointing to the right. •
Open the menu Control palette.
in the Machine Sim Render
This menu provides access to numerous Machine Sim options. •
Set the options as shown. This should only require you to select the Transparent Stock and Transparent Fixture options.
•
Choose the menu
again and select Settingts.
97
Tutorials On Machine Simulation – Machine Sim Tutorial
•
Select all of the Collision options.
Using Machine Sim – Part Sim
This will let us know in several ways if we happen to experience a collision. A collision is interference between the tool or holder and any part of the machine or a fixture. Cutting too deep into a part is not a collision, that is a gouge. The Cutting values can be adjusted to better match the power of your computer or the desired responsiveness versus rendering speed. •
Close the Settings when you are done.
Part Sim Machine Sim can be used without a machine assembly file. This mode is referred to as “Part Sim” or “Part Mode”. If a machine is not loaded, Machine Sim automatically uses this mode. Part Sim can also be selected if a machine is loaded. Let’s look at Part Sim before we load a machine. We will render the part using Part Sim first for familiarization. •
From the isometric view, zoom out a little and move the part so that the fixture is at the bottom of your window. Zooming out will allow you to see the tools and holders better. The transparent stock and fixtures allows us to see what the tools and holders are doing without rotating the part.
•
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
Tutorials On Machine Simulation – Machine Sim Tutorial
At top speed we will not see many of the subtleties of the tool movement, (unless you have a very slow computer). •
Render the operations. If the rendering is too slow, move the Speed Control to a faster speed. Note how you can see all of the cut stock.
•
Turn off the Transparent Stock option. The rendering will start again.
Using Machine Sim – Part Sim
•
When the rendering is complete. rotate the current view so that you see the threaded hole and the tool. If your mouse has a scroll wheel, click and hold the wheel down. Then move the mouse to rotate the current view. Like standard CPR, Part sim shows the tool moving about the part. Now let’s get into Machine Sim, where we see how things really are.
99
Tutorials On Machine Simulation – Machine Sim Tutorial
Using Machine Sim – Loading A Machine
Loading A Machine Before Machine Sim can be used, a machine assembly file must be selected. If you are going to create your own machine assembly file and have not done the “Build Machine Tutorial” on page 75 it is recommended that you complete that tutorial before continuing this tutorial. For information on creating a machine assembly file see the chapter “Using Build Machine” starting on page 17. If you will not be creating your own machine assembly (i.e. someone else in your company is tasked with that responsibility), we have included a completed version of the machine assembly that you can use. •
Open the Render Control palette menu and choose Load Machine > Browse. The Machine Sim Models dialog opens. This dialog is used to find and select machine assembly files. By default the system will find any assembly files stored in the Installation folder (..\Program Files \Gibbs\GibbsCAM\[#]\MachineSim) or the Application Folder (..\ Documents and Settings\All Users\ Application Data\Gibbs\GibbsCAM\ [#]\MachineSim). Additionally, you can specify a directory where you choose to store your machine models.
100
Tutorials On Machine Simulation – Machine Sim Tutorial
•
Click the User Folder button. A dialog will open allowing you to navigate to the location of the machine assembly file you created. If you did not create an assembly file you can choose the folder 4 Axis Vertical Mill Machine File that is in the same folder as the MachineSim.vnc file.
Select Machine Sim Tutorial Machine and click OK. The Gibbs window will include the machine model but we have something to take care of first.
Setting the Part Origin When Machine Sim is activated it checks to see if a part has been used with the machine before. This is because the part and the machine need to have matching origins. to ensure this, a dialog comes up if the part has not been used in Machine Sim before. •
Set the Part Origin to X-20, Y-20. Since the part’s origin is in the bottom left corner it is not centered on the table — it is too far in +X and +Y. We need to move it to the center of the part, which in this case is half the size of the 40x40mm part.
101
Using Machine Sim – Setting the Part Origin
•
Tutorials On Machine Simulation – Machine Sim Tutorial
Using Machine Sim – Machine Sim Rendering
•
Switch to isometric view and zoom out until you see the entire machine. The part should be centered on the table. It is very important that the system knows where the part origin is relative to the machine’s origin. Not defining this properly could lead to interference between the tool and the machine or part. If you do not properly define where the part is upon first activating Machine Sim, you can always select the Setup… option from the Machine Sim menu on the Render Control palette.
Machine Sim Rendering When Machine Sim is first activated, the spindle should be empty. As soon as the rendering is started a tool is loaded and the rendering begins. •
Select the Transparent Tool option.
•
Set the render speed to about the 1/4 speed mark and click the Play button. Both the tool and the holder are now displayed by the system. Note that selecting the transparent tool option applies to both the tool and holder. When the operations on the front face need to be rendered the table moves down in Y and the A Axis rotates into position. Throughout the rendering process the X and Y axis move as needed. Note that even the threads are rendered.
102
Tutorials On Machine Simulation – Machine Sim Tutorial
When the operations on the back need to be rendered the table moves up in Y and the A Axis rotates into position. When complete the rendering process stops at the end of the operations. Sending the tool home and unloading the tool is not rendered as that is not a part of the operations we define. 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.
Using Machine Sim – Machine Sim Rendering
•
Posting the file requires a custom post for the machine.
103
Using Machine Sim – Machine Sim Rendering
Tutorials On Machine Simulation – Machine Sim Tutorial
104
INDEX
Index
NUMERICS 3D vector definition: 32
Alert Types: 14 Detection: 34 Color: 31 Comment field: 31
A Add button: 24, 29 Add Component dialog: 24, 29, 31, 34–35 Alert Types, of collisions: 14 Assembly, of components: 20 At End Op: 61
Components: 19–20 Component Groups: 14, 28–29 Component Movement: 24, 34 Component Type: 31 Editing: 19, 24 Name of: 31 Coordinate Systems: 20 Create Facet Body: 49
At Start Op: 61 Axis auxiliary, def. by VMM: 70 Defining & assigning: 11 Increment: 27–28 Label: 31 Testing the model: 35 Type: 27
CS requirements: 22
Axis Limits: 33–34, 46, 70
Delay: 66
Axis motion, of Utility Ops: 71 Axis Type: 28
Cut Part Rendering: 5
D Datum point: 51–53 Define Custom Colors: 31 Delay command: 64 Delay, in MoveTo: 63 Don’t Preload Subspindles: 48
B
E
Build Machine: 5, 19, 25
Edit components: 19, 24
C
Explicit Script: 62
CAD application: 20
F
ChangeTool command: 64, 66 Check Machine Travel Limits: 46 Collision Checking: 28, 45 Collision events: 45–46 Collisions: 13–14
First, turret position: 27 Fixed component: 31 Flash CPR: 5 From Selection: 32 107
Index
G Ganged Tools: 58
Machine Space: 47 Machine Tool: 5, 19 MachSim Axis: 27
GoTo: 66
MDD: 11, 70
GoTo command: 63 Greater Than button: 35
Mill parts: 23 Model Tree: 19, 23, 25, 29 Moves, intra-operation: 11
H Has Limits: 33
MoveTo: 66 MoveTo command: 63, 66 MTM parts: 23, 26
Has Turret: 26, 56
MTM, Machine Parameter checkbox: 26
Home position: 22
I Implicit Script: 62 Inter-Operation Moves: 5
N Names, of components: 20, 31 Non-Cutting simulation: 45 Non-machine components: 14
L Lathe parts: 23 Length Out of Holder: 54 Less Than button: 35
O OpenGL: 43 Origin: 20, 22
Load command: 64, 66
P
Load Machine: 41, 43, 46 Parent: 29–30
M Machine assembly: 14 Machine Component Objects: 14 Machine Component Visibility: 47 Machine CS: 20 Machine Mode: 5, 43 Machine Parameters dialog: 23 Machine Sim: 5, 43 108
Part Body: 22–23 Labels: 26 Part Mode: 5 Part Origin: 47 Part Sim: 43 Part units: 22 P-body: 22–23 Pivot distances: 11
Index
Plug-Ins menu: 5, 23, 41 Position, tool in turret: 28 Postscript: 61, 70
Redraws: 66 Utility Op Script Names: 63 Variables: 66 Scripts, types of: 62
Preferences: 49
Secondary Axis, turret position: 27
Prim 1: 45
Secondary Value: 28
Prim 2: 46 Primary Value, axis position: 28 Primary Value, turret position: 27 Print command: 65 PrintLn command: 65
R
Select machine assembly: 46 Set Op Start/Stop #s: 44 SetPartVis command: 64, 66 SetPos command: 64, 66 Setup button: 23, 26, 47 Setup…: 42 SetVar command: 64
Redraw command: 64
SetVis command: 64, 66
Reload Simulation: 48
Show Op: 45
Remove button: 24
Show Time: 45
Render Control: 41, 43 Menu: 44
Skip Pecks: 45
Reparent: 66
Spindle Origin: 26
Reparent command: 64 Reposition the part: 47 RGB: 31
Skip Unselected Ops: 45 Spindle, part holding: 11 Spindle/ToolGroup Origin: 51–53, 56 Start At Op: 44
Root: 23
Step, turret position: 27
Rotary axes: 11
Stock body: 22
Rotation: 32 Rotation component: 31 Run Mode: 43
S Save button: 24, 35 Scripting: 61–63, 71 Conditionals: 65 Operation Variables: 67–68 Operators: 66
Stop Before Load/Unload: 45 Stop Before Op: 44
T Table, axes and: 11 Test Axis components: 34 Test button: 24 Test Machine window: 35 Time-based Script: 62 109
Index
TMS: 6
Utility Op Start Script: 62
Tolerance, of collision settings: 14
Utility Operations: 71
Tool Display: 43 invisible, transparent or solid: 43 Tool Display: 43 Tool Holder Length: 51 Tool Holders: 58 Tool Motion on Target Body: 5, 45 Tool Movement: 5
V Variables Global: 67 Global, user defined: 67 Local: 66 Operation: 67 Visible, compenent setting: 31
Tool Offset Lathe: 56 Mill: 54
VMM: 70
W
Toolchanges: 11 ToolGroup: 11 Count: 26 Origin: 26
Workpiece: 11, 22 Count: 26
ToolGroup spinner: 26
Z
Tools, defining: 51 Translation: 32 Component: 31
Zero position: 33
Transparent Fixture: 45 Transparent Stock: 45 Turret Shift: 58
U Unload command: 64, 66 Use Op Stop: 44 Use Tool / Holder Length: 70 from MDD: 54 Use Tool/Holder Length: 51 Used for Collision Checking: 28 Utility Data: 61 Utility Op End Script: 62 110