296
IMSpost Guide Version 8 Document Revision A

IMSPost Guide

Embed Size (px)

DESCRIPTION

Cum sa editezi un postprocesor

Citation preview

Page 1: IMSPost Guide

IMSpost Guide Version 8

Document Revision A

Page 2: IMSPost Guide

Copyright © 2011 by Intelligent Manufacturing Software, Inc.

All rights reserved. Intelligent Manufacturing Software, Inc. reserves the right to change the information in this document without notice. No part of this work may be processed, reproduced, or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as may be expressly permitted in writing by Intelligent Manufacturing Software, Inc.

Printed in the United States of America.

All other product names herein are used for identification purposes only and are recognized as properties (including trademarks, registered trademarks, and referenced copyrighted materials) of their respective companies.

Intelligent Manufacturing Software, Inc. 800 Broadway Haverhill, MA 01832 USA Tel (978) 556–0077 Fax (978) 556–0171 http://www.ims-software.com

Page 3: IMSPost Guide

IMSpost Guide iii

Table of Contents

OVERVIEW ................................................................................................................................................ 1 Company Profile ..................................................................................................................................................... 1 IMSpost Overview ................................................................................................................................................. 1 Installing the IMSpost Software and Getting Started ............................................................................................. 1

Before You Begin ............................................................................................................................................ 2 Licensing ......................................................................................................................................................... 2 Loading a Postprocessor .................................................................................................................................. 3 If You Encounter a Problem... ......................................................................................................................... 3

IMSpost Structure ................................................................................................................................................... 4 Postprocessor (CLdata) Statements ........................................................................................................................ 4

Syntax Checking ............................................................................................................................................. 5 POSTCMD: Using Postprocessor Commands via the PPRINT Statement ..................................................... 6

Menus and Tool Bars.............................................................................................................................................. 6 Menu and Option Notation .............................................................................................................................. 6 Tool Tips ......................................................................................................................................................... 6

Environment Modes and Tool Bars ........................................................................................................................ 8 Postprocessor ................................................................................................................................................... 8 Controller Emulator ......................................................................................................................................... 8

Terms ...................................................................................................................................................................... 8 APT Source Statement .................................................................................................................................... 8 Block Numeration ........................................................................................................................................... 8 Checklist .......................................................................................................................................................... 8 CL File ............................................................................................................................................................ 9 Comment Block ............................................................................................................................................. 10 Component Types ......................................................................................................................................... 10 Control Register ............................................................................................................................................ 10 Custom Postprocessor ................................................................................................................................... 10 Cutter Compensation ..................................................................................................................................... 10 Environment and Modes ............................................................................................................................... 11 Expression ..................................................................................................................................................... 11 Function Code ............................................................................................................................................... 11 Function Group ............................................................................................................................................. 11 Graphics Window .......................................................................................................................................... 12 Helical Interpolation ...................................................................................................................................... 12 Integer ........................................................................................................................................................... 12 Machine Control Code .................................................................................................................................. 12 Macro ............................................................................................................................................................ 12 NC Program .................................................................................................................................................. 13 Pointer ........................................................................................................................................................... 13 Postprocessing ............................................................................................................................................... 13 Project ........................................................................................................................................................... 13 Project File .................................................................................................................................................... 13 Real Number ................................................................................................................................................. 13 Static Table .................................................................................................................................................... 14 String ............................................................................................................................................................. 14 Tape Format .................................................................................................................................................. 14 Tracking the Tool .......................................................................................................................................... 14 Variable ......................................................................................................................................................... 14 Work Coordinate System .............................................................................................................................. 15

Page 4: IMSPost Guide

iv IMSpost Guide

MAIN AND SECONDARY TOOL BARS ............................................................................................. 17 Main Tool Bar ...................................................................................................................................................... 17

File ................................................................................................................................................................ 17 Edit ................................................................................................................................................................ 18 View .............................................................................................................................................................. 19 Execute .......................................................................................................................................................... 20 General .......................................................................................................................................................... 20 Controller ...................................................................................................................................................... 21 Machine ......................................................................................................................................................... 21 Report ............................................................................................................................................................ 22 User ............................................................................................................................................................... 22 Help ............................................................................................................................................................... 22

Secondary Tool Bar .............................................................................................................................................. 23

FILE MENU AND OPTIONS ................................................................................................................. 25 New ...................................................................................................................................................................... 26 Open ..................................................................................................................................................................... 27 General Options .................................................................................................................................................... 27 Jobs ....................................................................................................................................................................... 27 Preferences ........................................................................................................................................................... 28

Working Directories ...................................................................................................................................... 29 File Extensions .............................................................................................................................................. 29 Editor ............................................................................................................................................................. 30

Error Definition .................................................................................................................................................... 30 Apt Definition ....................................................................................................................................................... 31

Altering the Definition File With the Apt Definition Option ........................................................................ 32 Changing the Syntax Order ........................................................................................................................... 33 Using DEF (Definition) Files ........................................................................................................................ 35

Create Doc ............................................................................................................................................................ 36 GenApt.syntax ............................................................................................................................................... 37

Description ........................................................................................................................................................... 37 Description .................................................................................................................................................... 37 History ........................................................................................................................................................... 38 Detail ............................................................................................................................................................. 39 Macro ............................................................................................................................................................ 40 IsoCode ......................................................................................................................................................... 41

EXECUTE MENU AND OPTIONS ....................................................................................................... 43 Postprocess ........................................................................................................................................................... 43 Test Commands .................................................................................................................................................... 45 Debug ................................................................................................................................................................... 47

Debug Tool Bars and Options ....................................................................................................................... 49 New ............................................................................................................................................................... 51 Edit ................................................................................................................................................................ 52 Import ............................................................................................................................................................ 53 Macro Properties ........................................................................................................................................... 54 Search ............................................................................................................................................................ 56

Breakpoints ........................................................................................................................................................... 56

GENERAL MENU AND OPTIONS ....................................................................................................... 57 Start Program ........................................................................................................................................................ 58 Input/Output Units ................................................................................................................................................ 59 Part Number ......................................................................................................................................................... 60 Start Operation (Catia Only)................................................................................................................................. 61 Tool Change ......................................................................................................................................................... 62

Tool Change .................................................................................................................................................. 62 Turret Index ................................................................................................................................................... 64

Page 5: IMSPost Guide

IMSpost Guide v

Coolant ................................................................................................................................................................. 66 Cutter Comp ......................................................................................................................................................... 67 Feedrate ................................................................................................................................................................ 69

Feed/Minute .................................................................................................................................................. 70 Feed/Revolution ............................................................................................................................................ 71 Inverse Time .................................................................................................................................................. 72

Spindle .................................................................................................................................................................. 74 Drill Cycles........................................................................................................................................................... 75 End Operation (Catia Only) .................................................................................................................................. 78 End Program ......................................................................................................................................................... 79 Threading ............................................................................................................................................................. 79 Motion Codes ....................................................................................................................................................... 80

Rapid / Form ................................................................................................................................................. 81 Linear ............................................................................................................................................................ 83 Circle ............................................................................................................................................................. 87 Nurbs ............................................................................................................................................................. 90 Arc Fit ........................................................................................................................................................... 92 Line Fit .......................................................................................................................................................... 95 Shape Repetition ........................................................................................................................................... 96

Sort Output ........................................................................................................................................................... 98 New Command ..................................................................................................................................................... 99 Macro manager ................................................................................................................................................... 103

New ............................................................................................................................................................. 106 Edit .............................................................................................................................................................. 107 Import .......................................................................................................................................................... 108 Macro Properties ......................................................................................................................................... 109 Search .......................................................................................................................................................... 111

CONTROLLER MENU AND OPTIONS ............................................................................................ 113 Block Number .................................................................................................................................................... 114 Comment Blocks ................................................................................................................................................ 116 Register Format .................................................................................................................................................. 117

Basic ............................................................................................................................................................ 118 Advanced ..................................................................................................................................................... 119 Deleting a Register ...................................................................................................................................... 121 Changing Control Register Formats During Execution ............................................................................... 121

Function Codes ................................................................................................................................................... 123 USE and One-Shot USE1 Parameters ......................................................................................................... 125

Function Groups ................................................................................................................................................. 126 Subprograms ....................................................................................................................................................... 127 Tables ................................................................................................................................................................. 128

Example of Defining a Lookup Table ......................................................................................................... 129 Tape Format ....................................................................................................................................................... 132 Import Controller ................................................................................................................................................ 133 Apt Definition ..................................................................................................................................................... 133

APT/CL Data Code Types .......................................................................................................................... 135 Grammar ............................................................................................................................................................. 136

Syntax .......................................................................................................................................................... 137 Register ....................................................................................................................................................... 139 Function ....................................................................................................................................................... 141 Variable ....................................................................................................................................................... 143 CE Errors ..................................................................................................................................................... 147

Page 6: IMSPost Guide

vi IMSpost Guide

MACHINE MENU AND OPTIONS ..................................................................................................... 149 Motion ................................................................................................................................................................ 150

Co-Linear Axes ........................................................................................................................................... 156 Components ........................................................................................................................................................ 158 References .......................................................................................................................................................... 159

Defining Machine Z Zero ............................................................................................................................ 161 Multi-Axis .......................................................................................................................................................... 163

Multi-axis Setup .......................................................................................................................................... 163 Work Plane .................................................................................................................................................. 168

Import Machine .................................................................................................................................................. 174 IMS Project File .......................................................................................................................................... 174 IMS Model File ........................................................................................................................................... 174 Pre-defined Machines .................................................................................................................................. 175

REPORT MENU AND OPTIONS ........................................................................................................ 177 List ...................................................................................................................................................................... 180

Block Definition .......................................................................................................................................... 180 Program Header ........................................................................................................................................... 181 Program Footer ............................................................................................................................................ 182 Page Header ................................................................................................................................................ 184 Page Footer .................................................................................................................................................. 185 Page Size ..................................................................................................................................................... 187

Table ................................................................................................................................................................... 188 Table Definition .......................................................................................................................................... 188 Program Header ........................................................................................................................................... 189 Program Footer ............................................................................................................................................ 190 Page Footer .................................................................................................................................................. 192 Page Header ................................................................................................................................................ 193

USER MENU AND OPTIONS .............................................................................................................. 195 User Dialog......................................................................................................................................................... 195 Examples ............................................................................................................................................................ 201

Descriptive Comments ................................................................................................................................ 201 Opstop ......................................................................................................................................................... 201 MULTI HOME ........................................................................................................................................... 202

HELP MENU AND OPTIONS .............................................................................................................. 203 Activate PP File .................................................................................................................................................. 204 Diagnostics ......................................................................................................................................................... 205

Sample Diagnostic Report File .................................................................................................................... 206

MACRO LANGUAGE COMMANDS .................................................................................................. 209 Accessing Variables Within Macros .................................................................................................................. 209 Assignment Statements ...................................................................................................................................... 211 Math Functions in a Macro ................................................................................................................................. 212 Including Operations in Macros ......................................................................................................................... 213 Setting Strings in the Macro Language .............................................................................................................. 213 FINAL Macro ..................................................................................................................................................... 214

ADD ............................................................................................................................................................ 214 BOUND ....................................................................................................................................................... 214 COPY .......................................................................................................................................................... 215 DELETE ...................................................................................................................................................... 215 LOCATE ..................................................................................................................................................... 215 MOVE ......................................................................................................................................................... 216 UPDATE ..................................................................................................................................................... 216

Macro Statements ............................................................................................................................................... 217 ASSIGN Statements ........................................................................................................................................... 218

Page 7: IMSPost Guide

IMSpost Guide vii

BREAK Statements ............................................................................................................................................ 218 CALL Statements ............................................................................................................................................... 218

Passing Arguments in the CALL Statement ................................................................................................ 219 CASE Statements ............................................................................................................................................... 219 CLREAD Statements.......................................................................................................................................... 220 CUT Statements ................................................................................................................................................. 221 FILE Statements ................................................................................................................................................. 221 GETAPT Statements .......................................................................................................................................... 222 GETAT Statements ............................................................................................................................................ 222 GETISO statements ............................................................................................................................................ 222 HOOK Statements .............................................................................................................................................. 223 IF Statements ...................................................................................................................................................... 224 OPTIMIZE Statements ....................................................................................................................................... 225 OUTPUT Statements .......................................................................................................................................... 225

Using REGISTER, FUNCTION, and MODE Variables and Values in an OUTPUT Statement ................ 226 PRINT and DISPLAY Statements ..................................................................................................................... 227 PRIORITY Statements ....................................................................................................................................... 228 PUSH and POP statements ................................................................................................................................. 228 REPORT Statements .......................................................................................................................................... 228 RETURN Statements.......................................................................................................................................... 228 ROUND Statements ........................................................................................................................................... 229 RUN Statements ................................................................................................................................................. 229 SEQNO Statements ............................................................................................................................................ 229 SETAT Statements ............................................................................................................................................. 230 SOLUTION Statements ...................................................................................................................................... 230

SOLUTION Statements: Format 1 .............................................................................................................. 230 SOLUTION Statements: Format 2 .............................................................................................................. 233 SOLUTION Statements: Format 3 .............................................................................................................. 235 SOLUTION Statements: Format 4 .............................................................................................................. 237 SOLUTION Statements: Format 5 .............................................................................................................. 237

SORT Statements ............................................................................................................................................... 238 Sorting Output Example .............................................................................................................................. 238

SPLIT Statements ............................................................................................................................................... 239 SPRINT Statements ............................................................................................................................................ 240 STREXT Statements .......................................................................................................................................... 241 STRLEN Statements .......................................................................................................................................... 241 STRSTR Statements ........................................................................................................................................... 241 TABLE Statements ............................................................................................................................................. 241 TOKEN Statements ............................................................................................................................................ 242 TOOL_ALONG Statements ............................................................................................................................... 242 UCASE and LCASE Statements ........................................................................................................................ 242 USER STATEMENTS ....................................................................................................................................... 243 WHILE Statements ............................................................................................................................................. 243

MACRO LANGUAGE VARIABLES ................................................................................................... 245 CLDATA Variables............................................................................................................................................ 245 CLREAD Variables ............................................................................................................................................ 246 Component Model Example ............................................................................................................................... 247 COMPONENT Variables ................................................................................................................................... 248 COOLANT Variables ......................................................................................................................................... 250 CUTCOM (Cutter Compensation) Variables ..................................................................................................... 251 CYCLE Variables ............................................................................................................................................... 251 FEED (Feedrate Definition) Variables ............................................................................................................... 252 FUNCTION Variables ........................................................................................................................................ 253 Geometry Functions ........................................................................................................................................... 254

VECPROD .................................................................................................................................................. 254 MATIDNT .................................................................................................................................................. 254

Page 8: IMSPost Guide

viii IMSpost Guide

VECLEN ..................................................................................................................................................... 254 VECANG .................................................................................................................................................... 255 MATROT .................................................................................................................................................... 255 PNTONPLN ................................................................................................................................................ 255 PNT_LINE_CIR_INTRSC ......................................................................................................................... 255 PNT_LINE_INTRSC .................................................................................................................................. 256 LINE_DIST_PARREL ................................................................................................................................ 256 LINE_PARREL .......................................................................................................................................... 256 LINE_ANGLE_LINE ................................................................................................................................. 256 MATPNTVEC ............................................................................................................................................ 257 ISIDENT ..................................................................................................................................................... 257 BACKMAT ................................................................................................................................................. 257

Geometry Operations.......................................................................................................................................... 258 Geometry Assignments ...................................................................................................................................... 260 MACHINE Variables ......................................................................................................................................... 267 MODE Variables ................................................................................................................................................ 268 REGISTER Variables ......................................................................................................................................... 271 SPINDLE Variables ........................................................................................................................................... 273 SYSTEM Variables ............................................................................................................................................ 273 TOOL CHG (Tool Change) Variables ............................................................................................................... 285

Page 9: IMSPost Guide

IMSpost Guide 1

Overview

Intelligent Manufacturing Software (IMS) is the worldwide leader in NC postprocessing software. Founded in 1990, Intelligent Manufacturing Software is a leading provider of manufacturing software products, and a specialist in providing advanced postprocessing solutions.

Companies large and small, from the world's leading CAD/CAM companies, to the smallest machine shops, continually find new ways to use IMS's software to meet and surpass their daily requirements.

Company Profile Intelligent Manufacturing Software, Inc. is a corporation with over twenty-five years of industry experience in delivering postprocessing solutions; a company that takes pride in delivering total solutions that are tailored to each individual client, and a company that has a vested interest in keeping the customer satisfied. We pride ourselves on delivering industry leading levels of service and support, and we deliver these products and services at a fraction of the cost of our competitors.

IMSpost Overview IMSpost is the IMS executable module designed for users who wish to develop or maintain their own postprocessors. The IMS product family includes:

The complete postprocessor solution.

Postprocessor configuration.

The world's most flexible selection of standard postprocessors to meet any requirement.

Installing the IMSpost Software and Getting Started You can request a CD from IMS or you can download your software requirements through the IMS website at:

www.ims-software.com

Installing the software is a simple process that takes only a few minutes. Most customers prefer to use the IMSpost default directories, but you can specify your own pathnames for the necessary directories.

Page 10: IMSPost Guide

Overview: Installing the IMSpost Software and Getting Started

2 IMSpost Guide

Before You Begin Once you have installed the software (from the IMS CD or IMS website), complete these steps before you begin:

1. Request and install a license code. Refer to the Licensing description below.

2. Install specific postprocessor license codes, if applicable. Refer to the Activate PP File option on the Help menu.

Licensing The IMS protection system provides the means for the protection of both software modules and individual postprocessor project files. This allows a high level of protection for IMS partners, dealers, and resellers against unauthorized use of project files they have developed. The service time and revenue involved in producing postprocessors represents an investment by our partners, and we want to be sure this investment is adequately protected.

The steps involved in obtaining a license are:

1. Decide which license options you require.

For a new license, send your request to [email protected]. For an update of an existing license, send your request to [email protected]. In either case, include the following information with your request.

Customer Information

• Customer Name • Address • City, State, Country, ZIP/Postal Code • Telephone Number • Fax Number

Contact Information

The contact information is important, as the license code will be sent by email to this address.

• First Name • Last Name • Title/Position • E-mail

2. Request a license code from IMS or your IMS reseller.

3. Install the license code you receive on your system. To do so, refer to IMS_license_installation.PDF and see the Hardware Info entries on the Diagnostic dialog.

4. Set up the IMS software environment on your system.

Customize the IMS software environment to better meet your needs by setting preferences for how you would like to use the features of the software (open the File menu and select the Preferences option). A default version of this file is created in the install directory during the installation process. In order for the IMSpexec or IMSpost software to locate this file, it is suggested that you set an environment variable (see your System Administrator) named IMSDIR_POST_INI.

Page 11: IMSPost Guide

Overview: Installing the IMSpost Software and Getting Started

IMSpost Guide 3

Environment Variable Setup for Windows 2000, NT, or XP

a. In the Windows environment, open the Control Panel.

b. Click on System (or System Properties).

c. Go to the Advanced tab.

d. Click the Environment Variables button.

e. Click the New button.

f. In the “Variable name” field, enter: IMSDIR_POST_INI

g. In the “Variable value” field, enter the directory path of the imspostw.ini file. This will usually be in the IMS installation directory (for example: C:\Program Files\IMS70a\IMSpost\”).

h. Click OK.

i. Close the System and Control Panel windows.

j. Restart your system.

Environment Variable Setup for Windows 98

a. Open a DOS window.

b. From the root directory, edit the autoexec.bat file. The environment variable must point to the directory where the license.ims exists: IMSDIR_POST_INI=c:\ims\imspost70

c. Save the file.

d. Exit the DOS prompt.

Loading a Postprocessor Once the environment and preferences are set up correctly, you must load a postprocessor file. You can:

• Load a new postprocessor from the IMS postprocessor library, or • Load an existing postprocessor that you or someone else customized.

If You Encounter a Problem... If you encounter a problem installing or licensing the software, try troubleshooting using the IMS Diagnostics.

Page 12: IMSPost Guide

Overview: IMSpost Structure

4 IMSpost Guide

IMSpost Structure With the proper controller and machine libraries loaded the simplest form of the IMSpost hierarchy is:

1. Read the INIT/* macro. This macro is designed to declare all variables and machining modes for program start-up.

2. Read the INIT_CFG/* macro. It is here that optional dialogs may be displayed, the controller registers are sorted in their specified order, sequence numbering, and any codes from the Start of Program dialog (General menu, Start Program option) are output.

3. Begin reading each statement passed in through the APT/CL file. Typically, this is the only file the postprocessor is going to read.

If there is not a macro defined for the statement, the statement will be ignored. Various CAM systems pass data to their CL/APT files that has nothing to do with machining. In these cases, macros are not required to support this type of data.

4. Continue reading until the end of the file. Then it generates the FINI_CFG/* macro which will output any specified code from the End of Program dialog (General menu, End Program option), generate all necessary output and error files, then close the file.

Postprocessor (CLdata) Statements NOTE: If it is not possible to generate all the APT commands you might like to use in your postprocessor due to CAM system limitations, refer to POSTCMD: Using Postprocessor Commands via the PPRINT Statement and the end of this description.

CLdata statements are the statements that are passed on to the postprocessor through the APT/CL part file. These statements consist of major and minor words. Major words are located to the left of the slash (/) and all minor words (CLDATAM) are located to the right of the slash. Numbers (CLDATAN) may also be included to the right of the slash.

In its simplest form, a major word does not have parameters.

If the major word does not exist in the postprocessor macro library, it will be ignored. For example:

STOP/

The following is an example of a major word with a minor word (OFF) parameter: SWITCH/OFF

A major word with a value is: INDEX/3

Whenever a postprocessor statement has more than one parameter, these parameters are separated with a comma delimiter. For example:

LOADTL/10,LENGTH,50

LOADTL is a major word. LENGTH is a minor word. 10 is the first CLDATA value. 50 is the second CLDATA value.

Postprocessors need a way to retract parameters from statements which contain more than one parameter. The hierarchy of these parameters begins with the left and goes to the right. IMSpost

Page 13: IMSPost Guide

Overview: Postprocessor (CLdata) Statements

IMSpost Guide 5

keeps track of the values with the CLDATAN. It keeps track of the minor words with CLDATAM. It keeps track of all the parameters (words + values) with CLDATA. For example:

CYCLE/DRILL,-25,MMPM,3000,RAPTO,10,RTRCTO,10,30

GLOBAL.DEPTH = CLDATAN.1 The 1st value (-25) GLOBAL.RAPTO = CLDATAN.3 The 3rd value (10) GLOBAL.RAPTO = CLDATAN.RIGHT.1.RAPTO Gets the value to the right of minor word RAPTO (10) GLOBAL.FEED = CLDATAN.2 The 2nd value (3000) GLOBAL.FEED = CLDATAN.RIGHT.1.MMPM 3000 GLOBAL.OPTION = CLDATA.9 The 9th parameter (30) GLOBAL.OPTION = CLDATAN.5 The 5th value (30)

If you connect your values with minor words (such as SWITCH/OFF), your APT statements are not restricted to a specific format. As long as the postprocessor finds the minor word, it will automatically connect its value with it.

Syntax Checking If your postprocessor statement only has two choices (ON/OFF), you could use an IF statement to see what is coming in (such as SWITCH/OFF). These examples check for minor word OFF:

IF(CLDATAM.1 = "OFF")

IF(CLDATAM.OFF)

IF(CLDATAM.OFF = 1)

The first example is looking for OFF to be the first minor word. The second and third examples do not care where the word OFF is located in the postprocessor statement. It is just checking to see if it exists.

When command can have numerous minor words, use the CASE and ENDCASE statements. For example:

CASE (CLDATAM)

DRILL statement(s)

TAP statement(s)

OFF statement(s)

AUTO statement(s) ENDCASE

There may be a time when you want your macro to determine how many parameters are being passed within the postprocessor statement. Let’s assume you have this postprocessor statement:

HEAD/LEFT,XOFF,120,YOFF,130,OPTION,54

HEAD/* WORDS = CLDATAM.0 Counts minor words (4): LEFT,XOFF,YOFF,OPTION NUMBERS = CLDATAN.0 Counts numbers (3): 120,130,54 PARAMETERS = CLDATA.0 Counts minor words and numbers (7)

Page 14: IMSPost Guide

Overview: Menus and Tool Bars

6 IMSpost Guide

POSTCMD: Using Postprocessor Commands via the PPRINT Statement On occasion, because of CAM system limitations, it is not possible to generate all the APT commands you might like to use in your postprocessor. One way IMSpost can get around this limitation is by using the PPRINT statement to pass APT commands to the postprocessor. Because most CAM systems use PPRINT to generate comments, this provides a convenient and almost limitless way to input APT statements.

To use this feature, use the keyword POSTCMD as the start of a PPRINT command. For example:

PPRINT/POSTCMD,COOLNT/MIST

The above command activates the IMSpost COOLNT macro. Of course, whenever this PPRINT/POSTCMD is encountered, the macro must exist in the postprocessor macro file; otherwise, the record will be ignored.

Menus and Tool Bars After you activate the IMSpost software, load any existing postprocessor in order to activate the tool bars through which you can access various menus, options, and dialogs.

• Main tool bar

• Secondary tool bar, such as:

Menu and Option Notation Throughout this manual, menus and options are indicated as:

Menu > Option

For example, File > Save indicates that you should select the Save option on the File menu.

Tool Tips When you set your mouse on (but do not click) an option on the secondary tool bar, you will see a tool tip providing a brief description of the feature. For example, when you set your mouse on:

You see a tool tip for the Motion Codes feature:

Page 15: IMSPost Guide

Overview: Menus and Tool Bars

IMSpost Guide 7

Another type of tool type is provided for some options. It shows the IMSpost function group variable associated with the option. For example, when you set your mouse on:

Coolant off

You see a tool tip for the associated variable:

Similarly, when you set your mouse on an option associated with a macro, the macro is shown:

Page 16: IMSPost Guide

Overview: Environment Modes and Tool Bars

8 IMSpost Guide

Environment Modes and Tool Bars IMSpost operates in two environment modes: Postprocessor and Control Emulator. You can change between these modes by selecting the mode on the secondary tool bar, as shown below.

Postprocessor Postprocessor is an operating mode in IMSpost that is active when is displayed on the secondary tool bar:

A postprocessor is a program that formats a neutral CL file into an NC file that is suitable for a specific machine/control combination. The name refers to the fact that the processing takes place after the tool path has been generated.

Controller Emulator A Controller Emulator or reverse processing option is an integrated part of IMSpost. All library posts now contain the data necessary to convert from ISO format (NC code) to APT/CL commands.

The Controller Emulator is active when is displayed on the secondary tool bar:

NOTE: The IMS Controller Emulator functionality includes support for canned cycles, controller subroutines, controller variables and expressions, and multi-axis machines.

Terms Terms used in this document and the basic tools provided with IMSpost are described below. They are listed in alphabetical order for easy referencing.

APT Source Statement An APT source statement typically is generated by the CAM software. It passes cutter location and machine function data that will be interpreted by a postprocessor to generate a machine code file. See File > Apt Definition.

Block Numeration This is the ordering of blocks of information in a machine code file. Block numbering most commonly uses the N register to store this information. See Controller > Block Number.

Checklist IMSpost provides you with a checklist to guide you through the postprocessor development process, ensuring that you have access to all necessary features, including program codes, controller format, and machine format.

The IMSpost Checklist is a list of steps suggesting a set of tasks necessary to complete your postprocessor. For example:

Page 17: IMSPost Guide

Overview: Terms

IMSpost Guide 9

You can access the IMSpost dialog sections directly using the checklist. Simply click on the text line of a particular step and the corresponding dialog will display.

When you have completed a dialog and exited the dialog using the OK/Save buttons (not Cancel), a checkmark will appear in the IMSpost checklist next to the appropriate line. You can toggle the checkmarks on/off for a specific line by double-clicking on the checkmark or empty box.

All checklist information is saved with the postprocessor data file, so it is recalled each time you reload a specific postprocessor.

TIP: You can delete all the checkmarks by selecting them with your mouse. Now when you double-click on a particular dialog to review, a checkmark is displayed.

CL File A Center Line or Cutter Location (CL) file is a neutral toolpath file that contains generic commands to perform tasks such as changing a tool or turning on the coolant. A CL file, which is produced by a CAM system, is not intended for a specific machine.

These files are produced in response to the virtually unlimited number of machine and control combinations. Producing a neutral toolpath file accommodates this large variety of output requirements.

CL files are postprocessed into NC files.

Page 18: IMSPost Guide

Overview: Terms

10 IMSpost Guide

Comment Block A comment block is a block of code stored in the machine code file that is not acted on by the machine controller. The block is most often used to comment the machine code file or to provide operator instructions or messages on the controller screen. See Controller > Comment Blocks.

Component Types A machine component must be one of the four basic types:

TABLE The machine table or rotary table on which the part to be machined is mounted. At least one table piece is a base component, meaning it is not mounted on another component. You may define any number of TABLE type pieces to represent movement of linear or rotary type axes.

PART Component that can be mounted to the topmost TABLE component. This approach is unnecessary, however, because IMSpost automatically adds this component for you if it is not added explicitly.

HEAD Component used to represent a spindle or rotary axis mounted to the spindle. A HEAD type, unlike a TABLE type, can have direction associated with it, so a direction specifier should be entered in the direction field. Note that this is NOT motion direction, but rather the directional setup of the component itself.

TOOL The cutter that will be doing the machining. Typically, PART components represent what is being machined and TOOL components represent the cutter itself. Both the PART and the TOOL components are specified within the CUT statement. For example, to cut a part component with tools tip:

CUT(PART,TOOL.TIP)

These component types, or pieces, let you physically describe or “build” your machine for the postprocessor mathematical model. See Machine > Components.

Control Register This is a code, sometimes called a letter address, that stores data to be read and interpreted by the machine control. Typically, it is not enough for a postprocessor to output a value. This value is usually associated with a particular address (G,X,Y,Z,F,S,M) and also needs a proper format. See Controller > Register Format.

Custom Postprocessor Intelligent Manufacturing Software will develop custom postprocessors for any machine and controller configuration. You can then maintain the posts and make any enhancements you want in-house. Contact IMS for more details:

Telephone: 978-556-0077 Fax: 978-556-0171 Postal address: 800 Broadway, Haverhill, MA 01832 Electronic mail: [email protected]

Cutter Compensation Cutter compensation is the correction of the cutter line to the left or right of center, from the programmed line. See General > Cutter Comp.

Page 19: IMSPost Guide

Overview: Terms

IMSpost Guide 11

Environment and Modes After you activate the IMSpost software, load any existing postprocessor in order to activate the main tool bar and secondary tool bar (highlighted in the following example) through which you can access various postprocessor dialogs.

IMSpost operates in two environment modes:

• Postprocessor • Control Emulator

Expression An expression can consist of any supported combination of data types, variables, operations, or functions. For example:

REGISTER.T.VALUE > 24

Combined expressions must be separated with parenthesis. For example: (SYSTEM.MOTION="LINEAR") AND (REGISTER.C.CHANGE) (MACHINE.B > 90) OR (MACHINE.Y < 3.75)

Function Code A function is a controller code, usually in the form of a G-code or M-code, that causes the machine to take some action. For example, M08 is a function that turns on the coolant. See Controller > Function Codes.

Function Group Function groups (also referred to as MODES) provide a means for assigning functions into user-defined groups. For example, the MOTION group may contain G00, G01, G02, G03 functions that describe some type of movement to the machine controller. These codes are mutually exclusive within each group. That is G01 remains in effect until cancelled by another code within the MOTION group.

You categorize functions into groups for two reasons:

• To group together families of functions (such as MOTION, COOLANT, SPINDLE, and CYCLE).

• To assign variable names to functions used repeatedly to simplify macro programming.

See Controller > Function Groups.

Each member of a group is assigned a specific function code. For example, the MOTION group links the following members and functions:

• The member POSITION for the ISO function G00 • The member LINEAR for the ISO function G01 • The member CLW for the ISO function G02 • The member CCLW for the ISO function G03

Most of the functions associated with grouping functions are intended for advanced users. You typically must create new function groups or modify existing groups.

Page 20: IMSPost Guide

Overview: Terms

12 IMSpost Guide

A function can only be assigned to one group. If you attempt to assign a function to a group that has already been assigned to another group, you will get an error message. You must first remove the function from the group it is in, and then assign it to a different group.

There are many default groups assigned for commonly used codes. Selecting one of the default postprocessor templates automatically sets up a group definition for commonly used functions.

NOTE: You do not have to assign every function to a member of a group. The function groups (modes) are for convenience in macro programming and are not required.

Some of the dialog and menus in IMSpost use the group/mode variables. Changing a function in a dialog may change the function assigned to a group variable. Similarly, changing a group member’s function assignment may change the setting in a dialog.

Graphics Window The graphics window (highlighted in the following example) is the largest part of the application display. It is where all of the machine graphics are displayed.

Helical Interpolation For controllers that can support helical interpolation, IMSpost offers helical interpolation support using the powerful CIRCLE SOLUTION statement. The library postprocessors also have updated CIRCLE macros to support this feature.

In order to enable processing of helical interpolation, check the “Helical interpolation supported” option on the Circle definition dialog. See General > Motion Codes (Circle tab).

Within the ArcFit routine, check the Screw option. See General > Motion Codes (Arc Fit tab).

Integer An integer value consists of one or more digits, which can be preceded by a sign (+ or -). An integer does not contain a decimal point. Examples of integers are:

GLOBAL.VALUE = - 3 COUNTER = 1

Machine Control Code A machine control code instructs machines to perform certain tasks, such as turning on the coolant. In some cases, these codes are standardized. For example, an M08 code means to turn on the coolant. In other cases, machine tool builders do not follow the same standard and, as a result, the code required to perform a given function can vary drastically from machine to machine.

Macro An IMS macro is a set of programming language statements that instructs the postprocessor as to how to respond to a certain event. Each APT source command to be processed by the postprocessor has an IMS macro of the same name associated with it. All postprocessor output is generated through the execution of an IMS macro.

If any APT source commands do not exist in the macro library, these commands will be ignored by the postprocessor.

See General > Macro manager.

Page 21: IMSPost Guide

Overview: Terms

IMSpost Guide 13

NC Program An NC program is produced by a CAM systems to run machine tools such as 2-axis lathes, mills (3-, 4-, and 5-axis), wire EDM machines, mill/turns, lasers, routers, grinders, and punch presses.

Pointer Pointers are used in conjunction with the LOCATE macro statement. These statements are commonly used throughout the IMS Revpost product.

Postprocessing Postprocessing is the process of transforming a neutral toolpath file (called a Center Line, Cutter Location, or CL file) into an NC program that will run a machine tool. Postprocessing is performed by a postprocessor program.

Postprocessing is a simple task with IMSpost. Most of the work occurs beforehand when you create or modify the postprocessor. In most cases, you can edit parameters for controller format, machine structural definition, output file format, and macros using the IMSpost dialogs. Advanced users also have the option of writing macros.

There are two options for running a processor:

• Using the IMSpexec.exe file that is installed with IMSpost, or • Using the IMSpost generator (see Execute > Postprocess).

The historical and modification data associated with a postprocessor file is saved so you can track the file’s history. You can view or modify this information throughout the development cycle of the postprocessor file.

Project An IMSpost project is a data file consisting of all the parameters necessary for a complete postprocessor. This includes controller definition, machine kinematic description, IMSpost macros, and other postprocessor data.

Multiple projects may be loaded simultaneously in IMSpost. Use File > Open to select an existing project. Use File > New to create a new project.

Project File A project file is a complete postprocessor stored as an external file. The file is saved in encrypted ASCII format. This data file contains a complete description of the parameters necessary to postprocess a file, including:

• Controller description • Machine description • Output file definition • Macro programs

Use File > Open to select an existing project file. Use File > New to create a new project file.

Real Number Real number values must be written in standard notation. A real number consists of one or more digits on both sides of a decimal point, which can be preceded by a sign (+ or -). Although input data can have an integral value, such as 3.0, such a number is considered to be a real number by

Page 22: IMSPost Guide

Overview: Terms

14 IMSpost Guide

the system. A value is written and stored as a real number unless entered without the decimal point. An example of real numbers is:

GLOBAL.VALUE = 15.375 + 5.775

Static Table A static table is a table attached to a register. For example, a spindle table might represent 100 rpm by S1, 125 rpm by S2, etc.

S1 = 100 S2 = 125

See Report > Table to construct these tables within IMSpost.

String A string is a sequence of any number of characters enclosed in double quotes. Only printable ASCII characters are permitted. Control characters are not supported. However, it is possible to substitute a character in a string with a control character.

Examples of strings are: "1234" "S" MYSTRING = "AB4E" + "G85" TOOL_BLOCK = "(** RETRACT FOR SAFETY CLEARANCE **)" DIR = "G90 M3"

Tape Format Tape format defines the characteristics required by the machine controller to mark the start or end of a file, end of block, or end of program information. See Controller > Tape Format.

Tracking the Tool IMSpost gives you a number of ways of tracking the tool. To view and select these options, see refer to the “Output using” option (see Machine > Multi-axis > Multi-axis Setup).

Variable For detailed information, refer to Macro Language Variables.

There are four general types of variables (data) allowed in IMS macros: integer, real number, character string, and pointer. Examples are:

Integer INDEX = 1 Real number GLOBAL.TABLE_FEED = 1200.0 Character string MYTEXT = "G91G28Z0" Pointer PTH = LOCATE(REGISTER.H)

variable = expression

Typically, if you are setting a variable to a number or another variable name, the expression value should not be surrounded with quotes. For example:

GLOBAL.SPEED = 2000 GLOBAL.RPM_SPEED = GLOBAL.LAST_RPM_SPEED

Page 23: IMSPost Guide

Overview: Terms

IMSpost Guide 15

When you are setting the variable to text, it must be enclosed in quotes: MODE.SPINDLE = "OFF" GLOBAL.TMARK = "G28G91XY"

Besides these, IMSpost categorizes its own system variables: REGISTER, FUNCTION, MODE, MACHINE, SOLUTION, and COMPONENT.

REGISTER is associated with the controller address. REGISTER.X.MODAL = "YES" REGISTER.T.FORMULA = "? + 100" REGISTER.Z.LAST = 1500.0

FUNCTION is associated with the machine function. FUNCTION.M3.NAME = "M13" FUNCTION.G1.USE = "X,Z,I,K,F"

MODE is the current machining mode. MODE.SPINDLE="CLW"

MACHINE is a parameter associated with the machine axis. MACHINE.Z.HOME = 4500.0 MACHINE.B.LOCKL = 0

SOLUTION is associated with current motion block.

COMPONENT is associated with the machine models component. COMPONENT.PART.REFERENCE.DIRECTION.HORIZONTAL = "0,1,0"

The REGISTER, FUNCTION, MODE, MACHINE, and COMPONENT variables are dependent upon what was selected through the various postprocessor dialogs. They are all accessible via the IMS macro language.

The SOLUTION variables are dependent upon the type of motion currently being processed. There is a different set of SOLUTION variables for 3-axis, linear motion, circular motion, and multi-axis motion.

TIP: In your macro debug mode, enter the names of these variable types in the “watch” area. If they are defined, IMSpost will return the results.

Work Coordinate System The library posts are equipped with the G54-G59 work coordinate systems. As a default they are not activated, but can be very easily. With your postprocessor loaded in the IMS environment:

1. Select User > MULTI HOME.

2. Check the Use Multi Home option.

3. If the G54-G59 codes are to be output in the following motion block, check the option to Output code on next motion block.

Page 24: IMSPost Guide

Overview: Terms

16 IMSpost Guide

For experienced IMS macro users, these codes are supported with the UCS_MULTI/* macro. The G54-G59 codes are represented by the MODE.SYSTEM.COORD variables.

Notes

Page 25: IMSPost Guide

IMSpost Guide 17

Main and Secondary Tool Bars

The main and secondary tool bars in the upper left of the window.

Main Tool Bar

A detailed description of each menu on the main tool bar is provided in this section. Also noted are corresponding buttons on the secondary tool bar as well as control key combinations, if applicable, to access the option.

File The File menu includes the following options:

Option Button Keys Description

New — — Creates a new postprocessor file (*.lib, *.prj). Open

Ctrl O Opens a browsing dialog that enables you to choose a

previously defined postprocessor file (*.lib, *.prj). Close — — Closes the currently active postprocessor file. Save

— Saves the currently postprocessor file using the same

name. Save As — — Saves the currently postprocessor file using a different

name that you specify. Jobs — — Saves the current working environment (saves

breakpoints for debugging). Two options are available: Load Job Loads a saved job file. Save Job Saves a job to a file.

Preferences — — Customizes working directories, file extensions, and other IMS default conditions.

Error Definition

— — Opens a dialog for error checking.

Apt Definition — — Translates the CAM system APT language. Create Doc — — Creates postprocessor documentation. Description — — Maintains a history of the postprocessor development. Exit

— Quits the application. Prompts you to save documents.

Page 26: IMSPost Guide

Main and Secondary Tool Bars: Main Tool Bar

18 IMSpost Guide

Edit The Edit menu includes the following options that are used when working with the Debug feature or Macro Manage . r

Option Button Keys Description

Undo — Alt Backspace

Reverses the previous action.

Redo — Ctrl Y Restores the previous action that was reversed (undone).

Cut

Shift Delete

Cuts the current selection and places it on the Clipboard.

Copy

Ctrl C Copies the current selection and places it on the Clipboard.

Paste

Ctrl V Pastes the cut or copied selection from the Clipboard.

Select All — Ctrl A Selects all information, such as all lines of code in a macro.

Find

Ctrl F Searches for specified text.

Replace — Ctrl H Replaces currently selected text with the information on the Clipboard.

Toggle Bookmark

Ctrl F2 Toggles the bookmark feature to insert or remove bookmarks.

Next Bookmark

F2 Goes to the next temporary bookmark.

Previous Bookmark

Shift F2 Goes to the previous temporary bookmark.

Clear All Bookmarks

— Clears all bookmarks in the window.

Insert/Remove Breakpoint

F9 Inserts a breakpoint at the current location or removes the currently selected breakpoint. To insert a breakpoint, position your cursor at the line

where you want to insert a breakpoint. Click . A red marker appears to the left of the line. For example, a breakpoint is inserted here at line 31:

To delete a breakpoint, position your cursor at a line where a breakpoint exists (such as line 31 above) and

click . Remove All Breakpoints

— Removes all existing breakpoints.

Line Numbers — — Displays line numbers, when this option is checked.

Page 27: IMSPost Guide

Main and Secondary Tool Bars: Main Tool Bar

IMSpost Guide 19

Option Button Keys Description

Go to line — Ctrl G Enables you to go to a line number that you specify:

Enter the line number, then click Go To.

View The View menu includes the following options:

Option Button Description

ISO (3D)

Automatically rotates the world coordinates of the current machine to fit the Isometric view.

XZ (Front)

Automatically rotates the world coordinates of the current machine to fit the Front view. The Y axis will be perceived as depth.

YZ (Side)

Automatically rotates the world coordinates of the current machine to fit the Side view. The X axis will be perceived as depth.

XY (Top)

Automatically rotates the world coordinates of the current machine to fit the Top view. The Z axis will be perceived as depth.

Fit View

Fits the view to all objects. This centralizes the graphics window on all of the displayed objects.

Debug Windows

— Enables you to select the windows displayed for use while debugging:

• Macro Manager • APT-CL • ISO Code • Watch Window • Machine

Refer to Debug. Application Look

— Provides a variety of options to display the IMSpost application.

Page 28: IMSPost Guide

Main and Secondary Tool Bars: Main Tool Bar

20 IMSpost Guide

Execute The Execute menu includes the following options:

Option Button Description

Postprocess

Displays options and enables you to execute an entire program. In Controller Emulator mode, you can reverse postprocess.

Test Commands

Displays options and enables you to perform an on-line test of commands, executing a partial program.

Breakpoints — Available in the next software revision.

General The Genera menu includes the following options: l

Option Button Description

Start Program — Enables you to enter code for the start of every program. Input/Output Units

— Enables you to enter default units.

Part Number — Specifies how the postprocessor should handle part number processing.

Start Operation

— (Catia Only) Enables you to enter code for the beginning of all Catia operations.

Tool Change — Opens a tool change dialog. Coolant

Opens the Coolant dialog to set coolant codes and conditions.

Cutter Comp — Opens the Cutter Comp dialog. Feedrate — Displays feed tabs. Spindle

Opens the Spindle dialog to set spindle codes and conditions.

Drill Cycles

Opens the Cycle dialog to define drill cycle parameters.

End Operation — (Catia Only) Enables you to enter code for the ending of all Catia operations.

End Program — Enables you to enter code for the end of every program. Threading — Available in the next software revision. Motion Codes

Sets function codes and conditions for rapid and contouring motion.

Sort Output — Sort registers and G/M code functions. New Command

— Enables you to automatically create a macro.

Macro manager

Opens the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed.

Page 29: IMSPost Guide

Main and Secondary Tool Bars: Main Tool Bar

IMSpost Guide 21

Controller The Controller menu includes the following options:

Option Button Description

Block Number

Specifies block number sequencing (Nxxxx).

Comment Blocks

Enables you to enter operator comments and set parameters for the comment block.

Register Format

Defines tables for controller register formats. You can set the format of controller letter addresses.

Function Codes

Defines controller function codes. All G/M codes in the postprocessor are listed.

Function Groups

— Lists all Mode/Group variables.

Subprograms — Provides options to support subroutines. Tables — Enables you to create look-up tables. Tape Format — Provides options for special characters needed on tape (such as %). Import Controller

— Overrides the existing controller file with another controller file.

Apt Definition

Sets the APT definition to convert.

Grammar

Sets the grammar format.

Machine The Machine menu includes the following options:

Option Description

Motion Displays all programmable machine axes. Components Specifies model components. References Specifies machine offsets (pivot points). Multi-Axis Provides setup options for tool tracking.

Multi-axis Setup Sets specific formatting and conditions for multi-axis programming.

Work Plane Sets formatting for a multi-axis machine with a controller that supports different working planes.

Import Machine

Overrides the existing machine model with: IMS project file From another postprocessor file. IMS model file From an existing machine model. Pre-defined machines View and select predefined machine model.

Page 30: IMSPost Guide

Main and Secondary Tool Bars: Main Tool Bar

22 IMSpost Guide

Report The Report menu includes the following options:

Option Button Description

List

Creates an optional *.lis output file (enter commentary data along with the machine code).

Table

Creates an optional tool data table and displays specified tool/cutter data.

User The User menu includes the following options:

Option Description

User Dialog Enables you to create custom dialogs. Descriptive Comments EXAMPLE of a user dialog:

Activates tape comments. This is an IMS-developed dialog. Opstop EXAMPLE of a user dialog:

Activates output of M01 codes. This is an IMS-developed dialog. MULTI HOME EXAMPLE of a user dialog:

Enables you to active work coordinate systems. This is an IMS-developed dialog.

Help The Help menu provides options to displayed information about the IMSpost application or visit the IMS Web site.

The Help menu includes the following options:

Option Button Description

Help Topics

Displays IMSpost help information.

Activate PP File

— Enables you to install specific postprocessor (PP) license codes, if applicable.

Diagnostics — Creates a license diagnostic. About IMSpost

— Displays the current IMS software release.

Page 31: IMSPost Guide

Main and Secondary Tool Bars: Secondary Tool Bar

IMSpost Guide 23

Secondary Tool Bar The secondary tool bar appears in the upper left under the main tool bar and looks like this in Postprocessor mode:

It looks like this in Control Emulator mode:

Buttons provide the following functions.

Button Description

Opens a dialog to select a startup postprocessor from a library.

Opens a browsing dialog that enables you to choose a previously defined postprocessor file (*.lib, *.prj). You can also access this option with this key combination: Ctrl O

Saves the currently postprocessor file using the same name.

Cuts the current selection and places it on the Clipboard. You can also access this option with this key combination: Shift Delete

Copies the current selection and places it on the Clipboard. You can also access this option with this key combination: Ctrl C

Pastes the cut or copied selection from the Clipboard. You can also access this option with this key combination: Ctrl V

Toggles between the Postprocessor and Control Emulator mode environments.

Displays the checklist.

Displays options and enables you to execute an entire program.

Displays options and enables you to perform an on-line test of commands, executing a partial program.

Opens the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed.

Sets function codes and conditions for rapid and contouring motion.

(Available with Postprocessor only.) Specifies block number sequencing (Nxxxx).

(Available with Postprocessor only.) Enables you to enter operator comments and set parameters for the comment block.

Defines tables for controller register formats. You can set the format of controller letter addresses.

Defines controller function codes. All G/M codes in the postprocessor are listed.

(Available with Postprocessor only.) Creates an optional *.lis output file (enter commentary data along with the machine code).

Creates an optional tool data table and displays specified tool/cutter data.

Page 32: IMSPost Guide

Main and Secondary Tool Bars: Secondary Tool Bar

24 IMSpost Guide

Button Description

Opens the Coolant dialog to set coolant codes and conditions.

Opens the Spindle dialog to set spindle codes and conditions.

(Available with Postprocessor only.) Opens the Cycle dialog to define drill cycle parameters.

(Available with Control Emulator only.) Sets the grammar format.

(Available with Control Emulator only.) Sets the APT definition to convert.

Displays IMSpost help information.

Quits the application and prompts you to save documents.

Control the camera view. From left to right, the buttons are Isometric (3D) view, Front view, Side view, and Top view.

Control camera zoom features. From left to right, the buttons zoom in (closer), zoom out (away), and zoom onto a captured window in a bounding rectangle.

Fits the view to all objects. This centralizes the graphics window on all of the displayed objects.

Jogs the machine axis.

Notes

Page 33: IMSPost Guide

IMSpost Guide 25

File Menu and Options

The File menu provides general file operations:

Option Button Keys Description

New — — Creates a new postprocessor file (*.lib, *.prj). Open

Ctrl O Opens a browsing dialog that enables you to choose a

previously defined postprocessor file (*.lib, *.prj). Close — — Closes the currently active postprocessor file. Save

— Saves the currently postprocessor file using the same

name. Save As — — Saves the currently postprocessor file using a different

name that you specify. Jobs — — Saves the current working environment (saves

breakpoints for debugging). Two options are available: Load Job Loads a saved job file. Save Job Saves a job to a file.

Preferences — — Customizes working directories, file extensions, and other IMS default conditions.

Error Definition

— — Opens a dialog for error checking.

Apt Definition — — Translates the CAM system APT language. Create Doc — — Creates postprocessor documentation. Description — — Maintains a history of the postprocessor development. Exit

— Quits the application. Prompts you to save documents.

Page 34: IMSPost Guide

File Menu and Options: New

26 IMSpost Guide

New Creating a postprocessor through IMS consists of selecting a controller and connecting it to a machine model.

1. When you select File > New, IMSpost guides you through the necessary steps to ensure the proper machine definition:

e. Select a postprocessor library file from the Postprocessor Listing. A description of this

postprocessor and sample ISO code will display immediately in the areas to the right of the listing.

f. Select your machine configuration from the machine model library. Click the Browse button to view the choices.

g. Click Next.

2. Various dialogs will prompt you to enter specific information based on the postprocessor file you selected. Work through these and click Next after each dialog. If necessary use the Back button to return to any previous dialogs.

NOTE: The dialogs are related to the options available on the General menu.

3. Save the new postprocessor file by selecting File > Save.

Page 35: IMSPost Guide

File Menu and Options: Open

IMSpost Guide 27

Open

This option (also available with ) opens a browsing dialog that enables you to choose a previously defined postprocessor file (*.lib, *.prj).

NOTE: Multiple project files can be open at a time. Be sure to save your work before opening a different postprocessor file.

1. When you select File > New, IMSpost displays a projects browser in the directory you selected as the default postprocessor directory.

2. Select a project file from the list.

3. Click Open. The name of the project file appears in the window title bar.

General Options Several options available on the File menu are common to most applications: New, Open, Close, Save, Save As, and Exit. Procedures for these options are self-explanatory.

Option Button Keys Description

Close — — Closes the currently active postprocessor file. Save

— Saves the currently postprocessor file using the same

name. Save As — — Saves the currently postprocessor file using a different

name that you specify. Exit

— Quits the application. Prompts you to save documents.

Jobs A job in IMSpost is a collection of data that represents a complete working environment. You can save a job, exit IMSpost, and then load the same job to maintain your complete working environment between IMSpost sessions. Jobs are saved as ASCII-type data files, with the file extension: .job

When you select the Jobs option, two additional options are available:

Load Job to load a saved job. Save Job to save a job.

The data saved in a job file consists of the following:

• Current postprocessor (project) file name. • APT input file name. • NC code output file name. • APT/CL input type • Test commands entered in the Test Dialog. • Debug ON/OFF status • Debugger breakpoints • Debugger watch variables

Page 36: IMSPost Guide

File Menu and Options: Preferences

28 IMSpost Guide

Preferences The Preferences option enables you to customize the working environment to your requirements. You can customize working directories, file extensions, and other IMS default conditions.

1. Modify the working directories, as described below.

2. Modify the file extensions for each file type, as described below.

3. Set your default system editor, as described below.

4. Set the startup/default APT/CL input file type. Click the down arrow and select from the list. The license you purchase from IMS will allow your specific cam system(s).

5. Select the language to use.

6. Click OK to close the window and save the preference settings.

Page 37: IMSPost Guide

File Menu and Options: Preferences

IMSpost Guide 29

Working Directories Directories that you can customize are:

Field Description

Project files Pathname and directory where postprocessor files reside. APT/CL files Directory containing APT/CL data input files. Output files Default output directory for NC code files (*.nc, *.log). List files Directory for *.lst files (optional output file with commentary data). APT def files Directory for APT/CL definition translation files. Error files Directory for IMS system and user-defined errors. Language files Directory containing language conversion text files. Temporary files Directory where any temporary files are created during execution. Machine files Directory where IMSmodel machine definition files reside. User files Directory where user-created files are stored if you extend IMSpost to

incorporate your own programs or DLLs. Doc files Directory where postprocessor specification files reside.

The following directories also are used by the IMSpexec and/or IMSpost software. Note that you cannot customize the directories for these files.

Type Description

Not specified Directory for the license.ims file. Not specified Directory for IMS software executable modules. Bitmap files Directory containing IMSpost bitmap images. Help files Directory of help system files.

File Extensions File extensions that you can customize are listed below. Note that the extension on the right side of the dialog is associated with the file type immediately to the left.

Field Description

Project files… Extension Default file extension for project files. APT/CL files… Extension Default file extension for APT/CL files. Output files… Extension Default file extension for NC output files. List files… Extension Default file extension for output list files.

The following extension also is used by the IMSpexec and/or IMSpost software. Note that you cannot customize this extension.

Type Description

Not specified… Extension Default file extension for APT/CL definition files.

Page 38: IMSPost Guide

File Menu and Options: Error Definition

30 IMSpost Guide

Editor The default user editor is most commonly used for displaying output data when necessary (such as to display the output NC file when postprocessing is completed). For IMSpost Standard, or IMSpost Professional users, the user editor may also be used as an editor for the Macro Manager.

In the windows environment, the default is usually: notepad In the UNIX environment, the default is usually: vi

The IMS macro has special features built in the default editor. If you change your editor, these features may not be supported.

Error Definition This option opens a dialog for error checking. IMSpost maintains the error routines in the following directories:

system.err for standard system error messages. user.err for user-defined (custom) error messages.

NOTE: Your IMS license must include the postprocessor macro utility to support this feature.

When defining error messages, there are two important steps to consider:

1. Defining the error message (ID number and descriptive message). 2. Setting conditions to execute the error message (this is usually set up in a postprocessor

macro).

1. Select the System Error Definition or User Error Definition tab, as appropriate.

2. You can edit an existing error message. To do so, click on the Id or Message description and change the number and/or text. You also can click to select/unselect error conditions (described below).

The remainder of this procedure describes how to add an error message.

3. Click in the Id column at the bottom of the list. Enter an integer to represent the error message ID number.

Page 39: IMSPost Guide

File Menu and Options: Apt Definition

IMSpost Guide 31

4. Enter the text for the error message in the Message column.

5. Specify the condition(s) for the error message. Select (check) a box for these conditions, as appropriate:

Condition Description

Error Increment the error counter. Warning Increment the warning counter. Stop Stop execution of the program. SCOL Show the current output line. SCAC Show the current APT command. SCEM Show the current execution macro. SCEML Show the current line within macros execution. DBreak Break in the Debug mode. Format Indicate that the error contains a formatted string. Log Write the error to a log file. PPrint Write as a PPRINT command. List Write to the list file. Dialog Display a pop-up dialog message.

Apt Definition The Apt Definition option is used to translate the CAM system APT language.

Because IMSpost accepts different CL/APT formats from a variety of CAM systems, each individual CAM system has its own definition file. In the past, accounting for the differences between APT or CLdata formats for various CAM systems meant a different postprocessor for each format type. IMSpost makes it possible to use the same postprocessor, even if the input file formats are different. One way this is accomplished is through the use of an APT definition file. It is possible to have an APT definition file for each of the supported CLdata types within IMSpost.

Definition files translate the incoming postprocessor statements into the standard IMSpost statements. This enables IMSpost to translate all the incoming APT/CL statements before they are processed. Because of this, it enables you to use the existing macros in the library files.

An APT definition file contains a mapping of input commands and input command formats from the input CLdata format into the standard IMS format (or any format that you choose). Major words, minor words, the order of parameters programmed, and CLdata values can be mapped to a standard format.

IMSpost offers you two ways to edit these files. You can edit the DEF file (see Using DEF (Definition) Files) or use the Apt Definition option (on the File menu) to alter the definition file as described below.

Page 40: IMSPost Guide

File Menu and Options: Apt Definition

32 IMSpost Guide

Altering the Definition File With the Apt Definition Option

Tab Description

Major Words Indicates the mapping of major and minor words. The word in the Name column represents your CAM system. The word in the Replace column represents the IMS term to which the CAM system word will be changed.

Minor Words

Command Enables you to specify a translation statement that requires values or modify the order of the command syntax (the order in which the values are output). For example, to convert this APT statement, it would appear in the Name column:

LOAD/TOOL,1,ZOFF,5,ADJUST,1

The following would appear in the Replace column: LOADTL/1,ADJUST,1

You can use the Minor and Variable buttons to modify minor word or variable definitions. You can change the word or variable index and/or value/expression. To do so, click to highlight the information to change and then enter new information. For example:

Page 41: IMSPost Guide

File Menu and Options: Apt Definition

IMSpost Guide 33

Tab Description

See Changing the Syntax Order.

String Indicates the mapping of CLdata values. The word in the Name column represents value. The string in the Instruction column represents the instruction associated with the value.

NOTE: All values are represented by the # sign.

Changing the Syntax Order For example, if your existing CAM system outputs:

MULTAX/

you can map it to: MULTAX/ON

Similarly, you can map: LOADTL/5,ADJUST

to: LOADTL/5,ADJUST,5

When there are values associated with a command, you can arrange the command syntax order by clicking the Variable button. This enables you to rearrange the order of values. A good example is a CYCLE statement:

CYCLE/DRILL,#,#,IPM,#

where the first value (#) represents hole depth, the second value represents the clearance plane, and the last value represents the feed. To translate this statement for IMSpost, you would enter:

CYCLE/DRILL,#,IPM,#,#,#

Because the feed parameter has been rearranged, the order must be defined within the Apt Definition Commands dialog.

The # numbers represent the values on your CAM system. The CLDATA numbers represent the new order. When these need to be repositioned, highlight the name and then click the Variable button to associate the new order.

Page 42: IMSPost Guide

File Menu and Options: Apt Definition

34 IMSpost Guide

CAM (Name): LOADTL#,ADJUST

IMSpost (Replace): LOADTL/#,ADJUST,#

Index: Value/Expression: #1 CLDATAN.1 #2 CLDATAN.3

The first value (for the tool) is represented as #1 with a value of CLDATAN.1 (the first value in your APT command). The second value (for tool offset) is represented by #2 with a value of CLDATAN.3 (the third value in your APT command). For example:

LOADTL/1,ADJUST will translate to LOADTL/1,ADJUST,1

If you wanted to ignore the third value in your APT statement and always use the tool number, you could define the second variable as:

#2 CLDATAN.1

Math functions are also allowed. For example: #2 CLDATAN.1 + 1000 #3 CLDATAN.4/2

NOTE: IMSpost knows which definition file to read based on what type of APT/CL input you select. While you are in debug mode, you should see the statement translated properly. IMSpost only translates statements coming in from a file. It will not translate statements you enter in the Test dialog.

NOTE: IMSpost reads the DEF file when IMSpost is activated. Therefore, if any changes are made to any of the DEF files, you must exit and re-enter the IMS environment to incorporate these changes.

Page 43: IMSPost Guide

File Menu and Options: Apt Definition

IMSpost Guide 35

Using DEF (Definition) Files For example, one APT command could be:

UNITS/INCH

The standard IMS library macro supports the command UNIT/INCHES. In order to do a direct translation of this statement, go into the appropriate DEF file (in the /deffiles directory) and add the following statement:

1,UNITS,UNIT

The above example will translate all major words UNITS into UNIT. (The 1 value signifies major words.) Additional examples are:

1,FEEDRATE,FEDRAT Maps FEEDRATE to FEDRAT; use FEDRAT/* macro. 1,LOAD,LOADTL Maps LOAD to LOADTL; use LOADTL/* macro.

In the example below, all minor words INCH are translated to INCHES. (The 2 value signifies minor words.)

2,INCH,INCHES

This example will map one statement into another:

3,MULTAX/ The 3 value signifies an incoming statement. 4,MULTAX/ON The 4 value signifies an outgoing statement. 6,END APT STATEMENT

There may be some commands for which you have to rearrange the parameters. A CYCLE statement is a good example, since every CAM system has its own set of standards. IMSpost interprets the CYCLE/DEEP statements as:

CYCLE/DEEP,FEDTO,#,INCR,#,MMPM,#,RAPTO,#

But, your CYCLE/DEEP statement may look something like this: CYCLE/DRILL,DEEP,STEP,#,MMPM,#,RAPTO,#,FEDTO,#

Because these type of statements include values, it is important to map out the proper order: 3,CYCLE/DRILL,DEEP,STEP,# 1,MMPM,#,RAPTO,#,FEDTO,# The number 3 signifies the incoming statement. 4,CYCLE/DEEP,FEDTO,1,INCR,# ,MMPM,#,RAPTO,# The number 4 signifies the outgoing statement. 5,1,CLDATAN.4 Use the 4th value from the incoming statement. 5,2,CLDATAN.1 Use the 1st value. 5,3,CLDATAN.2 Use the 2nd value. 5,4,CLDATAN.3 Use the 3rd value. 6,END APT STATEMENT

Page 44: IMSPost Guide

File Menu and Options: Create Doc

36 IMSpost Guide

Use the following numbers as the first value in a line in a DEF file:

1 Use when only translating major words (UNITS/xxx). 2 Use when translating all minor words (xxx/INCHES). 3 INCOMING statement (your CAM system). 4 OUTGOING statement (IMSpost translation). 5 Set order of values. It is not necessary to rearrange values not recognized by the postprocessor macro. 6 End of statement translation. This is not necessary when only using 1 or 2. All others should close with this.

Create Doc This option provides a utility to create a postprocessor documentation file. This file contains all the letter addresses and machine codes supported by the post. Machine axis data is also included.

To show examples of postprocessor commands, you can select the file: GenAPt.syntax (Refer to the overview of GenAPt.syntax at end of this description.)

1. Click the browse button to the right of the Apt Syntax File field. Select GenApt.syntax or, if you choose not to have these examples in your *.doc files, leave this area blank.

2. In the Doc File field, enter a filename with the extension: .doc

3. Specify the Input type by clicking the down arrow and selecting a type from the list provided.

4. Tailor your documentation file by selecting one option: Minimum, Full, or Custom.

Button Description

Minimum Includes machine codes, controller addresses, and machine limits. Full Includes same data as above, plus a few extras. Custom Enables you to pick/omit sections and enter text for your own custom

documentation. When Custom is selected, IMSpost enables you to choose the items and sections of the machine/controller. If any of the displayed sections are not required, select the Skip checkbox. It is recommended to try a few of these options to see the various results.

5. Click the Go button. The file will reside in the /docfiles directory.

Page 45: IMSPost Guide

File Menu and Options: Description

IMSpost Guide 37

GenApt.syntax The GenApt.syntax file contains all the postprocessor statements to be included in the document. This generic file is supplied by IMS and can be easily modified for additional statements. The actual APT statements that will be tested are located in the /GenApt directory.

A breakdown of GenAPT.syntax is: MODE,postprocess - designates postprocessor documentation PATH,GenApt COMMAND,SPINDLE - name of file (in /GenApt directory) to be tested SYNTAX,SPINDL / [s] [RPM|SFM|SMM] [CLW|CCLW - available syntax APT,CLW,CCLW - test SPINDL with CLW and CCLW parameters EXT,apt - name of extension END - end of command definition

Description The Description option enables you to maintain a history of the postprocessor development. The Description dialog includes several tabs, as described below.

Description

Click this tab to enter freeform text describing the postprocessor. Place your cursor in the text area and enter text.

Page 46: IMSPost Guide

File Menu and Options: Description

38 IMSpost Guide

History

Click this tab to enter freeform text regarding the history of the postprocessors development and use. The following information and buttons are provided:

Field/Button Description

Text Area Displays freeform text describing the history of the project. Place the cursor in the text area and enter text.

Date List Displays the dates of the text entries. Click the date to see the text entry (displayed in the text area) for that date.

New Adds the current date to the list. If you add enough history entries, this date list will scroll.

Delete Deletes a selected date and the associated freeform text from the tab. TIP: History can be very useful for postprocessor development and modifications, particularly if more than one person is supporting postprocessor development. It is a good idea to comment on macros that have been changed, added, or deleted.

Page 47: IMSPost Guide

File Menu and Options: Description

IMSpost Guide 39

Detail

Click this tab to provide detailed information about the postprocessor in one easily accessible location. The following information is provided:

Field Description

Support Cam Indicates the supported format as one of the following: APT (general APT), STRIM (STRIM APT), EUCLID (EUCLID APT), PRELUDE (Prelude Machinist), MACHINIST (EUCLID Machinist), NCI (NCI Intermediate), CATIA, PTC APT, CV APT, UG APT, IBM Binary (IBM 360/370 binary CL), or DUCT.

Confidence Indicates the confidence as: PROVE Approved by usage testing. IMS Approved by IMS. PPCC Approved by PPCC. PARTNER Created by an IMS partner. AGENT Created by an IMS AGENT. USER Created by an IMS user. TRY Untested post.

Controller Specifies the controller that the postprocessor describes. Machine Specifies the machine that the postprocessor is designed to control. Post Version Specifies the number (version) of the post. Project Version Specifies the number (version) of the project. User Version Specifies the number (version) of the user. Create

Specify the dates on which the project is created, modified, or frozen. Use the arrows to select dates. Modify

Freeze

Page 48: IMSPost Guide

File Menu and Options: Description

40 IMSpost Guide

Macro

Click this tab to enter freeform text regarding the macros used in the project.

Field/Button Description

Text Area Displays freeform text describing the macro selected from the macro list. Place the cursor in the text area and enter text.

Macro List Specifies the macro for which you want to display information. Click the dropdown arrow and select a macro.

TIP: You can also enter descriptive comments directly into the macro by opening the macro file from the Macro Manager.

Page 49: IMSPost Guide

File Menu and Options: Description

IMSpost Guide 41

IsoCode

Click this tab to list an example of the output of this postprocessor. You can place the cursor in the text area and enter text. (Cut-and-paste ISO code from a proven program.)

Page 50: IMSPost Guide

File Menu and Options: Description

42 IMSpost Guide

Notes

Page 51: IMSPost Guide

IMSpost Guide 43

Execute Menu and Options

You can easily test the postprocessor as it is being developed. For example, you can define one set of parameters, test them, and then move on to the next set of parameters.

With options on the Execute menu, you can postprocess and debug an entire file or enter the specific commands you want to test. The Execute menu provides options to customize postprocessor execution:

Option Button Description

Postprocess

Displays options and enables you to execute an entire program.

Test Commands

Displays options and enables you to perform an on-line test of commands, executing a partial program.

Breakpoints — Available in the next software revision.

Postprocess

The Postprocess option (also available with ) displays options and enables you to postprocess a complete part file. For example:

Page 52: IMSPost Guide

Execute Menu and Options: Postprocess

44 IMSpost Guide

If you are in Controller Emulator mode, this is a reverse postprocessing option. For example:

For either mode:

1. In the Input file text box, enter the name of the APT source or CLdata file to be processed. You can click the Browse button to navigate to the file.

2. In the Output file text box, accept the default NC file created by IMSpost or enter another file name.

3. From the Input type dropdown list, select a file input type.

Your selection from this list sets a flag that indicates what CAM system generated the file or whether it is just a general format.

4. Select the Display output file option to view the output in Notepad (or another editor you have selected in the INI file).

Field/Button Description

Input file Displays the path for the input file to be postprocessed. Either enter the path to the file or click Browse to select the file. The default directory for a search is set through the Preferences option.

Output file Displays the path for the machine code output file created by the postprocessor. You can accept the default or enter your own path. NOTE: In Controller Emulator mode, the APT/CL output can then be postprocessed with a different postprocessor, giving you the ability to convert existing NC-code files from one machine/controller format to another.

Page 53: IMSPost Guide

Execute Menu and Options: Test Commands

IMSpost Guide 45

Field/Button Description

List file Indicates that List file information is included in a report. Refer to Report.

Input type Sets a flag that can be checked internally so IMSpost knows what CAM system generated the file, or if it is just a general format.

Display output file Identifies whether the file will be displayed after postprocessing is completed. The EDT line in the INI file determines which editor is used for this display. By default, Notepad is used.

Enable machine animation

Enables animation of the machine graphic.

Execute Begins postprocessing (Postprocessor mode) or reverse postprocessing (Controller Emulator mode).

Debug Opens the Debug window used for debugging errors in the code. Refer to the Debug description.

Test Commands

The Test Commands option (also available with ) displays options and enables you to perform online testing of a single APT command or group of commands. You can manually enter the command(s) you want to test, or cut-and-paste a section from an existing APT/CL program into the top display.

NOTE: In Test mode, IMSpost does not interpret or translate various CAM systems. The statements processed in the Test dialog must meet the standard APT format

As shown on the next page, the following fields and buttons are available.

Field/Button Description

Input Commands Displays the input commands (in the upper scrollable area). Click to place your cursor in this area and enter as many commands as you would like to test. Enter one command per line.

Output Displays the postprocessed output from the commands entered in the upper scrollable area. The output is displayed after you click Execute.

List file Indicates that List file information is included in a report. Refer to Report.

Input type (Postprocessor mode only) Sets a flag that can be checked internally so IMSpost knows what CAM system generated the file, or if it is just a general format.

Enable machine animation

Enables animation of the machine graphic.

Execute Tests the commands entered in the Input Commands (upper scrollable area). the results appear in the Output box.

Debug Opens the Debug window used for debugging errors in the code. Refer to the Debug description.

Page 54: IMSPost Guide

Execute Menu and Options: Test Commands

46 IMSpost Guide

Page 55: IMSPost Guide

Execute Menu and Options: Debug

IMSpost Guide 47

Debug The Debug feature is used to troubleshoot errors in the code. You can debug one or more APT commands (through testing) or an entire postprocessor file.

NOTE: If you use Debug from the Postprocess feature (Execute > Postprocess) and you select or enter an output file that already exists, the system will prompt you to overwrite the file. If you do not want to do so, click No and enter a different file name. Otherwise, click Yes to overwrite.

The system opens debug windows. For example:

Double-click on a macro listed in the Macro Manager list. The associated code will display to the right. The windows that open can include the following. Information displayed in these windows changes to reflect changes within the selected macro.

• Macro Manager—the macro list. • APT-CL View—the APT/CL command being executed. • ISO (Code) View—the ISO code of the command being executed. • Watch Window—the area where you can test variables. This window includes four tabs:

— Autos automatically displays variables and values. To examine a variable, double-click it and then enter a value to test. Note that all text must be enclosed in quotation marks.

— Watch enables you to set what you want to look at. — Call Stack shows where you came from in a stack if you want to step in. — Output provides an internal data dump if the option is displayed.

• Machine—the display of the machine graphics.

To determine the windows that open, select View > Debug Windows and then check each desired window title. Use these windows to debug one or more APT commands (through testing) or an entire postprocessor file.

Macro List

APT/CL Command Being Executed

ISO Code of the Command Being

Executed

Selected Macro

Watch Window

Page 56: IMSPost Guide

Execute Menu and Options: Debug

48 IMSpost Guide

When you set (but do not click) your mouse on a variable, value information is displayed. For example:

Click (or press F5) to start debugging. This instructs IMSpost to execute the program until a breakpoint is encountered.

NOTE: When in debug mode, IMSpost automatically sets breakpoints at the beginning of the INIT and INIT_CFG macros as well as the first statement encountered in your test or part file.

When you complete your debugging work, click (tool bar options are described below). If the system cannot find the output you indicated, you are asked if you want to create one. If you click Yes, you can then use the text editor to modify and save the file.

Page 57: IMSPost Guide

Execute Menu and Options: Debug

IMSpost Guide 49

Debug Tool Bars and Options The Debug feature includes several sets of options available for use. Options on the Debug tool bar (above the Macro Manager and under the secondary tool bar) control the debugging process:

Button Keys Description

Ctrl F2 Toggle Bookmark—Toggles the bookmark feature to insert or remove

bookmarks.

F2 Next Bookmark—Goes to the next temporary bookmark.

Shift F2 Previous Bookmark—Goes to the previous temporary bookmark.

— Clear All Bookmarks—Clears all bookmarks in the window.

Ctrl F Find—Searches for specified text.

F9 Insert/Remove Breakpoint—Inserts a breakpoint at the current location

or removes the currently selected breakpoint. To insert a breakpoint, position your cursor at the line where you want to

insert a breakpoint. Click . A red marker appears to the left of the line. For example, a breakpoint is inserted here at line 31:

To delete a breakpoint, position your cursor at a line where a breakpoint

exists (such as line 31 above) and click .

— Remove All Breakpoints—Removes all existing breakpoints.

F5 Go—Starts debugging or continues after a breakpoint. This instructs

IMSpost to execute the program until a breakpoint is encountered.

F10 Step Over—Steps over the next macro instruction.

F11 Step In—Steps in and enters the macro that is being called by the current

instruction.

— Step Out—Steps out of (exits) the macro that was called and returns to

the next statement it was called from.

— Run to Cursor—Runs (executes) to a statement designated by the cursor

line.

— Next Input—Steps to read the next instruction line.

— Stop—Stops the debugging execution.

— Examine—Examines the variable data to see what various machining

conditions are active. The system examines macro variables, machine motion, and controller options.

Page 58: IMSPost Guide

Execute Menu and Options: Debug

50 IMSpost Guide

Button Keys Description

— Quit—Quits and exits the debug environment.

In addition to the options on the Debug tool bar, you can use the buttons on the Macro Manager:

Button Description

New—Enables you to define a new macro.

Edit—Enables you to edit a macro after selecting it on the Macro Manager list.

Save—Saves the current macro status.

Save All—Saves all changes made to all macros.

Delete—Deletes a macro that is selected on the Macro Manager list. NOTE: It is not a good idea to delete a macro unless you are absolutely sure the macro should not be supported within the postprocessor. The library files contain macros that are called up with other macros. It is not a good idea to delete a macro just because it does not look familiar. Rather than deleting the macro, enter a BREAK statement as the first macro instruction. For example:

SPINDL/* BREAK

Later, you can “comment out” the BREAK statement and the macro will be reactivated. For example:

SPINDL/* *BREAK

Export—Opens a browser and enables you to export the selected macro(s) to another postprocessor.

Import—Opens a browser and enables you to import a macro(s) from another postprocessor.

Macro properties—Specifies the macro type.

Search—Searches for specific text throughout the Macro Manager list.

Additional options are available on the Edit menu. Note that some of the Edit options are duplicated on the tool bars described above and are not repeated here:

Option Button Keys Description

Undo — Alt Backspace

Reverses the previous action.

Redo — Ctrl Y Restores the previous action that was reversed (undone).

Cut

Shift Delete

Cuts the current selection and places it on the Clipboard.

Copy

Ctrl C Copies the current selection and places it on the Clipboard.

Page 59: IMSPost Guide

Execute Menu and Options: Debug

IMSpost Guide 51

Option Button Keys Description

Paste

Ctrl V Pastes the cut or copied selection from the Clipboard.

Select All — Ctrl A Selects all information, such as all lines of code in a macro.

Replace — Ctrl H Replaces currently selected text with the information on the Clipboard.

Line Numbers — — Displays line numbers, when this option is checked. Go to line — Ctrl G Enables you to go to a line number that you specify:

Enter the line number, then click Go To.

New

Macros are executed by major words. When you click , the following dialog is displayed:

Enter a macro name and click OK. (Do not add the / code or any syntax.) For this example, IMSpost automatically creates the following macro display:

Page 60: IMSPost Guide

Execute Menu and Options: Debug

52 IMSpost Guide

The macro name SWITCH represents the command name that activates the macro of the same name.

/* is a wildcard that signifies that IMSpost will trap all the SWITCH/ commands encountered in the part file. As a default, IMSpost always adds the /* to the command name that is entered.

Each macro must end with a RETURN statement to signify the end of the macro logic and instructs IMSpost to return and read the next CL/APT statement.

You could enter SWITCH/OFF for the macro name, but then your macro would only be called for SWITCH/OFF commands.

With the new macro dialog open, you can insert your macro commands. For example, click before the R in RETURN and press Enter to open a line between the macro command SWITCH/* and RETURN statements.

You can close the view of the macro by clicking the X on the right of the macro name tab:

Edit

To edit an existing macro, select it from the Macro Manager list and then click . Or, double-click the macro name on the list. The macro is displayed. The following example shows the COOLNT macro.

Page 61: IMSPost Guide

Execute Menu and Options: Debug

IMSpost Guide 53

All macros start with the word that activates the macro (in this case, COOLNT/*).

Any statement that begins with an asterisk (*) represents a comment. Comments must start with an asterisk and cannot be combined with the instruction.

All macros must end with a RETURN command. This signifies the end of the macro and instructs IMSpost to return and read the next CL/APT statement.

Import

Click . An Import browser is displayed:

Field/Button Description

All Selects all macros in the list. None Deselects all macros in the list. View Views a selected macro. Verify Reconfirms that the imported macro already exists in the open project.

The specific macro or macros you selected are copied out of the “import” project and into the current project.

If you import a macro from another postprocessor and there is currently a macro with the same name, IMSpost will indicate that you are about to overwrite an existing macro and provide the option to cancel the procedure.

Page 62: IMSPost Guide

Execute Menu and Options: Debug

54 IMSpost Guide

Macro Properties Typically, macros are designed to determine and output machine or controller conditions. They can also be designed to calculate a mathematical function. They can be assigned to do a mathematical function and return the value to the macro that called it.

To specify how you want each macro will perform its operation, double-click to select the macro from the Macro Manager. (Use the Ctrl key to select more than one macro.)

Click . The Confirm Macro Type dialog is displayed:

Field/Button Description

Include Provides the ability to load a macro (same name) from a master file. This macro must exist in the file that is designated in the display area. This instructs IMSpost to override the existing macro with the one specified in the Include pathname display. This enables you to build and maintain a library of custom macros that will be used with other postprocessors. The advantage is that you can maintain a single library of macros. This master file only needs to contain macros that will be shared with other postprocessor files. For the recipient postprocessors, be sure to check the Include option for all macros contained in this master file. If it is checked, the existing macros will be overridden by the master file. This is a powerful feature for maintaining consistency among your postprocessor library. You only have to update your master file and all your other posts will be updated when they are executed. NOTE: The Include checkbox gives you the advantage of ensuring that your postprocessors always use your current custom macros. For example, if you have additional custom logic you want to maintain in all of your SPINDL macros, make sure this particular SPINDL macro exists in your master file. This way when you update or create a new post, this SPINDL will be imported from your designated master file.

Page 63: IMSPost Guide

Execute Menu and Options: Debug

IMSpost Guide 55

Field/Button Description

Function Indicates that a macro is categorized as a function. That is, the macro can be designed to return a mathematical value. When this option is selected, the macro will compute and return the value to the macro that called it. Two steps are necessary: 1. Define the function. This can be any valid programming logic that

IMSpost can interpret. The Function option must be checked for the macro.

2. The macro function must be called from another macro. For example, define the macro logic (this macro divides the first value by 2.5): BBB/* B = CLDATAN.1/2.5 RETURN(B)

To call the macro function: LOADTL/* * call macro function BBB/100 C = 4 + BBB(100)

Check Syntax Enables macro syntax checking. You can instruct the system on what the allowable statements can be. Typically, when IMSpost reads a command in the APT/CL file, it looks to find a macro with the same name. If any of the parameters in the statement are not defined with the macro, usually the statement is ignored. If you select the Check Syntax option, you can specify what allowable commands (combinations) can be checked to match the defined syntax. If IMSpost reads a command that does not exist, an error is generated.

Postprocessor Specifies the macro logic is for a postprocessor operation. (Usually a macro’s logic is either for a postprocessor or reverse-postprocessor operation.) A macro could be designed to do some type of a general file service that has no relation to posting or reverse-posting. For this reason, both the Postprocessor and Revpost checkboxes could be activated. Usually these checkboxes are controlled by the type of project being created (postprocessor or reverse-postprocessor).

Revpost Specifies the macro logic is for a reverse-postprocessor operation. (Usually a macro’s logic is either for a postprocessor or reverse-postprocessor operation.)

Yes Saves changes and exits the Confirm Macro Type dialog. No Exits the Confirm Macro Type dialog without saving changes. All Saves all changes (when you select more than one macro from the Macro

Manager) and exits the Confirm Macro Type dialog.

Page 64: IMSPost Guide

Execute Menu and Options: Breakpoints

56 IMSpost Guide

Search

To search for text on the Macro Manager list, click . The Macro Search dialog is displayed:

Enter text on which to search and then click Find. You can select the Match Case option and the search will match the uppercase and lowercase characters that you enter. (For example, it will not find “FLOOD” if you enter “Flood” and select Match Case.) In addition, you can select the option to match the complete word. In this case, the search will not find “FLOOD” if you enter “FLO.”

FLOOD is searched in the example below. The result of the search shows the name of the macro in which the text was found, the line on which the text appears in the macro, and the text line. In this example, FLOOD was found on lines 7 and 8 in COOLNT/* and on line 165 in INIT/*.

Breakpoints The Breakpoints option will be available in the next software revision.

Page 65: IMSPost Guide

IMSpost Guide 57

General Menu and Options

The General menu includes the following options, which are not specifically associated with machines and machine controllers:

Option Button Description

Start Program — Enables you to enter code for the start of every program. Input/Output Units

— Enables you to enter default units.

Part Number — Specifies how the postprocessor should handle part number processing.

Start Operation

— (Catia Only) Enables you to enter code for the beginning of all Catia operations.

Tool Change — Opens a tool change dialog. Coolant

Opens the Coolant dialog to set coolant codes and conditions.

Cutter Comp — Opens the Cutter Comp dialog. Feedrate — Displays feed tabs. Spindle

Opens the Spindle dialog to set spindle codes and conditions.

Drill Cycles

Opens the Cycle dialog to define drill cycle parameters.

End Operation — (Catia Only) Enables you to enter code for the ending of all Catia operations.

End Program — Enables you to enter code for the end of every program. Threading — Available in the next software revision. Motion Codes

Sets function codes and conditions for rapid and contouring motion.

Sort Output — Sort registers and G/M code functions. New Command

— Enables you to automatically create a macro.

Macro manager

Opens the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed.

Page 66: IMSPost Guide

General Menu and Options: Start Program

58 IMSpost Guide

Start Program This option enables you to enter text to be displayed at the start of a postprocessor output file. Enter the line or lines of text as you would like them to appear in the output file.

NOTE: This option also is available with Start of Program on the Checklist.

Note the following while entering text:

• You do not need to include sequence numbers (N-codes). These are automatically added to the blocks at output if you turned sequence numbering on (see Block Number on the Controller menu).

• Spaces are not required between the codes.

• You can sort the output (see Sort Output on the General menu).

• Any data that you enter in double quotation marks (") is output directly without sorting or tokenizing by the postprocessor.

• If your output file ends with a special character (such as %), this character should be entered using the Tape Format option.

NOTE: The lines of code you enter here are converted to OUTPUT macro commands and entered in the INIT_CFG macro. You can add additional macro logic to this macro to perform more sophisticated start-of-program sequences.

Page 67: IMSPost Guide

General Menu and Options: Input/Output Units

IMSpost Guide 59

Input/Output Units This option enables you to customize the input and output units and the associated function codes for your postprocessor.

Field Description

Metric Units Displays the function code used to specify that the format of the postprocessor is output in metric units.

English Units Displays the function code used to specify that the format of the postprocessor is output in English units.

Input Specifies Metric (MM) or English (INCH) to describe the format of the Input file (APT/CL) values.

Output Specifies Metric (MM) or English (INCH) to describe the format of the values written to the output NC code file.

The Input and Output selections made in the “Units type” section of this dialog will also be reflected in the Input and Output Units fields in the Register Format dialog.

NOTE: If the Input type and Output type are not the same, the input values and output values will be different. For example, using Input type English and Output type Metric, GOTO/1, 2, 3 would output G1 X25.4 Y50.8 Z76.2

Page 68: IMSPost Guide

General Menu and Options: Part Number

60 IMSpost Guide

Part Number This option specifies how the postprocessor should handle part number processing.

If you are being prompted at each execution of your postprocessor for a part number, you may stop this option by selecting either one of these options (as described below):

• Ignore Part Number processing • Read from APT/CL PARTNO statement

Field Description

Par Number Options Enables you to define how the part number is processed. Select one of the following: Ignore Part Number processing

Indicates the postprocessor will not output any codes or prompt the user for any part number information.

Read from APT/CL PARTNO statement

Indicates the postprocessor will get the part number from the APT/CL file and, if not found, use the default number value as specified below.

Read from APT/CL if exists; else prompt user

Indicates the postprocessor will get the part number from the APT/CL file and, if not found, prompt the user to enter a value.

Prompt user at runtime

Indicates the postprocessor will always prompt the user at runtime and ignore the PARTNO command from the APT/CL file.

Page 69: IMSPost Guide

General Menu and Options: Start Operation (Catia Only)

IMSpost Guide 61

Field Description

Prefix string for output with part number

Specifies a character string to be output before the PARTNO number.

Part number register Specifies the controller register to be output with the part number value.

Default Part number value

Uses this value for the part number unless one is entered by the user at runtime or found in the APT/CL PARTNO statement (depending on the Part Number Option selected above).

Sequence numbers off with part number

Outputs a part number without a sequence number on the N-code output.

Start Operation (Catia Only) This option enables you to enter code for the beginning of all Catia operations. It updates the START_OP macro. This macro is called from the Catia START_OP apt statement.

NOTE: This option also is available with Start Operation on the Checklist.

Enter the line or lines of text as you would like them to appear in the output file. It is not necessary to include spaces or sequence numbers.

NOTE: If your output file begins with a special character (such as %), this character should be entered with the Tape Format option.

Page 70: IMSPost Guide

General Menu and Options: Tool Change

62 IMSpost Guide

Tool Change This option opens a Tool Change dialog to customize the tool change output for your postprocessor. Two tabs are provided: Tool Change and Turret Index.

NOTE: This option also is available with Tool Change on the Checklist.

Tool Change

NOTE: The parameters set in this dialog are used in the LOADTL macro (or other macro specified). Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the LOADTL macro to perform more sophisticated tool change sequences. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Page 71: IMSPost Guide

General Menu and Options: Tool Change

IMSpost Guide 63

Field Description

Auto tool change function

Displays the function code used to specify an automatic tool change. For example, enter M06. For Advanced Users: The function specified in this field uses the function group variable MODE.MACHINE.TOOLCHG.

Tool number register Displays the code to be output with the tool number. Select from a list of predefined registers. For example, select T.

Length Compensation Register

Displays the code to be output with the length compensation value. Select from a list of predefined registers. For example, select H.

Time (mins) to change tools

Displays the time in the format 0.0 that is needed to change tools. For a 30 second tool change, you would enter 0.5

Output codes on a separate block

Specifies how you would like the tool change codes to be output. Select either this radio button or the one below it.

Output codes on the next motion block

Specifies how you would like the tool change codes to be output. Select either this radio button or the one above it.

Cancel coolant before tool change

Determines whether (checked) or not (unchecked) the postprocessor outputs a command to cancel the coolant before a tool change.

Cancel spindle before tool change

Determines whether (checked) or not (unchecked) the postprocessor outputs a command to turn off the spindle before the tool change.

Auto coolant after tool change

Automatically reinstates the coolant condition after the tool change.

Enable tool pre-selection

Activates tool pre-selection. The postprocessor will read ahead to get the next tool number and output the next tool value after the current tool change.

Reload 1st tool at the end

Reloads the first tool at the end of the program.

Ignore same tool Instructs the postprocessor to ignore redundant tool change statements.

Tool Number Incremental Start

Ignores the tool numbers programmed in the APT/CL file and outputs tool numbers increasing incrementally by one. The start value can be set in this field as well.

Output before tool change

Specifies the ISO code lines required to be output before the initial tool change code block (one entry field for initial tool, another for all subsequent tools).

Output after tool change

Specifies the ISO code lines required to be output after the tool change code block (one entry field for initial tool, another for all subsequent tools).

Force Register Output after Tool Change

Enables you to enter register addresses you want the postprocessor to force out. For more than one register, separate with a comma delimiter (for example: X,Y).

If your output shows Z motion first after a tool change and you prefer to see XY, before the Z axis motion click the More… button (on the Machine > Motion dialog )for the Z axis in order to display the extended axis dialog. Then activate the checkbox for “Move to home at tool change” and enter a value for the Z home position. The postprocessor will not output this point, but it will

Page 72: IMSPost Guide

General Menu and Options: Tool Change

64 IMSpost Guide

be updated internally. This home position should reflect a point higher than the point it will be traveling to after the tool change.

Turret Index

Field Description

Turret index CLW function

Displays the function code used to specify a clockwise turret index.

Turret index CCLW function

Displays the function code used to specify a counterclockwise turret index.

Turret index register Displays the code to be output with the turret index. Select from a list of predefined registers. For example, select T.

Page 73: IMSPost Guide

General Menu and Options: Tool Change

IMSpost Guide 65

Field Description

Offset Register Displays the code to be output with the offset. Select from a list of predefined registers. For example, select H.

Time (mins) to index turret

Displays the time in the format 0.0 that is needed to index the turret. For a 30 second turret index, you would enter 0.5

Output codes on a separate block

Specifies how you would like the turret index codes to be output. Select either this radio button or the one below it.

Output codes on the next motion block

Specifies how you would like the turret index codes to be output. Select either this radio button or the one above it.

Cancel coolant before turret index

Determines whether (checked) or not (unchecked) the postprocessor outputs a command to cancel the coolant before a turret index.

Cancel spindle before turret index

Determines whether (checked) or not (unchecked) the postprocessor outputs a command to turn off the spindle before the turret index.

Auto coolant after turret index

Automatically reinstates the coolant condition after the turret index.

Turret Number Incremental Start

Ignores the turret numbers programmed in the APT/CL file and outputs turret numbers increasing incrementally by one. The start value can be set in this field as well.

Output before turret index

Specifies the ISO code lines required to be output before the initial turret index code block (one entry field for initial turret, another for all subsequent turrets).

Output after turret index

Specifies the ISO code lines required to be output after the turret index code block (one entry field for initial turret, another for all subsequent turrets).

Force Register Output after turret index

Enables you to enter register addresses you want the postprocessor to force out. For more than one register, separate with a comma delimiter (for example: X,Y).

Page 74: IMSPost Guide

General Menu and Options: Coolant

66 IMSpost Guide

Coolant

The Coolant option (also available with ) opens the Coolant dialog to customize the output of coolant codes for your postprocessor.

NOTE: This option also is available with Coolant Definition on the Checklist.

NOTE: The parameters set in this dialog are used in the COOLNT macro. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the COOLNT macro. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Field Description

Coolant off Displays the function code used to output code to turn off the coolant. For example, enter M09. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.COOLNT.OFF.

Mist coolant Displays the function code used to output code to activate the mist (or similar) coolant type. For example, enter M07. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.COOLNT.MIST.

Flood coolant Displays the function code used to output code to activate the flood (or similar) coolant type. For example, enter M08. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.COOLNT.FLOOD.

Thru coolant Displays the function code used to output code to activate the Thru tool (or similar) coolant type. For example, enter M53. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.COOLNT.THRU.

Page 75: IMSPost Guide

General Menu and Options: Cutter Comp

IMSpost Guide 67

Field Description

Air coolant Displays the function code used to output code to activate the Air (or similar) coolant type. For example, enter M54. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.COOLNT.AIR.

Output code on a separate block

Outputs codes immediately if this option is selected.

Output on the next motion block

Outputs codes with the following motion block if this option is selected.

NOTE: Each function is unique within IMSpost. If you want to use the same code (such as M8) for more than 1 option, you must enter it this way: M8@MIST

Cutter Comp This option opens the Cutter Comp dialog to customize the output of cutter compensation codes for your postprocessor.

NOTE: This option also is available with Cutter Compensation on the Checklist.

NOTE: The parameters set in this dialog are used in the CUTCOM macro. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the CUTCOM macro. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Page 76: IMSPost Guide

General Menu and Options: Cutter Comp

68 IMSpost Guide

Field Description

Cutter compensation left code

Displays the function code used to output code to activate cutter compensation to the left of the cutter center line. For example, enter G41. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CUTCOM.LEFT.

Cutter compensation right code

Displays the function code used to output code to activate cutter compensation to the right of the cutter center line. For example, enter G42. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CUTCOM.RIGHT.

Cutter Compensation 3d code

Specifies the function code for special 3D compensation. If your controller does not support this, leave this field empty.

Cutter compensation off code

Displays the function code used to output code to cancel cutter compensation. For example, enter G40. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CUTCOM.OFF.

Compensation Register Name

Displays the code to be output with the cutter compensation value. You select from a list of defined registers. For example, select D. If the register does not exist, you must add it with the Register Format option.

Normal X Register Normal Y Register Normal Z Register

Enables you to browse and select the registers that represent machine X, Y, and Z (P, Q, and R) if your controller supports cutcom vectors.

Output codes on a separate block

Outputs cutter compensation codes immediately.

Output codes on the next motion block

Outputs cutter compensation codes in following motion block.

Output cutter compensation off on the next motion block

Turns off output of cutter compensation codes in following motion block.

Page 77: IMSPost Guide

General Menu and Options: Feedrate

IMSpost Guide 69

Feedrate The Feedrate option customizes the output of feedrate codes for your postprocessor.

NOTE: This option also is available with Feedrate Definition on the Checklist.

NOTE: The parameters set in this dialog are used in the FEDRAT macro. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the FEDRAT macro. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Field/Tab Description

Register used for feedrate value

Displays the code to be output with the feedrate value. You select from a list of defined registers. (Refer also to the Register Format option.)

Default feedrate value

Specifies the feed value you want the postprocessor to use if the program does not contain a FEDRAT statement before the cutting motion.

Output codes on a separate block

Outputs feed codes immediately.

Output codes on the next motion block

Outputs feed codes in the following motion interpolation block.

Feed/Minute tab Provides options to specify the function code and feed format for per minute values (either mm per minute or inch per minute).

Page 78: IMSPost Guide

General Menu and Options: Feedrate

70 IMSpost Guide

Field/Tab Description

Feed/Revolution tab Provides options to specify the function code and feed format for per-revolution values (either mm per revolution or inch per revolution).

Inverse Time tab Provides options to specify the special 1/T format used for some multi-axis motion definitions.

NOTE: The register format values defined in this dialog will be used for feedrate output values, regardless of the letter address format specified with the Register Format option. For example, changing the “Digit” format for the F register in the register format will have no effect on the output format of the F code, unless the format is also changed in this dialog.

Feed/Minute Use the options on this tab to specify the feed formats used for millimeters or inches per minute.

Field Description

Function code Enables you to enter the machine code that represents feed per minute mode.

Register format (mm) Specifies the number format for millimeter mode. Register format (inch) Specifies the number format for inch mode. Minimum feed/min. (mm) Enables you to enter the minimum per minute feedrate used for

millimeter mode. Maximum feed/min. (mm) Enables you to enter the maximum per minute feedrate used for

millimeter mode. Minimum feed/min. (inch) Enables you to enter the minimum per minute feedrate used for

inch mode. Maximum feed/min. (inch) Enables you to enter the maximum per minute feedrate used for

inch mode. If you program a feedrate over the maximum and you want the postprocessor to use the specified maximum feed, this maximum feed must be represented in the Register Format. Refer to Controller > Register Format (Advanced tab).

Page 79: IMSPost Guide

General Menu and Options: Feedrate

IMSpost Guide 71

Feed/Revolution Use the options on this tab to specify the feed formats used for revolutions (per revolution feed mode).

Field Description

Function code Enables you to enter the machine code that represents per revolution feed mode.

Register format (mm) Specifies the number format for mm per revolution mode. Register format (inch) Specifies the number format for inch per revolution mode. Minimum feed per rev. Specifies the minimum per revolution value. Maximum feed per rev. Specifies the maximum per revolution value.

Page 80: IMSPost Guide

General Menu and Options: Feedrate

72 IMSpost Guide

Inverse Time Some controllers use a formula to obtain a more efficient contouring feedrate. Typically the inverse time (I/T) feed number is calculated by dividing the programmed feed by the tool path distance. This calculated F-code is the inverse of the time required to move the programmed distance.

The tool path distance is the vectoral distance resulting from the combined axes for that motion.

Field Description

Function code Specifies the machine code that represents inverse time feed mode. Register format Specifies the number format for inverse time feed mode. Minimum feed per min Defines the minimum calculated feed number. Maximum feed per min Defines the maximum calculated feed number. Inverse time formula Enables you to specify the formula the postprocessor should use

when calculating the inverse time feed value. Active for motion type Provides options for the motion type:

Linear and Rotary Calculates I/T feed if the move contains both linear and rotary motion.

Rotary Calculates I/T feed if the move contains rotary motion only.

Linear Calculates I/T feed if the move contains linear motion only.

Page 81: IMSPost Guide

General Menu and Options: Feedrate

IMSpost Guide 73

Field Description

Cancel inverse time mode for rapid positioning motion

Specifies that the postprocessor will cancel I/T mode for all RAPID motions. I/T mode will automatically be reactivated based upon initial parameters. NOTE: To cancel, you can clear all the checkboxes for the Motion Type or comment out the HOOK statements in the INIT_CFG/* macro.

Simulate inverse time feedrate mode

Instructs the postprocessor to calculate the feed number based upon the actual length the tool tip moves.

NOTE: The formula you specify must be a valid definition that IMSpost can interpret, such as:

SYSTEM.FEED/SOLUTION.TOTAL_MOVE

This feature also works with the ASSIGN macro statement. This formula is stored in the system variable, SYSTEM.INV_TIME_FORMULA. ASSIGN("REGISTER.[SYSTEM.FEEDRATE_NAME].VALUE",SYSTEM.INV_TIME_FORMULA)

As an explanation: REGISTER.F.VALUE = programmed feed / total delta motion

SPECIAL NOTE: Because IMSpost utilizes SOLUTION variables for various inverse time formulas, it is important to turn off the internal motion processing within IMSpost. See the Linear tab for Motion Codes. These SOLUTION variables are only processed within the SOLUTION statements in the GOTO macro.

The controller manual for the particular machine will describe what inverse formula it supports. The four choices the formula browser provides are:

Formula Description

SOLUTION.TOTAL_MOVE Uses total linear and rotary delta motion. This is generally the formula most commonly used.

SOLUTION.LINE_DIST Uses the linear distance between the current tool position to the next tool position in part coordinates.

SOLUTION.CURVE_DIST Uses the linear distance between the current tool position and the next position. This involves interpolation that can dramatically slow down the processing time (not recommended of most cases).

SOLUTION.DELTA_DIST Uses the combination (delta) of linear and rotary axes without converting the rotary motion to mm or inches.

If the formula in your controller manual does not match any of these, you can enter it through the SYSTEM.INV_TIME_FORMULA = " ", or you can enter the formula in the blank display in the formula browser.

Page 82: IMSPost Guide

General Menu and Options: Spindle

74 IMSpost Guide

Spindle

The Spindle option (also available with ) opens the Spindle dialog to customize the output of spindle codes for your postprocessor.

NOTE: This option also is available with Spindle Definition on the Checklist.

NOTE: The parameters set in this dialog are used in the SPINDL macro. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the SPINDL macro. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Field Description

Clockwise rotation Displays the function code used to output code to activate spindle rotation in the clockwise direction. For example, enter M03. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.SPINDLE.CLW.

Counter-clockwise rotation

Displays the function code used to output code to activate spindle rotation in the counterclockwise direction. For example, enter M04. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.SPINDLE.CCLW.

Spindle off Displays the function code used to turn off the spindle. For example, enter M05. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.SPINDLE.OFF.

Spindle register Displays a list of defined registers from which you select the code to be output with the spindle speed value. For example, select S.

Default value (rpm) Displays the spindle speed in rpm. This value is used if the spindle is turned on and no value is specified.

Page 83: IMSPost Guide

General Menu and Options: Drill Cycles

IMSpost Guide 75

Field Description

Output codes on a separate block

Determines how you would like the codes to be output. Select this radio button or the one below.

Output codes on the next motion block

Determines how you would like the codes to be output. Select this radio button or the one above.

Drill Cycles

The Drill Cycles option (also available with ) opens the Cycles dialog to customize the output of canned cycle codes for your postprocessor.

NOTE: This option also is available with Drill Cycles on the Checklist.

NOTE: The parameters set in this dialog are used in the CYCLE and CYCLMOTN macros. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the CYCLE and CYCLMOTN macros. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Page 84: IMSPost Guide

General Menu and Options: Drill Cycles

76 IMSpost Guide

Field Description

Cancel Displays the function code used to output code to cancel a drilling cycle. For example, enter G80. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.OFF.

Drill Displays the function code used to output code to activate a standard drilling cycle. For example, enter G81. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.DRILL. APT word: DRILL

Face Displays the function code used to output code to activate a drill with dwell, or spot drill cycle. For example, enter G82. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.FACE. APT word: FACE

Deep Displays the function code used to output code activate a deep drill cycle. For example, enter G83. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.DEEP. APT word: DEEP

Tap Displays the function code used to output code to activate a tapping cycle. For example, enter G84. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.TAP. APT word: TAP

Bore Displays the function code used to output code to activate a boring cycle. For example, enter G85. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.BORE. APT word: BORE

Ream Displays the function code used to output code to activate a reaming cycle. For example, enter G86. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.REAM. APT word: REAM

Bakbor Displays the function code used to output code to activate a back boring cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.BAKBOR. APT word: BAKBOR

Manbor Displays the function code used to output code to activate a manual boring cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.MANBOR. APT word: MANBOR

Page 85: IMSPost Guide

General Menu and Options: Drill Cycles

IMSpost Guide 77

Field Description

Stpbor Displays the function code used to output code to activate a step boring cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.STPBOR. APT word: STPBOR

Brkchp Displays the function code used to output code to activate a break chip cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.BRKCHP. APT word: BRKCHP

LH Tap Displays the function code used to output code to activate a left-hand tapping cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.LHTAP. APT word: LHTAP

Finbor Displays the function code used to output code to activate a fine boring cycle. For Advanced Users: The function specified in this field uses the IMSpost function group variable MODE.CYCLE.FINBOR. APT word: FINBOR

User Indicates a user-defined cycle type. Cycle off output Determines the mode of output for the cycle off code—either on a block by

itself or on the next motion block. Depth Format Provides options to describe the depth format:

Register for total depth

Displays the register for the total drilling depth parameter.

Register for deep increment

Displays the register for the incremental depth for deep drilling cycles.

Register for deep retract

Displays the register for the retract parameter for deep drilling cycles.

Format Displays the format for the register depth parameter. • Absolute: Always absolute mode. • Incremental: Always incremental mode. • Absolute or Incremental: Based on current mode. • Invert sign (+/-): Sign reverse of standard tool

direction Clearance Plane Format

Provides options to describe the clearance plane format: Register for clearance plane

Displays the register for the clearance pane and/or retraction plane parameter (for example, R).

Page 86: IMSPost Guide

General Menu and Options: End Operation (Catia Only)

78 IMSpost Guide

Field Description

Format Displays the format for register depth parameter. • Absolute: Always absolute mode. • Incremental: Always incremental mode. • Absolute or Incremental: Based on current mode. • Invert sign (+/-): Sign reverse of standard tool

direction. Other Codes Provides options to describe other codes.

Register for dwell Displays the register used if a delay time code is required with this cycle.

Cycle block codes Adds the ISO codes entered in this edit box to the cycle definition block.

Simulated Cycle Sets this box to perform simulated drilling cycles. If canned drill codes do not exist, simulated cycles will be performed with a series of rapid motion, feed motion, dwells, etc.

Position Before Cycle

Sets this box to position the tool in the non-drilling axes before the canned cycle block. If this block is not checked, positioning may occur on the same block as the canned drill codes.

End Operation (Catia Only) This option enables you to enter code for the ending of all Catia operations. This dialog updates the END_OP macro, which is called from the Catia END_OP APT statement.

Page 87: IMSPost Guide

General Menu and Options: End Program

IMSpost Guide 79

End Program This option enables you to enter text to be displayed at the end of a postprocessor output file. Simply enter the line or lines of text as you would like them to appear in the output file. Note the following while entering text:

• You do not need to include sequence numbers (N-codes). These are automatically added to the blocks at output if you turned sequence numbering on (see Block Number on the Controller menu).

• Spaces are not required between the codes.

• You can sort the output (see Sort Output on the General menu).

• Any data that you enter in double quotation marks (") is output directly without sorting or tokenizing by the postprocessor.

• If your output file ends with a special character (such as %), this character should be entered using the Tape Format option.

NOTE: The lines of code you enter here are converted to OUTPUT macro commands and entered in the FINI_CFG macro. You can add additional macro logic to this macro to perform more sophisticated end-of-program sequences.

Threading The Threading option will be available in the next software revision.

Page 88: IMSPost Guide

General Menu and Options: Motion Codes

80 IMSpost Guide

Motion Codes

The Motion Codes option (also available with ) opens the Motion Parameters dialog to set function codes and conditions for rapid and contouring motion.

NOTE: This option also is available with Motion Functions on the Checklist.

NOTE: The parameters set in this dialog are used in the CIRCLE macro. Default variables for this dialog are set in the INIT macro. If your license supports the macro programming language, you can add additional macro programming to the CIRCLE macro. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Page 89: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 81

Rapid / Form The setting of rapid or positioning motion is designed to allow you to specify the following options:

Field Description

Rapid Motion Code Specifies the function code, usually a G-code, that specifies positioning motion. In the above example, a G0 is entered.

Rapid block, special codes

Indicates special codes. This is only for machines that require a special code to instruct the controller in rapid mode (such as F0, R, or F999). If your controller does not require this, leave it blank. Text strings may be added within these areas. For example, if you need an R letter to signify rapid motion, enter it in the special code box. If this letter is also a register used for something else, enclose it in single quotes: ‘R’

Page 90: IMSPost Guide

General Menu and Options: Motion Codes

82 IMSpost Guide

Field Description

Break up rapid moves

Instruct the postprocessor to make work plane checks on all rapid motion based upon these conditions. When the tool is moving away from the part, motion will be made along the tool axis (Z) first, retracting from the part, and then to the final position(X,Y). When moving toward the part, motion will be along the X,Y axes first, followed by the movement down in Z.

Restore feedrate after rapid move

Indicates you would like the feedrate to be reinstated on the next non-rapid move following the rapid motion.

From Provides options for handling the starting point, or FROM point of a program. Select one of the four radio buttons. Output from command as rapid motion

Outputs the point as a rapid positioning move.

Output from command as linear motion

Outputs the point as a linear/feed move.

Save as home position (no output)

Saves the point as a home position, but does not output.

Ignore from command Ignores the FROM command. You can select the last option listed in the From area independent of your selection above: Apply to list from command only

Instructs the postprocessor as to how to treat successive From statements.

NOTE: If your controller uses the same G-code for rapid positioning and linear motion, enter the code this way:

G1@LINEAR G1@POSITION

Page 91: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 83

Linear The Linear tab is used to specify the function code used with linear interpolation. You can set your own acceleration/deceleration spans for the postprocessor. Since IMSpost maintains an internal record of variables and current machining conditions, you can determine how the postprocessor could break up the linear motion.

The example above illustrates a slow-down span for all linear motions. IMSpost will subtract 10 mm from the incoming motion and output that distance with the programmed feedrate, then output the remaining distance with half of the programmed feedrate. That is:

FROM/0,0,0 FEDRAT/1500 GOTO/100,0,0 Nxxx G1 X90. F1500 Nxxx X100 F750.

If more than one axis is involved in the motion, IMSpost will calculate the vector distance based upon the total delta motion.

Page 92: IMSPost Guide

General Menu and Options: Motion Codes

84 IMSpost Guide

To define this example:

1. You must define your formula to IMSpost. You are restricted to the variable description names listed in the “Variable description” (to the right of the graphic image). No other names or variables should be used.

In the example above, the formula in the “Linear equation” column states to subtract 10 from the length of move. The Count instructs the system how many times to do it (1, in this example). This could come into play if the formula uses a percentage of the length.

2. For the feed equation in the example above, we want to use the programmed feed for the first part of the motion. So, PF is entered to represent the programmed feedrate.

3. To finish the motion in the example, the formula shows the L1 variable (Linear equation), which instructs IMSpost to output the remainder of the motion with half of the programmed feedrate (PF * .5 as defined in the Feed equation column). You could also enter PF/2 in this example.

4. For the linear equation to be active, you must check “Activate linear break up” (under the graphic image). It will affect all linear motion being passed through the postprocessor. The IMS variable that controls this checkbox is:

GLOBAL.LINEAR_TYPE = "LINEAR_BREAK" Checkbox ON GLOBAL.LINEAR_TYPE = "LINEAR" Checkbox OFF

5. The Speed equation area gives you an option of modifying the spindle speed to a formula.

6. You have the option to “Process motion internally (not with GOTO macro).” Except in special cases, the standard processing of motion commands (the default/standard GOTO macro) is used. Therefore, you may use the internal, compiled version of the GOTO macro, which provides a significant increase in processing speed. This function is very useful when postprocessing very large files consisting of many GOTO commands (for example a file with surfaces). The system variable used that instructs IMSpost as to which GOTO macro will be used is:

SYSTEM.SURFACE = 0 Use GOTO macro in post SYSTEM.SURFACE = 1 Use internal GOTO program

By default, the IMS library posts will use the internal GOTO program. For multi-axis processing, this could significantly reduce the processing time based on the size of the files being postprocessed.

It is only necessary to use the postprocessor GOTO macro if you are adding additional logic to the GOTO motion. For advanced IMSmacro users, try getting your results by utilizing HOOK statements with the internal GOTO routine.

As an option, you could enter a condition to define when the equation will be activated. If the condition is true, the linear equation formula will be activated. Remember, you are restricted to the variable descriptions for this dialog. For example, if you only want to activate this formula if the programmed feedrate was over 2000 MMPM, simply enter the following in the Condition area:

PF > 2000

This will read like an implied IF statement.

TIP: You can control this equation with the Condition or with the GLOBAL.LINEAR_TYPE variable.

Page 93: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 85

Linear Break

You can adjust the linear motion based upon the preset conditions such as the length of the move or the angle of the next motion. By using these preset variables, you could construct an acceleration/deceleration factor within the postprocessor without adjusting the GOTO macro logic.

Linear Equation Formula

The Linear Motion dialog also enables you to incorporate your own special slow-down spans (deceleration/acceleration) conditions for the linear motion. IMSpost maintains a record of variables and machining conditions and you can determine how to split up the motion. In addition, as each condition for splitting a move is set, you may also apply conditions for modifying the feedrate and spindle speed parameters for these moves. For example, when the angle between the current move and the next move is very sharp, you may want to program a percentage of the move with a faster feed and slow down for the remaining part of the move. This would give you both a faster program and a more accurate cut.

Activating the Linear Equation

Use these following steps to enable the linear processing feature:

1. Enter an equation specifying how you would like IMSpost to split up the move in the Linear Equation column. Any supported mathematical expression and any of the variables supplied by IMSpost (and listed below) may be used. For example, to split the move at 25% of its total length, you would enter L1 * 0.25 or L1/4.

NOTE: You are restricted to these variables only. If your logic requires other variables, you must relate the logic to your GOTO macro.

2. Set the Count parameter in the first column. This count is used to specify how many times to perform the Linear Equation before completing the move to the end position. A count value of “0” means to apply the equation to the entire move.

3. If you would like the feedrate to be changed for the split moves, enter the desired formula in the Feed Equation column. Again, any mathematical expression containing any of the IMSpost supplied variables may be used. Refer specifically to the PF and CF variables in the Variable Description list.

4. If you would like the spindle speed changed for the split moves, enter the desired formula in the Speed Equation column. Any mathematical expression or any IMSpost supplied variable may be used. Refer specifically to the PS and CS variables in the Variable Description list.

5. To enable the linear processing feature, you must check the “Activate linear break up” box. If this box is not checked, the Linear Equation formula will be ignored by IMSpost.

This checkbox controls the variable: GLOBAL.LINEAR_TYPE

GLOBAL.LINEAR_TYPE = "LINEAR_BREAK" Activate linear equation

GLOBAL.LINEAR_TYPE = "LINEAR" Turn off linear equation (default)

In the following example:

L1 * .9 PF*.75 Output 90% of programmed motion with 75% of the programmed feed. The optional condition checks for a CLW spindle condition.

L1 PF Finish motion with programmed feed

The example includes a condition in the Condition column:

Page 94: IMSPost Guide

General Menu and Options: Motion Codes

86 IMSpost Guide

REGISTER.T.VALUE > 36 GLOBAL.TOOL = 10 MODE.SPINDLE = 'OFF' MODE.COOLNT <> 'FLOOD'

Note that when setting a variable to a text result, the text must be enclosed in single quotes.

Page 95: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 87

Circle IMSpost supports circular interpolation in any plane (not just standard XY, YZ, and ZX planes). Depending on the capabilities of your controller and machine, you can process circular input data for any circle or arc and generate circular interpolation moves (for example G2,G3). Or, if your controller or machine can only work in major planes, then generate a point to point representation of the arc or circle that is outside of the plane.

The Circle feature lets you specify the type of circular interpolation your particular controller supports.

1. Enter the codes for the direction (clockwise and counter-clockwise).

2. Select the proper circle format (using the options in the Radius format area on the dialog). Illustration examples are shown on the right of the dialog.

3. Select options, as appropriate, under the illustration examples. Quadrant checks specify that the arc can cross a 90 degree quadrant. You also can control helical interpolation and define whether or not a circle can exist outside a major plane.

Page 96: IMSPost Guide

General Menu and Options: Motion Codes

88 IMSpost Guide

Field Description

Clockwise code used Displays the function code used to define clockwise circular movement. For example, enter G02. The function specified in this field uses the IMSpost function group variable MODE.MOTION.CLW.

Counter-clockwise code used

Displays the function code used to define counter (anti) clockwise circular movement. For example, enter G03. The function specified in this field uses the IMSpost function group variable MODE.MOTION.CCLW.

3d Clockwise code used

Displays the function code used to define three-dimensional clockwise circular movement, if supported by the controller. The function specified in this field uses the IMSpost function group variable MODE.MOTION.3DCLW.

3d Counter-Clockwise code used

Displays the function code used to define three-dimensional counter (anti) clockwise circular movement, if supported by the controller. The function specified in this field uses the IMSpost function group variable MODE.MOTION.3DCCLW.

Radius format Displays choices for circular interpolation, center coordinate, and output. Select one of the I,J,K options or the R option.

Break into linear moves

Indicates the postprocessor will simulate an arc by generating multiple straight line moves.

Linear Tolerance Break

Sets the tolerance for the postprocessor to use if the circle radius is outside of the minimum/maximum limits (that is, 0.01). Smaller tolerances result in more linear motion. This tolerance is in effect only if the postprocessor has to break the circle into straight lines.

Maximum radius for circular interpolation

Sets maximum limits for circular interpolation. This tolerance is in effect only if the postprocessor has to break the circle into straight lines.

Minimum radius for circular interpolation

Sets minimum limits for circular interpolation. This tolerance is in effect only if the postprocessor has to break the circle into straight lines.

Maximum chord length

Sets the maximum circular chord length allowed, or else break to linear moves. This tolerance is in effect only if the postprocessor has to break the circle into straight lines.

Break up circle on quadrant boundaries

Instructs the postprocessor to make quadrant checks.

Helical Interpolation supported

Instructs the postprocessor that machine is capable of helical interpolation.

Support circular interpolation in any plane

Instructs the postprocessor to process circles outside of the three major planes.

The parameters set in this dialog are used in the CIRCLE macro. Default variables for this dialog are set in the INIT macro. You can add additional macro programming to the CIRCLE macro.

The Circle dialog uses a number of macro variables. The following example from a portion of an INIT macro shows the macro variables used by this dialog with default settings and description. Be careful—It is possible to modify or disable the use of the dialog parameters.

Page 97: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 89

INIT/* * Setup circle definition parameters SYSTEM.PLANE_X = "X" SYSTEM.PLANE_Y = "Y" SYSTEM.PLANE_Z = "Z" GLOBAL.PLANE = SYSTEM.PLANE_Z SYSTEM.CIRCLE_CENTER_X = "I" SYSTEM.CIRCLE_CENTER_Y = "J" SYSTEM.CIRCLE_CENTER_Z = "K" SYSTEM.CIRCLE_RADIUS = "R" SYSTEM.HELICAL = 0 GLOBAL.CIRCLE_90 = 0 GLOBAL.CIRCLE_TYPE = 1 GLOBAL.CIRCLE_MINRAD = 0.000000 GLOBAL.CIRCLE_MAXRAD = 0.000000 SYSTEM.CIRCLE_TOLER = 0.000000 GLOBAL.CIRCLE_ALLPLANE=0 GLOBAL.ORGCIRC_TYPE = GLOBAL.CIRCLE_TYPE CASE (GLOBAL.CIRCLE_TYPE) 0: SYSTEM.CIRCTYPE = 0 1: SYSTEM.CIRCTYPE = 1 2: SYSTEM.CIRCTYPE = 2 3: SYSTEM.CIRCTYPE = 3 4: SYSTEM.CIRCTYPE = 0 5: SYSTEM.CIRCTYPE = 10 ENDCASE * End circle definition parameters

Page 98: IMSPost Guide

General Menu and Options: Motion Codes

90 IMSpost Guide

Nurbs The Nurbs feature controls the output of NURBS processing, as supported within the NURBS macro. The registers and output data are set using the Nurbs dialog. An algorithm is built within IMSpost to evaluate and calculate NURBS data from GOTO points, and the OPTIMIZE macro statement activates or deactivates this NURBS processing algorithm.

Field Description

Format style Selects the nurb format style. Output before nurbs Specifies required code for output before nurbs. Nurbs motion function code

Specifies machine code.

Register used for order value

Defines the register used for the order value. If the controller register does not exist, you must add it to the Register Table using the Register Format option.

Page 99: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 91

Field Description

Register used for weight value

Defines the register used for the weight value. If the controller register does not exist, you must add it to the Register Table using the Register Format option.

Register used for knot value

Defines the register used for the knot value. If the controller register does not exist, you must add it to the Register Table using the Register Format option.

Maximum order # Specifies the mathematical degree + 1 (usually 4). Nurbs tolerance Specifies the tolerance band for nurbs. Output after nurbs Specifies required code for output after nurbs. Activate nurbs optimization

Activate optimization for nurbs processing control.

For advanced users, consult the OPTIMIZE macro statement and refer to the NURBS macro within your postprocessor.

Page 100: IMSPost Guide

General Menu and Options: Motion Codes

92 IMSpost Guide

Arc Fit The Arc Fit feature is a routine designed to fit an arc into a series of points. If the result is successful, the postprocessor will act on the motion like a circular record. If not, a series of small linear moves will be made.

Field Description

Minimum # of points

Defines the minimum number of points, which must be at least 4.

Minimum angle Defines the minimum required angle. Minimum radius Defines the minimum required radius. Maximum radius Defines the maximum radius. Plane Tolerance Defines the plane fluctuation number. Radius Tolerance Defines the radius fluctuation number. Point Tolerance Defines the point fluctuation number.

Page 101: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 93

Field Description

Vector change tolerance (deg)

Specifies the vector change tolerance in degrees. This can be used either: • With the helical interpolation (SCREW). This option then specifies the

tolerance in the IJK vectors from one to another. • When the IJKs are constant while going about a cylinder (SPIRAL).

This option then specifies how many degrees the IJK vectors can be outside of the plane.

XY Plane YZ Plane ZX Plane ALL Plane

Enable you to select any combination of the three major planes. If a circle can be outside a major plane, select ALL Plane.

Screw Looks for a third axis linear motion (helical interpolation). Spiral Instructs IMSpost to look ahead and determine if the points are made about

a cylinder. If they are, the postprocessor will output the final rotation, thus bypassing all the points between the start and finish. (This is only for machines capable of making such a move). If this option is active, the dialog will enable you to enter the vector direction along the cylinder.

Use exact end points

Indicates that the circle should begin and end on a programmed point.

Use tangents Creates lines through points, then attempts to fit an arc tangent within these lines.

Activate arc-fit optimization

Activates arc-fit optimization. When this option is selected, the preprocessor performs a point-to-point motion to try to fit the arc. If this option is not selected, there is no point checking.

Direction Defines the direction of the arc: Parallel to Tool Points must be parallel to the tool. Major Plane Points must be in one of the three major planes. All Points can be outside the major planes.

The Arc Fit feature uses a number of macro variables. The following example from a portion of an INIT macro shows the macro variables used with default settings and description. Be careful—It is possible to modify or disable the use of the Arc Fitdialog parameters.

* * Setup arcfit definition parameters SYSTEM.ARCFIT_EXECT = 1 SYSTEM.ARCFIT_TOLRAD = 0.050000 SYSTEM.ARCFIT_TOLPLN = 0.050000 SYSTEM.ARCFIT_MINANG = 0.000000 SYSTEM.ARCFIT_MAXRAD = 99999.000000 SYSTEM.ARCFIT_MINRAD = 0.001000 SYSTEM.ARCFIT_POINTS = 4 OPTIMIZE(CIRCLE,0,XYPLANE,1,YZPLANE,1,ZXPLANE,1,ALLPLANE,0) *

The OPTIMIZE command controls the ARCFIT routine. Each of these parameters consists of a Boolean condition for On and Off. The condition is dependent upon the selection within the Arc Fit dialog. If you have the macro programming package, you can control this command at any time.

Page 102: IMSPost Guide

General Menu and Options: Motion Codes

94 IMSpost Guide

The following is an example. It is important to note that any three points can mathematically define a circle. Therefore, the tolerance limitations are very important in determining the series of points that will be converted to arcs, and those that will not.

In the drawing above, straight line moves A to B and B to C can possibly fit within an arc. However, if the programmed radius tolerance is less than the actual tolerance (as shown in the drawing), no arc output will be generated.

For advanced IMSpost macro users: The Spiral option, if successful, will pass on a SOLUTION(SPIRAL/TYPE) statement to the SPIRAL/* macro.

Page 103: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 95

Line Fit The Line Fit feature instructs IMSpost to look at a series of incoming points and try to fit a straight line within them. If the result is successful, the postprocessor will output one straight line as opposed to numerous smaller lines.

Specify a tolerance for the points. Optionally, activate line fit optimization. The Line Fit dialog uses a number of macro variables. The following example is from a portion of an INIT macro that shows the macro variables used by this dialog with default settings and description. Be careful—It is possible to modify or disable the use of the dialog parameters.

* Setup linefit definition parameters SYSTEM.LINEFIT_TOLER = 0.005000 OPTIMIZE(LINE,0) *

The OPTIMIZE command controls the LINEFIT routine. Each of these parameters consists of a Boolean condition for On and Off. The condition is dependent upon the selection within the LINEFIT dialog. If you have the macro programming package, you can control this command at any time.

Page 104: IMSPost Guide

General Menu and Options: Motion Codes

96 IMSpost Guide

Shape Repetition The Shape Repetition feature provides the ability to repeat a geometric shape definition routine in the APT file. The repetitive geometric pattern can be in a different location or the same location as the original. The Shape Repetition feature can shorten the output file by using subroutines.

Field Description

Translation Provides translation options: None Indicates no check. Same location Searches for a shape in exactly same shape and

orientation. Other Location Searches for a shape in different positions.

Rotation Provides rotation options: X-Axis Searches for a shape rotated about X-axis. Y-Axis Searches for a shape rotated about Y-axis. Z-Axis Searches for a shape rotated about Z-axis.

Page 105: IMSPost Guide

General Menu and Options: Motion Codes

IMSpost Guide 97

Field Description

Combination Searches for a shape that coincides with any combination.

Scale Enabled Activates the scale feature. Allow combinations Allows a combination of translation, rotation, and/or scaling. Ignore All Post Commands

Ignores all postprocessor commands.

Include Post Command Enables you to enter postprocessor commands to include. Exclude Post Command Enables you to enter postprocessor commands to exclude. Only check drill cycle points

Checks only cycle point geometry.

Distance Tolerance Specifies the general tolerance used. Angle Tolerance Specifies a tolerance used for plane factors. Minimum Points Specifies the minimum points for the shape. Start check at command Specifies a postprocessor command (for example, LOADTL). As

an option you can include (in the Occurrence box) how many times to locate it (the default is 1).

End check at command Specifies a postprocessor command (for example, STOP). As an option you can include (in the Occurrence box) how many times to locate it (the default is 1).

Activate shape repetition checking

Controls the Shape Repeat feature within the postprocessor.

The Shape Repetition feature generates a SHAPE REPEAT statement, which can have nested embedded shape repetitions. In the following syntax example:

SHAPE_REPEAT,MAIN,START,SUBID,1,REPEAT,4,TRANS

START indicates that the repetition routine is started. SUBID,1 is the shape identification. REPEAT,4 indicates that the shape is repeated 4 times. TRANS specifies the type of repetition as translation.

Page 106: IMSPost Guide

General Menu and Options: Sort Output

98 IMSpost Guide

Sort Output This option sorts the contents of the output line.

NOTE: This option also is available with Sort Output on the Checklist.

1. Select functions and registers you want to sort in the output. Double-click the function or register or select it.

2. Click Add >>> to add the function or register to the sort list (Sort Order).

When the function or register moves to the Sort Order column, it is no longer displayed in the Functions or Registers column.

3. Use additional options, as described below.

Field/Button Description

Functions Displays all the available functions. Double-click a function to add it to the Sort Order column.

Registers Displays all the available registers. Double-click a register to add it to the Sort Order column.

Sort Order Displays the functions and registers that are being sorted in the output file, as well as the order in which those items will be displayed. Double-click an item to remove it from the sort order.

Add >>> Enables you to select multiple functions or registers and add them to the Sort Order.

<<< Remove Enables you to select multiple functions or registers in the Sort Order list and remove them.

Add String >>> Enables you to enter registers, function codes, or text strings that are not displayed in the Functions or Registerscolumn. Enter the text in the text box and then click Add String to add it to the Sort Order.

Page 107: IMSPost Guide

General Menu and Options: New Command

IMSpost Guide 99

Field/Button Description

Move Up Moves the selected item(s) in the Sort Order column up one entry in the sort order list.

Move Down Moves the selected item(s) in the Sort Order column down one entry in the sort order list.

Reverse Reverses the order of the items in the Sort Order column. For example, highlight the G90 and G91 codes. Then click Add. Repeatedly click Move Up until these codes are above the G on the Sort Order list. Then select the G17, G18, and G19 codes and repeat the process until these codes are between the G90/G91 and the G address.

Note that you can also set the order of G and M codes. For example:

Nxxx G90 G17 G00

For IMS macro users: You can also use the IMS macro SORT command to reorder any letter addresses or function (G/M) codes. The initial SORT statement resides in the INIT_CFG/* macro.

New Command This option initiates a utility that automatically creates a postprocessor macro. The logic for this is limited to applying function (G/M) codes to the specified syntax. Function codes are associated with minor word syntax, while Registers are associated with values.

1. In the Enter New Apt Command field, specify the syntax of the command. Anything surrounded by brackets is considered optional. The # represents a value. For example:

Page 108: IMSPost Guide

General Menu and Options: New Command

100 IMSpost Guide

The statement in the example above will offer the following combinations:

DOOR/SPACE,#,OPEN,#,#,#,# DOOR/SPACE,#,CLOSE,# DOOR/SPACE,#,SHUT,#,#

2. Click Apply.

3. Enter the associated function codes and control registers for each valid syntax combination.

In the example above, because the first and last values (#) are not optional, they will always be output. They are represented in the Default cells with their associated controller register.

Page 109: IMSPost Guide

General Menu and Options: New Command

IMSpost Guide 101

4. If you want the macro to output the codes with and without motion, click the “Output on the next motion block” option. Then, in your macro, you can add logic for the with/without motion check. For example: * check for NOW; if true, output immediately IF(CLDATAM.NOW) OUTPUT(MODE.MODAL.DOOR,NEWLIN ELSE * output codes with following linear or rapid positioning motion CALL(USE1SET/"MODE.MODAL.DOOR",LINEAR,POSITION) ENDIF

5. Click Create to automatically write the macro logic.

NOTE: In addition to creating the macro automatically, the mode variables and their associated functions and parameters are also created. If you review the function definition (Controller > Function Codes), you will see the new mode/group and definition:

Similarly, if you review the groups (Controller > Function Groups), you will see the new group and members (functions):

Page 110: IMSPost Guide

General Menu and Options: New Command

102 IMSpost Guide

6. You can click Test to test the command. To see the results of the test, click on the secondary toolbar (this is the same as Execute > Test Commands).

7. Click View to review the macro. For example:

You can save this as a file or simply close the window after reviewing the macro.

8. You can click View to generated output. The example generates the following:

9. When you have completed your entries, click OK.

Page 111: IMSPost Guide

General Menu and Options: Macro manager

IMSpost Guide 103

Macro manager

This option (also available with ) the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed. This enables you to work with the macros associated with the postprocessor file. Certain macros are automatically added to the postprocessor file when it is created. You can delete these (not recommended), import macros from other projects into the open project, add new macros, and modify existing macros.

Each project, or postprocessor, consists of its own set of macros. When you start a new project, that project automatically includes a default set of macros. The Macro Manager dialog displays only those macros associated with the project you have open.

When you initiate the Macro Manager, the screen changes to provide option buttons and the list of macros. For example:

Page 112: IMSPost Guide

General Menu and Options: Macro manager

104 IMSpost Guide

The Debug feature includes several sets of options available for use. Options on the tool bar above the Macro Manager (and under the secondary tool bar) control the debugging process:

Button Keys Description

Ctrl F2 Toggle Bookmark—Toggles the bookmark feature to insert or remove

bookmarks.

F2 Next Bookmark—Goes to the next temporary bookmark.

Shift F2 Previous Bookmark—Goes to the previous temporary bookmark.

— Clear All Bookmarks—Clears all bookmarks in the window.

Ctrl F Find—Searches for specified text.

F9 Insert/Remove Breakpoint—Inserts a breakpoint at the current location

or removes the currently selected breakpoint. To insert a breakpoint, position your cursor at the line where you want to

insert a breakpoint. Click . A red marker appears to the left of the line. For example, a breakpoint is inserted here at line 31:

To delete a breakpoint, position your cursor at a line where a breakpoint

exists (such as line 31 above) and click .

— Remove All Breakpoints—Removes all existing breakpoints.

Buttons on the Macro Manager tool bar are:

Button Description

New—Enables you to define a new macro.

Edit—Enables you to edit a macro after selecting it on the Macro Manager list.

Save—Saves the current macro status.

Save All—Saves all changes made to all macros.

Page 113: IMSPost Guide

General Menu and Options: Macro manager

IMSpost Guide 105

Button Description

Delete—Deletes a macro that is selected on the Macro Manager list. NOTE: It is not a good idea to delete a macro unless you are absolutely sure the macro should not be supported within the postprocessor. The library files contain macros that are called up with other macros. It is not a good idea to delete a macro just because it does not look familiar. Rather than deleting the macro, enter a BREAK statement as the first macro instruction. For example:

SPINDL/* BREAK

Later, you can “comment out” the BREAK statement and the macro will be reactivated. For example:

SPINDL/* *BREAK

Export—Opens a browser and enables you to export the selected macro(s) to another postprocessor.

Import—Opens a browser and enables you to import a macro(s) from another postprocessor.

Macro properties—Specifies the macro type.

Search—Searches for specific text throughout the Macro Manager list.

Additional options are available on the Edit menu. Note that some of the Edit options are duplicated on the tool bars described above and are not repeated here:

Option Button Keys Description

Undo — Alt Backspace

Reverses the previous action.

Redo — Ctrl Y Restores the previous action that was reversed (undone).

Cut

Shift Delete

Cuts the current selection and places it on the Clipboard.

Copy

Ctrl C Copies the current selection and places it on the Clipboard.

Paste

Ctrl V Pastes the cut or copied selection from the Clipboard.

Select All — Ctrl A Selects all information, such as all lines of code in a macro.

Replace — Ctrl H Replaces currently selected text with the information on the Clipboard.

Line Numbers — — Displays line numbers, when this option is checked.

Page 114: IMSPost Guide

General Menu and Options: Macro manager

106 IMSpost Guide

Option Button Keys Description

Go to line — Ctrl G Enables you to go to a line number that you specify:

Enter the line number, then click Go To.

New

Macros are executed by major words. When you click , the following dialog is displayed:

Enter a macro name and click OK. (Do not add the / code or any syntax.) For this example, IMSpost automatically creates the following macro display:

The macro name SWITCH represents the command name that activates the macro of the same name.

/* is a wildcard that signifies that IMSpost will trap all the SWITCH/ commands encountered in the part file. As a default, IMSpost always adds the /* to the command name that is entered.

Each macro must end with a RETURN statement to signify the end of the macro logic and instructs IMSpost to return and read the next CL/APT statement.

You could enter SWITCH/OFF for the macro name, but then your macro would only be called for SWITCH/OFF commands.

Page 115: IMSPost Guide

General Menu and Options: Macro manager

IMSpost Guide 107

With the new macro dialog open, you can insert your macro commands. For example, click before the R in RETURN and press Enter to open a line between the macro command SWITCH/* and RETURN statements.

You can close the view of the macro by clicking the X on the right of the macro name tab:

Edit

To edit an existing macro, select it from the Macro Manager list and then click . Or, double-click the macro name on the list. The macro is displayed. The following example shows the COOLNT macro.

All macros start with the word that activates the macro (in this case, COOLNT/*).

Any statement that begins with an asterisk (*) represents a comment. Comments must start with an asterisk and cannot be combined with the instruction.

All macros must end with a RETURN command. This signifies the end of the macro and instructs IMSpost to return and read the next CL/APT statement.

Page 116: IMSPost Guide

General Menu and Options: Macro manager

108 IMSpost Guide

Import

Click . An Import browser is displayed:

Field/Button Description

All Selects all macros in the list. None Deselects all macros in the list. View Views a selected macro. Verify Reconfirms that the imported macro already exists in the open project.

The specific macro or macros you selected are copied out of the “import” project and into the current project.

If you import a macro from another postprocessor and there is currently a macro with the same name, IMSpost will indicate that you are about to overwrite an existing macro and provide the option to cancel the procedure.

Page 117: IMSPost Guide

General Menu and Options: Macro manager

IMSpost Guide 109

Macro Properties Typically, macros are designed to determine and output machine or controller conditions. They can also be designed to calculate a mathematical function. They can be assigned to do a mathematical function and return the value to the macro that called it.

To specify how you want each macro will perform its operation, select the macro from the Macro Manager. (Use the Ctrl key to select more than one macro.)

Click . The Confirm Macro Type dialog is displayed:

Field/Button Description

Include Provides the ability to load a macro (same name) from a master file. This macro must exist in the file that is designated in the display area. This instructs IMSpost to override the existing macro with the one specified in the Include pathname display. This enables you to build and maintain a library of custom macros that will be used with other postprocessors. The advantage is that you can maintain a single library of macros. This master file only needs to contain macros that will be shared with other postprocessor files. For the recipient postprocessors, be sure to check the Include option for all macros contained in this master file. If it is checked, the existing macros will be overridden by the master file. This is a powerful feature for maintaining consistency among your postprocessor library. You only have to update your master file and all your other posts will be updated when they are executed. NOTE: The Include checkbox gives you the advantage of ensuring that your postprocessors always use your current custom macros. For example, if you have additional custom logic you want to maintain in all of your SPINDL macros, make sure this particular SPINDL macro exists in your master file. This way when you update or create a new post, this SPINDL will be imported from your designated master file.

Page 118: IMSPost Guide

General Menu and Options: Macro manager

110 IMSpost Guide

Field/Button Description

Function Indicates that a macro is categorized as a function. That is, the macro can be designed to return a mathematical value. When this option is selected, the macro will compute and return the value to the macro that called it. Two steps are necessary: 1. Define the function. This can be any valid programming logic that

IMSpost can interpret. The Function option must be checked for the macro.

2. The macro function must be called from another macro. For example, define the macro logic (this macro divides the first value by 2.5): BBB/* B = CLDATAN.1/2.5 RETURN(B)

To call the macro function: LOADTL/* * call macro function BBB/100 C = 4 + BBB(100)

Check Syntax Enables macro syntax checking. You can instruct the system on what the allowable statements can be. Typically, when IMSpost reads a command in the APT/CL file, it looks to find a macro with the same name. If any of the parameters in the statement are not defined with the macro, usually the statement is ignored. If you select the Check Syntax option, you can specify what allowable commands (combinations) can be checked to match the defined syntax. If IMSpost reads a command that does not exist, an error is generated.

Postprocessor Specifies the macro logic is for a postprocessor operation. (Usually a macro’s logic is either for a postprocessor or reverse-postprocessor operation.) A macro could be designed to do some type of a general file service that has no relation to posting or reverse-posting. For this reason, both the Postprocessor and Revpost checkboxes could be activated. Usually these checkboxes are controlled by the type of project being created (postprocessor or reverse-postprocessor).

Revpost Specifies the macro logic is for a reverse-postprocessor operation. (Usually a macro’s logic is either for a postprocessor or reverse-postprocessor operation.)

Yes Saves changes and exits the Confirm Macro Type dialog. No Exits the Confirm Macro Type dialog without saving changes. All Saves all changes (when you select more than one macro from the Macro

Manager) and exits the Confirm Macro Type dialog.

Page 119: IMSPost Guide

General Menu and Options: Macro manager

IMSpost Guide 111

Search

To search for text on the Macro Manager list, click . The Macro Search dialog is displayed:

Enter the text on which to search and then click Find.

You can select the Match Case option and the search will match the uppercase and lowercase characters that you enter. (For example, it will not find “FLOOD” if you enter “Flood” and select Match Case.)

In addition, you can select the option to match the complete word. In this case, the search will not find “FLOOD” if you enter “FLO.”

In the following example, the search is for FLOOD. Notice that the result of the search shows the name of the macro in which the text was found, the line on which the text appears in the macro, and the text line. In this example, FLOOD was found on lines 7 and 8 in COOLNT/* and on line 165 in INIT/*.

Page 120: IMSPost Guide

General Menu and Options: Macro manager

112 IMSpost Guide

Notes

Page 121: IMSPost Guide

IMSpost Guide 113

Controller Menu and Options

The Controller menu provides options to customize the controller. You can define features that are specific to the CNC control, including:

• Function codes used and their grouping • Letter address definitions (controller registers) • Block numbering and comment line format • Output tape codes required at beginning and end of file

Options on the Controller menu are:

Option Button Description

Block Number

Specifies block number sequencing (Nxxxx).

Comment Blocks

Enables you to enter operator comments and set parameters for the comment block.

Register Format

Defines tables for controller register formats. You can set the format of controller letter addresses.

Function Codes

Defines controller function codes. All G/M codes in the postprocessor are listed.

Function Groups

— Lists all Mode/Group variables.

Subprograms — Provides options to support subroutines. Tables — Enables you to create look-up tables. Tape Format — Provides options for special characters needed on tape (such as %). Import Controller

— Overrides the existing controller file with another controller file.

Apt Definition

Sets the APT definition to convert.

Grammar

Sets the grammar format.

Page 122: IMSPost Guide

Controller Menu and Options: Block Number

114 IMSpost Guide

Block Number

The Block Number option (also available with ) is use to customize the output of block numbering or sequence numbering codes (Nxxxx) for your postprocessor.

NOTE: This option also is available with Sequence Numbers on the Checklist.

NOTE: The parameters set in this dialog are used in the INIT_CFG macro. The parameters set are output as a SEQNO statement in the INIT_CFG macro. At any time during execution of the postprocessor, you can add additional macro programming in other macros to control block number output. Be careful, however, because it is possible to modify or disable the use of the dialog parameters.

Field Description

Register Used Displays the code to be output for sequence numbering. You select from the list of defined registers. For example, select N.

Start value Displays the integer value to be used as the starting block number. You enter this number (for example, 100).

Increment value Displays the number to add to each sequence number for subsequent sequence numbers. You enter this number (for example, 10).

Maximum value Displays the maximum value that can be used for block numbers. You enter this number (for example, 999). When this block number is reached, the next block number begins with the start value.

Block step Determines how many blocks to output before output of a sequence number. The most common value is 1, which outputs sequence numbers on each output block.

Block numbers Specifies whether block numbering is active or inactive for the postprocessor.

Page 123: IMSPost Guide

Controller Menu and Options: Block Number

IMSpost Guide 115

Field Description

Output space after block number

Indicates that you want to output space after the block number.

The sequence numbering is saved in the INIT_CFG macro, using the macro language SEQNO command. The dialog example above equates to:

N1 G40 G90 G80 N2 G1 Z3. Y2. X1. F100. N3 Z6. Y5. X4. N4 Z9. Y8. X7. N5 Z3. Y2. X1. N6 Z6. Y5. X4. N7 Z9. Y8. X7. N8 M30

The resulting SEQNO command is: SEQNO(START=1.000000,INCR=1.000000,SPACE=1,ON,"N")

Another example is:

N1 G40 G90 G80 G1 Z3. Y2. X1. F100. N6 Z6. Y5. X4. Z9. Y8. X7. N11 Z3. Y2. X1. Z6. Y5. X4. N16 Z9. Y8. X7. M30

Page 124: IMSPost Guide

Controller Menu and Options: Comment Blocks

116 IMSpost Guide

The resulting SEQNO command is: SEQNO(START=1.000000,INCR=5.000000,SPACE=2,ON,"N")

IMS macro programmers may also find these commands useful:

SEQNO(OFF) Cancels sequencing SEQNO(ON) Re-activates sequencing SEQNO("O") Changes Nxxxx to Oxxxx

Comment Blocks

The Comment Blocks option (also available with ) define how your controller will output comment blocks or operator messages.

NOTE: This option also is available with Comment Blocks on the Checklist.

Field Description

Prefix string Displays the string to be output preceding the comment block. For example, enter:

( Or:

MSG

Suffix string Displays the string to output at the end of the comment block, if there is one. For example, enter:

) Output comment blocks

Outputs comments. If this option is not selected, comment statements are not output no matter how the other fields in this dialog are set.

Page 125: IMSPost Guide

Controller Menu and Options: Register Format

IMSpost Guide 117

Field Description

Output empty line before comment

Outputs a blank (empty) line before the comment block.

Output empty line after comment

Outputs a blank (empty) line after the comment block.

Output with block number

Outputs the comment block with a sequence number.

Set block numbers on after comment block

Turns on block numbers after the comment block is output. If block numbers are on, you should probably select this checkbox.

Convert to uppercase

Outputs all comment strings in upper case. Otherwise, output is as in the APT/CL file.

Comments are usually output via PPRINT statements.

Register Format

The Register Format option (also available with ) defines tables for controller register formats used in a postprocessor. You can enter all the letter address codes or just the ones you plan to use.

NOTE: This option also is available with Register Format on the Checklist.

When you run a postprocessor, the output contains lines consisting of control registers and their associated values, as shown here:

N6 G1 Y-95. F300

This line contains four control registers of different types and formats.

Page 126: IMSPost Guide

Controller Menu and Options: Register Format

118 IMSpost Guide

It is not enough just to output the letter address and its value. Certain limitations and specific formats always apply. Different machines use different control registers to perform specific functions. You can define the control registers your machine controller needs using the Register Definition dialog.

Because all the registers parameters cannot be displayed on a single screen, the Register Definition consists of two tabs: Basic and Advanced.

Each controller address has a respective field definition. The values in these fields can also be modified via REGISTER variables. The values entered here apply to controller (not machine) limits. Machine limits must be entered within the Machine Motion dialog.

The two tabs of information available on the Register Definition dialog are described below.

Basic Fields on the Basic tab are:

Field/Button Description

Name Displays the output name of the controller register. Units Out Displays the output units (INCH, MM, DEG, CONST). This parameter does

not affect the output format except in the case of rotary axis registers. Units In Displays the input units (INCH, MM, DEG, CONST). Initial Value Displays the initial value of the register. Digits Specifies the number of digits output before and after the decimal point. For

example, 2.4 means output two places to the left and four places to the right of the decimal.

Dec Indicates (when checked) that a decimal point is required. Lead Indicates how the postprocessor will output leading zeros:

YES Outputs leading zeros. NO Does not output leading zeros. 1 Outputs one lead zero. 2 Outputs two lead zeros 3 Outputs three lead zeros. 4 Outputs four lead zeros.

Trail Indicates how the postprocessor will output trailing zeros: YES Outputs leading zeros. NO Does not output leading zeros. 1 Outputs one lead zero. 2 Outputs two lead zeros 3 Outputs three lead zeros. 4 Outputs four lead zeros.

Sign Indicates (when checked) that a + sign is included before positive values. Modal Indicates (when checked) that the register is modal. Incr Indicates (when checked) that the register is incremental. Clear the checkbox

for absolute. Incr. Name Displays the incremental name used in the incremental mode is active (Incr,

above, is checked).

Page 127: IMSPost Guide

Controller Menu and Options: Register Format

IMSpost Guide 119

Field/Button Description

Add/Copy Enters or copies a new register. You can output just numbers with a specific format, and have a register name appear blank. You can also require a specific output format for numbers, such as integers only, two-place decimals only, and so forth. Each register has its own unique format. If there is a need to use the same register with a different format, enter the new register as F@DWELL or F@CYCLE If you require a register that starts with the character @ you must define the new register as:

@@register

For example, @@F would output the @F register. In the example below, the macro OUTPUT statement:

OUTPUT("L ", '@', 1.234, '@', 5.678, NEWLIN)

might output (depending, of course, on the definition of the @ format): L 1.234 5.678

This type of output is typically only required for nonstandard postprocessors that require macro customization. Sometimes a controller may be using the same controller register for a different function. For example, the X axis may have a 5.3 decimal format. But for a dwell time the format could be completely different. The IMS library posts handle this by also utilizing the @ character:

X@DWELL

IMSpost reads the register name, but only outputs the letter(s) that precede the @ character.

Test Output Value

Specifies a value used to determine how the postprocessor will output this value. To test a register format: 1. Enter a value in the Test Output Value field. 2. Select a register to test (in the Name column). 3. Review the result shown to the right of the Test Output Value text box.

Advanced Fields on the Advanced tab are:

Field/Button Description

Minimum Displays the minimum value for the output values. Provide a number if you select the Limit Min checkbox. This value is designated for the controller register and not machine axis limits. Machine axis limits are set within the Machine feature.

Limit Min Indicates (when checked) that output values are limited to a defined minimum.

Maximum Displays the maximum value for the output values. Provide a number if you select the Limit Max checkbox. This value is designated for the controller register and not machine axis limits. Machine axis limits are set within the Machine feature.

Page 128: IMSPost Guide

Controller Menu and Options: Register Format

120 IMSpost Guide

Field/Button Description

Limit Max Indicates (when checked) that output values are limited to a defined maximum. If you program a feedrate over the maximum and you want the postprocessor to use the specified maximum feed, this maximum feed must be represented by checking this option. For users with the macro utility, you can also specify the following in the appropriate macro:

REGISTER.F.MAXIMUM = 2500 REGISTER.F.LIMITMAX = "Y"

Dec Char Displays the default character for decimal output. DecInt Indicates how you want decimal characters output:

YES Outputs characters with integer values. NO Does not output characters with integer values. FORMAT Uses the defined format.

Before Displays the character or string to be output between the name and value. After Displays the character or string to be output after the value. Space Indicates (when checked) that a space is required between the register name

and value. (X 10. or X10.) Table Displays the table, if any, associated with the register. To define a table, refer

to the Tables feature. Zero Specifies the character output when the register value is 0. For example, some

controllers do not accept a 0, .0, or 0. as output. Formula Displays a mathematical formula to be applied to the value of the register on

output. Specify the input value of the register as a question mark (?). For example, to change the input value from radius to diameter, enter the following for the X register:

?*2 Add/Copy Enters or copies a new register.

You can output just numbers with a specific format, and have a register name appear blank. You can also require a specific output format for numbers, such as integers only, two-place decimals only, and so forth. Each register has its own unique format. If there is a need to use the same register with a different format, enter the new register as F@DWELL or F@CYCLE If you require a register that starts with the character @ you must define the new register as:

@@register

For example, @@F would output the @F register. In the example below, the macro OUTPUT statement:

OUTPUT("L ", '@', 1.234, '@', 5.678, NEWLIN)

might output (depending, of course, on the definition of the @ format): L 1.234 5.678

This type of output is typically only required for nonstandard postprocessors that require macro customization. Sometimes a controller may be using the same controller register for a different function. For example, the X axis may have a 5.3 decimal format. But for a dwell time the format could be completely different. The IMS

Page 129: IMSPost Guide

Controller Menu and Options: Register Format

IMSpost Guide 121

Field/Button Description library posts handle this by also utilizing the @ character:

X@DWELL

IMSpost reads the register name, but only outputs the letter(s) that precede the @ character.

Test Output Value

Specifies a value used to determine how the postprocessor will output this value. To test a register format: 1. Enter a value in the Test Output Value field. 2. Select a register to test (in the Name column). 3. Review the result shown to the right of the Test Output Value text box.

Deleting a Register NOTE: The library posts probably contain more controller registers than you need. It is not a good idea to delete them.

If you must delete a register:

1. Select one or more registers you want to delete. To select more than one, press and hold down the SHIFT key as you select registers.

2. Press the Delete key on your keyboard. The registers are deleted from the list.

Changing Control Register Formats During Execution You can access and change any existing register parameters, including all formats defined in the Register Definition dialog, during postprocessor execution. In any macro in which you want to change the register format, you can program a macro statement in the form:

REGISTER.name.parameter = new value

to change the setting “on the fly.” For example, to change the initial value parameter of the X register, enter:

REGISTER.X.INITIAL = 100.750

The common parameters and their allowed values are shown below. They closely correspond to the fields within the Register Definition dialog.

Parameter Value Description REGISTER.name.NAME Any string Name of register REGISTER.name.VALUE Any real value Current value REGISTER.name.UNIT MM, INCH, DEG,

CONST Output units

REGISTER.name.DIGIT Positive value, up to 9.9 Number format REGISTER.name.LEADING Y,N,1,2,3,4 Leading zero output REGISTER.name.TRAILING Y,N,1,2,3,4 Trailing zero output REGISTER.name.DECIMAL Y or N Decimal point output REGISTER.name.MINIMUM Any real value Minimum value REGISTER.name.LIMITMIN 0 or 1 Check minimum value flag REGISTER.name.MAXIMUM Any real value Maximum value

Page 130: IMSPost Guide

Controller Menu and Options: Register Format

122 IMSpost Guide

Parameter Value Description REGISTER.name.LIMITMAX 0 or 1 Check maximum value flag REGISTER.name.ZERO Any string Zero output string REGISTER.name.FORMULA Any legal expression Formula applied to register REGISTER.name.TABLE Any existing table Table attached to register REGISTER.name.INITIAL Any real value Initial value REGISTER.name.BEFORE Any string Before value character REGISTER.name.AFTER Any string After value character REGISTER.name.SPACE 0 or 1 Space between register name and

value REGISTER.name.DECCHAR Any character Decimal character REGISTER.name.INTDEC Y or N or F Integer decimal output flag REGISTER.name.UNITI MM, INCH, DEG,

CONST Input units

REGISTER.name.UNITO MM, INCH, DEG, CONST, UNIT

Output units

REGISTER.name.DELTA Any real value Incremental value from last REGISTER.name.INCREMENT Any real value Integer decimal output flag

For example:

REGISTER.X.VALUE = 1250

REGISTER.S.VALUE = 2000

Remember, when setting a register to something other than a value, it must be surrounded in double quotes. For example:

REGISTER.S.NAME = "S2"

REGISTER.X.MODAL = "N"

Formats and formulas are also treated as text strings. For example: REGISTER.X.FORMULA = "?*2"

REGISTER.X.DIGIT = "5.3"

Page 131: IMSPost Guide

Controller Menu and Options: Function Codes

IMSpost Guide 123

Function Codes

This option (also available with ) defines the functions (G/M codes) for use in the postprocessor.

NOTE: This option also is available with Function Codes (G/M) on the Checklist.

In the Function Definition dialog, you define the function codes you want to use in your postprocessor. You can enter all the function codes or just the ones you want to use. When you create a project, a basic set of functions is automatically associated with the project. These are displayed in the Function Definition dialog. You can remove or replace them as you build a new postprocessor file.

In general, advanced users employ function lists and the associated function groups as tools for making macro programming easier and more efficient. To set up specific functions, select Controller > Function Groups.

NOTE: The IMS macro language OUTPUT statement description describes how function group variables are used in IMS macros.

Before using the Function Codes option, create a project or open an existing one.

1. In the text box to the right of the Add | Copy button, enter the name of the new function.

When adding more than one function code, separate each function with a comma. For example, in the Add/Copy display area, enter:

G63,G64,G65,M41,M42

Make sure the Caps Lock is on. Most G and M function codes are usually in uppercase.

2. Click Add | Copy. The new function is added to the bottom of the list.

3. Modify the parameters, as described in the table below.

4. Click OK to save your work.

Page 132: IMSPost Guide

Controller Menu and Options: Function Codes

124 IMSpost Guide

NOTE: If necessary, you can associate new function codes with Mode/Group variables. If the function code requires the output of other registers, simple enter them in the Use field. You can also specify how many G and M codes may be output per block (Maximum codes per block).

Field/Button Description

Name Identifies the functions associated with the postprocessor. Mode/Group Displays the group or mode with which the function is associated.

A code associated with a MODE stays in effect until a different code within the same mode cancels it. For example, an M3 code will stay in effect until cancelled by an M4 or M5. A G1 code will stay in effect until cancelled by a G0, G2, or G3.

Modal Indicates whether the function is modal or nonmodal. Use Associates registers that are not based on machine axes. Separate these

with commas. These letter addresses are output with the corresponding function code. For more information, refer to USE and One-Shot USE1 Parameters below.

Use Machine Axes Associates registers that are based on specific machine axes. For example, a 5-axis machine might use X,Y,Z,A,B.

Component Links a specific component to a function (such as from MACHINE FUNCTIONS in IMSmachine). Refer to Machine > Components.

Technology Specifies the technology type as All, Mill, or Turn. The SYSTEM.TECHNOLOGY_TYPE variable applies and should be in the system variable list (see Debug). For example:

Page 133: IMSPost Guide

Controller Menu and Options: Function Codes

IMSpost Guide 125

Field/Button Description

Output Alone Specifies the function code may be output alone in a block. Do not select this option if the function code should not be output by itself.

End Block Specifies the function is performed at the end of the block. Do not select this option if the function is performed at the beginning of the block.

By Self Specifies the function code must be output by itself on a block. Add | Copy Adds the function name specified in the text box to the list of functions.

To copy a function, select it and click Add | Copy. The program copies that function definition and creates a new function with the same parameters (which you can then edit).

Maximum codes per block

Set the maximum codes per block for G-codes and M-codes.

If you want to delete a function code, highlight it on the list and press the Delete key on your keyboard.

USE and One-Shot USE1 Parameters The FUNCTION.USE parameter defines (or attaches) data to be output with a function. The USE parameter defined for a function can be a register name, another function, or a string. For example, the USE parameter for the G1 function may be X,Y,Z,F,S which tells IMSpost to check these registers each time the G1 function is output.

FUNCTION.G1.USE = "X,Y,Z,F,S"

Another similar parameter, USE1, works very much like the USE parameter but it is a one-shot command. This means that once the output from a USE1 function is generated, the parameter value is cleared.

IMSpost can easily handle programming issues such as “I want to output <something> the next time I output a <something> function”. For one example, IMSpost default projects use the USE1 parameter for the option of outputting LOADTL, SPINDL, COOLNT, CUTCOM, etc. codes until the next motion block. See any of these default project macros for examples of the USE1 command.

Page 134: IMSPost Guide

Controller Menu and Options: Function Groups

126 IMSpost Guide

Function Groups The Function Groups option defines function groups and the functions that are members of those groups.

Field/Button Description

Group Names Displays the groups currently associated with the postprocessor. Group Members Displays the functions that are members of the group selected in the

Group Names list. Initial Displays the default condition, if any, of the group. (This information is

noted under the Group Members area.) Add Group Adds a group to those defined for the postprocessor. You are prompted to

provide a name for the group. Delete Group Deletes the group selected in the Group Names list. Add Member Adds a member to the group selected in the Group Names list. You are

prompted for the member name. Delete Member Deletes the member selected in the Group Members list. Initial/Clear Sets an initial value for the group. You must first select both a group and

a member in that group. Otherwise, the initial value is set to NONE. You can also click this button to clear the initial value for a group.

Function Selects a function for a group/member combination. You must select both a group and member before clicking this button.

Each group contains members. For example the MODE 'SPINDLE' would contain members of CLW, CCLW, OFF, and ON. Functions can then be associated to these members.

If the function code(s) do not exist, you must use the Function Codes feature to add them.

Page 135: IMSPost Guide

Controller Menu and Options: Subprograms

IMSpost Guide 127

Subprograms The Subprograms option enables you to set up subprograms for the postprocessor.

Field Description

No controller subprogram codes

Indicates that no controller subroutines should be output.

Fanuc style Indicates that FANUC style subprograms should be output. This format uses a function to call the subprogram and controller register (letter addresses) to specify the subprogram number and number of repeats.

Seqno style Indicates that Seqno style subprograms should be output. This format used a function and a starting and ending sequence number to mark the subprogram.

Start of subprogram code

Specifies the Function code and Register (letter address) used to identify the start of the subprogram. Select the Seqno Off options if the subroutine block should not be output with a sequence number.

Page 136: IMSPost Guide

Controller Menu and Options: Tables

128 IMSpost Guide

Field Description

End of subprogram code

Specifies the Function code and Register (letter address) used to identify the end of the subprogram. Select the Seqno Off options if the subroutine block should not be output with a sequence number.

Call subprogram Specifies the Function code and Register (letter address) used to call and repeat the subprogram. Select the Seqno Off options if the subroutine block should not be output with a sequence number.

Output Message Specifies that the postprocessor should output a message regarding the subroutine.

Incremental Mode Specifies that the postprocessor should force out Incremental mode. Move to end Specifies that the postprocessor should output subroutines at end of the

machine file. Activate subprogram option

Activates the subprogram option.

Tables The Tables option enables you to set up controller-defined lookup tables. Use these tables to establish a discrete set of acceptable values for spindle speed or cutter compensation. For example, S0 could represent an rpm speed of 70.

Page 137: IMSPost Guide

Controller Menu and Options: Tables

IMSpost Guide 129

You can create and delete tables as well as edit their definitions. The primary purpose of tables is to attach them to registers. As described in this section, you create a table and then select Controller > Register Format to choose the defined table. Once this table is complete, you can add it to the Table column in the Register Definition.

To add a table:

1. Click New and then enter a table name for the table in the pop-up window. This name will be displayed in the Table field.

2. Click in the Index column and enter the index value.

3. Click in the Value1 column and enter the associated value.

4. If you want to add an additional column of information, click Add Column. By default, additional columns are named Value2, Value3, etc.

NOTE: The name of the table must be selected in the Table field on the Advanced tab of the Register Definition (see Register Forma ). Use the Test Output feature as described for the Register Definition.

t

Field/Button Description

Table Displays the name of the table whose definition is displayed in the fields of the dialog. To view information for a table, select the table name from the dropdown list.

New Adds a table to the Table dropdown list. You are prompted for the table’s name (as described in the procedure above).

Delete Deletes a lookup table from the Table dropdown list. You are prompted for the table name.

Add Column Adds a column for the table. Delete Column Deletes the last (right-most) column from the table. Note that you cannot

delete the Value1 column. Index Displays (and enables you to enter) an index for the table. Value1 Displays (and enables you to enter) a value associated with the index.

You can add columns of values, as described for Add Column above. This utility is used for creating look-up tables. For example, these S-codes would represent rpm speeds:

S0 = 35 rpm S3 = 142 rpm S6 = 500 rpm S9 = 850 rpm S1 = 60 rpm S4 = 250 rpm S7 = 660 rpm S10 = 1000 rpm S2 = 124 rpm S5 = 330 rpm S8 = 775 rpm

IMSpost will then output the respective integer for the programmed rpm speed.

Example of Defining a Lookup Table This example adds a spindle table to the postprocessor. The steps add a table to the postprocessor and then associate the table with the S controller register.

1. Create a project or open an existing one.

2. Select Tables on the Controller menu to open the Table Definition dialog.

3. Click New. Enter the name for the new table (such as RANGE1) and click OK.

Page 138: IMSPost Guide

Controller Menu and Options: Tables

130 IMSpost Guide

4. Build the table entries for RANGE1. Enter an index (such as 1) and a value for the index (such as 10). Click Add.

5. Enter another index of 2 and a value of 20. Click Add. Continue to add indices through 7 with associated values through 70.

6. Click Close when you are finished.

7. Select Controller > Register Format to open the Register Definition dialog.

8. Select the Advanced tab.

9. Click in the Table column to open a dropdown list and select the table (such as RANGE1) from the list.

Page 139: IMSPost Guide

Controller Menu and Options: Tables

IMSpost Guide 131

10. Click OK.

11. Test the values by changing the register test input field. In the Test Output field (lower right of the dialog), change the value in the text box. Click in the first column of the row to which you attached the table and view the change in the Result field (to the right of the text box).

Page 140: IMSPost Guide

Controller Menu and Options: Tape Format

132 IMSpost Guide

Tape Format This option provides options to define the tape format for the postprocessor, including special characters needed on tape (such as %).

Field Description

Column number for output block alignment

Specifies a fixed number of characters per outline line. Enter 0 if there is no limitation.

Output at the start of each block

Outputs this character(s) at the beginning of each output block.

Output at the end of each block

Outputs this character(s) at the end of each output block.

End of block characters Indicates character(s) that mark the end of an output block. Start of file character Specifies the character output at the start of the file. End of file character Specifies the character output at the end of the file. KBytes Breaks up the NC code output file into files based on this maximum

KByte size. Enter 0 if no KByte break up is desired.

Page 141: IMSPost Guide

Controller Menu and Options: Import Controller

IMSpost Guide 133

Field Description

No. of blocks Breaks up the NC code output file into files based on this maximum number of blocks. Enter 0 if no break up is desired.

Tool life Min Breaks up the NC code output file into smaller files based on this tool time (minutes) used. Enter 0 if not break up is desired.

Maximum characters per output line

Specifies the maximum number of characters per output line. Enter 0 if there is no limit.

Continuation character Specifies the character used to continue the current block on the next output line.

Output spaces between codes

Indicates that spaces are placed between codes in the output.(G0 X100. M5)

TIP: If your controller needs a special ASCII character at the beginning or end of the tape file, you can enter its associated integer value from the ASCII table preceded by the carat (^) character. For example, to output the ASCII character for “Line Feed” enter the following in the respective display area:

^10

Import Controller The Import Controller option overrides the existing controller file with another controller file. Because IMSpost merges the controller data with the machines physical data, you have the ability to override your postprocessor controller data with any other controller data file that resides on your machine. For example, you can swap the Fanuc logic for a Heidenhain and still maintain the axis configuration of your machine.

When the Import browser is displayed, highlight the *.lib file you want to load and click Open. Or, double-click on the selected *.lib file.

When you use this option, all the dialogs within the postprocessor are updated accordingly. The machine configuration will stay the same.

Apt Definition

This option (also available with ) opens the IMS Apt Definition dialog and enables you to set the APT definition to convert. This is used for the Controller Emulator and not active in the Postprocessor environment.

The Apt Definition option builds an internal process that eliminates the need to design and develop macro programs for the more commonly used controller/machine functions. Each function code and letter address that is to be processed, must be associated with an APT Process, and/or a macro. If it is not, it will be ignored.

For first time users, it may be easier to process your machine file by using all the default options within the library post you selected. After reviewing the output from the default conditions you can mark the sections of the Apt statements you want to change.

If the codes are correct, but you just want to change the APT syntax, see Changing the Syntax Order.

Page 142: IMSPost Guide

Controller Menu and Options: Apt Definition

134 IMSpost Guide

Field/Button Description

Function Code Enables you to select a function code (using a drop-down menu). If the function codes does not exist, you must add it (Controller > Function Codes).

Apt Statement Displays the APT statement(s) associated with the selected function code. Condition Displays the conditional expression(s) associated with the statement. The

conditional expression may contain any REGISTER or MODE variables within IMSpost. Examples are: REGISTER.C = 0 No C value in output line. REGISTER.C = 1 Output line must contain a C value. The variable REGISTER.C will return how many C values are in that line of code. REGISTER.G92 = 0 No G92 in output line. REGISTER.G41 = 1 Output line must contain a G41 code. MODE.PLANE = "XY" Current machine plane must be XY. MODE.FEED <> "MINUTE" Current feed mode is not minute (fpm). MODE.SPEED = "RPM" AND REGISTER.S.VALUE > 2000 If RPM spindle mode, and current rpm speed is over 2000. MODE.MOTION="LINEAR" OR MODE.MOTION = "POSITION" Current motion cat be G1 or G0.

Arguments Instructs IMSpost of what register value represents the # value in a statement. When a statement contains a value, it must be represented with a # character.

Page 143: IMSPost Guide

Controller Menu and Options: Apt Definition

IMSpost Guide 135

Field/Button Description

Up / Down Reposition arguments. If an APT Statement contains multiple values, they must be defined in the proper order.

Add Enables you to add a conditional expression that is displayed with its statement when you click Add.

Conditional Expression

Modify Enables you to modify or change a statement that you have highlighted in the display area above. Enter the new APT Statement in the Add display box (if necessary, enter a conditional expression), highlight the APT statement you want to modify in the large display area, and then click Modify.

New APT Conditional Statement Expression

Delete Deletes the statement that you highlighted in the large display area. MODE/USE Displays an alternate translation if one exists for the function code.

The above example shows two possibilities for the M3 code. If the M3 line also includes an S-code (REGISTER.S=1), SPINDL/RPM,#,CLW will be output. If it does not contain an S-code (REGISTER.S=0), SPINDL/ON will be output.

APPLY Applies all changes. NOTE: The APT process is directly related to the Instruction field within the Register Grammar (Controller > Grammar > Register tab) and Function Grammar (Controller > Grammar > Function tab) definitions. That is, if you specify a new APT process (using the APT Definition option), the “Process” selection must exist in the Instruction field.

APT/CL Data Code Types The following APT/CL data types are supported by IMS software products. The license you purchase from IMS will allow your specific CAM system(s).

Code Value APT/CL Data Type

1 EUCLID 2 STRIM 3 BihlerCAT (GERBER) 4 General APT 6 Catia Machinist 9 PTC

11 Prelude Manufacturing 12 Adra Systems 13 IBM360/370 Binary 14 Mastercam

Page 144: IMSPost Guide

Controller Menu and Options: Grammar

136 IMSpost Guide

Code Value APT/CL Data Type

15 CATIA v4/v5 16 Delcam 17 Unigraphics 18 Surfcam 19 Cimatron 20 Auton 21 Intercim 22 HMS-APT 23 VX 24 MetalCAM 25 I-DEAS 26 WorkNC 27 GibbsCam 28 Tebis

NOTE: The APT/CL data type selected is associated with the SYSTEM.CLDATA variable. For example, to change your input to CIMATRON format, enter SYSTEM.CLDATA = 19

Grammar

The Grammar option (also available with ) defines the grammar for macro syntax, registers, functions, variables, and CE errors. This is only active for the Controller Emulator and not applicable in the postprocessor environment.

The controller emulation involves two passes:

1. Split input blocks into tokens 2. Perform work

During the first pass, every input block is split into tokens according to the grammar definition. For example, this block:

N100X1.2Y3.4Z-12.6F120

breaks into the followings tokens: N100 X1.2 Y3.4 Z-12.6 F120

In the second pass, each token is executed according to the specific definition in the grammar. In general, all macros defined in the grammar are executed during this second pass. (An exception to this is based on the Parser option or Type (Define Variable) option, as described in the following sections.)

Page 145: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 137

Syntax The Syntax grammar tab is directly associated with the controller language and preset mathematical functions within the controller. Under normal conditions, there will be no need to modify this screen.

Option/Button Description

SYMBOL Lists an IMSpost definition for the operation. SYNTAX Specifies required parameter(s) for the symbols operation. Controller Symbol Indicates characters that correlate to the IMSpost symbol (described

above). Controller Syntax Defines the controller symbol action. Motion Indicates (when checked) that a machine axis can be included. Type Specifies a symbol type.

NOTE: When the type is Define Variable, the macro will be executed in the first controller pass. Normally (when the type is not Defined Variable), all macros defined in the grammar are executed in the second controller pass.

Page 146: IMSPost Guide

Controller Menu and Options: Grammar

138 IMSpost Guide

Option/Button Description

Instruction Specifies how to process the symbol operation: Process Use the internal APT definition process only. Macro Use the associated macro only. Process + Macro Use the internal APT definition process followed by the macro. Macro + Process Use the associated macro followed by the APT definition process. Ignore Ignore symbols of this type. Ignore All If a symbol occurs in a block, ignore entire block.

MACRO Indicates the macro name that the controller symbol is associated with. Case Sensitive Indicates (when checked) that the syntax case sensitive. Parser Indicates (when checked) that the macro will be executed in the first

controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.

VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.

Expression Evaluate With Math Priority

Specifies how IMSpost interprets the expression. Math priority signifies embedded operations within parenthesis. If this option is checked, these operations are executed first.

Expression Evaluate From Left To Right

Specifies how IMSpost interprets the expression. If this option is checked, IMSpost will interpret the operations left-to-right.

Add Creates an open row which enables you to add an additional symbol. Default Changes the controller syntax to be the same as the IMSpost syntax.

Most symbols have a definition of the symbol in the IMS language (SYNTAX column) and the equivalent in the controller language (Controller Syntax column). IMSpost generally ensures that the values are the same by using the equal sign (=). However, the FANUC controller does the same with the string EQ. To ensure that the controller symbols are the same as the IMSpost symbols, highlight a specific row(s) and click Default. The controller symbol syntax will automatically change to be the same as the IMSpost syntax.

Macro Displays the macro if a symbol is associated with a macro (as described above). This button opens a dialog that enables you to edit the macro.

Save Saves all changes and exits the Grammar dialog. To delete a syntax definition, highlight the definition row and press the keyboard Delete key.

Page 147: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 139

Register The Register grammar tab displays all the controller letter addresses (registers) supported with the IMSpost project. The IMS library files contain and support most of the available controller letter addresses.

Option/Button Description

Symbol Lists all the controller addresses supported for the active IMSpost project. To add an address, see Controller > Register Format.

Sort Specifies the order in which the letter address will be processed. This usually apples to a condition when a single line of output generates more than one APT statement. For example, this one line of code:

G41 G1 X120. Y340. Z210. D22 F500. S1200 M3

could generate the following APT statements: CUTCOM/LEFT,22,XYPLAN

FEDRAT/MMPM,500

SPINDL/1200,CLW

GOTO/120, 340,210

Page 148: IMSPost Guide

Controller Menu and Options: Grammar

140 IMSpost Guide

Option/Button Description

The Sort options available for this processing order are: Order Start of block End of block

The Start of Block option is selected for the above example because the D-code is processed first and included with the CUTCOM statement. For everything else, Order is specified to instruct IMSpost to process the statements in the same order they are read in the ISO output file. Since the F-code is being output before the S-code in the example above, the FEDRAT statement will be output first.

Motion Indicates (when checked) that the letter address can include motion. Macro Specifies the name of the macro that is associated with the letter

address. If this field is blank, no macro is associated with the register. Instruction Indicates how the letter address is processed. The options are:

Process Use the internal APT definition process only. Macro Use the associated macro only. Process + Macro Use the internal APT definition process followed by the macro. Macro + Process Use the associated macro followed by the APT definition process. Ignore Ignore symbols of this type. Ignore All If a symbol occurs in a block, ignore entire block.

Variable Enables you to pass arguments. Update Automatically updates (when checked) the system variable if the

register is associated with a system variable and there is any change in the register value.

String Indicates (when checked) that the register has the ability to contain a string.

Type Refers to the type of operation. Choose from these options: Empty Program Start Program End Optional Skip Optional Stop

Empty Specifies what to do if the register appears by itself (without a value). Options are: Error Generate an error. Last Assume the last value. Value Use the value specified in the Empty Value field.

Empty Value Specifies the default value if the Value option is selected above (for Empty).

Case Sensitive Indicates (when checked) that the text is case sensitive.

Page 149: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 141

Option/Button Description

Parser Indicates (when checked) that the macro will be executed in the first controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.

VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.

Macro Displays the macro if a register is associated with a macro (as described above). This button opens a dialog that enables you to edit the macro.

Save Saves all changes and exits the Grammar dialog. To delete a register definition, highlight the definition row and press the keyboard Delete key.

Function The Function grammar tab displays all the functions (G and M codes) used in the controller emulator.

Page 150: IMSPost Guide

Controller Menu and Options: Grammar

142 IMSpost Guide

Option/Button Description

Symbol Lists all the functions. To add or delete a function, see Controller > Function Codes.

Sort Indicates when the Instruction should be processed. Options are: Start of Block If the code should be processed first. End of Block If the code should be processed last. Order Process order in which it is read in the output block.

Motion Indicates (when checked) that the function can be output with motion. Macro Specifies the name of the macro that is associated with the fucntion. If

this field is blank, no macro is associated with the function. Instruction Indicates how the letter address is processed. The options are:

Process Use the internal APT definition process only. Macro Use the associated macro only. Process + Macro Use the internal APT definition process followed by the macro. Macro + Process Use the associated macro followed by the APT definition process. Ignore Ignore symbols of this type. Ignore All If a symbol occurs in a block, ignore entire block.

Activate Mode Specifies the mode if you want IMSpost to update other conditions. For example, if the M6 code puts the controller in the XY plane mode, enter G17.

Type Specifies the type of function. This is used by IMSpost to internally describe the operation. NOTE: When the type is Define Variable, the macro will be executed in the first controller pass. Normally (when the type is not Defined Variable), all macros defined in the grammar are executed in the second controller pass.

Variable Indicates a variable associated with the function. This value is dependent upon the revpost file that is loaded. Using a Fanuc as an example. Fanuc classifies code groups with system variables #4001 through #4130. Fanuc system variable #4001 represents the motion code group which includes G0, G1, G2, and G3.

Value Specifies the current code that is in effect for the system variable (indicated in the Variable field). For example, if the current system variable in effect is #4001, the Value field would contain the current motion code (G0, G1, G2, or G3).

Case Sensitive Indicates (when checked) that the text is case sensitive. Parser Indicates (when checked) that the macro will be executed in the first

controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.

VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.

Page 151: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 143

Option/Button Description

Macro Displays the macro if a function is associated with a macro (described above). This button opens a dialog that enables you to edit the macro.

Save Saves all changes and exits the Grammar dialog. To delete a function definition, highlight the definition row and press the keyboard Delete key.

Variable The Variable grammar tab displays data regarding the controller’s variable structure and logic.

Option/Button Description

Name Indicates a character that represents a controller variable. List Indicates (when checked) that the variable is a list-type variable. This is

used to define the variable starting/ending number index. If checked, the starting (From) and ending (To) index address must be entered in the following two fields.

From Specifies the beginning index number value. To Specifies the ending index number value.

Page 152: IMSPost Guide

Controller Menu and Options: Grammar

144 IMSpost Guide

Option/Button Description

Local Indicates (when checked) that the variable will not be recognized outside the program. If the variable is local, IMSpost will return the initial value to the register automatically by default.

Create Indicates (when checked) that code creates a variable. Initial Specifies the initial default value. Not Exist Indicates (when checked) that the variable is an undeclared variable

used in an IMSpost assignment. For example, the FANUC controller uses # as a list variable (# must be followed by an integer to specify the variable):

(#1000=#1001+2)

In this example, the value of #1001+2 is set for the variable #1000. However, in this example, the value for variable #1001 is not defined. You can define the behavior of the controller in this case by indicating that this is a “Not Exist” variable and then specifying the value (in the next column).

Not Exist Value Returns a value only if the Not Exist option is checked. Not Exist Condition Indicates (when checked) that the variable is an undeclared variable

used in an IMSpost condition. For example, the FANUC controller uses # as a list variable (# must be followed by an integer to specify the variable):

#1000=20 IF (#1000 EQ #1001) GOTO 100 … N100… …

In this example, the value of 20 is set for the variable #1000. However, in this example, the value for variable #1001 is not defined until it is used in an IF statement. You can define the behavior of the controller in this case by indicating that this is a “Not Exist Condition” and then specifying the value (in the next column).

Not Exist Condition Value

Returns a value only if the Not Exist Condition option is checked.

Vacancy Indicates (when checked) that the value of a variable is null (#0 in Fanuc). Null variables can be read, but cannot be written to. For example (Fanuc style):

IF[#24EQ#0] GOTO2

If you checked the Not Exist option for #0, you will jump to line N2. MACRO Specifies a macro associated with the variable. Macro Displays the macro if a variable is associated with a macro (described

above). This button opens a dialog that enables you to edit the macro. Var Def Enables you to use a variable without defining it first. Refer to Variable

Definition below. Add Creates an open row which enables you to add an additional variable. Save Saves all changes and exits the Grammar dialog.

Page 153: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 145

To delete a variable definition, highlight the definition row and press the keyboard Delete key.

Variable Definition

A specific command may define a variable. For example: DEF AA

DEF is a reserved word telling the controller that the following string (AA) is a new variable name.

In some controller languages, the programmer can define and use a “free” variable that is not a specific name reserved in the controller language (such as # in FANUC). A free variable is available when the controller programming language allows for use of a variable without first defining it. For example:

N100 G1 X… Y… Z… Move to X, Y, and Z N200 ABC=100. New variable “ABC” defined with the value of 100. N300 X=ABC Move X to 100.

When you click Var Def, the Free Variable Definition dialog is displayed and enables you to define a free variable:

This dialog enables you to define a free variable that IMSpost will use to emulate the controller interpretation. If the controller emulator finds a token that it is not predefined in the grammar, it will check to determine if this token is a variable. For an unrecognized token to be defined as a variable, it must match the definition condition of the controls in the Free Variable Definition

Page 154: IMSPost Guide

Controller Menu and Options: Grammar

146 IMSpost Guide

dialog. This enables you to specify a variety of ways that different controllers may restrict the use of free variables.

Different controllers have different restrictions for the name used to define a free variable. For example, there could be a maximum number of characters allowed in the name. Or, a specific character must be used as the first or last character in the name.

The IMSpost controller emulator enables you to define a number of different sets of restrictions (click the New button for each additional set). Once the controller emulator finds an undefined token, it checks against all free variable definitions until one is found. Then, it creates this variable.

NOTE: If a field is empty, IMSpost will ignore it and it will not be used as a restriction in the free variable name.

Option/Button Description

Allowed Start Characters

Indicates that the name must start with one of the defined characters.

Allowed End Characters

Indicates that the name must end with one of the defined characters.

Allowed Characters Indicates that the name must consist of only the defined characters. Must Start With Indicates that the name must start with the specified string. Must End With Indicates that the name must end with the specified string. Minimum Length Defines the minimum number of characters in the name. Maximum Length Defines the maximum number of characters in the name. Allow Index Variable

Indicates (when checked) that the variable name can be an index (such as FANUC #1, #2,…#n). Use the From option for the index start number. Use the To option for the index end number.

Create With Initial Value

Specifies the initial value to use when one is not previously defined.

Vacancy Variable Indicates (when checked) that a vacancy variable (such as FANUC #0) can be used.

Not Exist Indicates the variable can be used in a simple assignment without first defining the variable. The entry in the box to the right of this option specifies the value to be used.

Not Exist Condition Indicates the variable can be used in a condition command without first defining the variable. The entry in the box to the right of this option specifies the value to be used.

Check Macro Checks for the specified macro. The token is considered to be a legitimate variable name only if all restrictions fit the token AND if the macro returns a non-zero value.

Active Macro Activates the specified macro when the variable changes its value. Back Displays the previous set of restrictions. Next Displays the next set of restrictions. Delete Deletes the current set of restrictions. New Enables you to enter a new set of restrictions.

Page 155: IMSPost Guide

Controller Menu and Options: Grammar

IMSpost Guide 147

CE Errors The CE Errors grammar tab displays a dialog for error processing.

Option/Button Description

Id Specifies an identifier for the CE error. Name Specifies a name for the CE error. This name is used only used as an

identification reference. Driven Specifies a control register or function code to look for. Setting a

MODE condition is also allowed here. For example, if you are checking for linear motion, enter MODE.MOTION.LINEAR. If the Driven field is empty, every block will be checked. You can also extend the check with a conditional statement in the Condition field (described below).

Condition Lists an optional conditional expression. Message Specifies text for the error message. This is the message that will be

output in the .log file and event list. Macro Displays the macro if the error message is associated with a macro (as

described above).

Page 156: IMSPost Guide

Controller Menu and Options: Grammar

148 IMSpost Guide

Option/Button Description

Status Determines how an error should be generated: ON All the time. OFF Terminate error (cancels ON). ONCE First encounter.

Report Indicates how an error should be reported: STOP Terminate processing. WARNING Increment the warning counter and display the error in the log file and event list. ERROR Increment the error counter and display the error in the log file and event list.

Macro Displays the macro if an error is associated with a macro (described above). This button opens a dialog that enables you to edit the macro.

Add Creates an open row which enables you to add an additional error message.

Save Saves all changes and exits the Grammar dialog. To delete a CE error definition, highlight the definition row and press the keyboard Delete key.

Notes

Page 157: IMSPost Guide

IMSpost Guide 149

Machine Menu and Options

IMSpost views a postprocessor as two separate items: a controller and a machine. This gives you the capability of selecting a controller from your library and connecting it to the machine axis configuration. IMSpost will automatically take you through these important steps.

The best way approach is to select a machine from the IMS library machine models. If you need to modify an existing library model or create a machine from scratch, there are a few important factors.

• When defining your machine, it is important that you keep a consistent view while constructing the entire machine.

• Define your machine so all its axes are at their machine zero position. IMSpost uses the standard right-hand coordinate system (for example, assume you are standing directly in front of the machine).

• Rather than using XYZ for linear axes, IMSpost uses the following descriptions:

HORIZONTAL defines the linear axis that moves from your left to your right. INTO defines the linear axis that moves through you. VERTICAL defines the linear axis that moves from the floor to the ceiling.

• For rotary axes, IMSpost uses:

A as the name of the axis that rotates about the X axis. B as the name of the axis that rotates about the Y axis. C as the name of the axis that rotates about the Z axis.

The Machine menu includes the following options:

Option Description

Motion Displays all programmable machine axes. Use this dialog to define the moving axes that your machine tool accepts or supports. You can name the moving axes with the associated controller letter addresses (for example, letter address X controls horizontal motion).

Components Specifies model components. Use this dialog to describe the physical components of the machine (such as tables, heads, parts, and tools).

References Specifies machine offsets (pivot points). Use this dialog to describe offsets between the components you have defined for the machine.

Multi-Axis Provides setup options for tool tracking. Multi-axis Setup Sets specific formatting and conditions for multi-axis

programming. Work Plane Sets formatting for a multi-axis machine with a controller

that supports different working planes.

Page 158: IMSPost Guide

Machine Menu and Options: Motion

150 IMSpost Guide

Option Description

Import Machine

Imports machine options and overrides the existing machine model with: IMS project file From another postprocessor file. Use this option to

import a complete machine description (including motion, components, and references) from another project file.

IMS model file From an existing machine model. Use this option to import a complete machine description from the IMSmachine product. IMSmachine is automatically installed when you install IMSpost and it is used to graphically build a machine.

Pre-defined machines View and select predefined machine model.

Motion The Motion option displays all programmable machine axes.

NOTE: This option also is available with Motion Axis on the Checklist.

Use the Machine Motion dialog to define the moving axes that your machine tool supports. You can name the moving axes with the associated controller letter addresses (for example, letter address X controls horizontal motion). Click in a cell to edit the information.

NOTE: Typically there is no need to add machine axes within this dialog. The predefined machines models within IMSpost have been proven to be successful for many users.

To edit a motion axis:

1. Select the motion axis (row) that you want to modify.

2. Modify information, as described below.

Page 159: IMSPost Guide

Machine Menu and Options: Motion

IMSpost Guide 151

To add an axis:

1. Enter the motion axis letter in the text box. When adding an axis, it is recommended to load a new machine model that represents the new configuration. Adding an axis is commonly done for machines that include co-linear axes (two machine axes that share the same direction), as described below.

NOTE: The best way to add additional axes is to ensure you have the proper machine model active. On the Machine menu, select the Import Machine option and then the Pre-defined Machines option.

2. When adding a co-linear axis, indicate a Priority for the axis. Priority is used for machines that support co-linear axes. For example, the W-axis would move the spindle head while the Z axis would move the spindle quill. In any case, both axes must share the same direction (vertical, horizontal, or into). Specify both axes in the order of their priority, as described for co-linear axes (below).

3. Click Add.

4. Modify axis information. To do so, click in the field and select/enter the appropriate information:

Field/Button Description

Component Specifies the machine component name that “moves” the associated axis.

Type Indicates the axis type: Linear or Rotary. Direction Indicates the axis direction:

(+) vertical (-) horizontal (+) into (-) into The + and – indicators associate a sign with the direction of movement. You can also program a 3-axis vector input (for example: 1,0,0) instead of choosing one of the default axis names.

Minimum Available only if the motion type is Linear: Defines the minimum axis travel limits for this machine axis. For linear axes, these values are stored internally, but are not checked unless explicitly coded in the appropriate macros. The minimum and maximum values do not have an effect on rotary axis output.

Maximum Available only if the motion type is Linear: Specifies the maximum position value for the axis.

To delete a motion axis:

1. Right-click on the motion axis (row) that you want to delete.

2. Click the Delete keyboard key.

Page 160: IMSPost Guide

Machine Menu and Options: Motion

152 IMSpost Guide

Once an axis is defined, you can click More…to enter additional definitions. A dialog similar to the following is displayed. This dialog applies to a linear definition:

Page 161: IMSPost Guide

Machine Menu and Options: Motion

IMSpost Guide 153

This dialog applies to a rotary definition:

Field/Button Description

Name Specifies the motion axis name. Register Specifies the letter address used to describe the moving axes defined

for the machine tool. The letter address must be defined in the Register Format.

Component Specifies the machine component name that “moves” the associated axis.

Channel Assigns a channel name if more than one machine with multi-channel programming is used.

Type Indicates the axis type: Linear or Rotary.

Page 162: IMSPost Guide

Machine Menu and Options: Motion

154 IMSpost Guide

Field/Button Description

+/- for rotary direction

Rotary Only: Indicates direction. For example, if this option is checked, +90 and -90 are the same position, but travel direction is CLW for +90 and CCLW for -90. If this option is not checked, +90 and -90 are different positions, 180 degrees apart. (This is the more standard condition.)

Short Way Rotary Only: Instructs IMSpost that the controller will determine the direction that requires the shortest route. MACHINE.axis.SHORT = 1 (on) or = 0 (off) Output is from 0 to 360.

Direction Indicates the axis direction: (+) vertical (-) horizontal (+) into (-) into The + and – indicate the direction of movement. You can also program a 3-axis vector input (for example: 1,0,0) instead of choosing one of the default axis names.

Minimum Defines the minimum axis travel limits for this machine axis. For rotary axes, this value is always used in determining rotary axis position. For linear axes, this value is stored internally but not checked unless the Limit to Minimum option is selected (or it is explicitly coded in the appropriate macros).

Limit to Minimum Linear Only: Indicates that travel should be limited to the minimum value.

Maximum Defines the maximum axis travel limits for this machine axis. For rotary axes, this value is always used in determining rotary axis position. For linear axes, this value is stored internally but not checked unless the Limit to Maximum option is selected (or it is explicitly coded in the appropriate macros).

Limit to Maximum Linear Only: Indicates that travel should be limited to the maximum value.

Home Position Specifies the “home” position for the axis. This is used only if the next option (Move to home at tool change) is selected.

Move to home at tool change

Moves to the home coordinate at the tool change. For example, if your output shows Z motion first after a tool change and you prefer to see XY before the Z axis motion, select this option for the Z axis definition. Enter a value for the Z home position (in the field above). The postprocessor will not output this point, but it will be updated internally.

Maximum Feed Specifies the maximum axis feed (rapid positioning) for time calculations.

Minimum increment Does not make movements that are smaller than this value.

Page 163: IMSPost Guide

Machine Menu and Options: Motion

IMSpost Guide 155

Field/Button Description

Axis Step Outputs only axis motions to the step amount (round the values). A step value of 2.5 will output values of 0, 2.5, 5.0, 7.5... or -2.5, -5.0, -7.5...

Delta (co-linear axes) Linear Only: Specifies the delta movement (if there is any) before a switch to movement of the other machine axis parallel to this one. The machine must be defined such that parallel linear axes exist.

Discrete position(s) Rotary Only: Lists positions if the rotary axis is limited to certain fixed position. For example: [0, 90, 180, 270]

Acceleration Specifies the rate for acceleration speed (CE only). This is not applicable to IMSpost.

Use Acc. Indicates that Acceleration should be used (CE only). This is not applicable to IMSpost.

Deceleration Specifies the rate for slow down (CE only). This is not applicable to IMSpost.

Use Dec. Indicates that Deceleration should be used (CE only). This is not applicable to IMSpost.

Device ID (Catia) Shows the Catia device ID. Each motion axis has a device ID. Lock axis for type Defines axis locking. If this is a linear axis, only the Linear option is

available. If this is rotary axis, both Linear and Rotary axis options are available. This is because it is possible to use a rotary axis as a substitute for linear motion. By default, the rotary position is not used for position. For example, given a 4-axis machine with XYZC axes, if you want to have all motion in the XY plane to use X and C rather than X and Y, set the Y-axis box to “Lock Linear” and be sure the “Lock Linear” option is cleared (unchecked) for the C-axis.

Enable Auto Retract Available only if the motion type is Rotary: Enables the Auto Retract feature if it is active (see Machine > Multi-axis > Multi-axis Setup).

Enable Auto Retract For Linear Move

Available only if the motion type is Rotary: Repositions the rotary axis if a linear axis reaches a specified minimum or maximum range.

Page 164: IMSPost Guide

Machine Menu and Options: Motion

156 IMSpost Guide

Co-Linear Axes Co-linear axes are used to support machines that have two machine axis that share the same direction. A common example would be a horizontal machine with a programmable table or saddle. The tool (Z) and the saddle (W) share the same axis direction. You need to instruct IMSpost as to which axis has priority.

The following motion procedure describes a horizontal machine and how the W axis is added.

1. Enter the co-linear axis (W in this example) in the text box to the right of the Add button.

2. Indicate the axis that takes priority. In this example, enter Z,W to indicate that the Z-axis has priority over the W-axis. Z will move first and, if any distance remains, W will move.

3. Click Add.

4. Click in the Direction column and select the direction of the axis. Note that both axes must have the same direction (vertical, horizontal, or into).

Page 165: IMSPost Guide

Machine Menu and Options: Motion

IMSpost Guide 157

5. Because Z axis is specified as the Priority axis, enter the distance the Z axis will travel. To do so, click More… to the right of the Z-axis definition and enter the value (20 in the example) in the Delta field.

This dictates that Z will take the first 20 mm (or inch) of each move. The remainder will be done by the W. For example: GOTO/10,10,100 Nxxx G1 X10. Y10. Z20. W80.

6. You also should include the W-axis parameter in your Function definition (as shown below). To do so, open the Controller menu and select the Function Codes option. Enter the W-axis parameter in the appropriate Use column field. The Use field instructs the postprocessor as to what other registers should be output with the associated function code.

Page 166: IMSPost Guide

Machine Menu and Options: Components

158 IMSpost Guide

Components The Components option displays various components that construct the active machine model.

Field/Button Description

Name Specifies the component name. Type Indicates the components type:

Table, Head, Tool, Part, Static, Fixture, or Design Mount Defines what the component is attached to. Motion Describes the machine axis (if any) associated with the component.

Page 167: IMSPost Guide

Machine Menu and Options: References

IMSpost Guide 159

Field/Button Description

Shape Indicates the component shape type: Cube, Cylinder, Cone, Sphere, Torus, Extrude, Revolve, or Mesh Cone or Cylinder must be used for tool shapes in order to define tool orientation.

Direction For Tool Component Types Only: Specifies the orientation direction of the component. Be sure to define all component directions for these types of components.

Device ID (Catia) Identifies the device (Catia only). Add Adds a component. Enter the component name in the text box and then

click Add. To delete a machine component, select the component row and click Delete on your keyboard.

NOTE: It is recommended to select a predefined machine through the supplied existing models. You can do this through File > New or on Machine > Import Machine > Pre-defined machines.

References The References option specifies machine offsets (pivot points). This feature is used with multi-axis machines that require machine offsets or rotary axis “pivot points.”

NOTE: Entering machine offsets through this dialog ensures that the offsets are placed in the proper area within IMSpost.

Page 168: IMSPost Guide

Machine Menu and Options: References

160 IMSpost Guide

Field/Button Description

X (Horizontal) Specifies the reference offset in the horizontal machine direction. Y (Into) Specifies the reference offset in the “into” machine direction. Z (Vertical) Specifies a reference offset in the vertical machine direction. Set Up Machine Zero

Defines the machine zero, as described in Defining Machine Z Zero.

Advanced Accesses Advanced User options, as described below. FOR ADVANCED USERS: Each component has a point defined as its origin. When the machine is “built,” it is set up in such a way that all component origins are attached at the same point. This is not always the case with multi-axis or rotary axis machines. For example, it is common to have a rotary table (for example, a-table) with an origin or pivot point below the xy-table. The value from the a-table origin to the xy-table origin would be output in the vertical column or the appropriate row in the reference table. You would proceed similarly with origins that are not attached at the same point in order to accurately define your multi-axis machine.

Click the Advanced button and this dialog is displayed:

Field/Button Description

Horizontal Specifies the reference offset in the horizontal machine direction. Into Specifies the reference offset in the “into” machine direction. Vertical Specifies a reference offset in the vertical machine direction. Horizontal Orientation

If the from/to components are mounted in a rotated orientation: Specifies the axis where the horizontal component of the “from” axis is mounted on the “to” axis.

Page 169: IMSPost Guide

Machine Menu and Options: References

IMSpost Guide 161

Field/Button Description

Into Orientation If the from/to components are mounted in a rotated orientation: Specifies the axis where the “into” component of the “from” axis is mounted on the “to” axis.

Save Saves the information on the dialog. Reset Resets the information to the when the dialog was opened.

NOTE: It is highly recommended to enter machine offsets through the Machine References feature. IMSpost will then place these values in the proper cells within the machine reference section.

Defining Machine Z Zero You can select either the Pivot Point or the Spindle Face for machine Z zero. If in doubt, rely on the IMS default selection.

The Pivot choice is usually valid for machines with rotary spindle heads. If the machine has a pivot distance (in the example below, 10 inches from the spindle face to the center of the rotary A rotation), it must also be defined here if you want the postprocessor to adjust for this machine offset. If the controller handles it internally, there is no need to specify the distance.

This selection also works in conjunction with how the postprocessor is tracking the tool.

Depending on what you selected and how you choose to track the tool, these two settings may offset your tool axis. You specify the tool tracking by selecting Machine > Multi-axis > Multi-axis- Setup. The area for “Output using” gives you four choices: Pivot, Face, Center, and Tip.

For example (assuming a reference pivot distance of 10 mm above spindle face): GOTO/300,300,100

Page 170: IMSPost Guide

Machine Menu and Options: References

162 IMSpost Guide

Setup Machine Zero Output Using Description

Pivot Pivot Nxxx X300. Y300. Z100. (no change) Pivot Face Nxxx X300. Y300. Z110 (+ 10 pivot) Face Pivot Nxxx X300. Y300. Z90. ( - 10 pivot) Face Face Nxxx X300. Y300 Z100 (no change)

The other two choices involve software controlled tool lengths:

Center The postprocessor extracts the tool length from the LOADTL statement. This value will be added to all subsequent part Z coordinates.

Tip This instructs the postprocessor to add both the tool length and the cutter radius to the part Z coordinates.

When a multi-axis machine is in effect, these pivot distances and tool length offsets could be reflected in the output. This example uses a Vertical machine with a rotating spindle head (A-axis). There is a 120 mm pivot distance from the spindle face to the rotary A axis.

Example 1: Set Up Machine Zero = "Pivot"; Output Using = "Pivot"

GOTO/100,100,200,,0,.707107,.707107 Nxxx X100. Y100. Z200. A45.

Example 2: Set up Machine Zero = "Pivot"; Output Using = "Center" LOADTL/1.LENGTH,150 Nxxx T1 M6 GOTO/100,100,200,0,0,1 Nxxx G0 X100. Y100. Nxxx Z470. GOTO/100,100,200,,0,.707107,.707107 Nxxx Y290.919 Z390.919. A45.

Example 3: Set up Machine Zero = "Face"; Output Using = "Center" LOADTL/1.LENGTH,150 Nxxx T1 M6 GOTO/100,100,200,0,0,1 Nxxx G0 X100. Y100. Nxxx Z350. GOTO/100,100,200,,0,.707107,.707107 Nxxx Y290.919 Z270.919. A45.

Page 171: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 163

Multi-Axis This option is used to set specific formatting and conditions for multi-axis programming. Two options are available: Multi-axis Setup and Work Plane.

Multi-axis Setup This option is only necessary for postprocessors that contain one or more ROTARY machine axes.

Field Description

Use RTCP output Specifies that the output should be for a machine controller supporting Rotating Tool Center Point (RTCP) output. This ignores table rotation and takes care of table rotation compensation. For example, this option takes care of the distance from the tip end of a spindle to the pivot point. The use of Pivot or Face (see the Output using… options described below) depends on the controller. You defined if the distance is to the face of the spindle or to the pivot point.

Multax on by default Enables the default startup condition of the postprocessor to multi-axis postprocessing ( as if MULTAX/ON has been programmed in the APT/CL file).

Page 172: IMSPost Guide

Machine Menu and Options: Multi-Axis

164 IMSpost Guide

Field Description

Lintol on by default Enables the default startup condition of the postprocessor to linear tolerance calculations for multi-axis postprocessing (as if LINTOL/value has been programmed in the APT/CL file).

Output using... Defines how to track the cutter. Select one: Pivot (point of rotation on the head) Face Center Tip

MSpost gives you the option of tracking the tool a number of ways. Depending upon what you select in the “Output using” area, the postprocessor will make its calculations based upon the tool data passed within the APT/CL file. The postprocessor normally gets its tool data from the LOADTL and CUTTER statements. The tool length is defined with LOADTL and the cutter diameter (or radius) is in the associated CUTTER statement. This tool data updates these IMS system variables: SYSTEM.TOOL_LENGTH Tool length SYSTEM.CUTTER_RAD Cutter radius SYSTEM.CUTTER_DIAM Cutter diameter Within IMSpost, there is a CUT statement that instructs the system as to what is being cut (PART) and how it is being cut (TOOL...). For example, depending on what was selected in the “Output using” area; the following four CUT statements could be generated: CUT(PART,TOOL.RTCP) Cut part based upon tools pivot point (Machine References) CUT(PART,TOOL.ORIGIN Cut part with spindle face CUT(PART,TOOL.CENTER) Cut part with tools center CUT(PART,TOOL.TIP) Cut part with tools endpoint

Solution Condition Indicates the solution chosen by the postprocessor. As a general rule, IMSpost chooses the solution that represents the shortest movement of the tool. You can enter a conditional expression in the Solution Condition box to control the solution chosen by the postprocessor. In multi-axis programming, depending on machine axis limits and orientations, it is quite often possible to have more than one correct output solution for any input point/vector value. When the Solution Condition is true, the postprocessor will output the alternate position. If a valid expression is entered, the postprocessor will make this check for every 5-axis motion. The system variable that contains this expression is:

SYSTEM.FORCE_WAY " expression "

For example: SYSTEM.FORCE_WAY = "MACHINE.C > 45.0"

This example delete current solution expression: SYSTEM.FORCE_WAY = ""

TIP: Use MACHINE type variables in the conditional expression, rather than REGISTER variables. MACHINE variables are checked

Page 173: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 165

Field Description during the calculation of the solution, whereas REGISTER variables are not set until after the solution calculation has been completed. For example, use:

MACHINE.C > 45.0

rather than: REGISTER.C.VALUE > 45.0)

Enable read ahead to choose best solution

Activates the routine that determines the best initial tool start-up orientation. For 5-axis machines; this routine instructs IMSpost to look ahead through a specified area of the part file and determine the best way to initially position the tool. With this option selected, it could eliminate or reduce the need for tool retractions and tool re-orientations. For example; one start up tool orientation could be:

Nxxx X..Y..Z.. A45.0 C0.

and the alternate could be: Nxxx X..Y..Z..A-45.0 C180.0

The global variable that controls this checkbox is: GLOBAL.RAPID_BEST_SOLUTION

MULTAX/ON must be in effect here. If it is OFF, no SOLUTION will be returned. MULTAX/ON could be set as a default condition in this dialog. Refer also to More Details About Best Solution, below.

Enable auto retract/-reorient for rotary axes

Activates the retract/reorient feature and the options below. (Refer to the Enable Auto Retract option for Machine > Motion.) Automatic retract and reorient is an optional feature of multi-axis postprocessing using IMSpost. The retract/reorient condition occurs when a rotary axis sees a new tool axis vector that exceeds the angle specified in the “Auto retract angle” display area (described below), or it reaches a machine travel limit while in the process of a cutting move, and must retract the tool, unwind the rotary axis, move back to the last position, and finish the cutting move. With this feature enabled, IMSpost performs each of these moves automatically when the condition occurs during postprocessing of a multi-axis file. This motion can be modified within the AUTO_RETRACT macro.

Auto retract angle Defines the delta angle that activates the auto retract feature. For example, if you enter 30 and the postprocessor encounters a rotary motion of at least 30 degrees (for any rotary axis), the auto retract feature is activated. This delta angle represents the angle the postprocessor will have to move in order to maintain the programmed tool (IJK) vector.

Clearance distance Defines the relative distance to retract (along the tool axis) in G0 mode before the rotary axis repositions (unwinds).

Feed in/out distance Defines the initial retraction distance in feed (G1) mode. Remaining retraction will be done in G0 mode as specified in the Clearance distance, above.

Page 174: IMSPost Guide

Machine Menu and Options: Multi-Axis

166 IMSpost Guide

Rotating Tool Center Point (RTCP)

Rotational Tool Center Point (RTCP) programming mode, allows tool paths (calculated from the center of a ball nose tool or the tool tip point for an end milling cutter) to be directly matched to the center of rotation of the corresponding axis. This feature eliminates the need to re-post the program for tool length changes or reestablish the zero position of the workpiece for every axis rotation.

With RTCP turned on, new X, Y, and Z values are automatically calculated at the control so that the center of the tool tip will follow the original tool path centerline. For the postprocessor in the standard case, this means the X, Y, and Z linear values are not adjusted based on the rotary axis positions, but rather this adjustment takes place at the machine controller.

The RTCP feature must be supported by the controller.

The IMSpost variable that controls this feature is:

SYSTEM.COORD_RTCP = 1 The “Enable auto retract/reorient for rotary axes” option is checked (ON).

SYSTEM.COORD.RTCP = 0 The “Enable auto retract/reorient for rotary axes” option is not checked (OFF).

When the RTCP option is off, the postprocessor will adjust for the tool length by moving the linear axes.

This system variable usually applies to table rotations only. Rotary head rotations are controlled within IMSpost with the CUT statement and are dependent upon the options selected on the Multi-axis Setup dialog. The CUT statement instructs IMSpost as to which part component will be cut and which tool components will do the actual cutting. For example:

CUT(PART,TOOL.RTCP) Cut part with tools defined pivot point (Machine References).

CUT(PART,TOOL.ORIGIN) Cut part with spindle face.

CUT(PART,TOOL.CENTER) Cut part with tools center point.

CUT(PART,TOOL.TIP) Cut part with tools tip.

IMSpost also tracks the tool based upon tool data being processed within the part file. Tool data such as tool length, cutter radius, or diameter update IMSpost variables as these LOADTL and CUTTER statements are read within the part file.

Each IMS model component contains a control point called its origin. This point is the local coordinate system of that particular component. Cutter (tool) type components have four of these local origin points:

ORIGIN tracks the spindle face (no tool length). TIP uses the SYSTEM.TOOL_LENGTH CENTER = SYSTEM.TOOL_LENGTH + SYSTEM.CUTTER_RAD RTCP uses the specified pivot point (distance from spindle face to center of heads rotation).

The tool origin that will be in effect is dependent upon the options selected on the Multi-axis Setup dialog.

Support for Contact-Point Output with Corner Radius Cutters

The GOTO macro and GOTO solution statement allow output of the tool contact point in addition to the tool tip point. The tool contact point is the point where the tool actually touches the part. It may not be the tool tip, but could be some other point on the side or radius of the tool. The GOTO

Page 175: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 167

statement processing accepts three additional parameters, representing a vector from the tool radius center to the contact point. In addition, the CUTTER statement processing saves the tool information for the diameter, radius, and length of the tool in IMSpost variables that are used in calculating the contact points.

More Details About the Best Solution

In order for the Best Solution routine to work, there are a few variables necessary to define here: SYSTEM.BEST_START_COMMAND = "APT Statement" SYSTEM.BEST_END_COMMAND = "APT Statement"

Enter the names of the APT statements that will define the start and end of the boundary. SYSTEM.BEST_START_REPEAT = # SYSTEM.BEST_END_REPEAT = #

This indicates how many times to locate the start and end of the boundary. Typically, the value for both of these variables is set to one. If set to a value greater than one, IMSpost would keep searching until the APT word is encountered the specified number of times.

If set properly, finding the Best Solution is a one-shot command activated within the RAPID macro (SYSTEM.BEST_SOLUTION = GLOBAL.RAPID_BEST_SOLUTION).

If activated, IMSpost will do a look-ahead through all the GOTO points located within the specified boundary in order to determine the best tool orientation at start-up.

For example, to specify boundaries: SYSTEM.BEST_SOLUTION = 1 SYSTEM.MULTAX = "ON" SYSTEM.BEST_START_COMMAND = "FEDRAT/*" SYSTEM.BEST_START_REPEAT = 1 SYSTEM.BEST_END_COMMAND = "RAPID/*" SYSTEM.BEST_END_REPEAT = 1 (part program) LOADTL/1 MULTAX/ON RAPID/ Activates Best Solution in RAPID macro GOTO/100,150,300,0,1,0 RAPID/ GOTO/400,350,300,0.,1,0 FEDRAT/1500,MMPM Starts Best Solution Boundary GOTO/X,Y,Z,I,J,K GOTO/X,Y,Z,I,J,K GOTO/X,Y,Z,I,J,K GOTO/X,Y,Z,I,J,K GOTO/X,Y,Z,I,J,K RAPID/ Ends Best Solution Boundary and returns SOLUTION to

first RAPID motion

Page 176: IMSPost Guide

Machine Menu and Options: Multi-Axis

168 IMSpost Guide

Work Plane The Work Plane option sets formatting for a multi-axis machine with a controller that supports different working planes.

This option makes it possible to define a plane other than the three major planes of XY, YZ, and ZX. When defined properly, this option enables the programmer to use features like canned cycles, circular interpolation, and cutter compensation within the specified work plane.

NOTE: This dialog is only necessary for postprocessors that contain one or more rotary machine axes, and the feature must be supported within your controller. Because this feature passes the data to a custom macro, your IMS license must include the macro utility.

Overview

The new generation of controllers can perform more complicated functions, not only in the three major planes XY, YZ, ZX (G17, G18, G19), but in any plane.

Page 177: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 169

As an example, look at cutter compensation programming (G41, G42). Traditionally, this function works only in one of the major planes. For work done with tilted head machine in indexing mode (and not along a major plane), the user would have to program the part in the CAM system with the actual cutter to be used on the machine. If there is any change in the actual cutter diameter or length, the user will have to run the CAM program again with the modification of the cutter. Compare this to working in one of the major planes, where this is not necessary since the controller can do the compensation internally.

The working plane function in IMSpost supports this new technique as used in the new generation of controllers.

NOTE: If your controller does not support this feature, there is no need for you to specify it. If it does, your IMS license must also include the macro utility. When this dialog is properly defined, it will pass information to the postprocessor WORKING_PLANE/* dialog. In this macro, you have the ability to take this dialog data and process it to your specifications. The WORKING_PLANE/* does not exist in the library posts. Because this option can have many variations, the user is responsible for processing the data this dialog passes to the macro.

Description

It is important to understand what it means to work in a working plane.

Normally, the CAM system software generates the tool part file (APT, CLD) in one physical coordinate system. This physical coordinate system usually represents the part coordinate system with respect to the machine coordinate system.

If however, the head of the machine is tilted to cut the material in such a way that the tool is normal to a plane other than one of the major planes, it is possible that some newer controllers can define that plane in such a way to be able to apply the cutter compensation (as it was in one of the major planes).

The controller needs to determine if all points in the coordinate system lay on that plane. This is as if doing all programming in XY-plane and defining the plane in the controller using the controller language.

With this technique, the controller first applies the compensation to the given points, and then converts the points back to the physical coordinate system using the predefined plane.

Page 178: IMSPost Guide

Machine Menu and Options: Multi-Axis

170 IMSpost Guide

Defining the Plane

For the definition of the plane, the controller uses a sequence of rotation angles that rotate the physical coordinate system to a specific plane. IMSpost provides many different options in order to handle all variations of controllers that support this kind of operation.

Field Description

Work Plane On Indicates the function code for the working plane option ON. Work Plane Off Indicates the function code for the working plane option OFF.

Page 179: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 171

Field Description

Tool direction Creates the necessary matrix to multiply all points into the plane perpendicular to the tool. With this option, if the machine has a fixed head, the matrix will always be the identity matrix, in which case there will be no affect on the points. (In this case the tool is always normal to one of the major planes, so there is no need for the working plane option.) However, if the tool is tilted (usually because the machine has rotary head) IMSpost will define the necessary matrix internally.

IJK vector Defines the matrix to multiply all points into the plane perpendicular to the given vector, as specified in every GOTO command.

User-defined plane Specifies the matrix to be used to multiply all points into a certain fixed plane. This Matrix is a 4x3 matrix. The last column is a translation. For every given point (GOTO/x, y, z.....), the matrix will be applied to the point given to give a new one. (This option is useful only in cases in which the matrix is not dependent on the rotation of the machine axes.)

At this point, the postprocessor has two tasks to accomplish:

1. Define the matrix and multiply all given points by the matrix.

2. Create the specific command for the controller to define the matrix in the controller.

To this point, the options above covered the first task, defining the matrix. The next options cover how to create the specific command for the controller.

There are two ways to create the specific commands for the controller to define the matrix. Since there is no one way for all controllers to define the plane, you can use the advantages of IMSpost with the powerful macro language. Through the Work Plane dialog, IMSpost will internally generate a command to activate the macro called WORKING_PLANE/*. The call to the macro will include all necessary parameters possible needed by the controller.

Field Description

Machine Uses the predefined machine rotation axes for the defined plane. Some controllers define the plane using the same head rotation as the machine, such as if we have one rotary axis on the head (for example A rotation around the X axis of the machine). This option is very powerful because you are not dependent on your postprocessor in any way if the machine is changed.

Axis Specifies the axes defining the plane. In many controllers you have axes in combinations of “A, B, and C” where:

A rotation defines the rotation around the 1,0,0 vector. B rotation defines the rotation around the 0,1,0 vector. C rotation defines the rotation around the 0,0,1 vector.

Fill the table with the relevant information. Name Specifies the name of the axis. Vector Indicates the associated direction vector. Minimum Defines the minimum rotation angle. Maximum Defines the maximum rotation angle.

Page 180: IMSPost Guide

Machine Menu and Options: Multi-Axis

172 IMSpost Guide

Field Description

Step Specifies the tolerance value. Independent rotary axes

Specifies how to correctly use the Axis table definitions. If the box is NOT checked: The Work Plane feature assumes that A, B, and C are dependent on each other. If one axis is rotated, the other axes orientation may be changed. As an example, in the Axis table specify the names and associated vectors as: A 1,0,0 B 0,1,0 C 0,0,1 If the axis A is rotated, then the vectors of B (0,1,0) and C (0,0,1) orientation will be changed. Like most rotary axes machines, if the axes are dependent on each other, then the order of the rotation does not affect the final result. If the box IS checked: The axes rotated around a fixed vector, independent of the other axes rotation, and the order of the axes IS important. You must know how the controller works in order to define the work plane correctly.

Once you enter all information to internally calculate the point on the desired plane, you also need to know how the controller implements the mechanism internally. The only thing left then is to generate the right command to the controller for defining the plane.

As stated previously, the postprocessor will generate a WORKING_PLANE/ command to activate the macro WORKING_PLANE/ with all the necessary information, including the matrix, angles, and so on. You must extract the data from this WORKING_PLANE/ statement and output it as required by your controller.

You can format the exact controller output for defining the working plane in this macro. As with other IMSpost functions, this gives you complete control over formatting the output to the exact specifications.

The following options control when the macro will be active.

Field Description

Once Activates the WORKING_PLANE macro with the first move only. Change Activates the macro every time the plane is changed. Macro Executes the WORKING_PLANE macro.

Additional options are:

Field Description

Reverse Matrix Instructs IMSpost to calculate an inverse matrix. The system will flip the resulting coordinates.

Linear Indicates that a Linear motion activates the work plane option. The work plane option will not be activated unless a Linear motion occurs. This option can be combined with Rapid and/or Cycle.

Page 181: IMSPost Guide

Machine Menu and Options: Multi-Axis

IMSpost Guide 173

Field Description

Rapid Indicates that a Rapid motion activates the work plane option. The work plane option will not be activated unless a Rapid motion occurs. This option can be combined with Linear and/or Cycle.

Cycle Indicates that a Cycle motion activates the work plane option. The work plane option will not be activated unless a Cycle motion occurs. This option can be combined with Linear and/or Rapid.

Active Activates (or deactivates) the WORKING_PLANE feature. You may decide to define all the necessary information, but deactivate the feature (uncheck this option) as a default.

All the work plane parameters defined by this dialog can also be programmed by means of a macro command. The command generated by this dialog is:

WPLANE(………….)

You can put any combination of this command in any macro to modify/change the behavior of the work plane feature.

For the WORKING_PLANE macro to be activated, you must have:

1. Active option checked.

2. Macro option checked.

3. Once option checked OR the Change option checked.

Additional Information

For the advanced macro users, it is also good to know that IMSpost offers another way of calculating the work plane by using a SOLUTION statement:

SOLUTION(WPLANE/i,j,k,i1,j1,k1,i2,j2,k2)

where:

i, j, k Solution will find a plane perpendicular to this vector. i1, j1, k1 First axis of rotation to get to the desired plane. i2, j2, k2 Second axis of rotation to get to the desired plane.

The solution record will return:

• Matrix to convert from the physical plane to the desired plane. • Angle of first axis. • Angle of the second axis.

Calculation is based on the assumption that the two axes are independent.

Page 182: IMSPost Guide

Machine Menu and Options: Import Machine

174 IMSpost Guide

Import Machine This option imports machine options and overrides the existing machine model with:

IMS project file From another postprocessor file. This imports a machine description from another project.

IMS model file From an existing machine model. Pre-defined machines View and select predefined machine model.

IMS Project File You can import a machine model from another postprocessor file. This imports a machine description from another project. After you select this option, an Open Import File browser is displayed.

1. Select the project from which you want to import machine options.

2. Click Open.

IMS Model File You can import a machine model from an existing machine model from the /mchfiles folder. After you select this option, an Open Model File browser is displayed.

1. Be sure you are looking at *.MCH files. Refer to the Files of Type box at the bottom of the browser. For example:

Page 183: IMSPost Guide

Machine Menu and Options: Import Machine

IMSpost Guide 175

If the *.MCH file name starts with a 4 or 5:

4 = 4 axis (3 linear + 1 rotary) 5 = 5 axis (3 linear + 2 rotary)

The first letter signifies a horizontal or vertical tool axis.

“a,” “b,” and “c” signify the rotary axes. The letter that precedes this signifies that the rotary axis is a head or a table. The following example is a 4-axis horizontal machine with a rotary B table:

4htb.mch

2. Select the file from which you want to import.

3. Click Open.

NOTE: You can also select a new machine model by actually reviewing the model. To do so, select the Pre-defined Machines option, described below.

Pre-defined Machines You can view and select pre-defined machine model. This enables you to maintain all your controller data and change the machine. All the available library configurations are listed. For example:

Page 184: IMSPost Guide

Machine Menu and Options: Import Machine

176 IMSpost Guide

1. Select a machine to load.

2. Click the Load Machine button. The machine will display graphically.

3. After loading the new machine model, you should clear any model offsets that may be in effect.To clear these offsets:

a. Select Machine > References.

b. Click the Advanced button.

c. Click the Reset button to clear all the offsets.

d. Click the Save button.

4. If you still need to enter a new machine offset, select Machine > References and enter the offset in the appropriate field.

Notes

Page 185: IMSPost Guide

IMSpost Guide 177

Report Menu and Options

Report menu options enable you to specify additional data to be output in a file. Typically this is a file with the extenstion .lis. (This can be changed within File > Preferences). The report file will include all data from the .nc file along with your specified commentary data to the right of the machine code (Block Definition).

Each report file consists of a Block Definition, Header, and Footer. This .lis file will reside in the same directory as your other output (.nc) files. The following example displays the Absolute Machine Z, Machine Cut Time, and current spindle speed for each output block:

Page 186: IMSPost Guide

Report Menu and Options: Import Machine

178 IMSpost Guide

NOTE: When posting, you must activate the List File option on the Postprocess dialog (Execute > Postprocess). This file will have the same name as the output file unless you change the name. If you do not check the List File option, the report output file will not be created.

Page 187: IMSPost Guide

Report Menu and Options: Import Machine

IMSpost Guide 179

Two options on the Report menu are available to determine the characteristics of reports in IMSpost. These options enable you to define the List Format and the Table Report. The Report menu includes the following options:

Option Button Description

List

Creates an optional *.lis output file (enter commentary data along with the machine code). Use this dialog to define the format of the block-by-block data output in the listing file. When defining a List format, you define information you want to include with the output list (.LIS) file created by the postprocessor. This .LIS file shows all the data from your .NC file along with the associated parameters specified with the List Format dialog.

Table

Creates an optional tool data table and displays specified tool/cutter data. The Table Report dialog controls the characteristics of tables that are written to a separate file. An example of this type of report would be a tool table. This report can be generated either in text or HTML format. Your IMS license must include the IMSpost macro utility for this.

An example of a tool table is:

Page 188: IMSPost Guide

Report Menu and Options: List

180 IMSpost Guide

List

Use the List option (also available with ) to create an optional *.LIS output file that defines the format of the block-by-block data output in the listing file.

Each tab on this dialog is described below.

Block Definition The dialog for the Block Definition option is shown above. It includes the following:

Field/Button Description

Column Title Displays freeform text describing the header of this column of list data. Place the cursor in the text area and enter text. Be descriptive as to what will be output at the top of each page.

Attached Variable Specifies a variable name to be output in this column in the list file for each block of data.

Field Format Describes the format (using #.#) of the field output for this column of the list file.

Add Adds a new column to the list file block by block output. Delete Removes a column from the list file block-by-block output. Click in a

field of the column you want to be removed and then click Delete. NOTE: If you select Execute > Postprocess, you will see a List File checkbox. By default, it is normally not checked. You must check this box in order for IMSpost to create this additional .LIS file. This file will reside in the same directory as the .NC files.

Page 189: IMSPost Guide

Report Menu and Options: List

IMSpost Guide 181

Program Header The Program Header tab is used to define the format of the header to be placed at the start of the output NC program in the listing file.

The blank text box enables you to enter text describing the header. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as shown in the example above.

2. Then, enter the length of the field. For example, if you enter 20 ^ characters after text, you specify a variable length of 20 characters.

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed, as shown below.

4. Specify the variables that are associated with the text. There should be a variable specified for each string of ^ characters.

In the example below, note that two variables are required for the fourth line (DATE and TIME).

5. Click OK to save your work.

Page 190: IMSPost Guide

Report Menu and Options: List

182 IMSpost Guide

Program Footer The Program Footer tab is used to define the format of the footer to be placed at the end of the NC program in the listing file.

The blank text box enables you to enter text describing the footer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as shown in the example above.

2. Then, enter the length of the field. For example, if you enter 20 ^ characters after text, you specify a variable length of 20 characters.

Page 191: IMSPost Guide

Report Menu and Options: List

IMSpost Guide 183

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed:

The number of rows in on this table corresponds with the number of variable data fields you entered. In the example above, there are three rows of variable data. You will specify a variable for each string of ^ characters.

4. Click in a variable area and enter the value for that variable (such as GLOBAL.CONTROL in the example above).

5. Enter values for each variable.

6. Click OK to save your work.

Page 192: IMSPost Guide

Report Menu and Options: List

184 IMSpost Guide

Page Header The Page Header tab is used to define the format of the header to be placed at the start of each page of the output NC program in the listing file.

The blank text box enables you to enter text describing the headerer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as PARTNO: in the example above.

2. Then, enter the length of the field. For example, if your PARTNO will always contain a 4-digit number, you would enter 4 ^ characters, as in the example above.

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed, as shown below.

4. Enter the variable to be output.

NOTE: GLOBAL.PART_NAME is not an IMS library variable. You would have to define this variable within your post.

If there is more than one variable entered, you can reposition their order by clicking the Up, Down, and <<< keys. Or you can readjust the order by re-entering them in the display.

5. Click OK to save your work.

Page 193: IMSPost Guide

Report Menu and Options: List

IMSpost Guide 185

Page Footer The Page Footer tab is used to define the format of the footer to be placed at the end of each page of the output NC program in the listing file.

The blank text box enables you to enter text describing the footer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as MACHINE: in the example above.

2. Then, enter the length of the field. For example, if you enter 15 ^ characters, as in the example above, you specify a variable length of 15 characters.

Page 194: IMSPost Guide

Report Menu and Options: List

186 IMSpost Guide

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed:

4. Enter the variable that contains the machine description (for example, GLOBAL.MACHINE). This variable will also be displayed in the right column of the display (Variable-1).

If there is more than one variable entered, you can reposition their order by clicking the Up, Down, and <<< keys. Or you can readjust the order by re-entering them in the display.

5. Click OK to save your work.

Page 195: IMSPost Guide

Report Menu and Options: List

IMSpost Guide 187

Page Size The Page Size option defines the number of rows and columns per page of the printed list file NC program. These numbers should coincide with how you want pages processed through your printer.

Field Description

# of lines per page Specifies the number of lines on a printed output page for the listing file output.

# of characters per line Specifies the number of characters on a line on a printed output page for the listing file output.

Page 196: IMSPost Guide

Report Menu and Options: Table

188 IMSpost Guide

Table

The Table option (also available with ) creates an optional tool data table and displays specified tool/cutter data. Use this option to define the format of any user-defined tables you would like to generate as part of the postprocessing of an APT/CL file. A common use of this function is to build tool list tables containing tool number, tool length, machine time, and so on. However, these tables are completely definable in the postprocessor, and each postprocessor can maintain any number of tables.

NOTE: Your IMS license must include the macro utility in order to support this feature.

Each tab on this dialog is described below.

Table Definition The dialog for the Table Definition option is shown above. It includes the following:

Field/Button Description

Column Title Displays freeform text describing the header of this column of report data. Place the cursor in the text area and enter text. Be descriptive as to what will be output at the top of each page.

Attached Variable Specifies a variable name to be output in this column in the report file for each block of data.

Field Format Describes the format (using #.#) of the field output for this column of the report file.

New Table Creates a new table. Delete Table Deleted the current table. Add Column Adds a new column to the report file block by block output. Delete Column Removes a column from the report file block-by-block output. Click in

a field of the column you want to be removed and then click Delete. Text file Creates the report as a text file (.TXT).

Page 197: IMSPost Guide

Report Menu and Options: Table

IMSpost Guide 189

Field/Button Description

HTML file Creates the report as an HTML file (.HTM). XML file Creates the report as an XML file (.XML).

Program Header The Program Header tab is used to define the format of the header to be placed at the start of the output NC program in the report file.

The blank text box enables you to enter text describing the header. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as shown in the example above.

2. Then, enter the length of the field. For example, if you enter 20 ^ characters after text, you specify a variable length of 20 characters.

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed, as shown below.

4. Specify the variables that are associated with the text. There should be a variable specified for each string of ^ characters.

In the example below, note that two variables are required for the fourth line (DATE and TIME).

5. Click OK to save your work.

Page 198: IMSPost Guide

Report Menu and Options: Table

190 IMSpost Guide

Program Footer The Program Footer tab is used to define the format of the footer to be placed at the end of the NC program in the report file.

The blank text box enables you to enter text describing the footer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as shown in the example above.

2. Then, enter the length of the field. For example, if you enter 20 ^ characters after text, you specify a variable length of 20 characters.

Page 199: IMSPost Guide

Report Menu and Options: Table

IMSpost Guide 191

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed:

The number of rows in on this table corresponds with the number of variable data fields you entered. In the example above, there are three rows of variable data. You will specify a variable for each string of ^ characters.

4. Click in a variable area and enter the value for that variable (such as GLOBAL.CONTROL in the example above).

5. Enter values for each variable.

6. Click OK to save your work.

Page 200: IMSPost Guide

Report Menu and Options: Table

192 IMSpost Guide

Page Footer The Page Footer tab is used to define the format of the footer to be placed at the end of each page of the output NC program in the report file.

The blank text box enables you to enter text describing the footer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as MACHINE: in the example above.

2. Then, enter the length of the field. For example, if you enter 15 ^ characters, as in the example above, you specify a variable length of 15 characters.

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed, as shown below.

4. Enter the variable that contains the machine description (for example, GLOBAL.MACHINE). This variable will also be displayed in the right column of the display (Variable-1).

If there is more than one variable entered, you can reposition their order by clicking the Up, Down, and <<< keys. Or you can readjust the order by re-entering them in the display.

5. Click OK to save your work.

Page 201: IMSPost Guide

Report Menu and Options: Table

IMSpost Guide 193

Page Header The Page Header tab is used to define the format of the header to be placed at the start of each page of the output NC program in the report file.

The blank text box enables you to enter text describing the headerer. Variable data fields are represented by a string of ^ characters, which may also include a period (.) character for real value variable fields. The text may be any number of lines, consisting of any number of fixed or variable data fields.

1. Enter the text in the text box, such as PARTNO: in the example above.

2. Then, enter the length of the field. For example, if your PARTNO will always contain a 4-digit number, you would enter 4 ^ characters, as in the example above.

Page 202: IMSPost Guide

Report Menu and Options: Table

194 IMSpost Guide

Be sure the length of these strings will be large enough to contain the variables, otherwise the text within the variable could be truncated.

3. Click the Variables button and the following dialog is displayed:

4. Enter the variable to be output.

NOTE: GLOBAL.PART_NAME is not an IMS library variable. You would have to define this variable within your post.

If there is more than one variable entered, you can reposition their order by clicking the Up, Down, and <<< keys. Or you can readjust the order by re-entering them in the display.

5. Click OK to save your work.

Notes

Page 203: IMSPost Guide

IMSpost Guide 195

User Menu and Options

IMSpost library postprocessors normally include several “User” dialogs developed by IMS engineers. The User menu includes the options to create dialogs that will interact with your user during postprocessor execution.

NOTE: You must have the IMSpost Macro programming option in order to control the activation of these dialogs.

Options on the User menu are:

Option Description

User Dialog Enables you to create custom dialogs. Descriptive Comments EXAMPLE of a user dialog:

Activates tape comments. This is an IMS-developed dialog. Opstop EXAMPLE of a user dialog:

Activates output of M01 codes. This is an IMS-developed dialog. MULTI HOME EXAMPLE of a user dialog:

Enables you to active work coordinate systems. This is an IMS-developed dialog.

User Dialog The User Dialog option enables you to create custom dialogs. Once a dialog is created, it appears on the User menu (such as the example of Descriptive Comments, Opstop, and MULTI HOME).

Field/Button Description

Select User Dialog Enables you to select an existing dialog to edit. New Dialog Opens a blank dialog window. Enter a name in the pop-up window.

Page 204: IMSPost Guide

User Menu and Options: User Dialog

196 IMSpost Guide

Field/Button Description

Delete Dialog Deletes the active dialog. Add Entity Add an entity to the dialog. Then, you can specify:

Type Defines the entity type as one of the following: Static Enters text to be read by user. Checkbox Automatically creates a checkbox. Edit Box Creates an area to accept a user response. List Box Creates a list of items to select from.

Row Represents the horizontal starting position. Col Represents the vertical starting position. Size Defines the length of the field. Macro Designates the macro name that contains the default

value (usually INIT/*) specified in the Value column. Variable Defines the IMS macro variable to capture the result

of this field. Var type Defines the IMS macro variable type as:

Double For any real value. Integer For positive integers. The Checkbox type is always an Integer. String Accepts text strings. The Static type is always a String. Not Used Instructs the system that it is not necessary to attach a type to the variable.

Value Defines the IMS macro variable value. Label Specifies a label that depends on the entity Type:

Static Enter the static text. Checkbox Usually left blank. Edit Box Enter identifying text to be displayed to the right of the checkbox. List Box Enter the list box choices, separated by commas.

Delete Entity Deletes the specified entity. Import Imports a dialog from another project (postprocessor) file. Test Display the current dialog box. This is useful to check your design

while building a dialog. It also will show that you may need to adjust the length of your fields.

Close Saves and exits the dialog. IMSpost gives the postprocessor developer complete control as to when to display these dialogs.

• At the beginning of postprocessing the part file (INIT_CFG macro). • In any existing macro. • Create a macro to display the user dialog.

By default, the IMS-supplied dialogs are not activated within the post. You must add a USER macro command in order to activate them. For example:

Page 205: IMSPost Guide

User Menu and Options: User Dialog

IMSpost Guide 197

USER(‘‘Descriptive Comments’’) USER(‘‘Opstop’’)

NOTE: User > MULTI HOME includes a checkbox to control the display of the dialog. If the box is checked, a global variable is set to activate the dialog.

User Dialog Example

1. Click New Dialog and enter the name as JOB ID. Click OK.

2. Click Add Entity to add an instruction to the dialog. Enter information for a Static entity as shown:

3. Click Test to check your results:

4. Click Add Entity and enter information for an Edit Box entity as shown below.

The information you enter will be saved in the variable name you specify within the Variable column (GLOBAL.JOB_ID). As a default they should be declared in the INIT macro, but you

Page 206: IMSPost Guide

User Menu and Options: User Dialog

198 IMSpost Guide

can use the browser and select another macro. Because this dialog is looking for an integer response, the variable type is set to Integer.

TIP: Since these variables are going to be used in more than one macro, they must be defined and declared as GLOBAL variables. Always declare your variables in the INIT macro.

5. Click Test to check your results:

6. Click Add Entity and enter information for a Checkbox entity as shown:

A checkbox type entity is selected here because all that is need is a Yes (1) or No (0) response. Notice in the Value column, a value of 1 is entered. This is the default to turn the checkbox on. Variable types do not need to be selected for checkbox (the system assumes an integer).

Page 207: IMSPost Guide

User Menu and Options: User Dialog

IMSpost Guide 199

7. Click Test to check your results:

8. Click Add Entity and enter a Static entity with an instruction prompt in the Label column:

9. Click Test to check your results:

10. Click Add Entity and enter a List Box entity. Enter all possible selections using a comma (,) as a delimiter.

The order in which you enter selections in the Label column is the order in which they will be displayed. Remember to specify the variable type and declare the variable (GLOBAL.SETUP) that this selection will be stored in. As an option, you may enter any available choice in the Value column as a default selection.

Page 208: IMSPost Guide

User Menu and Options: User Dialog

200 IMSpost Guide

11. Click Test to check your results:

12. Click Close to save your work and exit the dialog.

Page 209: IMSPost Guide

User Menu and Options: Examples

IMSpost Guide 201

Examples The following are examples of user dialogs.

Descriptive Comments This example of a user-defined dialog activates tape comments.

Opstop TThis example of a user-defined dialog activates output of M01 codes.

Page 210: IMSPost Guide

User Menu and Options: Examples

202 IMSpost Guide

MULTI HOME This example of a user-defined dialog enables the user to active work coordinate systems.

Notes

Page 211: IMSPost Guide

IMSpost Guide 203

Help Menu and Options

The Help menu provides options to displayed information about the IMSpost application or visit the IMS Web site.

The Help menu includes the following options:

Option Button Description

Help Topics

Displays IMSpost help information.

Activate PP File

— Enables you to install specific postprocessor (PP) license codes, if applicable.

Diagnostics — Creates a license diagnostic. About IMSpost

— Displays the current IMS software release information. For example:

Page 212: IMSPost Guide

Help Menu and Options: Activate PP File

204 IMSpost Guide

Activate PP File This option enables you to install specific postprocessor (PP) license codes, if applicable. It is necessary only to install a custom PP file code if you received a project (postprocessor) file developed by another user. An example of this is if you ordered a custom developed postprocessor(s) from IMS or your dealer.

NOTE: If you have a license for any of the IMSpost development programs, your license will allow you run any postprocessors you have created or modified without using this option.

Field/Button Description

Load PP files into my current license

Loads the selected postprocessor license file(s) into your current license.

Load PP files into a customer license

Loads the selected postprocessor license file(s) into a customer license.

Browse… Enables you to browse to and select the license file. 1. Get the postprocessor data file from IMS or your dealer. You should also receive a license

activation code for this specific postprocessor.

2. Select Help->Activate PP File.

3. Browse to or enter the name of the license file to be activated.

4. Click Finish and IMSpost will write the license code into the postprocessor project that is currently active.

Page 213: IMSPost Guide

Help Menu and Options: Diagnostics

IMSpost Guide 205

Diagnostics The Diagnostics dialog enables you to troubleshoot your IMS software installation. Symptoms of installation and license problems include, Demonstration version messages, postprocessing only part of an APT/CL file, or license warning messages.

NOTE: The diagnostic troubleshoots installation and licensing problems only. It is not meant as a tool for debugging the output of a particular postprocessor.

Field/Button Description

Environment Variables Confirms the set up of the IMS environment. The software will not run correctly without the correct license file (IMSDIR_LICENSE_FILE).

Hardware Info Confirm that the IMS software is correctly accessing either an Ethernet address or an IMS supplied hardware key (dongle). This area also indicates if a dealer license applies. If an Ethernet address is shown, supply this as part of your license request. If you are an existing IMS user and have an IMS-supplied hardware key, send this key ID as part of your license request.

Page 214: IMSPost Guide

Help Menu and Options: Diagnostics

206 IMSpost Guide

Field/Button Description

Output diagnostic report Enables you to select a name for a diagnostic report, which you may want to create if the information above appears to be correct. NOTE: If there appears to be a problem with your software or license setup, an IMS support engineer or dealer representative probably will request a copy of this file to analyze the problem.

Display diagnostic report file

Displays the report file in your default editor. If this option is not checked, the file is created file without displaying it.

Build Report Generates the diagnostic report.

Sample Diagnostic Report File ================================================================================ IMS License Diagnostic Report Version 8.0 : April, 2011 ================================================================================ Date: Wed Apr 27 10:28:35 2011 1. Environment Variables : IMSDIR_LICENSE_FILE = Z:\license_dell830_nodelocked.dat IMSDIR_IMSVERIFY_DEBUG is not set IMSDIR_CE_SYNC is not set IMSDIR_MIK_AXS = 1 IMSDIR_MIK_CATMCH = g:\catia.catmch IMSDIR_MIK_DEBUG = G:\mik_debug.txt 2. IMS license file found : Z:\license_dell830_nodelocked.dat Company : Dan Project Code : IMS IMS dealer : TRUE IMS Products : 16448 IMSpost Professional IMSpost Revpost editor Load Option : LIBRARY/DEFAULT (IMSpost) Number of PP (3X) : 0 Number of PP (5X) : 0 Number of CE : 0 CAM Options : 8388607 EUCLID ,Tebis APT ,GibbsCAM ,GE-APT GENERAL APT ,CATIA MACHINIST,PTC ,Teksoft ADRA ,IBM BIN ,MASTERCAM ,CATIA DELCAM ,UNIGRAPHICS ,SURFCAM ,CIMATRON AUTON ,INTERCIM ,HOUTZEL ,VX MetalCam Linear : 99 Rotary : 99 3. Hardware data for users computer: IMS dongle NOT found Ethernet address 1: 001E8C56298E Ethernet address 2: 001D09B7DEE7

Page 215: IMSPost Guide

Help Menu and Options: Diagnostics

IMSpost Guide 207

4. Postprocessor ID Codes File : Creator : User code : PP ID code : Post Version : 8.000000 Project Version : 50.000000 User Version : 1.000000 ================================================================================ IMSflex license FEATURE report ================================================================================ =====> IMSpostPro <====== License checkout successful =====> RevEditor <====== License checkout successful ================================================================================ IMSflex license file : Z:\license_dell830_nodelocked.dat ================================================================================ ####################################################################### ## ## Intelligent Manufacturing Software, Inc. ## ####################################################################### ## ## Product license file for : Dan ## ## Creation date : Apr 12, 2011 (08:56) ## ## ## Company code : IMS ## Number of PP (3x): 0 ## Number of PP (5x): 0 ## Number of CE: 0 ## Load option : 1 (Library enabled) ## Dealer option : 1 ## ## ##################################################################### # Features using nodelocked license ##################################################################### FEATURE Revpost IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=200 SIGN=5BD98628DDA8 FEATURE IMSpexec IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=196 SIGN=610F01B4AD60 FEATURE IMSpostPro IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=222 SIGN=F8393C601D9C FEATURE RevEditor IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=246 SIGN=B9DC8B147EA2 FEATURE IMSmachine IMS 4.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=152 SIGN=AF974ADA895C FEATURE IMSverify5x IMS 4.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=196 SIGN=0AF9FA803BAC

Page 216: IMSPost Guide

Help Menu and Options: Diagnostics

208 IMSpost Guide

FEATURE IMSverifySim IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=163 SIGN=20B2079826CE FEATURE IMSmik IMS 4.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=142 SIGN=E462633C3CB6 FEATURE IMSmik IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=111 SIGN=BCBF1E64C1C0 FEATURE IMSunify IMS 8.0 31-dec-2011 uncounted \ VENDOR_STRING=IMS-00100007FFFFF00-001e8c56298e \ HOSTID=001e8c56298e user_info=Dan ck=132 SIGN=A0319D2C16E2 ## ## ## ##################################################################### ## End of IMS generated license #####################################################################

Notes

Page 217: IMSPost Guide

IMSpost Guide 209

Macro Language Commands

Macros constitute the link between CLdata (cutter location data) input and the postprocessor’s formatted output. You use macro programming to determine the internal logic of your project during commonly modified postprocessing sequences to satisfy your hardware requirements and your own machining preferences.

An IMS macro is a collection of statements that instructs the IMS knowledge base as to how to respond to the given input. Each macro begins with the macro name (definition statement) and ends with a RETURN statement. Any number of valid macro statements or expressions can appear between the macro definition and the RETURN statement. The following example illustrates a simple IMS macro:

TEST/* GLOBAL.VAR = 2.5 REGISTER.X.VALUE = GLOBAL.VAR OUTPUT(REGISTER.X, NEWLIN) RETURN

The example has the required macro name TEST. The second statement is an example of the use of an arithmetic expressions (setting the variable GLOBAL.VAR to the value 2.5). The fourth statement is an example of the macro OUTPUT statement. The macro ends with the required RETURN statement.

Accessing Variables Within Macros To control and manage the data in the knowledge base, you must know where it is stored, how to access it within a macro, and how to pass it from one macro to another. You need to understand the use of variables in the IMS macro language. There are several categories of variables:

Category Description SYSTEM The IMS knowledge base creates and maintains system variables. You access

them using the reserved word SYSTEM followed by the variable name (for example, SYSTEM.DATE). Any macro can access system variables at any time.

GLOBAL You create and maintain global variables. Define them using the reserved word GLOBAL followed by a variable name (for example, GLOBAL.TEST). Once you define global variables, any macro can use them.

MODE Specify these variables using the word MODE followed by the group and the subgroup (for example, MODE.MOTION or MODE.MOTION.LINEAR). Within a macro, you access the current status of a mode or its functional subgroup in the same way as you do with a global variable.

Page 218: IMSPost Guide

Macro Language Commands: Accessing Variables Within Macros

210 IMSpost Guide

Category Description LOCAL You can create and maintain local variables. However, you can use them only

within the macro in which you define them. You do not have to use special reserved words to define a local variable; you just use the variable name (for example, TEST1). After the system executes a macro, all local variables within the macro are no longer defined. To use them again, you must redefine them in another macro or macros.

CLDATA These variables are a type of system variable. The system sets their values for one macro at a time, based on the input arguments or CLdata information passed into the macro (from a CLD file). Two reserved words provide access to this type of variable: CLDATAN and CLDATAM for Numbers and Minor words, respectfully.

CLREAD These variables are a type of system variable. The system sets their values for one macro at a time, based on the input arguments or CLdata information accessed from a macro found in a CLREAD, read-ahead statement. Two reserved words provide access to this type of variable: CLREADN and CLDATAM for Numbers and Minor words, respectfully.

REGISTER These variables are related to the letter addresses that exist in the Register Format Table. For example: REGISTER.Z.MODAL = "N" Set Z register as non-modal. REGISTER.F.MAXIMUM = 2000 Set F maximum = 2000

COMPONENT These are component-type variables. They are represented within the Machine Components feature.

FUNCTION These variables are associated with the Function Codes feature. These functions (G/M codes) represent responses to the various dialogs. These function codes are usually associated with MODE variables. FUNCTION.G1.NAME = "G1" Reinstate G1 code name. FUNCTION.G0.USE = "X,Y,Z,C" Registers to be output with G0 code. FUNCTION.M3.NAME = "M13" Change M3 code to M13.

MACHINE These variables are associated with the Machine feature. They enable you to modify any of the machine axis parameters: MACHINE.Z.HOME = 300 Update Z home position. MACHINE.X = 1275 Update Machine X position.

SOLUTION These are variables associated with their respective SOLUTION routine. Consult the individual SOLUTION macro statement for variable examples.

ARRAY These variables enable you to create subscripted variables. That is, the variable declaration is modified by another variable: INDX = INDX + 1 GLOBAL.FEED_TABLE = GLOBAL.FEED[INDX]

All the above variables (except LOCAL) are treated as Global variables. That is, they may be accessed throughout the Macro Manager.

Page 219: IMSPost Guide

Macro Language Commands: Assignment Statements

IMSpost Guide 211

Assignment Statements Assignment statements are the most common statement used in macros. They have the format:

variable = expression

where the expression can be simple or complicated, as long as it produces a valid result.

IMS macros use two types of variables:

• Local, used only within the residing macro

• Global, available to any macro throughout the posts macro library. Global variables must begin with the word GLOBAL.

You can subscript either type of variable.

All IMS variables (MODE, FUNCTION, REGISTER, MACHINE, etc.) are treated as global variables. Examples are:

X = CLDATAN.1+ GLOBAL.OX + GLOBAL.TX

MODE.COOLNT = "MIST"

PTR1 = LOCATE("G98")

A = A + 1

RPM = GLOBAL.SPEED[A]

TOOL = CLDATAN.1 + CLDATAN.RIGHT.OSETNO

GLOBAL.RPM = CLDATAN.RIGHT.RPM

DELTA = SQRT ( (X*X) + (Y*Y) )

GLOBAL.TOOL[N] = CLDATAN.1

TIP: Do not use periods (.), commas (,), single quotation marks, or double quotation marks in local variable names. IMSpost uses these characters as mathematical operations, as delimiters, and to distinguish variable names and text strings within the output generator. In general, it is not a good idea to use any special characters in your variable definition, with the exception of the underscore ( _ ):

OK: GLOBAL.FIRST_SPIN = 1 Not OK: GLOBAL.FIRST,SPIN = 1

In a macro language assignment statement, you can set or change a variable only for use in the current macro. When execution of the current macro is completed, the value will then return to its value before the one-shot assignment was executed. This “one-shot” change is achieved by placing an exclamation mark (!) before the variable in the assignment statement. For example:

TEST/* GLOBAL.A = 3.0 Set variable GLOBAL.A !GLOBAL.A = 999.999 Set GLOBAL.A using “one-shot” VALUE_1 = GLOBAL.A * (-1.0) Value of VALUE_1 is –999.999; GLOBAL.A, while in the macro is 999.999 RETURN After the macro is completed, the value of GLOBAL.A is 3.0

Page 220: IMSPost Guide

Macro Language Commands: Math Functions in a Macro

212 IMSpost Guide

Math Functions in a Macro Here are the math functions you can use in a macro:

Math Function Description

SIN(X) Sine of X (X in degrees) COS(X) Cosine of X (X in degrees) TAN(X) Tangent of X (X in degrees) ASIN(X) Arcsine of X ACOS(X) Arccos of X ATAN(X) Arctangent of X ATAN2(Y,X) Calculate inverse tangent of the arguments quotient SQRT(X) Square root of X ABS(X) Absolute value of X INT(X) Integer part of X ROUND(X) Round off to closest integer part of X SINH(X) Hyperbolic sin of X COSH(X) Hyperbolic cosine of X TANHX) Hyperbolic tangent of X EXIST(variable name) =0; variable does not exist

=1; variable exists but not initialized =2; variables exists and is initialized

EXP(X) Exponential function LOG(X) Natural logarithm POW(X,Y) Set power of X to Y

A = POW(2,3) or A=2*2*2 LOG10(X) Base 10 logarithm X > 10 CEIL(X) Smallest integer not less than X FLOOR(X) Largest integer not greater than X MIN(X1,..,Xn) Return the lowest X MAX(X1..,Xn) Return the highest X MOD(X,Y) Remainder of X/Y with the same sign as X UCASE(S) Uppercase of string S LCASE(S) Lowercase of string S STRLEN(S) Length of string S SPRINT(Format,V1,..Vn) Return string format

NOTE: Since these functions are reserved within IMSpost as special math functions, they should not be used as local variable names.

OK: GLOBAL.MAX = CLDATAN.2 Not OK: MAX = CLDATAN.2

Page 221: IMSPost Guide

Macro Language Commands: Including Operations in Macros

IMSpost Guide 213

Including Operations in Macros The order in which operations in an expression are performed depends on their position within the expression and their level of precedence. For example, both of these expressions produce a value 10 because multiplication has higher precedence than addition and is performed first.

2 * 3 + 4 Or: 4 + 2 * 3

Two operations of equal precedence are performed in order from left to right. IMS supports the following level of precedence:

*,/ highest precedence +,- AND OR =,< > lowest precedence

You can use parentheses ( ) to specify the order of operations. The quantity within the parentheses is computed first. For example (4 + 2) * 3 equals 18, not 10. Use parentheses in complicated expressions to make the order of evaluation clear and explicit.

Setting Strings in the Macro Language A string may consist of any combination of text, values, machine code, and defined variable(s). The + sign is used to join the items together.

START_STRING = "(** PULL BACK FOR SAFETY ** LOAD TOOL #" TOOL = GLOBAL.TOOL END_STRING = "***)" TOOL_STRING = START_STRING + TOOL + END_STRING OUTPUT(TOOL_STRING,NEWLIN)

You could also output all this data without pre-defining the string. In this case, separate all the items with a comma (,) delimiter:

OUTPUT (START_STRING, GLOBAL.TOOL, END_STRING,NEWLIN)

NOTE: Predefining the string enables you to control the output display. For example you could add tabs by predefining a string:

TAB = " " START_STRING = "(** PULL BACK FOR SAFETY ** LOAD TOOL #" + TAB + TOOL + TAB + END_STRING

Page 222: IMSPost Guide

Macro Language Commands: FINAL Macro

214 IMSpost Guide

FINAL Macro The FINAL/* macro is a special IMSpost macro. Its function is to reprocess the output of the postprocessor before it is written to the output file. This “second pass” processing lets you add, remove, or reposition blocks of data generated by the normal postprocessing phase (first pass). There are IMSpost macro language statements that are specialized for use in a FINAL macro:

• ADD • BOUND • COPY • DELETE • LOCATE • MOVE • UPDATE

The FINAL macro performs output for tool preselection. The listing of tools used is updated during “pass one” processing. “Second pass” or FINAL loops to search for each M6. The NEXT tool number from the list is then added to the block following the M6, preselecting the next tool.

NOTE: This macro illustrates the use of address pointers. With the addition of macro statements such as CLREAD, these pointer-type commands are not used within the IMSpost environment. However, they are very useful in the IMS Controller Emulator environment.

FINAL/* GLOBAL.TOOLLIST[GLOBAL.TOOLINDX] = GLOBAL.TOOLLIST[1] GLOBAL.TOOLINDX = 2 PTS = LOCATE(START) PTE = LOCATE(END) BOUND(PTS,PTE,FORWARD) PTC = LOCATE(REGISTER.M6) WHILE (PTC) PTC = PTC + 1 REGISTER.T.VALUE = GLOBAL.TOOLLIST[GLOBAL.TOOLINDX] ADD(PTC, REGISTER.T) GLOBAL.TOOLINDX = GLOBAL.TOOLINDX + 1 BOUND(PTC,PTE,FORWARD) PTC = LOCATE(REGISTER.M6) ENDWHILE RETURN

ADD Use the ADD macro command in a FINAL macro to add a string or register to an output block marked with a pointer type variable. The syntax is:

ADD(PTR, "string") ADD(PTR, REGISTER.?)

The current string or register (with the ? substituted by the actual register name) is added to the block pointed to by PTR.

BOUND Use the BOUND macro statement to set parameters used by the LOCATE statement. The syntax is:

BOUND(ptr1, ptr2, direction)

Page 223: IMSPost Guide

Macro Language Commands: FINAL Macro

IMSpost Guide 215

where ptr1 and ptr2 mark the beginning and end, respectively, of the search boundary for the LOCATE command, and direction may be either of the keywords FORWARD or BACKWARD to indicate the direction of search from the current location.

The direction argument is optional. If you omit it, the program assumes the value as FORWARD.

COPY Use the COPY macro command in a FINAL macro to copy a block or a series or blocks. The syntax used determines what action the COPY command will take. This command with two arguments, copies the block pointed to by PTR1 after the block pointed to by PTR2:

COPY(PTR1, PTR2)

This command with three arguments copies the series of blocks from PTR1 to PTR2 after the block pointed to by PTR3:

COPY(PTR1, PTR2, PTR3)

DELETE Use the DELETE macro command in a FINAL macro to remove a string or register from an output block or to remove a complete block or series of blocks. The action taken depends on the syntax used.

To remove a string or register from an output block marked with a pointer type variable, enter: DELETE(PTR, "string") DELETE(PTR, REGISTER.?)

The current string or register (with the ? substituted by the actual register name) is removed from the block pointed to by PTR.

To remove one entire block of code, enter: DELETE(PTR1)

The entire block pointed to by PTR1 is removed from the output.

To remove a group of blocks, enter: DELETE(PTR1, PTR2)

The series of blocks from PTR1 to PTR2 is removed from the output.

LOCATE Use the LOCATE macro command to find blocks of data that contain a specified string or register. When you find (or locate) such a block, a pointer variable is returned to mark that block location. The syntax is: PTR = LOCATE("string") Or: PTR = LOCATE(REGISTER."name")

If a block containing the string or register specified is not found, the return value is 0. If a block containing the string of register specified is found, a pointer to the block is returned and all internal data values are updated to the values at that block.

The LOCATE command searches blocks from the current position set in the BOUND statement. The direction of search is also specified in the BOUND statement.

Page 224: IMSPost Guide

Macro Language Commands: FINAL Macro

216 IMSpost Guide

You can use the special arguments START and END to obtain a pointer marking the start or the end of the file:

PTRS = LOCATE(START) PTRE = LOCATE (END)

MOVE Use the MOVE macro command in a FINAL macro to change the location of a block or series or blocks. The syntax used determines what action the MOVE command will take.

This command with two arguments copies the block pointed to by PTR1 after the block pointed to by PTR2. The original block PTR1 will then be deleted.

MOVE(PTR1, PTR2)

This command with three arguments copies the series of blocks from PTR1 to PTR2 after the block pointed to by PTR3. The original series of blocks from PTR1 to PTR2 is then deleted.

MOVE(PTR1, PTR2, PTR3)

UPDATE Use the UPDATE macro command in a FINAL macro to update all postprocessor data values up to the block specified by the pointer argument. When moving around the list of output blocks during FINAL macro processing, you may need to reset the data values to the values at a current block. The syntax is:

UPDATE(PTR)

where PTR is a pointer variable pointing to the block to update to.

Page 225: IMSPost Guide

Macro Language Commands: Macro Statements

IMSpost Guide 217

Macro Statements The IMS macro facility supports the IMS knowledge-based system and includes macro statements to support the NC production process. Supported statements include:

• ADD • ASSIGN • BOUND • BREAK • CALL • CASE • CLREAD • COPY • CUT • DELETE • DISPLAY • FILE • GETAPT • GETAT • GETISO • HOOK • IF • LOCATE • MOVE • OPTIMIZE • OUTPUT • PRINT • PRIORITY • PUSH and POP • REPORT • RETURN • RUN • SEQNO • SETAT • SOLUTION • SORT • SPLIT • SPRINT • STREXT • STRLEN • STRSTR • TABLE • TOKEN • TOOL_ALONG • UPDATE • UCASE and LCASE • USER • WHILE

Page 226: IMSPost Guide

Macro Language Commands: ASSIGN Statements

218 IMSpost Guide

ASSIGN Statements The ASSIGN statement enables you to assign an expression to a variable. The syntax is:

ASSIGN("variable",expression)

For example: ORIGIN/100+50*2, (300+50)/2, 100/2 ASSIGN("A",CLDATA.1) A = 200 ASSIGN("B",CLDATA.2) B = 175 ASSIGN("C",CLDATA.3) C = 50

BREAK Statements Use the BREAK statement to exit a macro before reaching the RETURN statement. For example:

TEST/* IF(GLOBAL.FLAG_10) BREAK ENDIF OUTPUT("FLAG_10 IS NOT SET",NEWLIN)

CALL Statements You can execute one macro from within the body of another macro by using the CALL statement. The CALL statement passes control to the first line of the specified macro. When the system encounters a RETURN statement in the called macro, control returns to the calling macro at the line immediately following the CALL statement. Examples are:

CALL(RAPID/)

CALL(GOTO/GLOBAL.HOMEX, GLOBAL.HOMEY, GLOBAL.HOMEZ)

CALL (PPRINT/"*** TOOL CHANGE OPERATION ***")

CALL (SPINDL/OFF)

CALL (RAPID/)

CALL (GOTO/10,0,REGISTER.Z.VALUE)

To specify the macro being called, use the list of formal parameters, NAME/*. There are four formal parameter types that can be passed to the calling of other existing macros, as shown in the example below.

All variables passed by a CALL statement are passed "by value." This means that changing the variable passed into the called macro does not affect the original variable value in the calling macro. In this example, the macro being called is TEST:

TEST/* B = CLDATAN.1 A=7 - - RETURN

In this example, the calling macro is TEST_1: TEST_1/* A=5 CALL(TEST/A)

Page 227: IMSPost Guide

Macro Language Commands: CASE Statements

IMSpost Guide 219

Note that here, after return from the call, A is still equal to 5, no matter what has been done in the TEST macro. RETURN

Passing Arguments in the CALL Statement In the CALL statement, each parameter that exists as a variable is passed as the variable’s value. Otherwise, it is passed as a minor word. If you want to pass a minor word, where the name of the minor word also exists as a variable, you must pass the minor word with single quotation marks. For example:

DIR = "CLW" CALL(TEST/ABC ,1.0,DIR ,'CLW')

In the TEST macro, the input variables are:

CLDATAN.0 = 1 1 value is statement (counts # of values in statement) CLDATAN.1 = 1.0 1st value in statement CLDATAN.2 = "CLW" 2nd word in statement (DIR = "CLW")

CLDATAM.0 = 2 2 words in statement (counts # of words in statement) CLDATAM.1 = "ABC" 1st word in statement

CASE Statements Use the CASE statement to select statements to execute from among several alternatives. The CASE statement syntax is:

CASE (expression, ..., expression, ..., expression) value_1: statements value_2: statements ... value_n: statements ENDCASE

The system evaluates each expression to obtain a result. The system then searches the results for a value equal to a value in the list below. If the system finds an expression result equal to the first listed value, then it executes the series of statements associated with that value. The system then continues to search for a result equivalent to the next listed value. Unlike most standard CASE statements in higher-level languages, the IMS CASE statement supports the search for the results of multiple expressions.

CASE (CLDATAM) "ON":MODE.COOLNT = GLOBAL.COOLNT "OFF":MODE.COOLNT = "OFF" "MIST":MODE.COOLNT = "MIST" GLOBAL.COOLNT = "MIST" "FLOOD":MODE.COOLNT = "FLOOD" GLOBAL.COOLNT = "FLOOD" ENDCASE

NOTE: The values in this example are written with double quotation marks because they are character strings. Double quotation marks are not required for numbers or variable names.

Page 228: IMSPost Guide

Macro Language Commands: CLREAD Statements

220 IMSpost Guide

CLREAD Statements Use the CLREAD macro statement to look ahead in the APT-CL file and save information from the minor words and/or CLdata values. This feature has many practical uses, including getting the next tool number for tool pre-selection or reading ahead for subprogram processing. Another feature of the CLREAD statement is that you can read ahead and then continue processing the APT-CL file from the read-ahead point, so you can skip over sections of the APT-CL file if desired.

The statement takes four arguments, and returns a value, as described below. The syntax is: value = CLREAD("statement", occurrence #, stay/return, how many)

value Return value indicating the number of lines read, from the current line, until search was successful. Value of 0 indicates statement was not found.

"statement" The formal parameters of the statement to read ahead for. occurrence The number of times to locate this statement before returning success. To

find the next occurrence of the statement, occurrence is 1. To find the second occurrence of the statement, occurrence is 2, and so on.

stay/return Set to 0, if you want to continue processing from the point after the statement is found (in other words, jump). Set to 1 to return to normal processing order after the statement is found. Set to 2 to continue looking for subsequent statement(s) after the statement is found.

how many The number of APT-CL lines to search (if <=0, then search entire file). Use the system variable SYSTEM.IO to specify whether the statement that was looked ahead for was found. If SYSTEM.IO is 0, the search was successful. If SYSTEM.IO is non-zero, the search for the statement was not successful.

If the read ahead was successful, the formal parameters from the statement are stored in variables of type CLREADN and CLREADM. These variables exactly correspond to the variables of type CLDATAN and CLDATAM used when processing an APT command, and all formats of the variable are analogous to CLDATAN and CLDATAM.

Example 1

This example show how to read ahead (in the LOADTL/* macro) for the following SPINDL statement:

* ensure spindle is off MODE("SPINDLE","OFF) * read ahead 20 lines for SPINDL statement RPM = CLREAD("SPINDL/*",1,1,20) IF(RPM) * activate read-ahead SPINDL statement CALL(SYSTEM/APT_RLINE) ELSE * if not found, activate previous SPINDL CALL(SPINDL/ON) ENDIF

Example 2

For this example, the following macro lines will read ahead and get all the tool numbers in the APT-CL file:

Page 229: IMSPost Guide

Macro Language Commands: CUT Statements

IMSpost Guide 221

IVAL = 1 A = CLREAD("LOADTL/*",1,2,0) WHILE (A > 0) OUTPUT("TOOL # ", IVAL, " = ", CLREADN.1, NEWLIN) IVAL = IVAL + 1 A = CLREAD("LOADTL/*",1,2,0) ENDWHILE

CUT Statements If there is more than one PART and/or TOOL component defined for your machine, you may need to use the CUT statement. IMSpost uses the CUT statement to determine what is being cut, and how it is being cut. This statement is useful for advanced machines with multiple, simultaneous tools, or more than one part setup at a time. The syntax is:

CUT( [PART component], [TOOL component].TIP)

For example, CUT ( PART2, VTOOL.TIP ) means that the part named PART2 is machined by the tool components tool tip named VTOOL.

For multi-axis machines, the TOOL component has four origin configurations associated with it. These are dependent upon what was selected with the Multi-axis Setup feature.

CUT(PART,TOOL.RTCP) Cut PART component with tools (rotary head) defined pivot point. CUT(PART,TOOL.ORIGIN) Cut PART component with spindle face. CUT(PART,TOOL.CENTER) Cut PART component with tools center point. CUT(PART,TOOL.TIP) Cut PART component with tools tip.

FILE Statements The FILE macro statement is used to perform reading and writing to an external file. The syntax is:

FILE(action, filename [, instring])

action READ, WRITE, CLOSE, APPEND (add a data string to the end of a specified file), OPEN (open a specified file), COPY (copy the file name into another name), DELETE (delete a specified filename), or TABLE. The action TABLE outputs data to a predefined table within IMSpost (see the Report feature). An example could be an external text file that contains all pertinent tool data:

FILE(TABLE,"tooltable.htm",TOOL TABLE

This statement would take the data that was predefined through the Report feature and add it to a file named tooltable.htm.

filename Name of the file. instring Name of the input string. Do not use this with CLOSE. Use the table name

with the TABLE action. For reading (READ action) or writing (WRITE action) from or to a file, be sure to use the full pathname for the requested file. It is not necessary to explicitly open a file before reading or writing, as is necessary with some other programming languages. However, it is necessary to close (CLOSE action) the file.

Page 230: IMSPost Guide

Macro Language Commands: GETAPT Statements

222 IMSpost Guide

Use the variable SYSTEM.IO to test for end-of-file. After executing a FILE command with the READ or WRITE action, the SYSTEM variable SYSTEM.IO will be set to 0 if the command executed successfully. The SYSTEM.IO variable will be set to 1 if an error, or end-of-file condition occurs. For example, to extract data from a temp file and add it to another:

SYSTEM.IO = 0 * check to see if file still contains data WHILE(SYSTEM.IO = 0) FILE(READ,SYSTEM.TAPEFILE,GET_CODE) IF(SYSTEM.IO = 0) FILE(APPEND,GLOBAL.FILE_A,GET_CODE) ENDIF ENDWHILE SYSTEM.TAPEFILE = GLOBAL.FILE_A * close and delete temp file FILE(CLOSE,GLOBAL.FILE_A) FILE(DELETE,GLOBAL.FILE_A)

It is not necessary to OPEN a file before you read or write to it. However, it is necessary to CLOSE the file before you DELETE it.

GETAPT Statements This statement returns the current APT/CL statements. For example:

GLOBAL.RECORD = GETAPT Returns current APT/CL record and saves it in variable GLOBAL.RECORD

NOTE: This is the same as the system variable SYSTEM.APT_LINE

GETAT Statements GETAT is used to extract a character from the specified position:

A = GETAT("TOOL=5",4)

The first argument is the string to be used, and the 2nd argument is the character position to extract. In this case, A = L

GETISO statements This command enables you to retrieve previous output data from the buffer.

SYSTEM.SAVE_ISO_LINES = #

where # represents how many blocks of output to retrieve. The following logic could be contained within an existing macro:

* retrieve and output the last 10 lines of ISO code I = 1 WHILE( I <= SYSTEM.SAVE_ISO_LINES ) A[I] = GETISO(I) OUTPUT(A[I],NEWLIN) I = I + 1 ENDWHILE

Page 231: IMSPost Guide

Macro Language Commands: HOOK Statements

IMSpost Guide 223

HOOK Statements Hooking is an advanced programming feature that is implemented in the IMSpost macro language using the HOOK command. Hooking defines execution of some command (a macro) when a certain set of conditions is true at a certain time.

There is a lot going on with a HOOK statement. Do not expect to step through it within the macro debugger. The best way to see if your HOOK is being activated is to set a breakpoint at the macro it is calling. The syntax is:

HOOK (NAME=name1, MACRO=name2, EXPRESSION = expr, PLACE = place, FLAG)

name1 The unique name for the hook. name2 The APT command or macro activated by the hook. expr An optional conditional expression to be evaluated to TRUE or FALSE. place Specifies where you want the macro activated in the event that the expr condition

evaluates to TRUE or no expr condition is specified. The place can only be one of the following: BEFORE Before a NEWLIN is activated. INCLUDE Include in the current output block. AFTER After a NEWLIN is activated. BGOTO In the GOTO command before the solution is evaluated. AGOTO In the GOTO command after the solution is evaluated. BCIRCLE In the CIRCLE command before the solution is evaluated. ACIRCLE In the CIRCLE command after the solution is evaluated. Typically, if you want the macro logic to be output with motion, you would use the AGOTO selection.

FLAG Specifies when you want the flag activated. ON Activate the hook always. OFF Turn the HOOK statement off. ONCE One shot to call the macro ONCE when the place position is encountered. It turns itself off after activated once.

Each HOOK statement has its own unique name. This gives you the option of turning the HOOK ON or OFF throughout your program. The macro activated by the HOOK statement must be predefined.

The FLAG expression is optional. This enables you to define specific instances when you want the HOOK macro called. This expression must be surrounded in double quotes. For example:

HOOK(NAME=CLAMPS,MACRO="CLAMP/*",EXPRESSION="REGISTER.B.CHANGE", PLACE=AGOTO,ON"

Example TEST/* HOOK (NAME=MYHOOK, MACRO="AUXFUN/120", EXPRESSION="GLOBAL.A=5", PLACE=BEFORE, ON) RETURN INIT/* GLOBAL.A = 5 RETURN

Before every block you will get: Nxxx M120

Page 232: IMSPost Guide

Macro Language Commands: IF Statements

224 IMSpost Guide

IF Statements The first form of the IF statement uses the syntax:

IF (condition) statement ... ... ... statement ENDIF

where “condition” is any expression that results in a Boolean value (true or false) and “statement” is any valid IMS macro statement.

To execute the IF statement, the system first evaluates the condition. If the condition is not equal to zero, the system executes the following statements until it encounters ENDIF. If the condition equals zero, the system does not execute the statements and it passes control to the next statement after ENDIF. For example:

IF (GLOBAL.TOOLNUM > 1) REGISTER.Z.VALUE = 500.0 OUTPUT(MODE.MOTION.POSITION, NEWLIN) ENDIF

Another form of the IF statement uses the syntax: IF (condition) statement ... statement ELSE statement ... statement ENDIF

In this case, if the condition is not equal to zero, the system executes each statement until it encounters ELSE. If the condition equals zero, the system executes all statements after the ELSE until it encounters ENDIF. In each case, the system passes control to the statement following ENDIF after it has executed either series of statements. For example:

IF (CLDATAN.1 = 180) DIRECTION = "CCLW" ELSE DIRECTION = "CLW" ENDIF

You can nest IF statements. Be sure to associate the IF/ELSE/ENDIF statements correctly when you construct nested IF statements.

You can also combine IF statements by using the words AND and OR: IF((MODE.SPINDLE = 'OFF') OR (MODE.COOLNT = 'OFF')) IF ((GLOBAL.FCYCLE) AND (GLOBAL.POSCYCLE) AND (MODE.CRETURN <> 'INITIAL'))

TIP: Use the Auto Indent feature within the IMS macro editor.

Page 233: IMSPost Guide

Macro Language Commands: OPTIMIZE Statements

IMSpost Guide 225

OPTIMIZE Statements The OPTIMIZE statements are automatically created within IMSpost. These statements control the LINE-FIT, ARC-FIT, and NURBS algorithm features. Depending upon what was selected through the respective dialogs, these OPTIMIZE commands will be created and reside in the INIT macro.

Each OPTIMIZE statement will remain in effect until modified or cancelled.

These parameters are activated with the Motion feature. Please refer to the Arc Fit, Line Fit, and Nurbs tabs.

For example, to activate the Line Fit routine: OPTIMIZE(LINE,1)

To cancel the Line Fit routine: OPTIMIZE(LINE,0)

To activate Arc Fit routine in the XY plane only: OPTIMIZE(CIRCLE,1,ACTIVE,1,TANGENT,0,SCREW,0,XYPLAN,1,YZPLAN,0, ZXPLAN,0,ALLPLAN,0)

OUTPUT Statements The OUTPUT statement is the link between the IMS knowledge base and the output data files. The system writes data generated by the OUTPUT statement to a file whose name is stored in the system variable SYSTEM.TAPEFILE.

The OUTPUT statement accepts arguments in one of four forms. Each has a specific meaning and should be used for a specific purpose. A description of each form follows:

• A string in double quotes causes the system to write the string to the file without interpretation. Without interpretation means that the system writes the data as is and does not check for machine code data that can update the knowledge base. Use this type of output for PPRINT or INSERT macros or to output logical functions to the tape.

• A string in single quotes causes the system to check the string for controller register data and values and to update the knowledge base to reflect the new data. The system may not use this data as is. The setting of the sort command or the addition of sequence numbers can affect the data.

If the parser does not recognize any part of the string as a controller register or value, the system processes the string without interpretation as if it were in double quotation marks.

• You can use variables in the OUTPUT statement to provide the macros with a greater level of flexibility. To avoid unpredictable results, use only variables that you have previously defined. You can use global variables, user-defined variables, and system variables, including MODE, FUNCTION, COMPONENT, MACHINE, CLREAD, CLDATA, REGISTER, SYSTEM, and SOLUTION.

• You must specify a NEWLIN argument to terminate an OUTPUT statement and send it to the knowledge base for processing. NEWLIN ends the current line of output and sends all remaining data to the knowledge base for processing.

Page 234: IMSPost Guide

Macro Language Commands: OUTPUT Statements

226 IMSpost Guide

FOR ADVANCED USERS: You can use the keywords WRITE and READ in an OUTPUT statement to process information in a macro and save it in a buffer for later use.

• WRITE at the end of an OUTPUT command terminates the string and stores the information in the output buffer.

• READ tells the knowledge base to write the data stored in the buffer to the knowledge base for OUTPUT processing.

• For an example of the usage of WRITE and READ, the standard MILL postprocessor makes extensive use of this functionality in macros in which output is “saved until the next motion block” (COOLNT, SPINDL, LOADTL, and so on). The buffer is then output in the GOTO macro (OUTPUT(READ)).

NOTE: You can program any combination of these four argument forms in any number of OUTPUT statements. When outputting any combination of machine code, variables, or text, each item must be separated by a comma delimiter.

Examples of the OUTPUT statement are: OUTPUT("(***THIS IS AN OPERATOR MESSAGE ***)", NEWLIN) OUTPUT('G01 X5.0 Y5.0', NEWLIN) OUTPUT(REGISTER.X.NAME, GLOBAL.X * 2.0, 'M06', NEWLIN) OUTPUT('Y', REGISTER.Y.VALUE)

The IMS macros distributed with this product contain additional examples of the OUTPUT statement.

Using REGISTER, FUNCTION, and MODE Variables and Values in an OUTPUT Statement OUTPUT REGISTER.name Outputs both register name and value according to

its format. FUNCTION.name Outputs all the USE registers belonging to that

function if the USE registers are not modal or their value has changed from the last time they were output.

MODE.name Outputs the function related to the current mode. For example, MODE.MOTION will output G1 if the current mode is in LINEAR and G1 is related to that submode. The function will be output regardless of whether it is modal.

MODE.MODAL.name Same as above but only if not MODAL or the last output is different from this function. (Modality is checked.)

MODE.name.subname

(such as, MODE.MOTION.LINEAR)

Generates the function related to the subname (such as G1 for mode.motion.linear) only if not MODAL or the last output is different from this function.

Using a MODE variable in the OUTPUT statement is the same as using a function. It also generates the USE connected to the related function. The benefit of using MODE is that the macro is not CONTROLLER dependent because it is not using the direct function name but a virtual name defined by the user. After mode output, MODE will always have the current output as the current mode.

Page 235: IMSPost Guide

Macro Language Commands: PRINT and DISPLAY Statements

IMSpost Guide 227

Example Part 1

Assume the last output is G1 X1. Assume the following variable values: REGISTER.X.VALUE = 2.4. REGISTER.X.MODAL = "Y" FUNCTION.G1.MODAL = "Y" FUNCTION.G1.USE = "X" MODE.MOTION.LINEAR = "G1" MODE.MOTION= "LINEAR"

OUTPUT(MODE.MOTION.LINEAR,NEWLIN) X2.4 OUTPUT(MODE.MOTION,NEWLIN) G1 X2.4 OUTPUT(MODE.MODAL.MOTION,NEWLIN) X2.4

Example Part 2

Assume last output is G0 X1. Assume the following variable values: REGISTER.X.VALUE = 1.0 REGISTER.X.MODAL = "N" FUNCTION.G1.MODAL = "N" FUNCTION.G1.USE = "X" MODE.MOTION.LINEAR = "G0" MODE.MOTION= "POSITION"

OUTPUT(MODE.MOTION.LINEAR,NEWLIN) G1 X1.0 OUTPUT(MODE.MOTION,NEWLIN) G0 X1.0 OUTPUT(MODE.MODAL.MOTION,NEWLIN) X1.0

PRINT and DISPLAY Statements The PRINT and DISPLAY statements are used together to generate output messages when executing the postprocessor and to receive real-time input from the user of the postprocessor.

• Use the PRINT statement to fill an internal buffer with messages to be output. This statement is used to create messages but will not cause any output by itself!

• Use the DISPLAY statement to empty the contents of the buffer and display the messages to the user of the postprocessor. The DISPLAY statement can be programmed with or without an argument.

If you do not use an argument, DISPLAY outputs the PRINT buffer and postprocessor execution continues. If you do use an argument, execution will be interrupted and you will be prompted for input. The argument programmed with the DISPLAY statement is set to the value you enter. This value can then be used in the macro.

For example, when developing your postprocessor, you need to output a program number as the first line of the NC program. But each program will be different so you do not want to program a fixed code into the postprocessor. Instead, you want to prompt the operator to enter a program number and then output it to the NC program. You might enter the following lines into your INIT_CFG macro:

INIT_CFG/* ... ... PRINT("PLEASE ENTER A PROGRAM NUMBER") DISPLAY(PRNUM) SEQNO(OFF) OUTPUT('O', PRNUM, NEWLIN)

Page 236: IMSPost Guide

Macro Language Commands: PRIORITY Statements

228 IMSpost Guide

SEQNO(ON) ... RETURN

TIP: You can also add a default response by adding it to the DISPLY line. In the following example, the system assumes 1000 if the user does not respond:

DISPLY(PRNUM,1000)

The next example uses the system variable SYSTEM.DISPLAY_RETURN to adjust the user response time. If there is no response after 10 seconds, the system continues.

SYSTEM.DISPLAY_RETURN = 10

If you need your programmer to input various sections of data, see User > User Dialog.

PRIORITY Statements Use the PRIORITY macro command, which is a machine-controlling command, for machines with parallel linear axes. The syntax is:

PRIORITY(axis1, axis2, …, axisn)

For axis motion in which it is possible to obtain a postprocessor solution using more than one axis (for example, U and X or Z and W), the postprocessor chooses the axes in order of priority specified in this statement.

You can also set this priority within the Machine Motion feature.

PUSH and POP statements These two statements work with the Register, Mode, and Machine variables within lMSpost. PUSH is used to save the last register value, or condition. POP is used to restore the previous value or condition. For example:

* save all current register values PUSH(REGISTER) REGISTER.X.VALUE = CLDATAN.1 * 60 OUTPUT('G4',REGISTER.X,NEWLIN) * restore present X value POP(REGISTER)

REPORT Statements REPORT statements enable you to write out to external error (.log) files. You can create and add postprocessor errors to the USER.ERR file. For additional data, see File > Error Definition.

RETURN Statements The RETURN statement is a required part of every macro, although it has no effect on output or execution. For the IMS knowledge base to recognize the end of a macro, use a RETURN statement as the final statement, including comments, in a macro. Refer to the IMS macros provided with the product for examples of the RETURN statement.

RETURN statements can also return a value to the macro that called it. The following example returns 7 to the calling macro:

RETURN 7

Page 237: IMSPost Guide

Macro Language Commands: ROUND Statements

IMSpost Guide 229

ROUND Statements The ROUND statement enables you to round-off and truncate a value. The syntax is:

A = ROUND (54.6678,3)

The first argument (54.6678) is the value to be rounded. The first argument may also be any valid variable.

The second argument (3) specifies how many places to round the value to. If this argument is zero, the value will be rounded off to an integer.

In the following example, A = 54.669: A = ROUND (54.6678,3)

The first argument could also represented as a defined variable. In this example, B = 54.3 and C = 124:

GLOBAL.HCODE = 54.332 B = ROUND (GLOBAL.HCODE,1) C = ROUND(123.5,0)

RUN Statements Use the RUN macro command to execute other programs from an IMS macro. The RUN command issues an operating system call to begin execution of the program specified. The IMS macro continues processing after the RUN command is executed—it does not wait until completion of the external program. The syntax is:

RUN("program")

where program is the name of the external program to run. For example, from the Windows version of IMSpost, you would use the following command to open Notepad:

RUN("notepad")

To open an external file with Notepad: GLOBAL.PART_PATH = "notepad " + "c:\MILL\MAZAK\TEST.APT" RUN ( GLOBAL.PART_PATH )

SEQNO Statements Use the SEQNO statement to override the default conditions for sequence number output. In this example, the SEQNO statement sets the sequence number to five and increases the number by five:

INIT_CFG/* SEQNO(START=5,INCR=5,ON,"N") SORT(N,G,X,Y,Z,R,I,J,K,F,S,T,M) OUTPUT('G90 G70 G80 G00', NEWLIN RETURN

TIP: For macro users, you can control the sequence with:

SEQNO(ON) Same as CALL(SEQNO/ON). SEQNO(OFF) Same as CALL(SEQNO/OFF). SEQNO("O") Changes the sequence letter address to O (such as O1535 G0 Z1200).

The letter O must exist in the Register Table.

Page 238: IMSPost Guide

Macro Language Commands: SETAT Statements

230 IMSpost Guide

SETAT Statements This statement enables you to substitute a character in a string with another. For example;

MY_STRING = "ABCDEFG" SETAT (MY_STRING,3,"L")

The first argument is the text string. The second argument (3) is the placement of the character to be replaced. The third argument ("L") contains the replacement character. So, the results of MY_STRING will be "ABLDEFG".

With the SETAT statement, it is also possible to substitute text with an ASCII character. For example:

MY_STRING = "ABC" SETAT(MY_STRING,3,12) MY_STRING = "AB + ascii representation of integer 12 (page break)

SOLUTION Statements The SOLUTION statement gives you a simple mechanism for converting part coordinates to the machine coordinates in point vector format. The SOLUTION statement also strips these coordinates of machine offsets and tool offsets, providing you with the original GOTO or CIRCLE data.

The SOLUTION statement syntax takes several different formats:

• Format 1 (Basic GOTO motion) • Format 2 (GOTO motion with linearization) • Format 3 (Circle records) • Format 4 (Converts circles to lines) • Format 5 (Calculates perpendicular vector to line or arc)

SOLUTION Statements: Format 1 SOLUTION(GOTO/X,Y,Z,I,J,K,"MOVE","REGISTER","NOHOOK")

X,Y,Z Usually the given part coordinate, given in the APT GOTO statement. I,J,K Usually the vector of the tool, relative to the part, given in multiaxis

(>3) moves. "MOVE" (optional) Moves the machine to the required coordinate. "REGISTER" (optional) Updates the related registers with the new values. "NOREPORT" (optional) Instructs IMSpost to not report any warnings or errors as a

result of this SOLUTION. "NOHOOK" (optional) Cancels any pending HOOK logic for this SOLUTION. This

is a one-shot statement. After this SOLUTION is generated, IMSpost will default to the previous SOLUTION parameters.

Page 239: IMSPost Guide

Macro Language Commands: SOLUTION Statements

IMSpost Guide 231

The result of the SOLUTION statement is a SOLUTION record, generated by IMSpost. A SOLUTION record is a series of variables, defined as follows:

SOLUTION.X Solution calculated for this X. SOLUTION.Y Solution calculated for this Y. SOLUTION.Z Solution calculated for this Z. SOLUTION.I Solution calculated for this component of the tool vector along X axis. SOLUTION.J Solution calculated for this component of the tool vector along Y axis. SOLUTION.K Solution calculated for this component of the tool vector along K axis. SOLUTION.EXIST Number of blocks to be output.

For each axis defined in the machine definition for the postprocessor (where “name” is the axis name), the following applies:

SOLUTION.name_CURRENT Current position of this axis before moved by this solution. SOLUTION.name_VALUE New suggested value to move to. SOLUTION.name_INCREMENT Incremental move (from last position). SOLUTION.name_CHANGE Need to move Yes/No (different from last position).

For example, if you have a machine with two linear axes X,Y, then:

SOLUTION.X_CURRENT Current position of this axis before moved by this solution. SOLUTION.X_VALUE New suggested value to move to. SOLUTION.X_INCREMENT Increment move. SOLUTION.X_CHANGE Need to move: Yes/No. SOLUTION.Y_CURRENT Current position of this axis before moved by this solution. SOLUTION.Y_VALUE New suggested value to move to. SOLUTION.Y_INCREMENT Increment move. SOLUTION.Y_CHANGE Need to move: Yes/No. SOLUTION.LINEAR_AXIS Number of linear axes that move for this solution. SOLUTION.ROTARY_AXIS Number of rotary axes that move for this solution. SOLUTION.LINTOL_LINEAR Maximum distance from the straight line within this

solution. SOLUTION.LINTOL_ROTARY Maximum angle distance from the plane within this

solution. SOLUTION.LINEAR_MOVE Length of the linear move. SOLUTION.ROTARY_MOVE Length of rotary move in system units (INCH/MM). SOLUTION.TOTAL_MOVE Length of total move.

Returning a solution for GOTO or CIRCLE involves complicated math calculations. You do not need to have any math knowledge to use these powerful statements. In some instances, however, you may want to have more influence on the result of the solution. The following example demonstrates how you can influence the result of the SOLUTION statement by using two SYSTEM matrices and a LOCAL axis coordinate system.

Page 240: IMSPost Guide

Macro Language Commands: SOLUTION Statements

232 IMSpost Guide

For the matrix examples, assume that you call the solution with the following arguments: Xi,Yi,Zi,Ii,Ji,Ki

If the variable, SYSTEM.MATRIX1 ≠ 0, the input variables will be multiplied by matrix 1. If the variable, SYSTEM.MATRIX2 ≠ 0, the input variables will be multiplied by matrix 2. The variables SYSTEM.LOCAL[1], SYSTEM.LOCAL[2], and SYSTEM.LOCAL[3], are added to Xi,Yi,Zi, respectively.

The matrices are three rows by four columns and are defined using SYSTEM variables as:

SYSTEM.MATRIXA1[1] SYSTEM.MATRIXA1[2] SYSTEM.MATRIX1A[3] SYSTEM.MATRIX1A[4]

SYSTEM.MATRIXB1[1] SYSTEM.MATRIXB1[2] SYSTEM.MATRIX1B[3] SYSTEM.MATRIX1B[4]

SYSTEM.MATRIXC1[1] SYSTEM.MATRIXC1[2] SYSTEM.MATRIX1C[3] SYSTEM.MATRIX1C[4]

If SYSTEM.MATRIX1 ≠ 0, the following takes place:

NEWXi = Xi*systetm.matrix1A[1] + Yi*system.matrix1A[2] + Zi*system.matrix1A[3] + system.matrix1A[4] NEWYi = Xi*systetm.matrix1B[1] + Yi*system.matrix1B[2] + Zi*system.matrix1B[3] + system.matrix1B[4] NEWZi = Xi*systetm.matrix1C[1] + Yi*system.matrix1C[2] + Zi*system.matrix1C[3] + system.matrix1C[4]

NEWIi = Ii*system.matrix1A[1] + Ji*system.matrix1A[2] + Ki*system.matrix1A[3] NEWJi = Ii*system.matrix1B[1] + Ji*system.matrix1B[2] + Ki*system.matrix1B[3] NEWKi = Ii*system.matrix1C[1] + Ji*system.matrix1C[2] + Ki*system.matrix1C[3]

If SYSTEM.MATRIX2 ≠ 0, the following takes place: NEWXi = Xi*systetm.matrix2A[1] + Yi*system.matrix2A[2] + Zi*system.matrix2A[3] + system.natrix2A[4] NEWYi = Xi*systetm.matrix2B[1] + Yi*system.matrix2B[2] + Zi*system.matrix2B[3] + system.natrix2B[4] NEWZi = Xi*systetm.matrix2C[1] + Yi*system.matrix2C[2] + Zi*system.matrix2C[3] + system.natrix2C[4]

NEWIi = Ii*systetm.matrix2A[1] + Ji*system.matrix2A[2] + Ki*system.matrix2A[3] NEWJi = Ii*systetm.matrix2B[1] + Ji*system.matrix2B[2] + Ki*system.matrix2B[3] NEWKi = Ii*systetm.matrix1C[1] + Ji*system.matrix2C[2] + Ki*system.matrix2C[3]

Applying the SYSTEM.LOCAL variables:

Xi = Xi + system.local[1] Yi = Yi + system.local[2] Zi = Yi + system.local[3]

Once all the matrix calculations and LOCAL variables have been applied, then the SOLUTION statement calculations will occur for the new Xi,Yi,Zi,Ii,Ji,Ki. By default:

SYSTEM.MATIRX1 = 0 SYSTEM.MATRIX2 = 0 SYSTEM.LOCAL[1] = 0.0 SYSTEM.LOCAL[2] = 0.0 SYSTEM.LOCAL[3] = 0.0

And matrix 1 and 2 are initialized to:

1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0

As can be seen, by default the system variables have no effect on the SOLUTION at all. They are simply a mechanism for you to provide advance calculation to the input variables, prior to the SOLUTION calculations being performed.

The REGISTER and MOVE parameters instruct IMSpost to move the machine and update the controllers registers to the new values calculated by the SOLUTION statement. You can use the SOLUTION statement, without these two parameters, and no motion or controller registers will

Page 241: IMSPost Guide

Macro Language Commands: SOLUTION Statements

IMSpost Guide 233

be updated. You can then utilize these new SOLUTION variables in your logic and specify another SOLUTION statement that includes the REGISTER and MOVE parameters.

SOLUTION Statements: Format 2 The "LINTOL" option: SOLUTION(LINTOL/x,y,z,i,j,k,name)

X,Y,Z Next motion point. I,J,K Vector of tool at this point (X,Y,Z). name Name of the array to divide the move.

You will call the LINTOL solution when working in MULTAX/ON mode (4 or 5 axes motion), and a LINTOL/n (linearization) statement is encountered in the program. The LINTOL may also be activated within the postprocessor definition (see the Multi-Axis feature).

LINTOL/n is a means to break single moves into much smaller moves in such a way that the tool tip will move in a straight line relative to the part and the tool axis will move in a plane defined by the cross product of the start and the end tool vectors. This solution makes use of the SYSTEM variables:

SYSTEM.LINTOL Controls multi-axis linearization routine. The SOLUTION first checks whether SYSTEM.LINTOL = 1 (if 0, no linearization check is made).

SYSTEM.LINTOL_LINEAR Specifies the linear deviation (if 0.0, no check is made). This is linearization for the linear axes only.

SYSTEM.LINTOL_ROTARY Specifies the angular deviation (if 0.0, no check is made). This is the multi-axis angular deviation for rotary motion.

SYSTEM.MAX_STEP Controls linearization of line segments: = 0 Line segments not affected by limit set in SYSTEM.MAX_LINTOL_STEP = 1 Line segments not complete; limit set in SYSTEM.MAX_LINTOL_STEP

SYSTEM.MAX_LINTOL_STEP Amount of lintol blocks ( 0 = no limit). The result of the SOLUTION statement is a SOLUTION record generated by IMSpost. A SOLUTION record is a series of variables, defined as follows:

SOLUTION.COUNTER Number of break moves. SOLUTION.LINTOL_LINEAR The result linear deviation. SOLUTION.LINTOL_ROTARY The result angular deviation. SOLUTION.X[1] X coordinate of the first breakpoint. SOLUTION.Y[1] Y coordinate of the first breakpoint. SOLUTION.Z[1] Z coordinate of the first breakpoint. SOLUTION.I[1] I component vector of the first breakpoint. SOLUTION.J[1] J component vector of the first breakpoint. SOLUTION.K[1] K component vector of the first breakpoint. SOLUTION.X[n] Last coordinate of the last breakpoint. SOLUTION.Y[n] Last coordinate of the last breakpoint.

Page 242: IMSPost Guide

Macro Language Commands: SOLUTION Statements

234 IMSpost Guide

SOLUTION.Z[n] Last coordinate of the last breakpoint. SOLUTION.I[n] I component vector of the last breakpoint. SOLUTION.J[n] J component vector of the last breakpoint. SOLUTION.K[n] K component vector of the last breakpoint.

In addition, the points of each axis variable name are returned:

nameX[1] X coordinate of first the breakpoint. nameY[1] Y coordinate of first the breakpoint. nameZ[1] Z coordinate of first the breakpoint. nameI[1] I component vector of the first breakpoint. nameJ[1] J component vector of the first breakpoint. nameK[1] K component vector of the first breakpoint. nameX[1] X coordinate of the last breakpoint. nameY[1] Y coordinate of the last breakpoint. nameZ[1] Z coordinate of the last breakpoint. nameI[1] I component vector of the last breakpoint. nameJ[1] J component vector of the last breakpoint. nameK[1] K component vector of the last breakpoint.

Example of GOTO Macro Implementing SOLUTION for LINTOL

GOTO/* SOLUTION(LINTOL/CLDATAN.1,CLDATAN.2,CLDATAN.3,CLDATAN.4,CLDATAN.5,CLDATAN.6,"CD") I=1 COUNT=SOLUTION.COUNTER WHILE (I<=COUNT) SOLUTION(GOTO/CDX[I],CDY[I],CDZ[I],CDI[I],CDJ[I],CDK[I],"MOVE","REGISTER") OUTPUT(MODE.MOTION.LINEAR,NEWLIN) I=I+1 ENDWHILE RETURN

Combining LINTOL with the AUTO-RETRACT Option

When both the LINTOL and AUTO-RETRACT options are activated, the LINTOL SOLUTION takes an additional consideration into the line segments definition. This would be the point of retraction.

The Auto Retract point is determined by the physical limitations of the machines rotary axis. When an Auto Retract motion is needed, the position and tool direction of that point will be maintained while the rotary axis is re-oriented. Then the postprocessor will continue with the linearization cut maintaining the same tool orientation.

The Auto Retract dialog requires the points:

1. The retraction point (this is the machines rotary limitation). 2. The feed out point (from the Machine > Multi-axis > Multi-axis Setup). 3. The rapid out point (from the Auto-Retract dialog).

The values returned from the LINTOL solution process contains all the necessary parameters needed to pass on to the AUTO_RETRACT/* macro.

Page 243: IMSPost Guide

Macro Language Commands: SOLUTION Statements

IMSpost Guide 235

Additional LINTOL solution variables are:

SOLUTION.LIMIT_X Specifies the machines XYZ position at the rotary limit. SOLUTION.LIMIT_Y

SOLUTION.LIMIT_Z

SOLUTION.SAFE_X Specifies the feed out retraction position. SOLUTION.SAFE_Y

SOLUTION.SAFE_Z

SOLUTION.OUT_X Specifies the rapid out retraction position. SOLUTION.OUT_Y

SOLUTION.OUT_Z

SOLUTION.LIMIT_I Specifies tool orientation at the rotary limit position. SOLUTION.LIMIT_J

SOLUTION.LIMIT_K

SOLUTION_NUMBER_LIMIT Determines which motion to use to reach machines rotary limit.

SOLUTION.NUMBER_FINAL Determines which motion to use to reach the final point. NOTE: For 5-axis motion, the last 2 SOLUTION variables will be passed into the AUTO_RETRACT/* macro. There you can make a decision as to what motion path to take (it gives you the opportunity to force the opposite motion).

SOLUTION Statements: Format 3 SOLUTION(CIRCLE/XC,YC,ZC,I,J,K,XE,YE,ZE,"X.Y","Y.Z","Z.X","MOVE",REGISTER","NOHOOK")

XC,YC,ZC Coordinate of arc center. I,J,K Vector perpendicular to the arc, using right-hand coordinate system.

This parameter is used to determine the arc direction, for example: Arc in XY-plane in the clockwise direction I,J,K = 0,0,-1 Arc in XY-plane in the counter clockwise direction I,J,K = 0,0,1

XE,YE,ZE End point on the required arc. "X.Z","Y.Z","Z.X" Three pairs of axes that define I,J,K vector that is normal to the plane

defined by each pair axis in the current machine position. "MOVE" (optional) Moves the machine to the required coordinate. "REGISTER" (optional) Updates the related registers with the new values. "NOHOOK" (optional) Cancels any pending HOOK logic for that motion.

The result of the SOLUTION statement is a SOLUTION record generated by IMSpost. A SOLUTION record is a series of variables, defined as follows:

SYSTEM.PLANE One of the three given plane option. The arc lays in this plane (for example, "X.Y").

SYSTEM.#_OF_RECORD Number of quadrants in this arc. This must be between 1 to 5. If it is 0, no solution is found.

SYSTEM.RADIUS Radius of the given arc. SYSTEM.DIRECTION Interpolation direction: 1 is CCLW, -1 is CLW.

Page 244: IMSPost Guide

Macro Language Commands: SOLUTION Statements

236 IMSpost Guide

SYSTEM.LENGTH Length of arc. SYSTEM.START_ANGLE Angle of start point (to +X axis if in the XY-plane). SYSTEM.END_ANGLE Angle of end point (to +X axis if in the XY-plane). SYSTEM.DELTA_ANGLE Angle between END_ANGLE to START_ANGLE. SYSTEM.X_START X coordinate of the start point. SYSTEM.Y_START Y coordinate of the start point. SYSTEM.X_END X coordinate of the end point. SYSTEM.Y_END Y coordinate of the end point. SYSTEM.X_CNT_TO_START Distance along X (if in the XY-plane) from the center of the

arc to the start point. SYSTEM.Y_CNT_TO_START Distance along Y (if in the XY-plane) from the center of the

arc to the start point. SYSTEM.X_CNT_TO_END Distance along Y (if in the XY-plane) from the center of the

arc to the end point. SYSTEM.Y_CNT_TO_END Distance along Y (if in the XY-plane) from the center of the

arc to the end point. SYSTEM.X_CFG_CENTER Center information along X (if in the XY- plane) according to

SYSTEM.CIRCTYPE SYSTEM.Y_CFG_CENTER Center information along Y (if in the XY plane) according to

SYSTEM.CIRCTYPE In addition, for each quadrant component of the arc (up to 5), the same information for each quadrant arc is supplied in array format. For each quadrant, the start point is the end point of the previous quadrant.

SYSTEM.LENGTH[1..n] SYSTEM.START_ANGLE[1..n] SYSTEM.END_ANGLE[1..n] SYSTEM.DELTA_ANGLE[1..n] SYSTEM.X_START[1..n] SYSTEM.Y_START[1..n] SYSTEM.X_END[1..n] SYSTEM.Y_END[1..n] SYSTEM.X_CNT_TO_START[1..n] SYSTEM.Y_CNT_TO_START[1..n] SYSTEM.X_CNT_TO_END[1..n] SYSTEM.Y_CNT_TO_END[1..n] SYSTEM.X_CFG_CENTER[1..n] SYSTEM.Y_CFG_CENTER[1..n]

The X_CFG_CENTER & Y_CFG_CENTER solution variables are set dependent on the SYSTEM.CIRCTYPE variable (this variable is changed if you choose a different option in the CIRCLE DIALOG BOX) where SYSTEM.CIRCTYPE could be:

0: Absolute coordinate of center. 1: Distance from start to center. 2: Distance from center to start. 3: Unsigned distance from center to start. 10: Linearize circular output.

Page 245: IMSPost Guide

Macro Language Commands: SOLUTION Statements

IMSpost Guide 237

SOLUTION Statements: Format 4 SOLUTION(CIR2LIN/"MOVE","REGISTER")

"MOVE" (optional) Moves the machine to the required coordinate. "REGISTER" (optional) Updates the related registers with the new values.

This SOLUTION form works together with the CIRCLE solution and can be called only after calling SOLUTION(CIRCLE/). This is because the CIR2LIN solution uses the CIRCLE solution return record as its input arguments.

The purpose of this solution is to provide an easy way to convert arc movement to linear interpolated movements, for controllers that do not support circular interpolation (usually G2, G3). This would be the case if you selected the “Break into linear moves” with the Circle feature.

The first call of this solution after a CIRCLE solution changes the number of break moves for this arc in SOLUTION.#_OF_RECORD. Subsequent calls decreases the SOLUTION.#_OF_RECORD until all moves are completed—in other words, the end of the arc is reached.

Example Using CIR2LIN SOLUTION(CIRCLE/Xc,Yc,Zc,I,J,K,Xe,Ye,Ze, "X.Y","Y.Z","Z.X","MOVE","REGISTER") IF (SOLUTION.#_OF_RECORD > 0) Check that solution exists for the given arguments. WHILE (SOLUTION.#_OF_RECORD) Loop until all moves completed. SOLUTION(CIR2LIN/"MOVE","REGISTER") Call the solution for the next move. OUTPUT(MODE.MOTION.LINEAR,NEWLIN) Generate linear move of this point. ENDWHILE

SOLUTION Statements: Format 5 SOLUTION(PERPTO/X1,Y1,X2,Y2,SIDE,LINCIR)

This solution calculates the perpendicular vector to a line or arc. The direction of the return vector is set according to the SIDE parameter (1:RIGHT or 2:LEFT) of the material.

You might want this solution with a controller for which you need to program a P,Q,R vector for cutter compensation (G41 G42). In this case, the return SOLUTION.P & SOLUTION.Q returns the necessary information.

IN CASE OF LINCIR = 0 X1,Y1 FROM POINT X2,Y2 TO POINT IN CASE OF LINCIR = 1,2 X1,Y1 END POINT ON CIRCLE X2,Y2 CIRCLE CENTER DIR 1 RIGHT SIDE OF THE MATERIAL 2 LEFT SIDE OF THE MATERIAL LINCIR 0 LINEAR 1 ARC CLW 2 ARC CCLW

Page 246: IMSPost Guide

Macro Language Commands: SORT Statements

238 IMSpost Guide

The result of the SOLUTION statement is a SOLUTION record, generated by IMSpost. A SOLUTION record is a series of variables, defined as follows:

SOLUTION.P Solution vector’s component of the X axis. SOLUTION.Q Solution vector’s component of the Y axis. SOLUTION.ANGLE Solution angle of vector to the positive X-axis.

SORT Statements The SORT statement is a statement created especially for the IMS knowledge-based applications. Use it within the INIT_CFG/ macro to set the order in which registers, preparatory functions (G-codes), and auxiliary functions (M-codes) are processed when the macros are executed during postprocessing.

NOTE: If you utilize the Sort Output feature in the IMS environment, these statements are generated automatically. The SORT command enables you to change the sorting of and letter addresses or function codes with any particular macro.

To set the order of processing for controller registers, specify the register list in the order you want and separate each register name with a comma. For example:

SORT(N,G,X,Y,R,Z,I,J,K,F,S,T,M)

To set the order of processing for preparatory functions, specify the option GFUNC as the first argument to the SORT command followed by the G-values listed in the order you want, separated by commas:

SORT(GFUNC,90,91,17,18,20,21,92,93,94,95,40,41,1,2,3,4)

To set the order of processing for auxiliary functions, specify the option MFUNC as the first argument to the SORT command followed by the M-values listed in the order you want, separated by commas:

SORT(MFUNC,1,2,3,4,11,12,8,9,30)

The system processes any registers or values that are not specified in the list in the order in which they are processed by the knowledge base, but only after it processes all the registers or values specified in the SORT.

Sorting Output Example The sort command is automatically generated by IMSpost when the SORT dialog is activated and saved. The sort order is saved in the INIT_CFG macro, using the macro language SORT command.

Example 1

Sort order and resulting sort statement in macro INIT_CFG/* is: SORT(/N,N,O,G,X,Y,Z,I,J,K,R,Q,P,H,D,S,L,T,M,F)

GOTO/1,2,3 G1 X1. Y2. Z3. Order of output according to SORT definition (G,X,Y,Z)

Page 247: IMSPost Guide

Macro Language Commands: SPLIT Statements

IMSpost Guide 239

Example 2

Sort order and resulting sort statement in macro INIT_CFG/* is: SORT(/N,N,O,G,Z,Y,X,I,J,K,R,Q,P,H,D,S,L,T,M,F)

GOTO/1,2,3 G1 Z3. Y2. X1. Order of output according go sort definition(G,Z,Y,X)

Example 3

You can also use this statement to sort the order of selected G-codes. This can be useful when multiple G-codes are output per block.

SORT(GFUNC,90,91,94,95,98,99,17,18,19,40,41,42,0,1,2,3,4,80,81,82,83,83,87,89)

The same can be done with M functions (only necessary if multiple M-codes per block): SORT(MFUNC,3,4,5,7,8,9,13,14)

SPLIT Statements Use this statement to split a string into substrings. This command is often used together with the FILE command to “split” input strings read from an external data source. However, the command can be used on any string. The syntax is:

SPLIT(delim, instring, sub1, sub2, . . . , subn)

where: delim is a separator for splitting. This must be enclosed in double quotes. instring is the name of the input string. sub1,sub2,....,subn output substrings.

You can have more substring arguments supplied than the number of substrings present in the input string. A good rule to follow is to be sure to have enough substring variables for the longest input string you intend to interpret.

An example is: ISUB = 1 SYSTEM.IO = 0 WHILE (SYSTEM.IO = 0) FILE(READ, "TRAIN.DAT", TEXTLINE) SPLIT(",",TEXTLINE,DVALUE,EVALUE) GLOBAL.DARRAY[ISUB] = DVALUE GLOBAL.EARRAY[ISUB] = EVALUE ISUB = ISUB + 1 ENDWHILE

Page 248: IMSPost Guide

Macro Language Commands: SPRINT Statements

240 IMSpost Guide

SPRINT Statements The SPRINT statement allows for specific formats when outputting values (variables) with text strings. For users experienced with the C programming language, this statement is similar to PRINTF

The syntax is: NAME_10 = SPRINT("%s %3.0f %u",T1,GLOBAL.CENTER_DRIVE,T2)

Each conversion character must be preceded by a percent sign (%). The SPRINT statement contains the arguments and formats, and the variable names to be output. These two fields are separated by a comma delimiter. Available arguments are:

d Convert to decimal o Convert to unsigned octal x Convert to unsigned hexadecimal u Convert to unsigned decimal (integer) c Single character s Designates a text string f Convert as a real number

Looking at the above syntax example, consider the following: T1 = "( TOOL DRIVE =" GLOBAL.CENTER_DRIVE = 525.775 T2 = " )" NAME_10 = SPRINT("%s %3.3f %s",T1,GLOBAL.CENTER_DRIVE,T2) OUTPUT(NAME_10,NEWLIN) --> ( TOOL DRIVE = 525.775 )

Each argument/format field must be separated by a space, and the entire string of formats must be enclosed with double quotes. A comma must then be inserted to separate the argument field from the variable name field. If necessary, you can also tab the fields.

The following table shows the different ways of printing the textsting “hello, world” (12 characters). Colons are used here to display the field length.

:%10s: :hello, world: :%-10s: :hello, world: :%20s: : hello, world: Right justified :%-20s: :hello, world : Left justified :%20.10s: : hello, wor: Right justified, 10 characters :%-20.10s :hello, wor : Left justified, 10 characters :%.10s :hello, wor: 10 characters

NOTE: The SPRINT statement is sensitive. Step through the debugger to ensure it is specified correctly. If the debug icon is not displayed after reading it, it is OK.

Page 249: IMSPost Guide

Macro Language Commands: STREXT Statements

IMSpost Guide 241

STREXT Statements Use the STREXT statement to extract a specified piece of text from a text string. For example:

VV = "ABCDEF" A = STREXT(VV,3,4) A = "CD"

The STREXT statement also is useful for extracting the remainder of a text string. For example: MY_TXT = "PARTNO_TEST15_JOBID#78A" GET_TEXT = STREXT(MY_TXT,8) GET_TEXT = "TEST15_JOBID#78A"

NOTE: When specifying the locations of the text string, you cannot use variables. You must specify the location with an integer.

STRLEN Statements This statement will return the length of the string (number of characters). For example:

TEST = "THE COW JUMPED OVER THE MOON" AA = STRLEN(TEST) * AA = 28 (spaces are also included).

STRSTR Statements This statement enables you to extract text from a text string. For example:

MY_TXT = "ABCDEFGH1234567" B = STRSTR(MY_TXT,"FGH")

The above statement searches the MY_TXT texstring for the string FGH. When found, it extracts it and everything behind it.

NOTE: If the second substring is not found, the variable will be empty.

TABLE Statements Use the TABLE command to insert a line, with the current table variable values, into the specified table. Each time a TABLE statement is read, it will add the specified data to the specific table name.

Typically, a tool list table is created with the Report feature. All the proper variables and formats are specified there. The TABLE command would exist at the bottom of the LOADTL macro, thus entering the predefined data into the table.

The syntax is: TABLE(table)

where: table is the name of a predefined table to generate a new line. For example:

TABLE(TOOL TABLE)

At the end of the program, the postprocessor should write out all this table data to a file. This would be done within the FINI_CFG macro:

FILE(TABLE,"TOOLTABLE.htm",TOOL TABLE)

Page 250: IMSPost Guide

Macro Language Commands: TOKEN Statements

242 IMSpost Guide

where: TOOLTABLE.htm is the file in HTML format. TOOL TABLE is the name of the table that was predefined with the Report feature.

TOKEN Statements Use this statement to extract pieces of text separated with delimeters. One or more delimeters may be specifed with this.

MY_PART = "LOAD%TOOL:10,MANUAL" A = TOKEN(MY_PART,"%:,")

where specified delimiters are %:,

You could extract all the text from the special characters by utilizing logic similar to this in a macro:

A = TOKEN(MY_PART,"%:,") WHILE(A) OUTPUT(A,NEWLIN) A=TOKEN("%:," ENDWHILE

The results will be: N1 LOAD N2 TOOL N3 10 N4 MANUAL

TOOL_ALONG Statements This statement will return the current tool direction for the specified axes. For example, if you have 3-axis machine (XYZ) and the Machine Z is specified as (+) vertical in the Motion dialog:

A = TOOL_ALONG("X","Y","Z")

IMSpost would return: A = +Z

This statement is used within the CYCLMOTN macro to see if the current tool-axis is along one of the major axes. This statement can be useful when programming machines with rotary heads.

UCASE and LCASE Statements These macro statements will convert text strings to either upper (UCASE) or lower (LCASE) case.

MY_TXT = "Program 10" MY_TXT_2 = UCASE(MY_TXT)

The result is: MY_TXT_2 = "PROGRAM 10"

TIP: If you are getting data from custom user dialogs, the UCASE statement in your macro will ensure that the data the user enters will be converted to upper case.

Page 251: IMSPost Guide

Macro Language Commands: USER STATEMENTS

IMSpost Guide 243

USER STATEMENTS Use the USER statement to display a custom dialog. The dialog name must be the exact name as the description used in User > User Dialog. For example:

USER("TOOL DATA BOX")

Typically, if you want your dialog to be displayed for every job, enter this statement in the INIT/* or INIT_CFG/* macros (not both).

There are some dialogs already connected with the library posts. These are available under the User menu.

Once dialogs are written correctly, you can also import them into other projects.

WHILE Statements The WHILE statement is the looping statement for IMS macros. A WHILE loop executes as long as a given condition exists. Execution ends when the condition no longer exists. Because the test is at the top of the loop, it is possible for the loop not to run. The loop statements do not execute if the condition never exists. This eliminates the need for an explicit test to bypass the loop.

The syntax of the WHILE statement is: WHILE (condition) statement ... statement ENDWHILE

The condition can be any expression that results in a Boolean value. Each statement in the loop can be any valid IMS macro statement. The system evaluates the condition. If the condition is equal to zero, the system exits the loop and passes control to the statement after ENDWHILE. If the condition does not equal zero, the system executes the series of statements that follow WHILE and passes control to the top of the loop where it evaluates the condition again.

The system executes the loop statements only when the WHILE condition is true (the condition does not equal zero). The system exits the loop when the WHILE condition is false (the condition equals zero).

An example is: I = 1 WHILE (I < CLDATAN.0) OUTPUT("M", CLDATAN.[I],NEWLIN) I = I + 1 ENDWHILE

NOTE: You can nest WHILE statements. Statements under control of a WHILE statement can themselves be WHILE statements.

Page 252: IMSPost Guide

Macro Language Commands: WHILE Statements

244 IMSpost Guide

Notes

Page 253: IMSPost Guide

IMSpost Guide 245

Macro Language Variables

Macro language variables are described in this section.

CLDATA Variables The variables of the format CLDATAM and CLDATAN are the way an IMSpost macro receives the input parameters from either an input file or an IMSpost test command.

CLDATAM variables are used to store input parameter “minor words.” CLDATAN variables are used to store input values. The different formats of these variables are as follows:

Variable Description CLDATAN.0 Parameter 0 is the count of CLDATAN input values. CLDATAN.1… Parameter(s) 1 to n are the actual input values. CLDATAN.LEFT.MINOR.0 LEFT.minor.0 is the count of values left of minor. CLDATAN.LEFT.MINOR.1… LEFT.minor.1 to n are the actual values left of minor. CLDATAN.RIGHT.MINOR.0 RIGHT.minor.0 is the count of values right of minor. CLDATAN.RIGHT.MINOR.1 RIGHT.minor.1 to n are the actual value right of minor. CLDATAN.[#]

CLDATAN.LEFT.MINOR.[#] Values 1…n can be written using the array format. CLDATAN.RIGHT.MINOR.[#] CLDATAM.0 Parameter 0 is the count of CLDATAM input values. CLDATAM.1… Parameter(s) 1 to n are the actual input minor words. CLDATAM.LEFT.MINOR.0 LEFT.minor.0 is the count of minor words left of minor. CLDATAM.LEFT.MINOR.1… LEFT.minor.1 to n are the actual minor words left of minor. CLDATAM.RIGHT.MINOR.0 RIGHT.minor.0 is the count of minor words right of minor. CLDATAM.RIGHT.MINOR.1. RIGHT.minor.1 to n are the actual minor words right of

minor. CLDATAM.[#]

CLDATAM.LEFT.MINOR.[#] Minor words 1…n can be written using the array format. CLDATAM.RIGHT.MINOR.[#]

You can also use the CLDATA.# format to extract/output a parameter within the CLDATA statement. For example:

CYCLE/DEEP,FEDTO,-125,INCR,12.5,MMPM,2000,RAPTO,10

where CLDATA.0 is the count total number of values and parameters. In this case, there are 5 parameters and 4 values:

CLDATA.1 = DEEP CLDATA.2 = FEDTO CLDATA.3 = -.125 CLDATA.4 = INCR

Page 254: IMSPost Guide

Macro Language Variables: CLREAD Variables

246 IMSpost Guide

CLDATA.5 = 12.5 CLDATA.6 = MMPM CLDATA.7 = 2000 CLDATA.8 = RAPTO CLDATA.9 = 10

An example is: LOADTL/1.0, LENGTH, 5.0, OSETNO, 3.0

When the LOADTL macro is initiated by the above statement, the CLDATA variables would be:

CLDATA.0 = 5 3 values + 2 minor words. CLDATAN.0 = 3 CLDATAN.1 = 1.0 CLDATAN.2 = 5.0 CLDATAN.3 = 3.0 CLDATAM.0 = 2 CLDATAM.1 = "LENGTH" CLDATAM.2 = "OSETNO" CLDATAN.RIGHT.LENGTH.0 = 1 One value between LENGTH and OSETNO. CLDATAN.RIGHT.LENGTH.1 = 5.0 CLDATAN.RIGHT.OSETNO.0 = 1 One value after OSETNO. CLDATAN.RIGHT.OSETNO.1 = 3.0

CLREAD Variables The variables of the format CLREADM and CLREADN are the way an IMSpost macro receives the input parameters from a “read ahead” of the input stream (from either an input file or IMSpost test command). Reading ahead is done using the IMS macro CLREAD statement. If the CLREAD macro statement successfully finds the statement it is searching for, the CLREADM and CLREADN variables will have the input parameters of that statement.

CLREADM variables are used to store input parameter “minor words.” CLREADN variables are used to store input values. The different formats of these variables are as follows:

Variable Description CLREADN.0 Parameter 0 is the count of CLREADN input values. CLREADN.1… Parameter(s) 1 to n are the actual input values. CLREADN.LEFT.MINOR.0 LEFT.minor.0 is the count of values left of minor. CLREADN.LEFT.MINOR.1… LEFT.minor.1 to n are the actual values left of minor. CLREADN.RIGHT.MINOR.0 RIGHT.minor.0 is the count of values right of minor. CLREADN.RIGHT.MINOR.1… RIGHT.minor.1 to n are the actual values right of minor. CLREADN.[#]

CLREADN.LEFT.MINOR.[#] Values 1…n can be written using the array format. CLREADN.RIGHT.MINOR.[#] CLREADM.0 Parameter 0 is the count of CLREADM input values. CLREADM.1… Parameter(s) 1 to n are the actual input minor words. CLREADM.LEFT.MINOR.0 LEFT.minor.0 is the count of minor words left of minor. CLREADM.LEFT.MINOR.1… LEFT.minor.1 to n are the actual minor words left of minor. CLREADM.RIGHT.MINOR.0 RIGHT.minor.0 is the count of minor words right of minor.

Page 255: IMSPost Guide

Macro Language Variables: Component Model Example

IMSpost Guide 247

Variable Description CLREADM.RIGHT.MINOR.1… RIGHT.minor.1 to n are the actual minor words right of

minor. CLREADM.[#]

CLREADM.LEFT.MINOR.[#] Minor words 1...n can be written using the array format. CLREADM.RIGHT.MINOR.[#]

Component Model Example The machine models within IMSpost are created with simple graphic shapes (components). For the library models, all these components are connected together to construct a predefined machine.

The only two components that are absolutely necessary are :

• Part, which instructs IMSpost as to what is being cut. • Tool, which indicates how the part is being cut.

Names correspond to the names in the Machine Components dialog (select Machine > Components). This dialog enables you to enter positions to see if your machine is positioning correctly.

Field Description

Name Component ID (from the component tree). Type Table, Head, Part, Tool, Static, and Fixture. Mount How the component is attached to another. Motion Does component drive a machine axis? If so, enter axis. Shape Components shape. This can be a cube cone or cylinder. Direction Direction in which the cylinder or cone is pointed.

Page 256: IMSPost Guide

Macro Language Variables: COMPONENT Variables

248 IMSpost Guide

COMPONENT Variables COMPONENT variables tell IMSpost “what” is being cut (PART) and “how” it is being cut (TOOL). Typically there is no reason to change these variables. It does, however, give you the ability to reorient the part, cut multiple parts, or change the tool axis direction (cutting with a right-angle attachment). This information is specified within the CUT macro statement.

Variable Description COMPONENT.UNIT Specifies the units type for the entire model ("INCH" or

"MM"). For example: COMPONENT.UNIT = "MM"

COMPONENT.PRIORITY Specifies the priority of the machine co-linear axes. For example: COMPONENT.PRIORITY = "Z,W"

COMPONENT.name.UNIT Specifies the units (name) type ("INCH" or "MM"). For example: COMPONENT.HEAD.UNIT = "MM"

COMPONENT.name.TYPE Specifies the components type. The choices are "TABLE", "HEAD", "PART", "TOOL", "STATIC", and "FIXTURE" For example: COMPONENT.TOOL.TYPE = "TOOL"

COMPONENT.name.MOUNT Specifies what component it is attached to. For example: COMPONENT.TOOL.MOUNT = "HEAD"

COMPONENT.name.MOTION Specifies what machine register is affected. For example: COMPONENT.TOOL.MOTION = "Z"

COMPONENT.name.SHAPE Specifies the component shape as "CUBE", "CYLINDER", or "CONE". For example: COMPONENT.PART.SHAPE = "CUBE"

The following variables apply only for cube shapes.

Variable Description COMPONENT.name.SIZE.LENGTH Specifies the length of the cube component. For

example: COMPONENT.TABLE.LENGTH = 300

COMPONENT.name.SIZE.WIDTH Specifies the width of the cube component. For example: COMPONENT.TABLE.WIDTH = 150

COMPONENT.name.SIZE.HEIGHT Specifies the height of the cube component. For example: COMPONENT.TABLE.HEIGHT = 35

Page 257: IMSPost Guide

Macro Language Variables: COMPONENT Variables

IMSpost Guide 249

The following variables specify direction of a vector.

Variable Description COMPONENT.name.DIRECTION.HORIZONTAL COMPONENT.name.DIRECTION.INTO COMPONENT.name.DIRECTION.VERTICAL

Specifies the tool direction along the (+) vertical axis. For example: COMPONENT.TOOL.DIRECTION.HORIZONTAL = 0.0 COMPONENT.TOOL.DIRECTION.INTO = 0.0 COMPONENT.TOOL.DIRECTION.VERTICAL = 1.0

COMPONENT.name.MOVE.HORIZONTAL Specifies the position to move along horizontal axis. For example: COMPONENT.TABLE.MOVE.HORIZONTAL = 100.0

COMPONENT.name.MOVE.INTO Specifies the position to move along the “into” axis. For example: COMPONENT.TABLE.MOVE.INTO = 50.0

COMPONENT.name.MOVE.VERTICAL Specifies the position to move along the vertical axis. For example: COMPONENT.HEAD.VERTICAL = 120.0

COMPONENT.MOTION.name Specifies the motion type, which can be "LINEAR" or "ROTARY". For example: COMPONENT.MOTION.B_HEAD = "ROTARY" COMPONENT.MOTION.TABLE = "LINEAR"

The following variables specify direction vector of the component motion.

Variable Description COMPONENT.MOTION.name.HORIZONTAL Specifies the horizontal direction vector. For example:

COMPONENT.MOTION.Z.HORIZONTAL = 0.0

COMPONENT.MOTION.name.INTO Specifies the “into” direction vector. For example: COMPONENT.MOTION.Z.INTO = 0.0

COMPONENT.MOTION.name.VERTICAL Specifies the vertical direction vector. For example: COMPONENT.MOTION.Z.VERTICAL = 1.0

Additional variables are:

Variable Description COMPONENT.MOTION.name.VALUE Move components to an absolute machine position.

For example: COMPONENT.MOTION.Z.VALUE = 2500

COMPONENT.MOTION.name.MINIMUM Specifies the minimum machine limit. For example: COMPONENT.MOTION.Z.MINIMUM = -20.

COMPONENT.MOTION.name.MAXIMUM Specifies the maximum machine limit. For example: COMPONENT.MOTION.Z.MAXIMUM = 4500.

COMPONENT.MOTION.name.LIMITMIN Controls minimum machine limit check (0 = Off, 1 = On). For example: COMPONENT.MOTION.Z.NAME = 1

Page 258: IMSPost Guide

Macro Language Variables: COOLANT Variables

250 IMSpost Guide

Variable Description COMPONENT.MOTION.name.LIMITMAX Controls the maximum machine limit check (0 = Off,

1 = On). For example: COMPONENT.MOTION.Z.NAME = 1

COMPONENT.MOTION.name.FEEDRATE Enters the maximum feedrate for the specified axis. For example: COMPONENT.MOTION.Z.FEEDRATE = 2000

COMPONENT.MOTION.name.INCREMENT Specifies the increment used with the co-linear axis only. For example: COMPONENT.MOTION.Z.INCREMENT = 20.0

COMPONENT.name.REFERENCE Specifies the origin from which the component originates. For example: COMPONENT.HEAD.REFERENCE = "HEAD.ORIGIN"

COMPONENT.name.REFERENCE.direction Enters the offset distance along the specified direction. For example: COMPONENT.Y.REFERENCE.VERTICAL = 7.05 COMPONENT.Z.REFERENCE.INTO = 11.8578 COMPONENT.TABLE.REFERENCE.HORIZONTAL = 0

The following variable specifies the components reference direction vector:

Variable Description COMPONENT.name.REFERENCE.DIRECTION.direction

For example: COMPONENT.PART.REFERENCE.DIRECTION.HORIZONTAL = "1.0.0.0.0.0" COMPONENT.PART.REFERENCE.DIRECTION.VERTICAL = "0.0.0.0.1.0"

COOLANT Variables The macro variables used by this dialog, with default settings and description, are as follows:

Variable Description GLOBAL.COOLANT_BLOCK = 0 Outputs coolant on a block itself.

= 1 Outputs with the next motion block. GLOBAL.COOLANT_DEF = 'MIST' Default coolant condition. MODE.COOLNT.MIST : M7 MODE/GROUP and FUNCTION attached to the

MIST coolant. MODE.COOLNT.FLOOD : M8 MODE/GROUP and FUNCTION attached to the

FLOOD coolant. MODE.COOLNT.OFF : M9 MODE/GROUP and FUNCTION attached to the

coolant is off. An example input, output result is:

COOLNT/MIST M7 MODE.COOLNT="MIST"

COOLNT/FLOOD M8 MODE.COOLNT="FLOOD"

COOLNT/OFF M9 MODE.COOLANT="OFF"

Page 259: IMSPost Guide

Macro Language Variables: CUTCOM (Cutter Compensation) Variables

IMSpost Guide 251

CUTCOM (Cutter Compensation) Variables The macro variables used by this dialog, with default settings and description, are as follows:

Variable Description GLOBAL.CUTCOM_BLOCK = 1 Outputs CUTCOM in a block itself or the next motion

block. GLOBAL.CUTCOM_REG = "D" Offsets the register used with cutter diameter

compensation. MODE.CUTCOM.LEFT : G41 MODE/GROUP and FUNCTION attached to the left-

side compensation. MODE.CUTCOM.RIGHT : G42 MODE/GROUP and FUNCTION attached to the

right-side compensation. MODE.CUTCOM.OFF : G40 MODE/GROUP and FUNCTION attached to the

cutter compensation cancel.

CYCLE Variables The macro variables used by this dialog, with default settings and description, are as follows:

Variable Description GLOBAL.CYCLE_USER1 = "" User defined cycle type name. GLOBAL.CYCLE_USER2 = "" User defined cycle type name. GLOBAL.CYCLE_USER3 = "" User defined cycle type name. GLOBAL.CYCLE_USER4 = "" User defined cycle type name. GLOBAL.CYCLE_OTHER = "" Additional code to be output on cycle block. GLOBAL.CYCLE_CFORM = 0 Clearance plane format:

0: Absolute position 1: Incremental position from cycle plane 2: Absolute or incremental (based on current mode of the postprocessor) 3: Incremental value, with reversed sign

GLOBAL.CYCLE_DFORM = 0 Depth format: 0: Absolute position 1: Incremental position from cycle plane 2: Absolute or incremental (based on current mode of the postprocessor) 3: Incremental value, with reversed sign

GLOBAL.CYCLE_BLOCK = 0 0: Cycle off in block itself 1: Cycle off on next motion block

GLOBAL.CYCLE_REG4 = "P" Register used for cycle dwell value. GLOBAL.CYCLE_REG3 = "R" Register used for clearance plane value. GLOBAL.CYCLE_REG2 = "Q" Register used for peck increments; used in DEEP and

BRKCHP cycles. GLOBAL.CYCLE_REG1 = "Z" Register used for cycle depth value. MODE.CYCLE.OFF="G80" MODE/GROUP + FUNCTION attached to cycle off.

Page 260: IMSPost Guide

Macro Language Variables: FEED (Feedrate Definition) Variables

252 IMSpost Guide

Variable Description MODE.CYCLE.DRILL="G81" MODE/GROUP+ FUNCTION attached to cycle drill. MODE.CYCLE.FACE="G82" MODE/GROUP+ FUNCTION attached to cycle drill

with dwell (spot drill). MODE.CYCLE.DEEP="G83" MODE/GROUP+ FUNCTION attached to deep

drilling cycle. MODE.CYCLE.TAP="G84" MODE/GROUP+ FUNCTION attached to tapping

cycle. MODE.CYCLE.REAM="G85" MODE/GROUP+ FUNCTION attached to reaming

cycle. MODE.CYCLE.BORE="G86" MODE/GROUP+ FUNCTION attached to boring

cycle. MODE.CYCLE.BAKBOR="G87 MODE/GROUP+ FUNCTION attached to back

boring cycle. MODE.CYCLE.MANBOR="G88" MODE/GROUP+ FUNCTION attached to manual

boring cycle. MODE.CYCLE.STPBOR="G89" MODE/GROUP+ FUNCTION attached to bore stop

cycle. MODE.CYCLE.BRKCHP="G73" MODE/GROUP+ FUNCTION attached to

breakchipping cycle. MODE.CYCLE.LHTAP="G74" MODE/GROUP+ FUNCTION attached to left-hand

(reverse) tapping cycle. MODE.CYCLE.USER MODE/GROUP+ FUNCTION attached to user

defined cycle. An example input, output result is:

CYCLE/DRILL, 0.5, IPM, 72, 0.4, 0.4 MODE.MOTION=CYCLE

GOTO/1,2,3 G81 X1. Y2. Z2.5 R3.4 F72.

MODE.CYCLE="DRILL"

GOTO/4,5,3 X4. Y5.

CYCLE/OFF G80 MODE.CYCLE=OFF

FEED (Feedrate Definition) Variables The macro variables used by this dialog, with default settings and description, are as follows:

Variable Description GLOBAL.FEED_BLOCK = 1 0 = output codes on a block itself

1 = next motion block GLOBAL.FEED_REG = "F" Register used for feed rate value. GLOBAL.FEED_MM_MIN = 5.3 Digit format for MM/MINUTE format. GLOBAL.FEED_INCH_MIN = 4.4 Digit format for INCH/MINUTE format. GLOBAL.FEED_MM_REV = 3.3 Digit format for MM/REVOLUTION format. GLOBAL.FEED_INCH_REV = 2.4 Digit format for INCH/REVOLUTION format.

Page 261: IMSPost Guide

Macro Language Variables: FUNCTION Variables

IMSpost Guide 253

Variable Description GLOBAL.FEED_INV_TIME = 4.2 Digit format for inverse time feed programming. GLOBAL.FEED_PROG = 100.000000 Default feed rate value. MODE.FEED.MINUTE (G94) MODE/GROUP+ FUNCTION attached to per

minute feed mode. MODE.FEED.REVOLUTION (G95) MODE/GROUP+FUNCTION attached to per

revolution feed mode. MODE.FEED.INVERSE (G93) MODE/GROUP attached to inverse time feed mode.

An example input, output result is:

UNIT/MM G71

FEDRAT/220.245 REGISTER. F.VALUE = 220.245

GOTO/100,0,0 G1 X100. F220.2

UNIT/INCHES G70

FEDRAT/23.245 REGISTER.F.VALUE = 23.245

GOTO/4,5,6 X4. Y5. Z6. F23.25

FUNCTION Variables Functions (M and G codes) are the codes that activate machining modes or specify controller options.

Each function that is supported within the postprocessor has the following variables associated with them. IMSpost will always use what is defined in the Function Table. These Function Variables give you a way to override these settings.

Variable Description FUNCTION.name.NAME Name of the G/M code. For example:

FUNCTION.M3.NAME = "M13"

This variable is useful for changing the name of a function FUNCTION.name.MODAL For code modality enter "Y" for modal; enter "N" for non-

modal. For example: FUNCTION.M3.MODAL = "Y"

FUNCTION.name.MODE MODE variable that could be associated with the code. FUNCTION.name.USE Enter controller letter addresses that will always be output with

this function code. For example: FUNCTION.G1.USE = "X,Y,Z,B,F"

FUNCTION.name.USE1 Enter controller letter addresses that will be output (one-shot) with this function code. For example: FUNCTION.G1.USE1 = "X,Y,Z,B,F"

FUNCTION.name.ALONE Enter 1 if code is output by itself. If code is output with other codes, enter 0.

FUNCTION.name.END Enter 1 if the controller acts on code immediately. FUNCTION.name.BLOCK Enter 1 if code is output by itself, or enter 0 if output with other

code.

Page 262: IMSPost Guide

Macro Language Variables: Geometry Functions

254 IMSpost Guide

NOTE: The END and BLOCK definitions control their respective checkboxes in the Function Definition Table. These two variables are normally in effect if the maximum number for G or M codes per block is exceeded. If it is, these checkboxes could determine which codes are output first when the G/M code buffer is full.

Function codes that are entered via the postprocessor dialogs, are automatically associated with IMS library Mode/Group (see Controller > Function Codes or Controller > Function Groups).

Function codes may also be changed. Note that once they are changed, they remain in effect until changed back to its original or default definition.

FUNCTION.M3.NAME = "M13"

Geometry Functions IMSpost utilizes some of these functions to shorten the length of existing macros that include various calculations. Some of these library macros include CATMAT/*, PNT2VEC/*, ORIGIN/*, and UCS/*.

VECPROD VECPROD generates the vectors product.

VECPROD(I1,J1,K1,I2,J2,K2) V1 = VECPROD(1,1,0,0,0,1) V1 = VECTOR(0.707107,-.207107,0 VECPROD(VECTOR,VECTOR) V1 = VECTOR(1,1,0 V2 = VECTOR(0,0,1) V5 = VECPROD(V1,V2) V5 = VECPROD(1,1,0,0,0,1) V5 = VECTOR(0.707107,-.207107,0)

MATIDNT MATIDNT returns the identity matrix.

M1 = MATIDNT() M1 = MATRIX(1,0,0,0,0,0,1,0,0,0,0,0,1,0)

VECLEN VECLEN returns the vectors length.

L = VECLEN(1,1,1 L = 1.732051 VECLEN (VECTOR) L1 = VECLEN(V2) Return length of predefined vector. VECLEN (I,J,K) L2 = VECLEN(1,1,0) VECLEN (POINT) VECLEN(P3) VECLEN (X1,Y1,Z1,X2,Y2,Z2) L = VECLEN(1,1,1) L = 1.732051

In case of vector input of 6 variables (or a LINE type or a 2 POINT type), the result will be the length of subtraction.

VECLEN (POINT,POINT) L4 = VECLEN(P6,P8) VECLEN (LINE) L5 = VECLEN(L12)

Page 263: IMSPost Guide

Macro Language Variables: Geometry Functions

IMSpost Guide 255

VECANG VECANG returns the angle between two specified vectors.

ANG = VECANG(0,0,1,1,0,1) ANG = 45 ANG = VECANG(VECTOR,VECTOR) Returns angle of 2 predefined vectors. ANG = VECANG(V10,V12 VECANG (POINT,POINT) Returns angle of 2 predefined points. ANG = VECANG(P12,P13)

MATROT MATROT defines the matrix according to two specified vectors and an angle. Available syntax is:

MATROT(VECTOR,VECTOR,ANGLE) MATROT(POINT,POINT,ANGLE) MATROT(I1,J1,K1,I2,J2,K2,ANGLE) MATROT(LINE,ANGLE)

For example: V1 = VECTOR(1,0,0) V2 = VECTOR(0,1,0) ANG = 90 M1 = MATROT(V1,V2,ANG) M1 = MATRIX(-0.448074,0,0.893997,1,0, 1,0,0,-0.893997,0,-0.448074,0)

PNTONPLN PNTONPLN checks to see if a given point exists on the specified plane. Available syntax is:

PNTONPLN(POINT,PLANE) PNTONPLN(X,Y,Z,A,B,C,D)

For example:

B = PNTONPLV(2,4,0,0,0,1,0) B = 1 VECPERVEC Returns the vector that is perpendicular to the specified vector.

Available syntax is: VECPERVEC(VECTOR) VECPERVEC(I,J,K)

For example:

V1 = VECPERVEC(1,0,0) V1 = VECTOR(0,1,0)

PNT_LINE_CIR_INTRSC PNT_LINE_CIR_INTRSC returns the intersection points where the line intersects a circle. Available syntax is:

PNT_LINE_CIR_INTRSC(LINE,CIRCLE) PNT_LINE_CIR_INTRSC(POINT,POINT,CIRCLE) PNT_LINE_CIR_INTRSC(X1,Y1,Z1,X2,Y2,Z2,XC,YC,ZC,I,J,K,R)

For example: L1 = LINE(-7,4,0,9,4,0) C1 = CIRCLE(0,0,0,0,0,1,5) PSC = PNT_LINE_CIR_INTRSC(L1,C1) PSC = LINE(3,4,0,-3,4,0)

Page 264: IMSPost Guide

Macro Language Variables: Geometry Functions

256 IMSpost Guide

PNT_LINE_INTRSC PNT_LINE_INTRSC reads the coordinates from each of the two specified lines and returns the coordinates of the lines intersection point. Available syntax is:

PNT_LINE_INTRSC(LINE,LINE) PNT_LINE_INTRSC(POINT,POINT,POINT,POINT) PNT_LINE_INTRSC(X11,Y11,Z11,X12,Y12,Z12,X21,Y21,Z21,X22,Y22,Z22)

For example: L1 = LINE(-3,5,0,9,5,0) L2 = LINE(2,4,0,2,7,0) P = POINT_LINE_INTRSC(L1,L2) P = POINT(2,5,0)

LINE_DIST_PARREL LINE_DIST_PARREL returns points of a line parallel to a given line at a given distance from it. Available syntax is:

LINE_DIST_PARREL(LINE,DISTANCE) LINE_DIST_PARREL(POINT,POINT,DISTANCE) LINE_DIST_PARREL(X1,Y1,Z1,X2,Y2,Z2) LINE_DIST_PARREL(LINE,DISTANCE) LINE_DIST_PARREL(POINT,POINT,DISTANCE) LINE_DIST_PARREL(X1,Y1,Z1,X2,Y2,Z2)

For example:

L1 = LINE_DIST_PARREL(5,0,3,10,3,2) L1 = LINE(5,-2,3,10,-2,3)

LINE_PARREL This function gives the second point, which together with the specified point, defines a line parallel to the given line. Available syntax is:

LINE_PARREL(LINE,POINT) LINE_PARREL(POINT,POINT,POINT) LINE_PARREL(X1,Y1,Z1,X2,Y2,Z2,X,Y,Z)

For example:

L1 = LINE_PARRLEL(5,0,3,10,0,3,7,4,3) L1 = LINE(4,3,0,4,5,0)

LINE_ANGLE_LINE LINE_ANGLE_LINE returns definition of a line passing through a point at an angle with a given line. Available syntax is:

LINE_ANGLE_LINE (LINE,POINT,ANGLE) LINE_ANGLE_LINE (POINT,POINT,POINT,ANGLE) LINE_ANGLE_LINE (X1,Y1,Z1,X2,Y2,Z2,X,Y,Z,ANGLE)

For example:

L1 = LINE)ANGLE_LINE(-3,4,0,3,4,0,4,3,0,90) L1 = LINE(4,3,0,4,5,0)

Page 265: IMSPost Guide

Macro Language Variables: Geometry Functions

IMSpost Guide 257

MATPNTVEC MATPNTVEC returns matrix from a given point and two vectors. Available syntax is:

MATPNTVEC(POINT,VECTOR,VECTOR) MATPNTVEC(X,Y,Z,I1,J1,K1,I2,J2,K2)

For example: M1 = MATPNTVEC(1,2,3,1,0,0,0,1,0) M1 = MATRIX(1,0,0,1,0,1,0,2,0,0,1,3)

ISIDENT ISIDENT is an “identity-type” matrix (1 = true, 0 = false). Available syntax is:

ISIDENT(MATRIX) ISIDENT(VECTOR,X,VECTOR,Y,VECTOR,Z) ISIDENT(A[1],A[2],A[3],A[4], B[1],B[2],B[3],B[4],C[1],C[2],C[3],C[4]) LINE_PNT_TAN_CIR(POINT,CIRCLE) LINE_PNT_TAN_CIR(X,Y,Z,XC,YC,ZC,I,J,K,R) M1 = MATRIX(1,0,0,0,0,1,0,0,0,0,1,0 A = ISEDENT(M1) --> A = 1

BACKMAT BACKMAT returns the reverse for the specified matrix. Available syntax is:

BACKMAT(MATRIX) BACKMAT(A[1],A[2],A[3],A[4], B[1],B[2],B[3],B[4], C[1],C[2],C[3],C[4]) BACKMAT(A[1],A[2],A[3], B[1],B[2],B[3], C[1],C[2],C[3]) BACKMAT(VECTOR, VECTOR, VECTOR) BACKMAT(VECTOR, A[4],VECTOR, B[4],VECTOR,C[4]) BACKMAT(POINT, A[4],POINT, B[4],POINT,C[4])

For example: M1 = MATRIX(0,0,1,0,1,0,-1,0,0) M2 = BACKMAT(M1) M2 = MATRIX(0,0,-1,0,0,-1,0,0,1,0,0,0)

Page 266: IMSPost Guide

Macro Language Variables: Geometry Operations

258 IMSpost Guide

Geometry Operations You can combining math operations (+,-,*,/) with predefined geometry definitions.

Combination Description POINT + POINT Adding two predefined points.

P1 = POINT(100,100,20) P2 = POINT(10,20,15) and if: P3 = P1 + P2 then: P3 = POINT(110,120,35)

POINT - POINT Subtracting two predefined points. P1 = POINT(100,100,20) P2 = POINT(10,20,15) and if: P3 = P1 - P2 then: P3 = POINT(90,80,5)

POINT + VECTOR Adding a predefined point to a predefined vector. P1 = POINT(100,100,20) V1 = VECTOR(0,0,1) P2 = P1 + V1 then: P2 = POINT(100,100,21)

POINT * REAL Multiplying a predefined point with a real number. P1 = POINT(100,100,20) P2 = P1*2.0 then: P2 = POINT(200,200,40)

POINT / REAL Dividing a predefined point with a real number. P1 = POINT(100,100,20) P2 = P1/2.0 then: P2 = POINT(50,50,10)

LINE * REAL Multiplying a predefined line by a real number. L1 = LINE(10,12,10,200,150,10) L2 = L1*2.0 then: L2 = LINE(20,24,20,400,300,20)

LINE / REAL Dividing a predefined line by a real number. L1 = LINE(10,12,10,200,150,10) L2 = L1/2.0 then: L2 = LINE(5,6,5,100,75,10)

VECTOR - VECTOR Subtracting two predefined vectors. V1 = VECTOR(1,2,3) V2 = VECTOR(1,0,0) V3 = V1 - V2 then: V3 = VECTOR(0,2,3)

Page 267: IMSPost Guide

Macro Language Variables: Geometry Operations

IMSpost Guide 259

Combination Description VECTOR * VECTOR Multiplying two predefined vectors.

V1 = VECTOR(1,2,3) V2 = VECTOR(1,0,0) V3 = V1 * V2 then: V3 = VECTOR(1,0,0)

VECTOR * REAL Multiplying a predefined vector by a real number. V1 = VECTOR(1,2,3) V3 = V1 * 2.0 then: V3 = VECTOR(2,4,6)

MATRIX * REAL Multiplying a predefined matrix by a real number. M1 = MATRIX(0,0,1,3,1,0,1,5,0,1,0,5) M2 = M1*2.0 then: M2 = MATRIX(0,0,2,6,2,0,2,10,0,2,0,10)

MATRIX * MATRIX Multiplying two predefined matrices. M1 = MATRIX(0,0,1,3,1,0,1,5,0,1,0,5) M2 = MATRIX(0,0,1,0,0,1,0,0,0,0,1,0) M3 = M1 * M2 then: M3 = MATRIX(

MATRIX / MATRIX Dividing two predefined matrices. CIRCLE * MATRIX Multiplying a circle by a predefined matrix.

C1=CIRCLE(5,0,0,0,0,1,5) M1=MATRIX(-1,0,0,1,1,0,0,2,0,0,1,3) C2=C1*M1 then: C2=CIRCLE(1,7,3,0,0,1,5)

Page 268: IMSPost Guide

Macro Language Variables: Geometry Assignments

260 IMSpost Guide

Geometry Assignments IMSpost utilizes some of these functions to shorten the length of existing macros that include various calculations. Some of these library macros include CATMAT/*, PNT2VEC/*, ORIGIN/*, and UCS/*. IMS offers various ways of defining and extracting geometry data:

Assignment Description POINT(X,Y,Z) Specify point.

P1 = POINT(10,20,400) X=10; Y=20; Z=400

POINT(POINT) Predefined point. P2 = POINT(P1) POINT(P2) = POINT(P1)

POINT(VECTOR) Point = vector. V1 = VECTOR(0,0,1) P1 = V1 : P1 = 0,0,1

P# .[X,Y,Z] Access point data. If P1 = (POINT(10,20,400) P1.[X,Y,Z] results as: P1.X = 10; P1.Y = 20; P1.Z=400

VECTOR(POINT) Specify as a predefined point. If: P1 = POINT(1,0,1) and: V1 = VECTOR(P1) IMSpost will normalize the vector to: V1 = 0.707,0,0.707

VECTOR(VECTOR) Predefined vector. If: V1 = VECTOR(0,0,1) and: V2 = VECTOR(V1) then: V2 = V1

VECTOR(I,J,K) If: V1 = VECTOR(1,0,1) IMSpost will normalize the vector to: V1 = 0.707107,0,0.707107

VECTOR(X1,Y1,Z1,X2,Y2,Z2) Take the difference between two points, and normalize the vector. If: V1 = VECTOR(3,0,9,2,5,6) returns: V1 = -.845145,0.169031,0.507093

VECTOR(POINT,POINT) Take the difference between two points and normalize the vector. P1 = POINT(3,0,9) P2 = POINT(2,5,6) V1 = VECTOR(P1,P2) returns: V1 = 0.169031,0.845154,-0.507093

Page 269: IMSPost Guide

Macro Language Variables: Geometry Assignments

IMSpost Guide 261

Assignment Description VECTOR(LINE) Take the difference between two points and normalize

the vector. L1 = LINE(3,0,9,2,5,6) V1 = VECTOR(L1) returns: V1 = 0.169031,0.845154,-0.507093

V#.[X,Y,Z] Access vector coordinates (IMSpost will first normalize the vector before returning values). If: V1 = VECTOR(1,0,1) then: V1.X = 0.707107 V1.Y = 0 V1.Z = 0.707107

LINE(X1,Y1,Z1,X2,Y2,Z2) Specify starting and ending points. L1 = LINE(1,2,3,4,5,6)

LINE(LINE) Predefined LINE. If: L1 = LINE(1,2,3,4,5,6) and: L2 = LINE(L1) then: L2 = L1

LINE(POINT.POINT) Determine LINE definition from 2 predefined points. If: P1=POINT(1,2,3) and: P2=POINT(4,5,6) then: L1 = LINE(P1,P2) L1 = 1,2,3,4,5,6

L#.[X[I]/Y[I]/Z[I] Access starting/ending line coordinates, where [I] can be 1 or 2. L1 = LINE(1,2,3,4,5,6) L1.X[1] = 1 L1.X[2] = 4 L1.Y[1] = 2 L1.Y[2] = 5 L1.Z[1] = 3 L1.Z[2] = 6

CIRCLE(X,Y,Z,I,J,K,R) Specify circle with circle endpoint, circle center, and radius. C1 = CIRCLE(0,0,0,0,0,1,5)

CIRCLE(CIRCLE) Predefined circle. If: C1 = CIRCLE(0,0,0,0,0,1,5) and: C2 = CIRCLE(C1) then: C2 = C1

Page 270: IMSPost Guide

Macro Language Variables: Geometry Assignments

262 IMSpost Guide

Assignment Description CIRCLE(POINT,POINT,R) Determine circle with 2 predefined points.

P1 = POINT(3,4,0) P2 = POINT(5,0,0) C1 = CIRCLE(P1,P2,5) then: C1 = 3,4,0,1,0,0,5

CIRCLE(POINT,VECTOR,R) Determine circle with predefined point, vector, and specify radius. P1 = POINT(3,4,0) V1 = VECTOR(0,0,1) RAD = 5.0 C3 = CIRCLE(P1,V1,RAD)

CIRCLE(POINT,POINT,POINT) Determine circle with three predefined points. If: P1=POINT(3,4,0) P2=POINT(5,0,0) P3 = POINT(0,5,0) and: C1 = CIRCLE(P1,P2,P3) then: C1 = 0,0,0,0,0,-1,5

C#.[X,Y,Z,I,J,K,R] Extract circle data. C1 = CIRCLE(3,4,0,0,0,1,5) C1.X = 3 C1.Y = 4 C1.Z = 0 C1.I = 0 C1.J = 0 C1.K = 1 C1.R = 5

PLANE(I,J,K,CONST) CONST specifies the translation origin point. PL1 = PLANE(0,0,1,3)

PLANE(PLANE) Use predefined plane definition. If: PL1 = PLANE(0,0,1,5) and: PL2 = PLANE(PL1) then: PL2 = PL1

PLANE(VECTOR,CONST) CONST specifies the translation origin point. If: V1 = VECTOR(1,0,0) and: PL1 = PLANE(V1,5) then: PL1 =1,0,0,5)

PLANE(POINT,CONST) Use a predefined point (IMSpost will transform the point data into a vector). CONST specifies the translation origin point. If: P1 = point(3,4,0) and: PL1 = PLANE(P1,5) then: PL1 = 0.6,0.8,0,5

Point data is converted to vector data.

Page 271: IMSPost Guide

Macro Language Variables: Geometry Assignments

IMSpost Guide 263

Assignment Description PLANE(POINT,POINT,POINT) Use three predefined points to calculate a plane. If:

P1 = POINT(3,4,0) P2 = POINT(5,0,0) P3 = POINT(0,5,0) and: PL1 = PLANE(P1,P2,P3) then: PL1 = 0,0,-1,5

PLANE(VECTOR,VECTOR,POINT) Use two predefined vectors and a point. If: V1 = VECTOR(0,1,0) V2 = VECTOR(0,1,1) P1 = POINT(0,5,0) and: PL1 = PLANE(V1,V2,P1) then: PL1 = 1,0,0,0

PL#.[A/B/C/D] Extract plane data, PL1 = PLANE(1,0,0,5) PL1.A = 1 PL1.B = 0 PL1.C = 0 PL1.D = 5

MATRIX(A1,A2,A3,A4,B1,B2, B3,B4,C1,C2,C3,C4

Specify all 12 values. M1 = MATRIXI(0,0,1,3,1,0,1,5,0,1,0,5

MATRIX(A1,A2,A3,B1,B2,B3, C1,C2,C3)

Omit 4th, 8th, and 12th values in the matrix. IMSpost will assume zero. M1 = MATRIX(0,0,1,1,0,1,0,1,0) is converted to M1 = MATRIX(0,0,1,0,1,0,1,0,0,1,0,0)

MATRIX(VECTOR,VECTOR,VECTOR) Use three predefined vectors to construct matrix. IMSpost assumes zero for 4th, 8th and 12th values. If: V1 = VECTOR(1,0,0) V2 = VECTOR(0,1,1) V3 = VECTOR(1,0,0) and: M1 = MATRIX(V1,V2,V3) then: M1 = MATRIX(1,0,0,0,0,1,1,0,1,0,0,0)

MATRIX(VECTOR,CONST,VECTOR, CONST,VECTOR,CONST

CONST specifies the translation origin point. If: V1 = VECTOR,1,0,0) V2 = VECTOR(0,1,1) V3 = VECTOR((1,0,0)

and: M1 = MATRIX(V1,1,V2,2,V3,3) then: M1 = MATRIX(1,0,0,1,0,1,1,2,1,0,0,3)

Page 272: IMSPost Guide

Macro Language Variables: Geometry Assignments

264 IMSpost Guide

Assignment Description MATRIX(POINT,CONST,POINT, CONST,POINT,CONST

CONST specifies the translation origin point. If: P1 = POINT(1,2,3) P2 = POINT(4,5,6) P3 = POINT(7,8,9) and: M1 = MATRIX(P1,1,P2,2,P3,3) then: M1 = MATRIX(1,2,3,1,4,5,6,2,7,8,9,3)

MATRIX(MATRIX) Predefined matrix. If: M1 = MATRIX(1,0,0,1,0,1,1,2,1,0,0,3) and: M2 = MATRIX(M1) then: M2 = MATRIX(1,0,0,1,0,1,1,2,1,0,0,3)

M#.[A[1...4] M#.[B[1...4] M#.[C[1...4]

Accessing matrix values. M1=MATRIX(1,2,3,1,4,5,6,2,7,8,9,3) M1.A[1] = 1 M1.A[2] = 2 M1.A[3] = 3 M1.A[4[ = 1 M1.B[1] = 4 M1.B[2] = 5 M1.B[3] = 6 M1.B[4] = 2 M1.C[1] = 7 M1.C[2] = 8 M1.C[3] = 9 M1.C[4] = 3

BACKMAT Returns the reverse of the specified matrix. Syntax includes: BACKMAT(MATRIX) BACKMAT(A[1],A[2],A[3],A[4],B[1],B[2],B[3], B[4] ,C[1],C[2],C[3],C[4] BACKMAT(A[1],A[2],A[3],B[1],B[2],B[3],,C[1], C[2],C[3] BACKMAT(VECTOR,VECTOR,VECTOR) BACKMAT(VECTOR,A[4],VECTOR,B[4], VECTOR,C[4] BACKMAT(POINT,A[4],POINT,B[4],POINT,C[4]

For example: M1 = MATRIX(0,0,1,0,1,0,-1,0,0) M2 = BACKMAT(M1) returns: M2 = MATRIX(0,0,-1,0,0,-1,0,0,1,0,0,0)

ISIDENT If specified matrix is an “identity” type matrix =1 for YES = 0 for NO M1 = MATRIX(1,0,0,0,0,1,0,0,0,0,1,0) A = ISIDENT(M1) A = 1

LINE_ANGLE_LINE Returns definition of a line passing through a point at an angle with a given line. L1 = LINE_ANGLE_LINE(-3,4,0,3,4,0,4,3,0,90) returns: L1 = LINE(4,3,0,4,5,0)

Page 273: IMSPost Guide

Macro Language Variables: Geometry Assignments

IMSpost Guide 265

Assignment Description LINE_DIST_PARREL Returns the points of a line parallel to a given line at a

given distance. L1 = LINE_DIST_PARREL(5,0,3,10,0,3,2) returns: L1 = LINE(5,-2,3,10,-2,3)

LINE_PARREL Returns a second point which, together with a given point, defines a line parallel to a given line. L1 = LINE_PARRLEL(5,0,3,10,0,3,7,4,3) returns: L1 = LINE(4,3,0,4,5,0)

LINE_PNT_TAN_CIR Returns a line passing through a pt and tangent to a circle. The syntax is: LINE_PNT_TAN_CIR(POINT,CIRCLE) LINE_PNT_TAN_CIR(X,Y,Z,XC,YC,ZC,I,J,K,R)

For example: P1 = POINT(7,5,0) C1 = CIRCLE(0,0,0,0,0,1,5) L1 = LINE_PNT_TAN_CIR(P1,C1) returns: L1 = LINE(5.571429,7,0,7,5,0)

MATIDNT Returns the identity matrix. M1 = MATIDNT() returns: M1 = MATRIX(1,0,0,0,0,10,0,0,0,1,0)

MATPNTVEC Returns matrix from a given point and two vectors. Available syntax includes: M1 = MATPNTVEC(1,2,3,1,0,0,0,1,0) returns: M1 = MATRIX(1,0,0,1,0,1,0,2,0,0,1,3)

MATROT Specifies matrix with two vectors and rotated at a specified angle. Available syntax is: MATROT(VECTOR,VECTOR,ANGLE) MATROT(POINT,POINT,ANGLE) MATROT(I1,J1,K1,I2,J2,K2,ANGLE)

For example: V1 = VECTOR(1,0,0) V2 = VECTOR(0,1,0) ANG = 90 M1 = MATROT(V1,V2,ANG) returns: M1 = MATRIX(-0.448074,0,0.893997,1,0,1,0,0, -.893997,0,-0.448074,0)

Page 274: IMSPost Guide

Macro Language Variables: Geometry Assignments

266 IMSpost Guide

Assignment Description PNTONPLN Checks to see if specified point is on a specified plane.

Syntax is: PNTONPLN(POINT,PLANE) PNTONPLN(X,Y,Z,A,B,C,D)

For example: I = PNTONPLN(2,4,0,0,0,1,0) I = 1 for true condition; I = 0 for false condition

PNT_LINE_INTRSC Returns intersection point of two lines. Syntax is: PNT_LINE_INTRSC(LINE,LINE) PNT_LINE_INTRSC(POINT,POINT,POINT,POINT) PNT_LINE_INTRSC(X11,Y11,Z11,X12,Y12,Z12, X21,Y21,Z21,X22,Y22,Z22)

For example: L1 = LINE(-3,5,0,9,5,0) L2 = LINE(2,4,0,2,7,0) P = PNT_LINE_INTRSC(L1,L2) returns: P = POINT(2,5,0)

PNT_LINE_CIR_INTRSC Returns intersection points of a line passing through a circle. Available syntax includes: PNT_LINE_CIR_INTRSC(LINE,CIRCLE) PNT_LINE_CIR_INTRSC(POINT,POINT,CIRCLE) PNT_LINE_CIR_INTRSC(X1,Y1,Z1,X2,Y2,Z2, XC,YC,ZC,I,J,K,R)

For example: LI = LINE(-7,4,0,9,4,0) C1 = CIRCLE(0,0,0,0,0,1,5) PSC = PNT_LINE_CIR_INTRSC(L1,C1) returns: PSC = LINE(3,4,0,-3,4,0)

VECLEN Returns length of vector. Available syntax includes: VECLEN(VECTOR) VECLEN(I,J,K) VECLEN(POINT) VECLEN(X1,Y1,Z1,X2,Y2,Z2) VECLEN(POINT,POINT) VECLEN(LINE)

For example; L = VECLEN(1,1,1) returns: L = 1.732051

NOTE: If the specified vector consists of 6 variables, a LINE type or a 2 POINT type, the result will be the length of subtraction

VECPERVEC Returns vector that is perpendicular to specified vector. Syntax is: VECPERVEC(VECTOR) VECPERVEC(I,J,K)

For example:

Page 275: IMSPost Guide

Macro Language Variables: MACHINE Variables

IMSpost Guide 267

Assignment Description V1 = VECPERVEC(1,0,0) returns: V1 = VECTOR(0,1,0)

VECPROD Returns vectors product. For example: V1 = VECPROD(1,1,0,0,0,1) returns: V1 = VECTOR(0.707107,-0.707107,0)

VECANG Returns the angle between two specified vectors. Syntax includes: VECANG(VECTOR,VECTOR) VECANG(POINT,POINT) VECANG(I1,J1,K1,I2,J2,K2)

For example: A = VECANG(0,0,1,1,0,1) returns: A = 45

MACHINE Variables Each programmable axis of the machine has a set of variables associated with it. Most of these variables are set within the Machine Motion feature.

Variable Description MACHINE.name.TYPE = "LINEAR" for linear axis

= "ROTARY" for rotary axis. This variable cannot be changed within the macro language. It can only be read.

MACHINE.name.LIMITMIN = 1 Check against minimum limit = 0 Do not check

MACHINE.name.LIMITMAX = 1 Check against maximum limit = 0 Do not check

MACHINE.name.FEEDRATE Maximum allowable federate. For example: MACHINE.Z = 3000

MACHINE.name.INCR Axis output as incremental: =0 for No =1 for Yes

MACHINE.name.HORSPOWER Contains specified horsepower. MACHINE.name.MINIMUM Minimum limit. For example:

MACHINE.Z.MINIMUM = -20.0

MACHINE.name.MAXIMUM Maximum limit. For example: MACHINE.Z.MAXIMUM = 3000.0

MACHINE.name. Current absolute machine position. For example: MACHINE.X = 0.0

MACHINE.name.REPORT =0 Output to error file MACHINE.name.TOOL =0 Do not move axis to home position during tool changes

= 1 Move axis to home position for tool changes

Page 276: IMSPost Guide

Macro Language Variables: MODE Variables

268 IMSpost Guide

Variable Description MACHINE.name.RTCP = 0 Do not use RTCP mode for rotary motion

= 1 Use RTCP mode for rotary motion MACHINE.name.LOCK =0 Enable axis

=1 Lock axis (for all motion) MACHINE.name.LOCKL =0 Enable movement along linear axis

=1 Disable movement along linear axis MACHINE.name.LOCKR =0 Enable movement along rotary axis

=1 Disable movement along rotary axis MACHINE.name.HOME Specify absolute machine home position (used in tool

changes). For example: MACHINE.Z.HOME = 4500

MACHINE.name.SHORT Instructs IMSpost that the controller will determine the shortest direction. For example: MACHINE.C.SHORT = 1

MACHINE.name.STEP Normally used for indexing tables. For example, if the indexer can only move in increments of 2.5: MACHINE.C.STEP = 2.5

MACHINE.name.MINSTEP Specify minimum increments necessary for movement (default = 0).

MACHINE.name.ABSOLUTE Current absolute machine position. For example: MACHINE.X.ABSOLUTE = 0.0

MACHINE.name.DELTA Delta motion for axis. For example: MACHINE.Z.DELTA = 5

MACHINE.name.VALUE Current absolute machine position. For example: MACHINE.X.VALUE = 500.5

MODE Variables MODE (or Group) variables are used by IMSpost to categorize certain functions. For example, the functions M3,M4, and M5 would be assigned to MODE.SPINDLE, and functions like G0, G1, G2, and G3 would be assigned to MODE.MOTION. This idea is very similar to the way these codes work within your controller. M3 would stay in effect until cancelled by an M4 or M5.

IMSpost uses MODE variables to update controller and machining conditions to the post.

A standard IMS library postprocessor comes with a variety of default MODE variables, but you can easily modify these or create your own.

Here is a list of the standard MODE variables. The function that is associated with them is dependent upon which library postprocessor was selected and what is entered in its respective dialog.

MODE.MOTION = "POSITION" (G0) MODE.MOTION = "LINEAR" (G1) MODE.MOTION = "CLW" (G2) MODE.MOTION = "CCLW" (G3) MODE.MOTION = "CYCLE" ; See MODE.CYCLE below

Page 277: IMSPost Guide

Macro Language Variables: MODE Variables

IMSpost Guide 269

MODE.PLANE = "XY" (G17) MODE.PLANE = "ZX" (G18) MODE.PLANE = "YZ" (G19) MODE.ABSINCR = "ABS" (G90) MODE.ABSINCR = "INCR" (G91) MODE.MACHINE = "REWIND" (M30) MODE.MACHINE = "RESET" (G92) MODE.MACHINE = "STOP" (M0) MODE.MACHINE = "OPSTOP" (M1) MODE.MACHINE = "END" (M2) MODE.MACHINE = "DWELL" (G4) MODE.MACHINE = "TOOLCHG" (M6) MODE.UNITS = "INCH" (G20) MODE.UNITS = "MM" (G21) MODE.CUTLENGTH = "ON_PLUS" (G43) ; Activates tool length compensation MODE.CUTLENGTH = "ON_MINUS" (G44) MODE.CUTLENGTH = "OFF" (G49) MODE.SPEED = "CSS" (G96) ; Used to determine spindle mode for turning machines MODE.SPEED = "RPM" (G97) MODE.CRETURN = "INITIAL" (G98) ; Used to specify retraction plane in cycle mode MODE.CRETURN = "RPOINT" (G99) MODE.STROKE_CHECK = "ON" (G22) MODE.STROKE_CHECK = "OFF" (G23) MODE.SYSTEM = "COORD1" (G54) ; Used to specify a preset work coordinate system MODE.SYSTEM = "COORD2" (G55) MODE.SYSTEM = "COORD3" (G56) MODE.SYSTEM = "COORD4" (G57) MODE.SYSTEM = "COORD5" (G58) MODE.SYSTEM = "COORD5" (G59) MODE.MACRO = "CALL_A" (G66) ; Used to call preset macros within controller MODE.MACRO = "CALL_B" MODE.MACRO = "CANCEL" (G67) MODE.POLAR = "ON" (G16) MODE.POLAR = "OFF" (G15) MODE.SCALING = "ON" (G51) MODE.SCALING = "OFF" (G50) MODE.ROTATION = "ON" (G68) MODE.ROTATION = "OFF" (G69) MODE.MOVE = "EXACT_STOP" (G61) MODE.MOVE = "AUTO_CORNER" (G62) MODE.MOVE = "TAPPING" (G63)

Page 278: IMSPost Guide

Macro Language Variables: MODE Variables

270 IMSpost Guide

MODE.MOVE = "CUTTING" (G64) MODE.SKIP = "ON" (G31) MODE.SKIP = "MULTI_1" MODE.SKIP = "MULTI_2" MODE.SKIP = "MULTI_3" MODE.SPINDLE = "ORIENT" (M19) MODE.SPINDLE = "CLW" (M3) MODE.SPINDLE = "CCLW" (M4) MODE.SPINDLE = "OFF" (M5) MODE.COOLNT = "MIST" (M7) MODE.COOLNT = "FLOOD" (M8) MODE.COOLNT = "THRU" (M52) MODE.COOLNT = "AIR" (M47) MODE.COOLNT = "OFF" (M9) MODE.FEED = "MINUTE" (G94) MODE.FEED = "REVOLUTION" (G95) MODE.FEED = "INVERSE" (G93) MODE.CYCLE = "OFF" (G80) MODE.CYCLE = "DRILL" (G81) ; feed in, rapid out MODE.CYCLE = "FACE" (G82) ; feed in, dwell, rapid out MODE.CYCLE = "DEEP" (G83) ; extended drilling cycle MODE.CYCLE = "TAP" (G84) ; feed in reverse spindle, feed out MODE.CYCLE = "BORE" (G85) ; feed in, feed out MODE.CYCLE = "REAM" (G86) ; feed in, dwell, feed out MODE.CYCLE = "BAKBOR" (G87) ; back boring cycle MODE.CYCLE = "MANBOR" (G88) ; manual retraction MODE.CYCLE = "STPBOR" (G89) ;stop spindle rotation at depth of hole MODE.CYCLE = "BRKCHP" (G73) ; extended drilling cycle MODE.CYCLE = "LHTAP" (G74) ; reverse tapping MODE.CYCLE = "FINBOR" (G76) ; offset tool at depth and retract MODE.CYCLE = "USER" ; user defined cycles MODE.CUTCOM = "LEFT" (G41) MODE.CUTCOM = "RIGHT" (G42) MODE.CUTCOM = "OFF" (G40) MODE.CUTCOM = "3D" MODE.MIRROR = "ON" (G51.1) MODE.MIRROR = "OFF" (G50.1)

Page 279: IMSPost Guide

Macro Language Variables: REGISTER Variables

IMSpost Guide 271

REGISTER Variables Each register that is defined in the Register Format Table, contains the following descriptions:

Variable Description REGISTER.name.NAME Name of letter address. For example:

REGISTER.X.NAME="X"

REGISTER.name.VALUE Current value in register. For example: REGISTER.S.VALUE = 2000

REGISTER.name.UNIT MM or INCH REGISTER.name.UNITI Unit (mm or inch) for input. For example:

REGISTER.X.UNITI = "MM"

REGISTER.name.UNITO Unit (mm or inch) for output. For example: REGISTER.X.UNITO = "MM"

REGISTER.name.DIGIT Number format definition. For example: REGISTER.S.DIGIT = 4.0

REGISTER.name.LEFT Number of whole numbers in format. REGISTER.name.RIGHT Number of decimal places in format. REGISTER.name.MINIMUM Minimum allowable value (this is a controller number and

not a machine limitation). See MACHINE Variables. REGISTER.name.MAXIMUM Maximum allowable value (this is a controller number and

not a machine limitation). See MACHINE Variables. REGISTER.name.LEADING How to output leading zeros:

"N" for No, "Y" for Yes, or 1 through 4 to specify a minimum of leading zeros to output.

REGISTER.name.TRAILING Contains data on how to output leading zeros: "N" for No, "Y" for Yes, or 1 through 4 to specify a minimum of trailing zeros to output.

REGISTER.name.DECIMAL Character to be used for decimal point. For example: REGISTER.X.DECIMAL="."

REGISTER.name.FORMULA Unique formula for register. For example: REGISTER.T.FORMULA = "?+100" (T-code = tool number + 100)

REGISTER.name.SIGN Output + sign: "N" for No or "Y" for Yes

REGISTER.name.ZERO How to output value of zero. For example: REGISTER.Z.ZERO="0.0"

REGISTER.name.LIMITMIN Use minimum limits set within controller register (these are not the same as machine limits). See MACHINE Variables. "N" for No or "Y" for Yes

REGISTER.name.LIMITMAX Use maximum limits set within controller register (these are not the same as machine limits). See MACHINE Variables. "N" for No or "Y" for Yes

REGISTER.name.INCREMENT = "N" for output axis as absolute = "Y" for output axis as incremental

Page 280: IMSPost Guide

Macro Language Variables: REGISTER Variables

272 IMSpost Guide

Variable Description REGISTER.name.TABLE Name of table that register is associated with. REGISTER.name.MODAL Is register modal:

"N" for No or "Y" for Yes REGISTER.name.LAST Last or previous value in register. REGISTER.name.CHANGE Did register change?

0 = No or 1 = Yes REGISTER.name.DELTA Delta difference from current and last values. REGISTER.name.ABSOLUTE Absolute value for register. REGISTER.name.INITIAL Initial value of register at start-up. REGISTER.name.BEFORE Specify characters to be output before registers value. REGISTER.name.AFTER Specify characters to be output after registers value. REGISTER.name.DECCHAR Specify character to output for decimal point. For example:

REGISTER.X.DECCHAR = "."

REGISTER.name.INTDEC Output a decimal point with an integer: "F" for register format, "Y" for Yes, or "N" for No

REGISTER.name.SPACE Output space between letter and value: 0 = No or 1 = Yes

REGISTER.name.REPORT Report to log file if value out of limits: 0 = No or 1 = Yes

REGISTER.name.ONCE Force out the current value: 0 = No or 1 = Yes

REGISTER.name.RESOLUTION Set minimum resolution. Enter number of decimal places. REGISTER.name.INAME Contains name change of register when in incremental

mode. For example: REGISTER.X.INAME="/X"

If necessary, register addresses may be changed the following way:

REGISTER.S.NAME = "S3" REGISTER.N.NAME = "O" REGISTER.R.NAME = "R-"

When a register is changed, it will remain in effect until changed back to its original definition.

Page 281: IMSPost Guide

Macro Language Variables: SPINDLE Variables

IMSpost Guide 273

SPINDLE Variables The macro variables used by this dialog, with default settings and description, are as follows:

Variable Description GLOBAL.SPINDLE_BLOCK = 1 0 = Output on a block itself

1 = Output codes with next motion GLOBAL.SPINDLE_REG = "S" Register used for spindle speed value. GLOBAL.SPINDLE_DIR = 'CLW' Current spindle direction. GLOBAL.SPINDLE_RPM = 100.000 Default spindle speed at startup. GLOBAL.SPINDLE_DEF = 'CLW' Default spindle direction at startup. MODE.SPINDLE.CLW : M3 MODE/GROUP+ FUNCTION attached to spindle

clockwise rotation. MODE.SPINDLE.CCLW : M4 MODE/GROUP+ FUNCTION attached to spindle

anti-clockwise rotation. MODE.SPINDLE.OFF : M5 MODE/GROUP+ FUNCTION attached to spindle is

off. An example input, output result is:

SPINDL/1200,CLW REGISTER.S.VALUE=1200

MODE.SPINDLE="CLW"

GOTO/1,2,3 G1 X1. Y2. Z3. S1200 M3

SYSTEM Variables SYSTEM variables are:

Variable Description SYSTEM.ACCURACY Number of digits of accuracy for internal calculations. SYSTEM.ADD_APT_TO_ISO Character(s) to add to beginning of APT statement when

outputting APT statements to output file. Works with: SYSTEM.OUT_APT_TO_ISO = 1

SYSTEM.ADD_APT_TO_ISO_END Character(s) to add to the end of APT statement when outputting APT statements to output file. Works with: SYSTEM.OUT_APT_TO_ISO = 1

SYSTEM.ADD_LENGTH Machine axis that tool length is added to (Z). SYSTEM.ADD_LENGTHX Machine axis that tool length is added to (X). SYSTEM.ADD_LENGTHY Machine axis that tool length is added to (Y). SYSTEM.APTCARD APT card in IBM360/370 CLFILE. SYSTEM.APT_LINE The current APT line command read from the file or from

the test dialog. SYSTEM.APT_RLINE In case of using CLREAD, this variable holds the last

statement read by the CLREAD command. SYSTEM.ARCFIT_EXACT ARC-FIT ends point must be on arc. SYSTEM.ARCFIT_MAXRAD ARC-FIT maximum radius.

Page 282: IMSPost Guide

Macro Language Variables: SYSTEM Variables

274 IMSpost Guide

Variable Description SYSTEM.ARCFIT_MINANG ARC-FIT minimum angle. SYSTEM.ARCFIT_MINRAD ARC-FIT minimum radius. SYSTEM.ARCFIT_POINTS ARC-FIT minimum number of points (must be greater

than 3). SYSTEM.ARCFIT_TOLRAD ARC-FIT maximum tolerance allowed from arc radius. SYSTEM.ARCFIT_TOLPLN ARC-FIT maximum tolerance allowed of each point from

arc plane. SYSTEM.AUTO_RETRACT 0 = Disable AUTO_RETRACT

1 = Enable AUTO_RETRACT SYSTEM_AUTO_RETRACT_ANGLE When using the AUTO_RETRACT feature (see Machine

Multi-Axis), this variable holds the maximum deviation allowed from the angle between the last vector specified in the last GOTO/x, y, z, i, j, k and the current GOTO/x, y, z, i, j, k where the i, j, k defined the vectors. This variable can be either real number or a string which represents a percentage. For a real number, it specifies the deviation from the angle between the two vectors. For a string, the value should be preceded by a percentage sign. For example, to specify the maximum deviation in percentage from the given angle: SYSTEM.AUTO_RETRACT_ANGLE = "%12"

SYTEM.AUTO_RETRACT_OUT Delta retraction distance. Refer to the Auto retract option on the Multi-axis dialog. See Machine > Multi-axis > Multi-axis Setup.

SYSTEM.AUTO_RETRACT_SAFE When using the AUTO_RETRACT feature (see Machine Multi-Axis), this variable holds the clearance distance.

SYSTEM.AXIS[n] n = 1 thru 15 for a list of motion axis names. SYSTEM.BEST_SOLUTION =1 Activate (one-shot). This is the best start-up position

for a 5-axis machine SYSTEM.BEST_START_COMMAND APT word to be used for the beginning boundary for the

best-solution look-ahead process. SYSTEM.BEST_START_REPEAT Number of times to locate the start boundary (default =

1). SYSTEM.BEST_END_COMMAND APT word to be used for the ending boundary for the

best-solution look-ahead process. SYSTEM.BEST_END_REPEAT Number of times to locate the end boundary (default = 1). SYSTEM.BLOCK_BEGLINE Holding the variable from the Tape Format Output at the

start of each block. SYSTEM.BLOCK_ADD Holding the variable from the Tape Format Output at the

end of each block. SYSTEM.BREAK_LINE_A Linear break; angle to the next position. SYSTEM.BREAK_LINE_COUNT Number of points in linear break.

Page 283: IMSPost Guide

Macro Language Variables: SYSTEM Variables

IMSpost Guide 275

Variable Description SYSTEM.BREAK_LINE_COND[1] Condition expression for Line 1 in the Linear Equation

Formula. SYSTEM.BREAK_LINE_COND[2] Condition expression for Line 2 in the Linear Equation

Formula. SYSTEM.BREAK_LINE_COND[3] Condition expression for Line 3 in the Linear Equation

Formula. SYSTEM.BREAK_LINE_COND[4] Condition expression for Line 4 in the Linear Equation

Formula. SYSTEM.BREAK_LINE_COND[5] Condition expression for Line 5 in the Linear Equation

Formula. SYSTEM.BREAK_LINE_CUR_F Linear break; feed value. SYSTEM.BREAK_LINE_CUR_S Linear break; spindle rpm value. SYSTEM.BREAK_LINE_EXP[1] Linear break; break expression one. SYSTEM.BREAK_LINE_EXP[2] Linear break; break expression two. SYSTEM.BREAK_LINE_EXP[3] Linear break; break expression three. SYSTEM.BREAK_LINE_FED[4] Linear break; break expression four. SYSTEM.BREAK_LINE_FED[5] Linear break; feed expression five. SYSTEM.BREAK_LINE_L1 Linear break; length of line to the current point. SYSTEM.BREAK_LINE_L2 Linear break; length of line from the current to the next

point. SYSTEM.BREAK_LINE_MUL[1] Linear break; reps for the first break expression. SYSTEM.BREAK_LINE_MUL[2] Linear break; reps for the second break expression. SYSTEM.BREAK_LINE_MUL[3] Linear break; reps for the third break expression. SYSTEM.BREAK_LINE_MUL[4] Linear break; reps for the fourth break expression. SYSTEM.BREAK_LINE_MUL[5 Linear break; reps for the fifth break expression. SYSTEM.BREAK_LINE_SPD[1] Linear break; spindle speed expression one. SYSTEM.BREAK_LINE_SPD[2] Linear break; spindle speed expression two. SYSTEM.BREAK_LINE_SPD[3] Linear break; spindle speed expression three. SYSTEM.BREAK_LINE_SPD[4] Linear break; spindle speed expression four. SYSTEM.BREAK_LINE_SPD[5] Linear break; spindle speed expression five. SYSTEM.BREAK_LINE_X[0] Linear break; X last position. SYSTEM.BREAK_LINE_X[1] Linear break; X current position. SYSTEM.BREAK_LINE_X[2] Linear break; X next position. SYSTEM.BREAK_LINE_Y[0] Linear break; Y last position. SYSTEM.BREAK_LINE_Y[1] Linear break; Y current position. SYSTEM.BREAK_LINE_Y[2] Linear break; Y next position. SYSTEM.BREAK_LINE_Z[0] Linear break; Z last position. SYSTEM.BREAK_LINE_Z[1] Linear break; Z current position. SYSTEM.BREAK_LINE_Z[2] Linear break; Z next position. SYSTEM.BUFFER This flag is set to 1 if there is output pending in the

output buffer.

Page 284: IMSPost Guide

Macro Language Variables: SYSTEM Variables

276 IMSpost Guide

Variable Description SYSTEM.BUFFER_APT Read and store the APT file in the buffer before

execution. 0 = No or 1 = Yes

SYSTEM.CIRCKIND Number representing the type of circular interpolation selected with the Circle feature. =1 Absolute center and endpoint =2 Distance from start to center and endpoint =3 Unsigned distance from start to end and endpoint =4 Radius and endpoint =5 Center, radius, and end angle =6 Circles not allowed (postprocessor simulates circle with linear motion

SYSTEM.CIRCLE_ANGLE Letter address that represents the angle of the endpoint (IMS Controller Emulator only).

SYSTEM.CIRCLE_CENTER_X Enter letter address for circle center along X axis (I). SYSTEM.CIRCLE_CENTER_Y Enter letter address for circle center along Y axis (J). SYSTEM.CIRCLE_CENTER_Z Enter letter address for circle center along Z axis (K). SYSTEM.CIRCLE_MAX_CHORD Holds the variable from the Circle feature. Maximum

chord length limits the linear break of a circle to a line such that one segment (chord) will not exceed this value. If 0.0, ignore this limitation.

SYSTEM.CONTROLLER_RTCP Controls use of RTCP option (if RTCP is not in the CUT statement).

SYSTEM.COORD_RTCP Holds the variable from the Machine Multi-Axis feature. Use the RTCP output checkbox. =0 Rotation tables effect the calculation of the linear moves =1 Does not affect the calculation of the linear moves

SYSTEM.CIRCLE_RADIUS Enter letter address. SYSTEM.CIRCLE_SIGN Output negative sign for circle center (can be NO or

YES). SYSTEM.CIRCLE_TOLER Tolerance for linear approximation. SYSTEM.CIRCLE_ANGLE Holds the name of the register specifying the ANGLE OF

THE END POINT IN arcs command for the IMS Controller Emulator. This is used only for: SYSTEM.CIRCKIND = 5

SYSTEM.CIRCLE_RADIUS Holds the name of the register specifying the RADIUS of arcs command for the IMS Controller Emulator.

SYSTEM.CIRCLE_CENTER_X Holds the name of the register specifying the CENTER usually along the X axis of arcs command for the IMS Controller Emulator.

SYSTEM.CIRCLE_CENTER_Y Holds the name of the register specifying the CENTER usually along the Y axis of arcs command for the IMS Controller Emulator,

Page 285: IMSPost Guide

Macro Language Variables: SYSTEM Variables

IMSpost Guide 277

Variable Description SYSTEM.CIRCLE_CENTER_Z Holds the name of the register specifying the CENTER

usually along the Z axis of arcs command for the IMS Controller Emulator.

SYSTEM_CIRCKIND Specify the circular interpolation method ( for the IMS Controller Emulator only). = 1 Absolute center and end point = 2 Distance from start to center and end point = 3 Unsigned distance from start to end and end point (quadrant boundary) = 4 Radius and end point = 5 Center, radius, and end angle = 6 Circles not allowed (created with linear moves)

SYSTEM.CIRCTYPE Variable containing current circular interpolation output format (1 - 6).

SYSTEM.CLDATA Input file type processing. CAM system represented by integer.

SYSTEM.CLDCARD CLDATA card in IBM360/370 format. SYSTEM.CLFILE Part (APT/CL) name and path name where the part file

resides. SYSTEM.CODE_SPACE Output space between codes: 0 for No or 1 for Yes SYSTEM.COMPATIBLE Check validity of IF statements in posts macros:

= 0 and IF statements are not valid, IMS system will accept statements. =1 and IF statements are not valid, IMS system will ignore IF statements and all statements associated with its true condition.

SYSTEM.CON_DELMEMORY Value in kilobytes required for the start and end strings added for file breakup.

SYSTEM.CON_MEMORY Value in kilobytes of the number of bytes that can be output into a file before a new file is started.

SYSTEM.CON_NOBLOCKS Size of file based on the number of blocks. SYSTEM.CON_TOOLLIFE Size of file based upon the tool life. SYSTEM.CONTROLLER_AUTO_ LINTOL

If not 0, the controller keeps the tool tip on a straight line when the rotary axis moves.

SYSTEM.CONTROLLER_AUTO_ LINTOL_STEP

Step angle used for keeping the tool tip on a straight line with rotary motion.

SYSTEM.CONTROLLER_RTCP Controls use of RTCP option, when RTCP does not exist in the CUT statement.

SYSTEM.COORD_RTCP Controls Rotating Tool Center Point within the postprocessor (must be supported within the controller): = 0 Rotation tables effect the calculation of the linear moves. = 1 Does not affect the calculation of the linear moves.

Page 286: IMSPost Guide

Macro Language Variables: SYSTEM Variables

278 IMSpost Guide

Variable Description SYSTEM.CURVE_TOLER Specify curve tolerance (default = 0). If greater than 0,

system performance could be slower for 5-axis machining based on this value.

SYSTEM.CUTCOM Enter current cutter compensation mode. SYSTEM.CUTCOMLEN CUTCOM length status: "OFF" or "ON" SYSTEM.CUTCOM_LENGTH Enter length value. SYSTEM.CUTCOM_LENGTHX Contains the value used in tool length compensation

along X. SYSTEM.CUTCOM_LENGTHY Contains the value used in tool length compensation

along Y. SYSTEM.CUTCOM_OFFSET Defines the radius of the tool for contact point

calculation. SYSTEM.CUTCOM_X_NAME Name of register representing X-axis coordinate in 3D

cutter compensation. SYSTEM.CUTCOM_Y_NAME Name of register representing Y-axis coordinate in 3D

cutter compensation. SYSTEM.CUTCOM_Z_NAME Name of register representing Z-axis coordinate in 3D

cutter compensation. SYSTEM.CUTTER_DIAM Contact point diameter for the corner radius cutter. SYSTEM.CUTTER_LEN Contact point length for the corner radius cutter. SYSTEM.CUTTER_RAD Contact point radius for the corner radius cutter. SYSTEM.CYLINDER Flag used for checking to determine if a series of linear

points form a circular motion. If 1, then the check is done; if 0 (default), check is not done.

SYSTEM.DATE Current date. SYSTEM.DIGITS Number of digits of accuracy to be used for internal

calculations of XYZ only (default is 4). SYSTEM.DIGITS_IJK Minimum factor to be used when truncating IJK vectors.

For example: SYSTEM.DIGITS_IJK = 4

This instructs IMSpost to truncate IJK vectors to the 4th decimal place (default = 0, no truncation factor).

SYSTEM.DISPLAY_RETURN Return from display dialog (default is 30 seconds). SYSTEM.END_FILE When ISO output is written to multiple output files,

output this string at the end of each new output file. SYSTEM.ERROR Number of errors reported to the log file. SYSTEM.FEED Current feed rate used for machine time calculations. SYSTEM.FEED_LAST Last feedrate used for the acceleration/deceleration

application. SYSTEM.FEEDRATE Current feed mode. SYSTEM.FEEDRATE_NAME Register name for feed value. SYSTEM.FILE_LINES_COUNT Contains number of lines written to the ISO file.

Page 287: IMSPost Guide

Macro Language Variables: SYSTEM Variables

IMSpost Guide 279

Variable Description SYSTEM.FILE_SIZE Holds the current size of the ISO output file (bytes). For

example: SYSTEM.FILE_SIZE/1024 = kbytes

SYSTEM.FORCE4AXES For 4-axis milling machine only: If not 0, IMSpost will force the tool vector (I,J,K) to be on the plane of the rotary axis.

SYSTEM.FORCE_WAY Holds the variable from the Machine Multi-Axis setup solution condition.

SYSTEM.GET_ISO_LINES Defines the number of previous ISO blocks to retrieve from the output buffer.

SYSTEM.GRAPHIC Show moves in the graphic module: 0 for No or 1 for Yes

SYSTEM.GRAPHIC_STEP Longest move step when showing the moves. SYSTEM.GRAPHIC_WAIT Delay time in seconds when showing the moves in the

graphic module. SYSTEM.GOTO_SOLUTION Force GOTO solution to choose the solution number:

0 = no force, 1 = force first, 2 = force second This is used to force a specific SOLUTION for multi-axis motion.

SYSTEM.HELICAL Helical interpolation allowed: 0 for No or 1 for Yes SYSTEM.INV_TIME_FORMULA Contains the formula to be used for inverse/time feed

number calculation. SYSTEM.ISO_APT_COMP = 0 Do not calculate the coordinate for the machine with

regard the cutter compensation. (G41,G42 & D value — IMS Controller Emulator only). = 1 Calculate the coordinate for the machine with regard to cutter compensation (G41,G42 & D value).

SYSTEM.I Last given I value in GOTO and CIRCLE solutions. SYSTEM.IO Input/Output status variable (0 or 1). SYSTEM.J Last given J value in GOTO or CIRCLE solutions. SYSTEM.K Last given K value in GOTO or CIRCLE solutions. SYSTEM.LINEFIT_TOLER Maximum tolerance allowed of each point from the line. SYSTEM.LINTOL_TYPE For continuous multi-axes machine when LINTOL/ON is

used for keeping small deviation from a straight line cut. 0 Create segments of moves by dividing the given APT vector to smaller change in vectors. 1 Create segments of moves by dividing the machine angles (AXIS A, B, C, etc) to smaller change in angles. This method will result with equal change of the angles axis in each segment.

SYSTEM.LINTOL_TOOL_LENGTH Not supported at this time. Reserved for future use. SYSTEM.LINTOL Multi-axis LINTOL condition: 0 = Off or 1 = On SYSTEM.LINTOL_DIRECTION Force GOTO solution to use the same solution as in the

previous LINTOL solution.

Page 288: IMSPost Guide

Macro Language Variables: SYSTEM Variables

280 IMSpost Guide

Variable Description SYSTEM.LINTOL_LINEAR Multi-axis linearization value (linear axes). SYSTEM.LINTOL_ROTARY Multi-axis angular deviation value (rotary axes). SYSTEM.LINTOL_TOOL_LENGTH Tool length for linearization tolerance calculation. SYSTEM.LINTOL_ROTARY Multi-axis angular deviation value (rotary axes). SYSTEM.LIN_ROT_INV_TIME = 1 Activate inverse time feed formula for motion that

contains both linear and rotary motion. SYSTEM.LIN_INV_TIME = 1 Activate inverse time feed formula if motion

contains linear motion only. SYSTEM.LIST Output statement should write to list file:

0 = No or 1 = Yes SYSTEM.LOCAL[n] Local coordinate system offset values (n = 1 – 15). SYSTEM.LISTFILE Name of list output file. SYSTEM.MAT1F[n] System matrix variable ( n = 1 – 15). SYSTEM.MAT2F[n] System matrix variable ( n = 1 – 15). SYSTEM.MATRIX1 Specifies the type of matrix calculation for MATRIX1:

= 0 Matrix1 is off = 1 Multiply XYZIJK (point and vector) by MATRIX1 before calculating the solution = 2 Multiply XYZ (point) by MATRIX1 before calculating the solution = 3 Multiply IJK (vector) by MATRIX1 before calculating the solution = -1 Multiply XYZIJK (point and vector) by the inverse of MATRIX1 before calculating the solution = -2 Multiply XYZ (point) by the inverse of MATRIX1 before calculating the solution = -3 Multiply IJK (vector) by the inverse of MATRIX1 before calculating the solution

SYSTEM.MATRIX2 Specifies type of matrix calculation for MATRIX2: = 0 Matrix2 is off = 1 Multiply XYZIJK (point and vector) by MATRIX2 before calculating the solution = 2 Multiply XYZ (point) by MATRIX2 before calculating the solution = 3 Multiply IJK (vector) by MATRIX2 before calculating the solution = -1 Multiply XYZIJK (point and vector) by the inverse of MATRIX2 before calculating the solution = -2 Multiply XYZ (point) by the inverse of MATRIX2 before calculating the solution = -3 Multiply IJK (vector) by the inverse of MATRIX2 before calculating the solution

SYSTEM.MATRIX1A[n] Specify the MATRIX1 value for row A, column n; where n can be 1 through 4.

SYSTEM.MATRIX1B[n] Specify the MATRIX1 value for row B, column n; where n can be 1 through 4.

Page 289: IMSPost Guide

Macro Language Variables: SYSTEM Variables

IMSpost Guide 281

Variable Description SYSTEM.MATRIX1C[n] Specify MATRIX1 value for row C, column n; where n

can be 1 through 4. SYSTEM.MATRIX2A[n] Specify MATRIX2 value for row A column n; where n

can be 1 through 4. SYSTEM.MATRIX2B[n] Specify MATRIX2 value for row B column n; where n

can be 1 through 4. SYSTEM.MATRIX2C[n] Specify MATRIX2 value for row C column n; where n

can be 1 through 4. SYSTEM.MAXCIRC Enter maximum arc angle per block (90, 360). SYSTEM.MAX_CSS Maximum constant surface speed. SYSTEM.MAXMOVE For IMS Controller Emulator only:

Enables you to split one move into a series of smaller moves.

SYSTEM.MAX_GCODE Maximum number of G-codes in one block (0 for no limit).

SYSTEM.MAX_MCODE Maximum number of M-codes in one block (0 for no limit).

SYSTEM.MIRROR[n] n can be 1 thru15 representing each of the programmable machine axes.

SYSTEM.MOVE For IMS Controller Emulator only: Each time a machine motion is detected, this variable will be set to non-zero.

SYSTEM.MTIME Machine time (includes tool changes, dwells, and positioning).

SYSTEM.MTIME_CUT Machine cut time. SYSTEM.MTOOL_TIME Tool cut time. SYSTEM.MULTAX Multax processing flag. SYSTEM.MOVE For IMS Controller Emulator only:

This variable is one of the most important variables in the IMS Controller Emulator. The system will automatically set it to non-zero if there is a machine axis in the current block (G1 XYZ). However, if in the current block there is a function defined in the grammar section of the functions that a motion is not allowed (such as G4 X), then the SYSTEM.MOVE variable will remain ZERO. This variable is updated for every block parsed by the IMS Controller Emulator.

SYSTEM.NORMALX Component along the X axis normal to the surface (for calculating the tip point from contact).

SYSTEM.NORMALX_LAST Previous component along X axis normal to the surface (for calculating tip point and 3D cutter compensation).

SYSTEM.NORMALY Component along the Y axis normal to the surface (for calculating the tip point from contact).

Page 290: IMSPost Guide

Macro Language Variables: SYSTEM Variables

282 IMSpost Guide

Variable Description SYSTEM.NORMALY_LAST Previous component along the Y axis normal to the

surface (for calculating the tip point and 3D cutter compensation.)

SYSTEM.NORMALZ Component along the Z axis normal to the surface (for calculating the tip point from contact).

SYSTEM.NORMALZ_LAST Previous component along the Z axis normal to the surface (for calculating the tip point and 3D cutter compensation).

SYSTEM.NUMMOVES Specify minimum number of points for converting GOTO points to an arc.

SYSTEM.NURBS_ANGLE Angular value used to break up splines. SYSTEM.NURBS_DEVIATION Angular deviation value to start the new curve based on

angle sharpness. SYSTEM.NURBS_ORDER Nurbs maximum order between 2-4. SYSTEM.NURBS_TOLER Nurbs tolerance. SYSTEM.NURBS_TOLER_ANG Nurbs tolerance band for IJK vectors. SYSTEM.NURBS_TYPE Enter nurbs type (0, 1, 2, 3, 4):

= 0 Nurbs/spline not supported by this controller. All NURBS commands will convert to segments of a line in the tolerance specified in the Motion Nurbs feature. = 1 Controller support nurbs format control points, notes, and weight (Fanuc, Siemens). = 2 Controller support spline format with polynominals from left to right. = 3 Controller support spline format with polynominals from right to left (Heidenhain style). = 4 Controller support Bezier format.

SYSTEM.OFFSET[n] n n can be 1 thru15 representing an offset for each of the programmable machine axes.

SYSTEM.OUT_APT_TO_ISO = 1 Output APT statement to machine code file = 0 Do not output (default).

SYSTEM.OS Operating system (WIN, VMS, or UNIX). SYSTEM.OPSKIP Not in use at this time. SYSTEM.OVERLAP_ANGLE = 1 Allow overlap angle of rotary axes limits. SYSTEM.PAGE Output listing page number. SYSTEM.PLANE Current plane in effect (XY). SYSTEM.PLANE_X Register name applied to XY plane (X). SYSTEM.PLANE_Y Register name applied to YZ plane (Y). SYSTEM.PLANE_Z Register name applied to ZX plane (Z). SYSTEM.PMAPT (Special for Prelude Mfg.) Generate debug commands as

APT statements.

Page 291: IMSPost Guide

Macro Language Variables: SYSTEM Variables

IMSpost Guide 283

Variable Description SYSTEM.POLAR For IMS Controller Emulator only:

Use polar coordinates. SYSTEM.POLARA For IMS Controller Emulator only:

Polar coordinate angle. SYSTEM.POLARR For IMS Controller Emulator only:

Polar coordinate radius. SYSTEM.POLAR_CENTER_X For IMS Controller Emulator only (not IMSpost). SYSTEM.POLAR_CENTER_Y For IMS Controller Emulator only (not IMSpost). SYSTEM.POLAR_CENTER_XNAME Register name applied to X center of polar coordinate. SYSTEM.POLAR_CENTER_YNAME Register name applied to Y center of polar coordinate. SYSTEM.PRJFILE Name of project file. SYSTEM.RAD_CSS Maximum CSS radius. SYSTEM.RAPID_INV_TIME How to control rapid in inverse time mode:

= 1 Postprocessor will output G0 code in G93 mode = 0 Postprocessor will switch back to G94 mode for rapid motion and switch back to G93 if necessary.

SYSTEM.ROT_INV_TIME = 1 Activate inverse time formula if motion only contains rotary motion.

SYSTEM.RTCP Used in 5-axis tool length calculations: 0 = Off or 1 = On. SYSTEM.SAVE_ISO_LINES Specify number of ISO blocks to retrieve from the output

buffer. SYSTEM.SCREEN Write OUTPUT commands to the terminal (not active). SYSTEM.SEQNO Contains the last sequence number. SYSTEM.SEQNO_INCR Sequence number increment value. SYSTEM.SEQNO_ON Controls sequence block output:

0 = SEQNO is Off 1 = SEQNO is On

SYSTEM.SHORT_WAY_METHOD For multi-axes machine in MULTAX mode. There are two options to define how IMSpost chooses the preferred solution (in the SOLUTION/GOTO command as well as in the internal code): = 0 Check the length of the move the tools tip is doing and choose the shortest one. = 1 Check the angles the rotary axes rotates and choose the shortest one.

SYSTEM.SPIN For IMS Controller Emulator only: The current spindle speed.

SYSTEM.SOL_NUMBER_LIMIT SYSTEM.SOL_NUMBER_FINAL

Processed from the SOLUTION(LINTOL) statement. If the Auto Retract sequence is in effect, these variables are passed to the AUTO_RETRACT/* macro where a proper motion route is determined.

SYSTEM.SOLUTION_NUMBER Force multi-axis SOLUTION type in LINTOL processing.

Page 292: IMSPost Guide

Macro Language Variables: SYSTEM Variables

284 IMSpost Guide

Variable Description SYSTEM.SPINDLE Current spindle speed. This is used for machine time

calculations. SYSTEM.SPINDLE_NAME Register name for spindle speed value. SYSTEM.START_END_RAD Maximum deviation allowed between start/end to the

circle center (0.0 to ignore). SYSTEM.STR_FILE When ISO output is written to multiple output files,

output this string at the start of each new output file. SYSTEM.SURFACE Flag to set whether linear motion should be handled by

special internal processing rather than by the GOTO macro: 1 = On (internal processing) 0 = Off (use GOTO macro)

SYSTEM.TABLE_FILES Number of exterior table files to read in ( default = 0). SYSTEM.TAPE Output statement should write to NC file: “ON" or "OFF" SYSTEM.TAPEFILE Path and name of the ISO output file. SYSTEM.TAPE_LENGTH Length of tape characters. SYSTEM.TIME Current time. SYSTEM.TIME_CALCULATION = 0 Do not update system machine time

(SYSTEM.MTIME) = 1 Update system machine time

SYSTEM.TIP_CONTACT Tool tip/contact options: 0 for input tip = output tip 1 for input contact = output contact 2 for input contact = output tip

SYSTEM.TOOL_LENGTH Variable containing the tool length value that will be used when necessary in MULTAX calculations.

SYSTEM.TOOL_LENGTHX Contains tool length value that may be used in various MULTAX calculations.

SYSTEM.TOOL_LENGTHY Contains tool length value that may be used in various MULTAX calculations.

SYSTEM.TOOL_LENGTHZ Contains tool length value that may be used in various MULTAX calculations.

SYSTEM.TOOL_WITH Instructs the postprocessor as to how to calculate the tool axis: = 1 Tool Tip = 2 Tool Center = 3 Spindle Face (as if the tool length is zero length) = 4 RTCP point (for now, the same as option 3)

SYSTEM.VERSION Software version. SYSTEM.WARNING Number of warnings reported to the log file. SYSTEM.X Last given X value in GOTO or CIRCLE solutions. SYSTEM.X_ARC_CENTER Current circle center along X. SYSTEM.X_ARC_CENTER_LAST Previous circle center along X.

Page 293: IMSPost Guide

Macro Language Variables: TOOL CHG (Tool Change) Variables

IMSpost Guide 285

Variable Description SYSTEM.X_ARC_DIR Current arc direction along X. SYSTEM.X_ARC_DIR_LAST Previous arc direction along X. SYSTEM.X_LAST Previous X value calculated from GOTO or CIRCLE

SOLUTION record. SYSTEM.Y Last given Y value in GOTO and CIRCLE solutions. SYSTEM.Y_ARC_CENTER Current circle center along Y. SYSTEM.Y_ARC_CENTER_LAST Previous circle center along Y. SYSTEM.Y_ARC_DIR Current arc direction along Y. SYSTEM.Y_ARC_DIR_LAST Previous arc direction along Y. SYSTEM.Y_LAST Previous Y value calculated from GOTO or CIRCLE

SOLUTION record. SYSTEM.Z Last given Z value in GOTO or CIRCLE solutions. SYSTEM.Z_ARC_CENTER Current circle center along Z. SYSTEM.Z_ARC_CENTER_LAST Previous circle center along Z. SYSTEM.Z_ARC_DIR Current arc direction along Z. SYSTEM.Z_ARC_DIR_LAST Previous arc direction along Z. SYSTEM.Z_LAST Previous value calculated from GOTO or CIRCLE

SOLUTION record.

TOOL CHG (Tool Change) Variables The macro variables used by this dialog, with default settings and description, are as follows:

Assignment Description GLOBAL.TOOLCHG_LREG = "H" Tool length compensation register name. GLOBAL.TOOLCHG_TREG = "T" Tool number register name. GLOBAL.TOOLCHG_SPINOFF = 0 Cancel spindle before tool change: 0 = no or 1 = yes GLOBAL.TOOLCHG_COOLOFF = 0 Cancel coolant before tool change: 0 = no or 1 = yes GLOBAL.TOOLCHG_TIME = 0.1 Machine time (in minutes) required to change the tool.

This is used for time calculations. MODE.MACHINE.TOOLCHG : M6 MODE/GROUP+ FUNCTION attached to tool change

function. GLOBAL.TOOLCHG_FORCE_OUTREG Force out specified registers after tool change.

An example input, output result is:

LOADTL/100,ADJUST,20 M5 (If GLOBAL.TOOLCHG_SPINOFF=1)

M9 (If GLOBAL>TOOLCHG_COOLOFF=1)

T100 M6 FUNCTION.M6.USE "T"

REGISTER.T.VALUE = 100

REGISTER.H.VALUE = 20

SYSTEM.MTIME = SYSTEM.MTIME + GLOBAL.TOOLCHG_TIME

Page 294: IMSPost Guide

Macro Language Variables: TOOL CHG (Tool Change) Variables

286 IMSpost Guide

Notes

Page 295: IMSPost Guide
Page 296: IMSPost Guide

Intelligent Manufacturing Software, Inc. 800 Broadway Haverhill, MA 01832 USA Tel (978) 556–0077 Fax (978) 556–0171 http://www.ims-software.com