IMSPost Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 296

IMSpost Guide

Version 8

Document Revision A

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) 5560077 Fax (978) 5560171 http://www.ims-software.com

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

IMSpost Guide

iii

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

iv

IMSpost Guide

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

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

vi

IMSpost Guide

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

IMSpost Guide

vii

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

viii

IMSpost Guide

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.

IMSpost Guide

Overview: Installing the IMSpost Software and Getting Started

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.

IMSpost Guide

Overview: Installing the IMSpost Software and Getting Started


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. j. Close the System and Control Panel windows. 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.

IMSpost Guide

Overview: IMSpost Structure

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 4 IMSpost Guide

Overview: Postprocessor (CLdata) Statements 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 GLOBAL.RAPTO = CLDATAN.3 GLOBAL.RAPTO = CLDATAN.RIGHT.1.RAPTO GLOBAL.FEED = GLOBAL.FEED = GLOBAL.OPTION GLOBAL.OPTION CLDATAN.2 CLDATAN.RIGHT.1.MMPM = CLDATA.9 = CLDATAN.5

The 1st value (-25) The 3rd value (10) Gets the value to the right of minor word RAPTO (10) The 2nd value (3000) 3000 The 9th parameter (30) 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. Lets assume you have this postprocessor statement:
HEAD/LEFT,XOFF,120,YOFF,130,OPTION,54 HEAD/* WORDS = CLDATAM.0 NUMBERS = CLDATAN.0 PARAMETERS = CLDATA.0

Counts minor words (4): LEFT,XOFF,YOFF,OPTION Counts numbers (3): 120,130,54 Counts minor words and numbers (7)

IMSpost Guide

Overview: Menus and Tool Bars

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:

IMSpost Guide

Overview: Menus and Tool Bars 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:

IMSpost Guide

Overview: Environment Modes and Tool Bars

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 displayed on the secondary tool bar: is

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 tool bar: is displayed on the secondary

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:

IMSpost Guide

Overview: Terms

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.

IMSpost Guide

Overview: Terms

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

PART

HEAD

TOOL

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.

10

IMSpost Guide

Overview: Terms

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

IMSpost Guide

11

Overview: Terms 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 members 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 = COUNTER = 1 - 3

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.

12

IMSpost Guide

Overview: Terms

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 files 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 IMSpost Guide 13

Overview: Terms 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 Real number Character string Pointer 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 INDEX = 1 GLOBAL.TABLE_FEED = 1200.0 MYTEXT = "G91G28Z0" PTH = LOCATE(REGISTER.H)

14

IMSpost Guide

Overview: Terms 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.

IMSpost Guide

15

Overview: Terms

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

16

IMSpost Guide

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 Open Close Save Save As Jobs

Ctrl O

Preferences Error Definition Apt Definition Create Doc Description Exit

Creates a new postprocessor file (*.lib, *.prj). Opens a browsing dialog that enables you to choose a previously defined postprocessor file (*.lib, *.prj). Closes the currently active postprocessor file. Saves the currently postprocessor file using the same name. Saves the currently postprocessor file using a different name that you specify. 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. Customizes working directories, file extensions, and other IMS default conditions. Opens a dialog for error checking. Translates the CAM system APT language. Creates postprocessor documentation. Maintains a history of the postprocessor development. Quits the application. Prompts you to save documents.

IMSpost Guide

17

Main and Secondary Tool Bars: Main Tool Bar

Edit
The Edit menu includes the following options that are used when working with the Debug feature or Macro Manager.
Option Button Keys Description

Undo Redo Cut Copy Paste Select All Find Replace Toggle Bookmark Next Bookmark Previous Bookmark Clear All Bookmarks Insert/Remove Breakpoint

Alt Backspace Ctrl Y Shift Delete Ctrl C Ctrl V

Reverses the previous action. Restores the previous action that was reversed (undone). Cuts the current selection and places it on the Clipboard. Copies the current selection and places it on the Clipboard. Pastes the cut or copied selection from the Clipboard. Selects all information, such as all lines of code in a macro. Searches for specified text. Replaces currently selected text with the information on the Clipboard. Toggles the bookmark feature to insert or remove bookmarks. Goes to the next temporary bookmark. Goes to the previous temporary bookmark. Clears all bookmarks in the window. 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:

Ctrl A Ctrl F

Ctrl H Ctrl F2 F2 Shift F2 F9

To delete a breakpoint, position your cursor at a line where a breakpoint exists (such as line 31 above) and . click Removes all existing breakpoints. Displays line numbers, when this option is checked.

Remove All Breakpoints Line Numbers

18

IMSpost Guide

Main and Secondary Tool Bars: Main Tool Bar


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) XZ (Front) YZ (Side) XY (Top) Fit View Debug Windows

Application Look

Automatically rotates the world coordinates of the current machine to fit the Isometric view. Automatically rotates the world coordinates of the current machine to fit the Front view. The Y axis will be perceived as depth. Automatically rotates the world coordinates of the current machine to fit the Side view. The X axis will be perceived as depth. Automatically rotates the world coordinates of the current machine to fit the Top view. The Z axis will be perceived as depth. Fits the view to all objects. This centralizes the graphics window on all of the displayed objects. Enables you to select the windows displayed for use while debugging: Macro Manager APT-CL ISO Code Watch Window Machine Refer to Debug. Provides a variety of options to display the IMSpost application.

IMSpost Guide

19

Main and Secondary Tool Bars: Main Tool Bar

Execute
The Execute menu includes the following options:
Option Button Description

Postprocess Test Commands Breakpoints

Displays options and enables you to execute an entire program. In Controller Emulator mode, you can reverse postprocess. Displays options and enables you to perform an on-line test of commands, executing a partial program. Available in the next software revision.

General
The General menu includes the following options:
Option Button Description

Start Program Input/Output Units Part Number Start Operation Tool Change Coolant Cutter Comp Feedrate Spindle Drill Cycles End Operation End Program Threading Motion Codes Sort Output New Command Macro manager

Enables you to enter code for the start of every program. Enables you to enter default units. Specifies how the postprocessor should handle part number processing. (Catia Only) Enables you to enter code for the beginning of all Catia operations. Opens a tool change dialog. Opens the Coolant dialog to set coolant codes and conditions. Opens the Cutter Comp dialog. Displays feed tabs. Opens the Spindle dialog to set spindle codes and conditions. Opens the Cycle dialog to define drill cycle parameters.

(Catia Only) Enables you to enter code for the ending of all Catia operations. Enables you to enter code for the end of every program. Available in the next software revision. Sets function codes and conditions for rapid and contouring motion. Sort registers and G/M code functions. Enables you to automatically create a macro. Opens the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed.

20

IMSpost Guide

Main and Secondary Tool Bars: Main Tool Bar

Controller
The Controller menu includes the following options:
Option Button Description

Block Number Comment Blocks Register Format Function Codes Function Groups Subprograms Tables Tape Format Import Controller Apt Definition Grammar

Specifies block number sequencing (Nxxxx). 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. Lists all Mode/Group variables. Provides options to support subroutines. Enables you to create look-up tables. Provides options for special characters needed on tape (such as %). Overrides the existing controller file with another controller file. Sets the APT definition to convert. Sets the grammar format.

Machine
The Machine menu includes the following options:
Option Description

Motion Components References Multi-Axis

Import Machine

Displays all programmable machine axes. Specifies model components. Specifies machine offsets (pivot points). 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. 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.

IMSpost Guide

21

Main and Secondary Tool Bars: Main Tool Bar

Report
The Report menu includes the following options:
Option Button Description

List Table

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.

User
The User menu includes the following options:
Option Description

User Dialog Descriptive Comments Opstop MULTI HOME

Enables you to create custom dialogs. EXAMPLE of a user dialog: Activates tape comments. This is an IMS-developed dialog. EXAMPLE of a user dialog: Activates output of M01 codes. This is an IMS-developed dialog. EXAMPLE of a user dialog: Enables you to active work coordinate systems. This is an IMSdeveloped 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 Activate PP File Diagnostics About IMSpost

Displays IMSpost help information. Enables you to install specific postprocessor (PP) license codes, if applicable. Creates a license diagnostic. Displays the current IMS software release.

22

IMSpost Guide

Main and Secondary Tool Bars: Secondary Tool Bar

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.

IMSpost Guide

23

Main and Secondary Tool Bars: Secondary Tool Bar


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

24

IMSpost Guide

File Menu and Options

The File menu provides general file operations:


Option Button Keys Description

New Open Close Save Save As Jobs

Ctrl O

Preferences Error Definition Apt Definition Create Doc Description Exit

Creates a new postprocessor file (*.lib, *.prj). Opens a browsing dialog that enables you to choose a previously defined postprocessor file (*.lib, *.prj). Closes the currently active postprocessor file. Saves the currently postprocessor file using the same name. Saves the currently postprocessor file using a different name that you specify. 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. Customizes working directories, file extensions, and other IMS default conditions. Opens a dialog for error checking. Translates the CAM system APT language. Creates postprocessor documentation. Maintains a history of the postprocessor development. Quits the application. Prompts you to save documents.

IMSpost Guide

25

File Menu and Options: New

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.

26

IMSpost Guide

File Menu and Options: Open

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 Save Save As Exit

Closes the currently active postprocessor file. Saves the currently postprocessor file using the same name. Saves the currently postprocessor file using a different name that you specify. 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

IMSpost Guide

27

File Menu and Options: Preferences

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.

28

IMSpost Guide

File Menu and Options: Preferences

Working Directories
Directories that you can customize are:
Field Description

Project files APT/CL files Output files List files APT def files Error files Language files Temporary files Machine files User files Doc files

Pathname and directory where postprocessor files reside. Directory containing APT/CL data input files. Default output directory for NC code files (*.nc, *.log). Directory for *.lst files (optional output file with commentary data). Directory for APT/CL definition translation files. Directory for IMS system and user-defined errors. Directory containing language conversion text files. Directory where any temporary files are created during execution. Directory where IMSmodel machine definition files reside. Directory where user-created files are stored if you extend IMSpost to incorporate your own programs or DLLs. 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 Not specified Bitmap files Help files

Directory for the license.ims file. Directory for IMS software executable modules. Directory containing IMSpost bitmap images. 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 APT/CL files Extension Output files Extension List files Extension

Default file extension for project files. Default file extension for APT/CL files. Default file extension for NC output files. 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.

IMSpost Guide

29

File Menu and Options: Error Definition

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. 30 IMSpost Guide

File Menu and Options: Apt Definition 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 Warning Stop SCOL SCAC SCEM SCEML DBreak Format Log PPrint List Dialog

Increment the error counter. Increment the warning counter. Stop execution of the program. Show the current output line. Show the current APT command. Show the current execution macro. Show the current line within macros execution. Break in the Debug mode. Indicate that the error contains a formatted string. Write the error to a log file. Write as a PPRINT command. Write to the list file. 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.

IMSpost Guide

31

File Menu and Options: Apt Definition

Altering the Definition File With the Apt Definition Option

Tab

Description

Major Words Minor Words Command

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

32

IMSpost Guide

File Menu and Options: Apt Definition


Tab Description

String

See Changing the Syntax Order. 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.

IMSpost Guide

33

File Menu and Options: Apt Definition

CAM (Name): Index: #1 #2

LOADTL#,ADJUST

IMSpost (Replace): LOADTL/#,ADJUST,# Value/Expression: CLDATAN.1 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 #2 #3 CLDATAN.1 CLDATAN.1 + 1000 CLDATAN.4/2

Math functions are also allowed. For example:

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.

34

IMSpost Guide

File Menu and Options: Apt Definition

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 1,LOAD,LOADTL

Maps FEEDRATE to FEDRAT; use FEDRAT/* macro. 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/ 4,MULTAX/ON 6,END APT STATEMENT

The 3 value signifies an incoming statement. The 4 value signifies an outgoing 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,# 5,1,CLDATAN.4 5,2,CLDATAN.1 5,3,CLDATAN.2 5,4,CLDATAN.3 6,END APT STATEMENT

The number 4 signifies the outgoing statement. Use the 4th value from the incoming statement. Use the 1st value. Use the 2nd value. Use the 3rd value.

IMSpost Guide

35

File Menu and Options: Create Doc Use the following numbers as the first value in a line in a DEF file: 1 2 3 4 5 6 Use when only translating major words (UNITS/xxx). Use when translating all minor words (xxx/INCHES). INCOMING statement (your CAM system). OUTGOING statement (IMSpost translation). Set order of values. It is not necessary to rearrange values not recognized by the postprocessor macro. 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 Full Custom

Includes machine codes, controller addresses, and machine limits. Includes same data as above, plus a few extras. 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. 36 IMSpost Guide

File Menu and Options: Description

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.

IMSpost Guide

37

File Menu and Options: Description

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 Date List New Delete

Displays freeform text describing the history of the project. Place the cursor in the text area and enter text. Displays the dates of the text entries. Click the date to see the text entry (displayed in the text area) for that date. Adds the current date to the list. If you add enough history entries, this date list will scroll. 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.

38

IMSpost Guide

File Menu and Options: Description

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

Confidence

Controller Machine Post Version Project Version User Version Create Modify Freeze

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. 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. Specifies the controller that the postprocessor describes. Specifies the machine that the postprocessor is designed to control. Specifies the number (version) of the post. Specifies the number (version) of the project. Specifies the number (version) of the user. Specify the dates on which the project is created, modified, or frozen. Use the arrows to select dates.

IMSpost Guide

39

File Menu and Options: Description

Macro

Click this tab to enter freeform text regarding the macros used in the project.
Field/Button Description

Text Area Macro List

Displays freeform text describing the macro selected from the macro list. Place the cursor in the text area and enter text. 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.

40

IMSpost Guide

File Menu and Options: Description

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

IMSpost Guide

41

File Menu and Options: Description

Notes

42

IMSpost Guide

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 Test Commands Breakpoints

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. Available in the next software revision.

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

IMSpost Guide

43

Execute Menu and Options: Postprocess 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

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

44

IMSpost Guide

Execute Menu and Options: Test Commands


Field/Button Description

List file Input type Display output file

Enable machine animation Execute Debug

Indicates that List file information is included in a report. Refer to Report. 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. 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. Enables animation of the machine graphic. Begins postprocessing (Postprocessor mode) or reverse postprocessing (Controller Emulator mode). 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

Output List file Input type

Enable machine animation Execute Debug

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. Displays the postprocessed output from the commands entered in the upper scrollable area. The output is displayed after you click Execute. Indicates that List file information is included in a report. Refer to Report. (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. Enables animation of the machine graphic. Tests the commands entered in the Input Commands (upper scrollable area). the results appear in the Output box. Opens the Debug window used for debugging errors in the code. Refer to the Debug description.

IMSpost Guide

45

Execute Menu and Options: Test Commands

46

IMSpost Guide

Execute Menu and Options: Debug

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:

Macro List

Selected Macro

Watch Window APT/CL Command Being Executed ISO Code of the Command Being Executed

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 Managerthe macro list. APT-CL Viewthe APT/CL command being executed. ISO (Code) Viewthe ISO code of the command being executed. Watch Windowthe 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. Machinethe 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. IMSpost Guide 47

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

(or press F5) to start debugging. This instructs IMSpost to execute the program until a Click 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.

48

IMSpost Guide

Execute Menu and Options: Debug

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 F2 Shift F2 Ctrl F F9

Toggle BookmarkToggles the bookmark feature to insert or remove bookmarks. Next BookmarkGoes to the next temporary bookmark. Previous BookmarkGoes to the previous temporary bookmark. Clear All BookmarksClears all bookmarks in the window. FindSearches for specified text. Insert/Remove BreakpointInserts 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 BreakpointsRemoves all existing breakpoints. GoStarts debugging or continues after a breakpoint. This instructs IMSpost to execute the program until a breakpoint is encountered. Step OverSteps over the next macro instruction. Step InSteps in and enters the macro that is being called by the current instruction. Step OutSteps out of (exits) the macro that was called and returns to the next statement it was called from. Run to CursorRuns (executes) to a statement designated by the cursor line. Next InputSteps to read the next instruction line. StopStops the debugging execution. ExamineExamines the variable data to see what various machining conditions are active. The system examines macro variables, machine motion, and controller options. 49

F5 F10 F11

IMSpost Guide

Execute Menu and Options: Debug


Button Keys Description

QuitQuits 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

NewEnables you to define a new macro. EditEnables you to edit a macro after selecting it on the Macro Manager list. SaveSaves the current macro status. Save AllSaves all changes made to all macros. DeleteDeletes 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

ExportOpens a browser and enables you to export the selected macro(s) to another postprocessor. ImportOpens a browser and enables you to import a macro(s) from another postprocessor. Macro propertiesSpecifies the macro type. SearchSearches 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 Redo Cut Copy

Alt Backspace Ctrl Y Shift Delete Ctrl C

Reverses the previous action. Restores the previous action that was reversed (undone). Cuts the current selection and places it on the Clipboard. Copies the current selection and places it on the Clipboard. IMSpost Guide

50

Execute Menu and Options: Debug


Option Button Keys Description

Paste Select All Replace Line Numbers Go to line

Ctrl V Ctrl A Ctrl H Ctrl G

Pastes the cut or copied selection from the Clipboard. Selects all information, such as all lines of code in a macro. Replaces currently selected text with the information on the Clipboard. Displays line numbers, when this option is checked. 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:

IMSpost Guide

51

Execute Menu and Options: Debug 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, doubleclick the macro name on the list. The macro is displayed. The following example shows the COOLNT macro.

52

IMSpost Guide

Execute Menu and Options: Debug 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 None View Verify

Selects all macros in the list. Deselects all macros in the list. Views a selected macro. 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.

IMSpost Guide

53

Execute Menu and Options: Debug

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.

54

IMSpost Guide

Execute Menu and Options: Debug


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

Postprocessor

Revpost

Yes No All

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. Specifies the macro logic is for a postprocessor operation. (Usually a macros 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). Specifies the macro logic is for a reverse-postprocessor operation. (Usually a macros logic is either for a postprocessor or reverse-postprocessor operation.) Saves changes and exits the Confirm Macro Type dialog. Exits the Confirm Macro Type dialog without saving changes. Saves all changes (when you select more than one macro from the Macro Manager) and exits the Confirm Macro Type dialog.

IMSpost Guide

55

Execute Menu and Options: Breakpoints

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. 56 IMSpost Guide

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 Input/Output Units Part Number Start Operation Tool Change Coolant Cutter Comp Feedrate Spindle Drill Cycles End Operation End Program Threading Motion Codes Sort Output New Command Macro manager

Enables you to enter code for the start of every program. Enables you to enter default units. Specifies how the postprocessor should handle part number processing. (Catia Only) Enables you to enter code for the beginning of all Catia operations. Opens a tool change dialog. Opens the Coolant dialog to set coolant codes and conditions. Opens the Cutter Comp dialog. Displays feed tabs. Opens the Spindle dialog to set spindle codes and conditions. Opens the Cycle dialog to define drill cycle parameters.

(Catia Only) Enables you to enter code for the ending of all Catia operations. Enables you to enter code for the end of every program. Available in the next software revision. Sets function codes and conditions for rapid and contouring motion. Sort registers and G/M code functions. Enables you to automatically create a macro. Opens the IMS macro file management utility. (Your license must support this.) All macros for the active postprocessor are listed.

IMSpost Guide

57

General Menu and Options: Start Program

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.

58

IMSpost Guide

General Menu and Options: Input/Output Units

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 English Units Input Output

Displays the function code used to specify that the format of the postprocessor is output in metric units. Displays the function code used to specify that the format of the postprocessor is output in English units. Specifies Metric (MM) or English (INCH) to describe the format of the Input file (APT/CL) values. 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

IMSpost Guide

59

General Menu and Options: Part Number

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 Indicates the postprocessor will not output processing any codes or prompt the user for any part number information. Read from APT/CL Indicates the postprocessor will get the part PARTNO statement number from the APT/CL file and, if not found, use the default number value as specified below. Read from APT/CL Indicates the postprocessor will get the part if exists; else prompt number from the APT/CL file and, if not user found, prompt the user to enter a value. Prompt user at Indicates the postprocessor will always runtime prompt the user at runtime and ignore the PARTNO command from the APT/CL file.

60

IMSpost Guide

General Menu and Options: Start Operation (Catia Only)


Field Description

Prefix string for output with part number Part number register Default Part number value Sequence numbers off with part number

Specifies a character string to be output before the PARTNO number. Specifies the controller register to be output with the 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). 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.

IMSpost Guide

61

General Menu and Options: Tool Change

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.

62

IMSpost Guide

General Menu and Options: Tool Change


Field Description

Auto tool change function

Tool number register Length Compensation Register Time (mins) to change tools Output codes on a separate block Output codes on the next motion block Cancel coolant before tool change Cancel spindle before tool change Auto coolant after tool change Enable tool preselection Reload 1st tool at the end Ignore same tool Tool Number Incremental Start Output before tool change Output after tool change Force Register Output after Tool Change

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. Displays the code to be output with the tool number. Select from a list of predefined registers. For example, select T. Displays the code to be output with the length compensation value. Select from a list of predefined registers. For example, select H. 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 Specifies how you would like the tool change codes to be output. Select either this radio button or the one below it. Specifies how you would like the tool change codes to be output. Select either this radio button or the one above it. Determines whether (checked) or not (unchecked) the postprocessor outputs a command to cancel the coolant before a tool change. Determines whether (checked) or not (unchecked) the postprocessor outputs a command to turn off the spindle before the tool change. Automatically reinstates the coolant condition after the tool change. 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. Reloads the first tool at the end of the program. Instructs the postprocessor to ignore redundant tool change statements. 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. 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). 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). 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

IMSpost Guide

63

General Menu and Options: Tool Change 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 Turret index CCLW function Turret index register

Displays the function code used to specify a clockwise turret index. Displays the function code used to specify a counterclockwise turret index. Displays the code to be output with the turret index. Select from a list of predefined registers. For example, select T.

64

IMSpost Guide

General Menu and Options: Tool Change


Field Description

Offset Register Time (mins) to index turret Output codes on a separate block Output codes on the next motion block Cancel coolant before turret index Cancel spindle before turret index Auto coolant after turret index Turret Number Incremental Start Output before turret index Output after turret index Force Register Output after turret index

Displays the code to be output with the offset. Select from a list of predefined registers. For example, select H. 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 Specifies how you would like the turret index codes to be output. Select either this radio button or the one below it. Specifies how you would like the turret index codes to be output. Select either this radio button or the one above it. Determines whether (checked) or not (unchecked) the postprocessor outputs a command to cancel the coolant before a turret index. Determines whether (checked) or not (unchecked) the postprocessor outputs a command to turn off the spindle before the turret index. Automatically reinstates the coolant condition after the turret index. 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. 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). 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). 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).

IMSpost Guide

65

General Menu and Options: Coolant

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

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

Mist coolant

Flood coolant

Thru coolant

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

66

IMSpost Guide

General Menu and Options: Cutter Comp


Field Description

Air coolant

Output code on a separate block Output on the next motion block

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. Outputs codes immediately if this option is selected. 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.

IMSpost Guide

67

General Menu and Options: Cutter Comp


Field Description

Cutter compensation left code

Cutter compensation right code

Cutter Compensation 3d code Cutter compensation off code

Compensation Register Name

Normal X Register Normal Y Register Normal Z Register Output codes on a separate block Output codes on the next motion block Output cutter compensation off on the next motion block

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. 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. Specifies the function code for special 3D compensation. If your controller does not support this, leave this field empty. 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. 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. 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. Outputs cutter compensation codes immediately. Outputs cutter compensation codes in following motion block. Turns off output of cutter compensation codes in following motion block.

68

IMSpost Guide

General Menu and Options: Feedrate

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 Default feedrate value Output codes on a separate block Output codes on the next motion block Feed/Minute tab

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.) Specifies the feed value you want the postprocessor to use if the program does not contain a FEDRAT statement before the cutting motion. Outputs feed codes immediately. Outputs feed codes in the following motion interpolation block. Provides options to specify the function code and feed format for per minute values (either mm per minute or inch per minute).

IMSpost Guide

69

General Menu and Options: Feedrate


Field/Tab Description

Feed/Revolution tab Inverse Time tab

Provides options to specify the function code and feed format for perrevolution values (either mm per revolution or inch per revolution). Provides options to specify the special 1/T format used for some multiaxis 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 Register format (mm) Register format (inch) Minimum feed/min. (mm) Maximum feed/min. (mm) Minimum feed/min. (inch) Maximum feed/min. (inch)

Enables you to enter the machine code that represents feed per minute mode. Specifies the number format for millimeter mode. Specifies the number format for inch mode. Enables you to enter the minimum per minute feedrate used for millimeter mode. Enables you to enter the maximum per minute feedrate used for millimeter mode. Enables you to enter the minimum per minute feedrate used for inch mode. 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).

70

IMSpost Guide

General Menu and Options: Feedrate

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

Field

Description

Function code Register format (mm) Register format (inch) Minimum feed per rev. Maximum feed per rev.

Enables you to enter the machine code that represents per revolution feed mode. Specifies the number format for mm per revolution mode. Specifies the number format for inch per revolution mode. Specifies the minimum per revolution value. Specifies the maximum per revolution value.

IMSpost Guide

71

General Menu and Options: Feedrate

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 Register format Minimum feed per min Maximum feed per min Inverse time formula Active for motion type

Specifies the machine code that represents inverse time feed mode. Specifies the number format for inverse time feed mode. Defines the minimum calculated feed number. Defines the maximum calculated feed number. Enables you to specify the formula the postprocessor should use when calculating the inverse time feed value. 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. IMSpost Guide

72

General Menu and Options: Feedrate


Field Description

Cancel inverse time mode for rapid positioning motion

Simulate inverse time feedrate mode

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. 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 SOLUTION.LINE_DIST SOLUTION.CURVE_DIST

SOLUTION.DELTA_DIST

Uses total linear and rotary delta motion. This is generally the formula most commonly used. Uses the linear distance between the current tool position to the next tool position in part coordinates. 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). 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.

IMSpost Guide

73

General Menu and Options: Spindle

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

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

Counter-clockwise rotation

Spindle off

Spindle register Default value (rpm)

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. 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. 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. Displays a list of defined registers from which you select the code to be output with the spindle speed value. For example, select S. Displays the spindle speed in rpm. This value is used if the spindle is turned on and no value is specified.

74

IMSpost Guide

General Menu and Options: Drill Cycles


Field Description

Output codes on a separate block Output codes on the next motion block

Determines how you would like the codes to be output. Select this radio button or the one below. 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. IMSpost Guide 75

General Menu and Options: Drill Cycles


Field Description

Cancel

Drill

Face

Deep

Tap

Bore

Ream

Bakbor

Manbor

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

76

General Menu and Options: Drill Cycles


Field Description

Stpbor

Brkchp

LH Tap

Finbor

User Cycle off output Depth Format

Clearance Plane Format

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 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 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 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 Indicates a user-defined cycle type. Determines the mode of output for the cycle off codeeither on a block by itself or on the next motion block. Provides options to describe the depth format: Register for total Displays the register for the total drilling depth depth parameter. Register for deep Displays the register for the incremental depth for increment deep drilling cycles. Register for deep Displays the register for the retract parameter for deep retract 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 Provides options to describe the clearance plane format: Register for Displays the register for the clearance pane and/or clearance plane retraction plane parameter (for example, R).

IMSpost Guide

77

General Menu and Options: End Operation (Catia Only)


Field Description

Format

Other Codes

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. 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 Sets this box to position the tool in the non-drilling Cycle 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.

78

IMSpost Guide

General Menu and Options: End Program

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.

IMSpost Guide

79

General Menu and Options: Motion Codes

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.

80

IMSpost Guide

General Menu and Options: Motion Codes

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

Field

Description

Rapid Motion Code Rapid block, special codes

Specifies the function code, usually a G-code, that specifies positioning motion. In the above example, a G0 is entered. 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

IMSpost Guide

81

General Menu and Options: Motion Codes


Field Description

Break up rapid moves

Restore feedrate after rapid move From

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. Indicates you would like the feedrate to be reinstated on the next nonrapid move following the rapid motion. Provides options for handling the starting point, or FROM point of a program. Select one of the four radio buttons. Output from command Outputs the point as a rapid positioning move. as rapid motion Output from command Outputs the point as a linear/feed move. as linear motion Save as home position Saves the point as a home position, but does (no output) 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 Instructs the postprocessor as to how to treat command only 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

82

IMSpost Guide

General Menu and Options: Motion Codes

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.

IMSpost Guide

83

General Menu and Options: Motion Codes 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" GLOBAL.LINEAR_TYPE = "LINEAR"

Checkbox ON 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 SYSTEM.SURFACE = 1

Use GOTO macro in post 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.

84

IMSpost Guide

General Menu and Options: Motion Codes


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" GLOBAL.LINEAR_TYPE = "LINEAR"

Activate linear equation Turn off linear equation (default)

In the following example:


L1 * .9 L1 PF PF*.75

Output 90% of programmed motion with 75% of the programmed feed. The optional condition checks for a CLW spindle condition. Finish motion with programmed feed

The example includes a condition in the Condition column:

IMSpost Guide

85

General Menu and Options: Motion Codes


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.

86

IMSpost Guide

General Menu and Options: Motion Codes

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.

IMSpost Guide

87

General Menu and Options: Motion Codes


Field Description

Clockwise code used

Counter-clockwise code used

3d Clockwise code used

3d CounterClockwise code used

Radius format Break into linear moves Linear Tolerance Break

Maximum radius for circular interpolation Minimum radius for circular interpolation Maximum chord length Break up circle on quadrant boundaries Helical Interpolation supported Support circular interpolation in any plane

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. 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. 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. 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. Displays choices for circular interpolation, center coordinate, and output. Select one of the I,J,K options or the R option. Indicates the postprocessor will simulate an arc by generating multiple straight line moves. 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. Sets maximum limits for circular interpolation. This tolerance is in effect only if the postprocessor has to break the circle into straight lines. Sets minimum limits for circular interpolation. This tolerance is in effect only if the postprocessor has to break the circle into straight lines. 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. Instructs the postprocessor to make quadrant checks. Instructs the postprocessor that machine is capable of helical interpolation. 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 carefulIt is possible to modify or disable the use of the dialog parameters. 88 IMSpost Guide

General Menu and Options: Motion Codes


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

IMSpost Guide

89

General Menu and Options: Motion Codes

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 Output before nurbs Nurbs motion function code Register used for order value

Selects the nurb format style. Specifies required code for output before nurbs. Specifies machine code. 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.

90

IMSpost Guide

General Menu and Options: Motion Codes


Field Description

Register used for weight value Register used for knot value Maximum order # Nurbs tolerance Output after nurbs Activate nurbs optimization

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. 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. Specifies the mathematical degree + 1 (usually 4). Specifies the tolerance band for nurbs. Specifies required code for output after nurbs. Activate optimization for nurbs processing control.

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

IMSpost Guide

91

General Menu and Options: Motion Codes

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 Minimum angle Minimum radius Maximum radius Plane Tolerance Radius Tolerance Point Tolerance

Defines the minimum number of points, which must be at least 4. Defines the minimum required angle. Defines the minimum required radius. Defines the maximum radius. Defines the plane fluctuation number. Defines the radius fluctuation number. Defines the point fluctuation number.

92

IMSpost Guide

General Menu and Options: Motion Codes


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. Enable you to select any combination of the three major planes. If a circle can be outside a major plane, select ALL Plane.

XY Plane YZ Plane ZX Plane ALL Plane Screw Spiral

Use exact end points Use tangents Activate arc-fit optimization Direction

Looks for a third axis linear motion (helical interpolation). 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. Indicates that the circle should begin and end on a programmed point. Creates lines through points, then attempts to fit an arc tangent within these lines. 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. 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.

IMSpost Guide

93

General Menu and Options: Motion Codes 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.

94

IMSpost Guide

General Menu and Options: Motion Codes

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. IMSpost Guide 95

General Menu and Options: Motion Codes

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

Rotation

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

96

General Menu and Options: Motion Codes


Field Description

Combination Scale Enabled Allow combinations Ignore All Post Commands Include Post Command Exclude Post Command Only check drill cycle points Distance Tolerance Angle Tolerance Minimum Points Start check at command

Searches for a shape that coincides with any combination. Activates the scale feature. Allows a combination of translation, rotation, and/or scaling. Ignores all postprocessor commands.

Enables you to enter postprocessor commands to include. Enables you to enter postprocessor commands to exclude. Checks only cycle point geometry. Specifies the general tolerance used. Specifies a tolerance used for plane factors. Specifies the minimum points for the shape. 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). 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). Controls the Shape Repeat feature within the postprocessor.

End check at command

Activate shape repetition checking

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.

IMSpost Guide

97

General Menu and Options: Sort Output

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 Registers Sort Order

Add >>> <<< Remove Add String >>>

Displays all the available functions. Double-click a function to add it to the Sort Order column. Displays all the available registers. Double-click a register to add it to the Sort Order column. 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. Enables you to select multiple functions or registers and add them to the Sort Order. Enables you to select multiple functions or registers in the Sort Order list and remove them. 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.

98

IMSpost Guide

General Menu and Options: New Command


Field/Button Description

Move Up Move Down Reverse

Moves the selected item(s) in the Sort Order column up one entry in the sort order list. Moves the selected item(s) in the Sort Order column down one entry in the sort order list. 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:

IMSpost Guide

99

General Menu and Options: New Command

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.

100

IMSpost Guide

General Menu and Options: New Command 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):

IMSpost Guide

101

General Menu and Options: New Command

6. You can click Test to test the command. To see the results of the test, click secondary toolbar (this is the same as Execute > Test Commands). 7. Click View to review the macro. For example:

on the

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. 102 IMSpost Guide

General Menu and Options: Macro manager

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:

IMSpost Guide

103

General Menu and Options: Macro manager 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 F2 Shift F2 Ctrl F F9

Toggle BookmarkToggles the bookmark feature to insert or remove bookmarks. Next BookmarkGoes to the next temporary bookmark. Previous BookmarkGoes to the previous temporary bookmark. Clear All BookmarksClears all bookmarks in the window. FindSearches for specified text. Insert/Remove BreakpointInserts 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 BreakpointsRemoves all existing breakpoints.

Buttons on the Macro Manager tool bar are:


Button Description

NewEnables you to define a new macro. EditEnables you to edit a macro after selecting it on the Macro Manager list. SaveSaves the current macro status. Save AllSaves all changes made to all macros.

104

IMSpost Guide

General Menu and Options: Macro manager


Button Description

DeleteDeletes 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

ExportOpens a browser and enables you to export the selected macro(s) to another postprocessor. ImportOpens a browser and enables you to import a macro(s) from another postprocessor. Macro propertiesSpecifies the macro type. SearchSearches 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 Redo Cut Copy Paste Select All Replace Line Numbers

Alt Backspace Ctrl Y Shift Delete Ctrl C Ctrl V

Reverses the previous action. Restores the previous action that was reversed (undone). Cuts the current selection and places it on the Clipboard. Copies the current selection and places it on the Clipboard. Pastes the cut or copied selection from the Clipboard. Selects all information, such as all lines of code in a macro. Replaces currently selected text with the information on the Clipboard. Displays line numbers, when this option is checked.

Ctrl A Ctrl H

IMSpost Guide

105

General Menu and Options: Macro manager


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. 106 IMSpost Guide

General Menu and Options: Macro manager 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, doubleclick 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.

IMSpost Guide

107

General Menu and Options: Macro manager

Import
Click . An Import browser is displayed:

Field/Button

Description

All None View Verify

Selects all macros in the list. Deselects all macros in the list. Views a selected macro. 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.

108

IMSpost Guide

General Menu and Options: Macro manager

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.

IMSpost Guide

109

General Menu and Options: Macro manager


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

Postprocessor

Revpost

Yes No All

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. Specifies the macro logic is for a postprocessor operation. (Usually a macros 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). Specifies the macro logic is for a reverse-postprocessor operation. (Usually a macros logic is either for a postprocessor or reverse-postprocessor operation.) Saves changes and exits the Confirm Macro Type dialog. Exits the Confirm Macro Type dialog without saving changes. Saves all changes (when you select more than one macro from the Macro Manager) and exits the Confirm Macro Type dialog.

110

IMSpost Guide

General Menu and Options: Macro manager

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

IMSpost Guide

111

General Menu and Options: Macro manager

Notes

112

IMSpost Guide

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
Button Description

Options on the Controller menu are:


Option

Block Number Comment Blocks Register Format Function Codes Function Groups Subprograms Tables Tape Format Import Controller Apt Definition Grammar

Specifies block number sequencing (Nxxxx). 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. Lists all Mode/Group variables. Provides options to support subroutines. Enables you to create look-up tables. Provides options for special characters needed on tape (such as %). Overrides the existing controller file with another controller file. Sets the APT definition to convert. Sets the grammar format.

IMSpost Guide

113

Controller Menu and Options: Block Number

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 Start value Increment value Maximum value

Block step

Block numbers

Displays the code to be output for sequence numbering. You select from the list of defined registers. For example, select N. Displays the integer value to be used as the starting block number. You enter this number (for example, 100). Displays the number to add to each sequence number for subsequent sequence numbers. You enter this number (for example, 10). 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. 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. Specifies whether block numbering is active or inactive for the postprocessor. IMSpost Guide

114

Controller Menu and Options: Block Number


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 N2 N3 N4 N5 N6 N7 N8 G40 G90 G80 G1 Z3. Y2. X1. F100. Z6. Y5. X4. Z9. Y8. X7. Z3. Y2. X1. Z6. Y5. X4. Z9. Y8. X7. 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

IMSpost Guide

115

Controller Menu and Options: Comment Blocks 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) SEQNO(ON) SEQNO("O")

Cancels sequencing Re-activates sequencing Changes Nxxxx to Oxxxx

Comment Blocks
The Comment Blocks option (also available with comment blocks or operator messages. ) define how your controller will output

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.

116

IMSpost Guide

Controller Menu and Options: Register Format


Field Description

Output empty line before comment Output empty line after comment Output with block number Set block numbers on after comment block Convert to uppercase

Outputs a blank (empty) line before the comment block. Outputs a blank (empty) line after the comment block. Outputs the comment block with a sequence number. Turns on block numbers after the comment block is output. If block numbers are on, you should probably select this checkbox. 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. IMSpost Guide 117

Controller Menu and Options: Register Format 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 Units Out Units In Initial Value Digits

Dec Lead

Trail

Sign Modal Incr Incr. Name

Displays the output name of the controller register. Displays the output units (INCH, MM, DEG, CONST). This parameter does not affect the output format except in the case of rotary axis registers. Displays the input units (INCH, MM, DEG, CONST). Displays the initial value of the register. 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. Indicates (when checked) that a decimal point is required. 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. 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. Indicates (when checked) that a + sign is included before positive values. Indicates (when checked) that the register is modal. Indicates (when checked) that the register is incremental. Clear the checkbox for absolute. Displays the incremental name used in the incremental mode is active (Incr, above, is checked).

118

IMSpost Guide

Controller Menu and Options: Register Format


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

Test Output Value

IMSpost reads the register name, but only outputs the letter(s) that precede the @ character. 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

Limit Min Maximum

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. Indicates (when checked) that output values are limited to a defined minimum. 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.

IMSpost Guide

119

Controller Menu and Options: Register Format


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 DecInt

Before After Space Table Zero Formula

Add/Copy

Displays the default character for decimal output. 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. Displays the character or string to be output between the name and value. Displays the character or string to be output after the value. Indicates (when checked) that a space is required between the register name and value. (X 10. or X10.) Displays the table, if any, associated with the register. To define a table, refer to the Tables feature. Specifies the character output when the register value is 0. For example, some controllers do not accept a 0, .0, or 0. as output. 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 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 120 IMSpost Guide

Controller Menu and Options: Register Format


Field/Button Description

library posts handle this by also utilizing the @ character:


X@DWELL

Test Output Value

IMSpost reads the register name, but only outputs the letter(s) that precede the @ character. 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 REGISTER.name.NAME REGISTER.name.VALUE REGISTER.name.UNIT REGISTER.name.DIGIT REGISTER.name.LEADING REGISTER.name.TRAILING REGISTER.name.DECIMAL REGISTER.name.MINIMUM REGISTER.name.LIMITMIN REGISTER.name.MAXIMUM Value Description

Any string Any real value MM, INCH, DEG, CONST Positive value, up to 9.9 Y,N,1,2,3,4 Y,N,1,2,3,4 Y or N Any real value 0 or 1 Any real value

Name of register Current value Output units Number format Leading zero output Trailing zero output Decimal point output Minimum value Check minimum value flag Maximum value 121

IMSpost Guide

Controller Menu and Options: Register Format


Parameter REGISTER.name.LIMITMAX REGISTER.name.ZERO REGISTER.name.FORMULA REGISTER.name.TABLE REGISTER.name.INITIAL REGISTER.name.BEFORE REGISTER.name.AFTER REGISTER.name.SPACE REGISTER.name.DECCHAR Value Description

0 or 1 Any string Any legal expression Any existing table Any real value Any string Any string 0 or 1

Any character REGISTER.name.INTDEC Y or N or F REGISTER.name.UNITI MM, INCH, DEG, CONST REGISTER.name.UNITO MM, INCH, DEG, CONST, UNIT REGISTER.name.DELTA Any real value REGISTER.name.INCREMENT Any real value For example:
REGISTER.X.VALUE = 1250 REGISTER.S.VALUE = 2000

Check maximum value flag Zero output string Formula applied to register Table attached to register Initial value Before value character After value character Space between register name and value Decimal character Integer decimal output flag Input units Output units Incremental value from last Integer decimal output flag

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"

122

IMSpost Guide

Controller Menu and Options: Function Codes

Function Codes
This option (also available with postprocessor. ) defines the functions (G/M codes) for use in the

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.

IMSpost Guide

123

Controller Menu and Options: Function Codes 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 Mode/Group

Identifies the functions associated with the postprocessor. 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:

124

IMSpost Guide

Controller Menu and Options: Function Codes


Field/Button Description

Output Alone End Block By Self Add | Copy

Maximum codes per block

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. 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. Specifies the function code must be output by itself on a block. 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). 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.

IMSpost Guide

125

Controller Menu and Options: Function Groups

Function Groups
The Function Groups option defines function groups and the functions that are members of those groups.

Field/Button

Description

Group Names Group Members Initial Add Group Delete Group Add Member Delete Member Initial/Clear

Function

Displays the groups currently associated with the postprocessor. Displays the functions that are members of the group selected in the Group Names list. Displays the default condition, if any, of the group. (This information is noted under the Group Members area.) Adds a group to those defined for the postprocessor. You are prompted to provide a name for the group. Deletes the group selected in the Group Names list. Adds a member to the group selected in the Group Names list. You are prompted for the member name. Deletes the member selected in the Group Members list. 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. 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.

126

IMSpost Guide

Controller Menu and Options: Subprograms

Subprograms
The Subprograms option enables you to set up subprograms for the postprocessor.

Field

Description

No controller subprogram codes Fanuc style

Indicates that no controller subroutines should be output. 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. Indicates that Seqno style subprograms should be output. This format used a function and a starting and ending sequence number to mark the subprogram. 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.

Seqno style

Start of subprogram code

IMSpost Guide

127

Controller Menu and Options: Tables


Field Description

End of subprogram code

Call subprogram

Output Message Incremental Mode Move to end Activate subprogram option

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. 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. Specifies that the postprocessor should output a message regarding the subroutine. Specifies that the postprocessor should force out Incremental mode. Specifies that the postprocessor should output subroutines at end of the machine file. 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.

128

IMSpost Guide

Controller Menu and Options: Tables 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 Format). Use the Test Output feature as described for the Register Definition.
Field/Button Description

Table

New Delete Add Column Delete Column Index Value1

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. Adds a table to the Table dropdown list. You are prompted for the tables name (as described in the procedure above). Deletes a lookup table from the Table dropdown list. You are prompted for the table name. Adds a column for the table. Deletes the last (right-most) column from the table. Note that you cannot delete the Value1 column. Displays (and enables you to enter) an index for the table. 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 S1 = 60 rpm S2 = 124 rpm S3 = 142 rpm S4 = 250 rpm S5 = 330 rpm S6 = 500 rpm S7 = 660 rpm S8 = 775 rpm S9 = 850 rpm S10 = 1000 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.

IMSpost Guide

129

Controller Menu and Options: Tables

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.

130

IMSpost Guide

Controller Menu and Options: Tables

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

IMSpost Guide

131

Controller Menu and Options: Tape Format

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 Output at the start of each block Output at the end of each block End of block characters Start of file character End of file character KBytes

Specifies a fixed number of characters per outline line. Enter 0 if there is no limitation. Outputs this character(s) at the beginning of each output block. Outputs this character(s) at the end of each output block. Indicates character(s) that mark the end of an output block. Specifies the character output at the start of the file. Specifies the character output at the end of the file. Breaks up the NC code output file into files based on this maximum KByte size. Enter 0 if no KByte break up is desired.

132

IMSpost Guide

Controller Menu and Options: Import Controller


Field Description

No. of blocks Tool life Min Maximum characters per output line Continuation character Output spaces between codes

Breaks up the NC code output file into files based on this maximum number of blocks. Enter 0 if no break up is desired. 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. Specifies the maximum number of characters per output line. Enter 0 if there is no limit. Specifies the character used to continue the current block on the next output line. 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.

IMSpost Guide

133

Controller Menu and Options: Apt Definition

Field/Button

Description

Function Code Apt Statement Condition

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). Displays the APT statement(s) associated with the selected function code. 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"

Arguments

Current motion cat be G1 or G0. 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.

134

IMSpost Guide

Controller Menu and Options: Apt Definition


Field/Button Description

Up / Down Add

Reposition arguments. If an APT Statement contains multiple values, they must be defined in the proper order. Enables you to add a conditional expression that is displayed with its statement when you click Add. Conditional Expression 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 Deletes the statement that you highlighted in the large display area. 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. Applies all changes.

Modify

Delete MODE/USE

APPLY

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 2 3 4 6 9 11 12 13 14 IMSpost Guide

EUCLID STRIM BihlerCAT (GERBER) General APT Catia Machinist PTC Prelude Manufacturing Adra Systems IBM360/370 Binary Mastercam 135

Controller Menu and Options: Grammar


Code Value APT/CL Data Type

15 16 17 18 19 20 21 22 23 24 25 26 27 28

CATIA v4/v5 Delcam Unigraphics Surfcam Cimatron Auton Intercim HMS-APT VX MetalCAM I-DEAS WorkNC GibbsCam 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.)

136

IMSpost Guide

Controller Menu and Options: Grammar

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 SYNTAX Controller Symbol Controller Syntax Motion Type

Lists an IMSpost definition for the operation. Specifies required parameter(s) for the symbols operation. Indicates characters that correlate to the IMSpost symbol (described above). Defines the controller symbol action. Indicates (when checked) that a machine axis can be included. 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.

IMSpost Guide

137

Controller Menu and Options: Grammar


Option/Button Description

Instruction

MACRO Case Sensitive Parser

VNC

Expression Evaluate With Math Priority Expression Evaluate From Left To Right Add Default

Macro Save

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. Indicates the macro name that the controller symbol is associated with. Indicates (when checked) that the syntax case sensitive. 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. 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. Specifies how IMSpost interprets the expression. Math priority signifies embedded operations within parenthesis. If this option is checked, these operations are executed first. Specifies how IMSpost interprets the expression. If this option is checked, IMSpost will interpret the operations left-to-right. Creates an open row which enables you to add an additional symbol. 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. 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. Saves all changes and exits the Grammar dialog.

To delete a syntax definition, highlight the definition row and press the keyboard Delete key.

138

IMSpost Guide

Controller Menu and Options: Grammar

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 Sort

Lists all the controller addresses supported for the active IMSpost project. To add an address, see Controller > Register Format. 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

IMSpost Guide

139

Controller Menu and Options: Grammar


Option/Button Description

Motion Macro Instruction

Variable Update

String Type

Empty

Empty Value Case Sensitive

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. Indicates (when checked) that the letter address can include motion. 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. 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. Enables you to pass arguments. 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. Indicates (when checked) that the register has the ability to contain a string. Refers to the type of operation. Choose from these options: Empty Program Start Program End Optional Skip Optional Stop 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. Specifies the default value if the Value option is selected above (for Empty). Indicates (when checked) that the text is case sensitive.

140

IMSpost Guide

Controller Menu and Options: Grammar


Option/Button Description

Parser

VNC

Macro Save

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

IMSpost Guide

141

Controller Menu and Options: Grammar


Option/Button Description

Symbol Sort

Motion Macro Instruction

Activate Mode

Type

Variable

Value

Case Sensitive Parser

VNC

Lists all the functions. To add or delete a function, see Controller > Function Codes. 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. Indicates (when checked) that the function can be output with motion. Specifies the name of the macro that is associated with the fucntion. If this field is blank, no macro is associated with the function. 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. 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. 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. 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. 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). Indicates (when checked) that the text is case sensitive. 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. 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.

142

IMSpost Guide

Controller Menu and Options: Grammar


Option/Button Description

Macro Save

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. 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 controllers variable structure and logic.

Option/Button

Description

Name List

From To

Indicates a character that represents a controller variable. 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. Specifies the beginning index number value. Specifies the ending index number value.

IMSpost Guide

143

Controller Menu and Options: Grammar


Option/Button Description

Local

Create Initial Not Exist

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. Indicates (when checked) that code creates a variable. Specifies the initial default value. 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)

Not Exist Value Not Exist Condition

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). Returns a value only if the Not Exist option is checked. 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

Not Exist Condition Value Vacancy

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). Returns a value only if the Not Exist Condition option is checked. 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

MACRO Macro Var Def Add Save

If you checked the Not Exist option for #0, you will jump to line N2. Specifies a macro associated with the variable. 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. Enables you to use a variable without defining it first. Refer to Variable Definition below. Creates an open row which enables you to add an additional variable. Saves all changes and exits the Grammar dialog.

144

IMSpost Guide

Controller Menu and Options: Grammar 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 N200 ABC=100. N300 X=ABC

Move to X, Y, and Z New variable ABC defined with the value of 100. 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

IMSpost Guide

145

Controller Menu and Options: Grammar 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 Allowed End Characters Allowed Characters Must Start With Must End With Minimum Length Maximum Length Allow Index Variable

Indicates that the name must start with one of the defined characters. Indicates that the name must end with one of the defined characters. Indicates that the name must consist of only the defined characters. Indicates that the name must start with the specified string. Indicates that the name must end with the specified string. Defines the minimum number of characters in the name. Defines the maximum number of characters in the name. 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. Specifies the initial value to use when one is not previously defined. Indicates (when checked) that a vacancy variable (such as FANUC #0) can be used. 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. 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. 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. Activates the specified macro when the variable changes its value. Displays the previous set of restrictions. Displays the next set of restrictions. Deletes the current set of restrictions. Enables you to enter a new set of restrictions.

Create With Initial Value Vacancy Variable Not Exist

Not Exist Condition

Check Macro

Active Macro Back Next Delete New

146

IMSpost Guide

Controller Menu and Options: Grammar

CE Errors
The CE Errors grammar tab displays a dialog for error processing.

Option/Button

Description

Id Name Driven

Condition Message Macro

Specifies an identifier for the CE error. Specifies a name for the CE error. This name is used only used as an identification reference. 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). Lists an optional conditional expression. Specifies text for the error message. This is the message that will be output in the .log file and event list. Displays the macro if the error message is associated with a macro (as described above).

IMSpost Guide

147

Controller Menu and Options: Grammar


Option/Button Description

Status

Report

Macro Add Save

Determines how an error should be generated: ON All the time. OFF Terminate error (cancels ON). ONCE First encounter. 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. 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. Creates an open row which enables you to add an additional error message. 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

148

IMSpost Guide

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

Components References Multi-Axis

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). Specifies model components. Use this dialog to describe the physical components of the machine (such as tables, heads, parts, and tools). Specifies machine offsets (pivot points). Use this dialog to describe offsets between the components you have defined for the machine. 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.

IMSpost Guide

149

Machine Menu and Options: Motion


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.

150

IMSpost Guide

Machine Menu and Options: Motion 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 Type Direction

Minimum

Maximum

Specifies the machine component name that moves the associated axis. Indicates the axis type: Linear or Rotary. 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. 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. 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.

IMSpost Guide

151

Machine Menu and Options: Motion Once an axis is defined, you can click Moreto enter additional definitions. A dialog similar to the following is displayed. This dialog applies to a linear definition:

152

IMSpost Guide

Machine Menu and Options: Motion This dialog applies to a rotary definition:

Field/Button

Description

Name Register

Component Channel Type

Specifies the motion axis name. 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. Specifies the machine component name that moves the associated axis. Assigns a channel name if more than one machine with multi-channel programming is used. Indicates the axis type: Linear or Rotary.

IMSpost Guide

153

Machine Menu and Options: Motion


Field/Button Description

+/- for rotary direction

Short Way

Direction

Minimum

Limit to Minimum Maximum

Limit to Maximum Home Position Move to home at tool change

Maximum Feed Minimum increment

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.) 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. 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. 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). Linear Only: Indicates that travel should be limited to the minimum value. 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). Linear Only: Indicates that travel should be limited to the maximum value. Specifies the home position for the axis. This is used only if the next option (Move to home at tool change) is selected. 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. Specifies the maximum axis feed (rapid positioning) for time calculations. Does not make movements that are smaller than this value.

154

IMSpost Guide

Machine Menu and Options: Motion


Field/Button Description

Axis Step

Delta (co-linear axes)

Discrete position(s)

Acceleration Use Acc. Deceleration Use Dec. Device ID (Catia) Lock axis for type

Enable Auto Retract

Enable Auto Retract For Linear Move

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... 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. Rotary Only: Lists positions if the rotary axis is limited to certain fixed position. For example: [0, 90, 180, 270] Specifies the rate for acceleration speed (CE only). This is not applicable to IMSpost. Indicates that Acceleration should be used (CE only). This is not applicable to IMSpost. Specifies the rate for slow down (CE only). This is not applicable to IMSpost. Indicates that Deceleration should be used (CE only). This is not applicable to IMSpost. Shows the Catia device ID. Each motion axis has a device ID. 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. Available only if the motion type is Rotary: Enables the Auto Retract feature if it is active (see Machine > Multiaxis > Multi-axis Setup). Available only if the motion type is Rotary: Repositions the rotary axis if a linear axis reaches a specified minimum or maximum range.

IMSpost Guide

155

Machine Menu and Options: Motion

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

156

IMSpost Guide

Machine Menu and Options: Motion 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.

IMSpost Guide

157

Machine Menu and Options: Components

Components
The Components option displays various components that construct the active machine model.

Field/Button

Description

Name Type Mount Motion 158

Specifies the component name. Indicates the components type: Table, Head, Tool, Part, Static, Fixture, or Design Defines what the component is attached to. Describes the machine axis (if any) associated with the component. IMSpost Guide

Machine Menu and Options: References


Field/Button Description

Shape

Direction

Device ID (Catia) Add

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. For Tool Component Types Only: Specifies the orientation direction of the component. Be sure to define all component directions for these types of components. Identifies the device (Catia only). 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 multiaxis 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.

IMSpost Guide

159

Machine Menu and Options: References


Field/Button Description

X (Horizontal) Y (Into) Z (Vertical) Set Up Machine Zero Advanced

Specifies the reference offset in the horizontal machine direction. Specifies the reference offset in the into machine direction. Specifies a reference offset in the vertical machine direction. Defines the machine zero, as described in Defining Machine Z Zero. 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 xytable. 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 Into Vertical Horizontal Orientation

Specifies the reference offset in the horizontal machine direction. Specifies the reference offset in the into machine direction. Specifies a reference offset in the vertical machine direction. 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.

160

IMSpost Guide

Machine Menu and Options: References


Field/Button Description

Into Orientation

Save Reset

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. Saves the information on the dialog. 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 > Multiaxis- 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

IMSpost Guide

161

Machine Menu and Options: References


Setup Machine Zero Output Using Description

Pivot Pivot Face Face

Pivot Face Pivot Face

Nxxx X300. Y300. Z100. (no change) Nxxx X300. Y300. Z110 (+ 10 pivot) Nxxx X300. Y300. Z90. ( - 10 pivot) Nxxx X300. Y300 Z100 (no change)

The other two choices involve software controlled tool lengths: Center Tip The postprocessor extracts the tool length from the LOADTL statement. This value will be added to all subsequent part Z coordinates. 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 (Aaxis). 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 LOADTL/1.LENGTH,150 GOTO/100,100,200,0,0,1 GOTO/100,100,200,,0,.707107,.707107 LOADTL/1.LENGTH,150 GOTO/100,100,200,0,0,1 GOTO/100,100,200,,0,.707107,.707107 Nxxx X100. Y100. Z200. A45. Nxxx T1 M6 Nxxx G0 X100. Y100. Nxxx Z470. Nxxx Y290.919 Z390.919. A45. Nxxx T1 M6 Nxxx G0 X100. Y100. Nxxx Z350. Nxxx Y290.919 Z270.919. A45.

Example 2: Set up Machine Zero = "Pivot"; Output Using = "Center"

Example 3: Set up Machine Zero = "Face"; Output Using = "Center"

162

IMSpost Guide

Machine Menu and Options: Multi-Axis

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

Multax on by default

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. Enables the default startup condition of the postprocessor to multiaxis postprocessing ( as if MULTAX/ON has been programmed in the APT/CL file).

IMSpost Guide

163

Machine Menu and Options: Multi-Axis


Field Description

Lintol on by default

Output using...

Solution Condition

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

164

IMSpost Guide

Machine Menu and Options: Multi-Axis


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

Enable auto retract/reorient for rotary axes

Auto retract angle

Clearance distance Feed in/out distance

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. 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. 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. Defines the relative distance to retract (along the tool axis) in G0 mode before the rotary axis repositions (unwinds). Defines the initial retraction distance in feed (G1) mode. Remaining retraction will be done in G0 mode as specified in the Clearance distance, above. 165

IMSpost Guide

Machine Menu and Options: Multi-Axis


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 SYSTEM.COORD.RTCP = 0

The Enable auto retract/reorient for rotary axes option is checked (ON). 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,TOOL.ORIGIN) CUT(PART,TOOL.CENTER) CUT(PART,TOOL.TIP)

Cut part with tools defined pivot point (Machine References). Cut part with spindle face. Cut part with tools center point. 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 166 IMSpost Guide

Machine Menu and Options: Multi-Axis 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 Activates Best Solution in RAPID macro RAPID/ GOTO/100,150,300,0,1,0 RAPID/ GOTO/400,350,300,0.,1,0 Starts Best Solution Boundary FEDRAT/1500,MMPM 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 Ends Best Solution Boundary and returns SOLUTION to RAPID/

first RAPID motion

IMSpost Guide

167

Machine Menu and Options: Multi-Axis

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.

168

IMSpost Guide

Machine Menu and Options: Multi-Axis 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.

IMSpost Guide

169

Machine Menu and Options: Multi-Axis


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 Work Plane Off

Indicates the function code for the working plane option ON. Indicates the function code for the working plane option OFF.

170

IMSpost Guide

Machine Menu and Options: Multi-Axis


Field Description

Tool direction

IJK vector User-defined plane

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. Defines the matrix to multiply all points into the plane perpendicular to the given vector, as specified in every GOTO command. 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

Axis

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

IMSpost Guide

171

Machine Menu and Options: Multi-Axis


Field Description

Independent rotary axes

Step Specifies the tolerance value. 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 Change Macro Additional options are:


Field

Activates the WORKING_PLANE macro with the first move only. Activates the macro every time the plane is changed. Executes the WORKING_PLANE macro.

Description

Reverse Matrix Linear

Instructs IMSpost to calculate an inverse matrix. The system will flip the resulting coordinates. 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.

172

IMSpost Guide

Machine Menu and Options: Multi-Axis


Field Description

Rapid

Cycle

Active

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. 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. 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 i1, j1, k1 i2, j2, k2

Solution will find a plane perpendicular to this vector. First axis of rotation to get to the desired plane. 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.

IMSpost Guide

173

Machine Menu and Options: Import Machine

Import Machine
This option imports machine options and overrides the existing machine model with: IMS project file IMS model file Pre-defined machines From another postprocessor file. This imports a machine description from another project. From an existing machine model. 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:

174

IMSpost Guide

Machine Menu and Options: Import Machine 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:

IMSpost Guide

175

Machine Menu and Options: Import Machine 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

176

IMSpost Guide

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:

IMSpost Guide

177

Report Menu and Options: Import Machine 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.

178

IMSpost Guide

Report Menu and Options: Import Machine 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

Table

Creates an optional *.lis output file (enter commentary data along with the machine code). Use this dialog to define the format of the block-byblock 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. 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:

IMSpost Guide

179

Report Menu and Options: List

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

Attached Variable Field Format Add Delete

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. Specifies a variable name to be output in this column in the list file for each block of data. Describes the format (using #.#) of the field output for this column of the list file. Adds a new column to the list file block by block output. 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.

180

IMSpost Guide

Report Menu and Options: List

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.

IMSpost Guide

181

Report Menu and Options: List

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. 182 IMSpost Guide

Report Menu and Options: List 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.

IMSpost Guide

183

Report Menu and Options: List

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

184

IMSpost Guide

Report Menu and Options: List

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. IMSpost Guide 185

Report Menu and Options: List 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.

186

IMSpost Guide

Report Menu and Options: List

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 # of characters per line

Specifies the number of lines on a printed output page for the listing file output. Specifies the number of characters on a line on a printed output page for the listing file output.

IMSpost Guide

187

Report Menu and Options: Table

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

Attached Variable Field Format New Table Delete Table Add Column Delete Column Text file 188

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. Specifies a variable name to be output in this column in the report file for each block of data. Describes the format (using #.#) of the field output for this column of the report file. Creates a new table. Deleted the current table. Adds a new column to the report file block by block output. 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. Creates the report as a text file (.TXT). IMSpost Guide

Report Menu and Options: Table


Field/Button Description

HTML file XML file

Creates the report as an HTML file (.HTM). 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.

IMSpost Guide

189

Report Menu and Options: Table

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. 190 IMSpost Guide

Report Menu and Options: Table 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.

IMSpost Guide

191

Report Menu and Options: Table

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.

192

IMSpost Guide

Report Menu and Options: Table

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 4digit number, you would enter 4 ^ characters, as in the example above. IMSpost Guide 193

Report Menu and Options: Table 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

194

IMSpost Guide

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 Descriptive Comments Opstop MULTI HOME

Enables you to create custom dialogs. EXAMPLE of a user dialog: Activates tape comments. This is an IMS-developed dialog. EXAMPLE of a user dialog: Activates output of M01 codes. This is an IMS-developed dialog. EXAMPLE of a user dialog: Enables you to active work coordinate systems. This is an IMSdeveloped 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 New Dialog

Enables you to select an existing dialog to edit. Opens a blank dialog window. Enter a name in the pop-up window.

IMSpost Guide

195

User Menu and Options: User Dialog


Field/Button Description

Delete Dialog Add Entity

Delete Entity Import Test

Close

Deletes the active dialog. 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. Deletes the specified entity. Imports a dialog from another project (postprocessor) file. 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. 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:

196

IMSpost Guide

User Menu and Options: User Dialog


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

IMSpost Guide

197

User Menu and Options: User Dialog 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). 198 IMSpost Guide

User Menu and Options: User Dialog 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.

IMSpost Guide

199

User Menu and Options: User Dialog

11. Click Test to check your results:

12. Click Close to save your work and exit the dialog.

200

IMSpost Guide

User Menu and Options: Examples

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.

IMSpost Guide

201

User Menu and Options: Examples

MULTI HOME
This example of a user-defined dialog enables the user to active work coordinate systems.

Notes

202

IMSpost Guide

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 Activate PP File Diagnostics About IMSpost

Displays IMSpost help information. Enables you to install specific postprocessor (PP) license codes, if applicable. Creates a license diagnostic. Displays the current IMS software release information. For example:

IMSpost Guide

203

Help Menu and Options: Activate PP File

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 Load PP files into a customer license Browse

Loads the selected postprocessor license file(s) into your current license. Loads the selected postprocessor license file(s) into a customer license. 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.

204

IMSpost Guide

Help Menu and Options: Diagnostics

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

Hardware Info

Confirms the set up of the IMS environment. The software will not run correctly without the correct license file (IMSDIR_LICENSE_FILE). 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.

IMSpost Guide

205

Help Menu and Options: Diagnostics


Field/Button Description

Output diagnostic report

Display diagnostic report file Build 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. Displays the report file in your default editor. If this option is not checked, the file is created file without displaying it. 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 IMS license file found : Z:\license_dell830_nodelocked.dat Company Project Code IMS dealer IMS Products : Dan : IMS : TRUE : 16448 IMSpost Professional IMSpost Revpost editor

2.

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 GENERAL APT ,CATIA MACHINIST,PTC ADRA ,IBM BIN ,MASTERCAM DELCAM ,UNIGRAPHICS ,SURFCAM AUTON ,INTERCIM ,HOUTZEL MetalCam Linear : 99 Rotary : 99 3. Hardware data for users computer: IMS dongle NOT found Ethernet address 1: 001E8C56298E Ethernet address 2: 001D09B7DEE7

,GE-APT ,Teksoft ,CATIA ,CIMATRON ,VX

206

IMSpost Guide

Help Menu and Options: Diagnostics


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

IMSpost Guide

207

Help Menu and Options: Diagnostics


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

208

IMSpost Guide

Macro Language Commands

Macros constitute the link between CLdata (cutter location data) input and the postprocessors 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 SYSTEM Description

GLOBAL

MODE

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

IMSpost Guide

209

Macro Language Commands: Accessing Variables Within Macros


Category LOCAL Description

CLDATA

CLREAD

REGISTER

COMPONENT FUNCTION

MACHINE

SOLUTION ARRAY

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. 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. 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. 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 These are component-type variables. They are represented within the Machine Components feature. 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. 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. These are variables associated with their respective SOLUTION routine. Consult the individual SOLUTION macro statement for variable examples. 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.

210

IMSpost Guide

Macro Language Commands: Assignment Statements

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 !GLOBAL.A = 999.999 VALUE_1 = GLOBAL.A * (-1.0) RETURN

Set variable GLOBAL.A Set GLOBAL.A using one-shot Value of VALUE_1 is 999.999; GLOBAL.A, while in the macro is 999.999 After the macro is completed, the value of GLOBAL.A is 3.0

IMSpost Guide

211

Macro Language Commands: Math Functions in a Macro

Math Functions in a Macro


Here are the math functions you can use in a macro:
Math Function Description

SIN(X) COS(X) TAN(X) ASIN(X) ACOS(X) ATAN(X) ATAN2(Y,X) SQRT(X) ABS(X) INT(X) ROUND(X) SINH(X) COSH(X) TANHX) EXIST(variable name)

EXP(X) LOG(X) POW(X,Y) LOG10(X) CEIL(X) FLOOR(X) MIN(X1,..,Xn) MAX(X1..,Xn) MOD(X,Y) UCASE(S) LCASE(S) STRLEN(S) SPRINT(Format,V1,..Vn)

Sine of X (X in degrees) Cosine of X (X in degrees) Tangent of X (X in degrees) Arcsine of X Arccos of X Arctangent of X Calculate inverse tangent of the arguments quotient Square root of X Absolute value of X Integer part of X Round off to closest integer part of X Hyperbolic sin of X Hyperbolic cosine of X Hyperbolic tangent of X =0; variable does not exist =1; variable exists but not initialized =2; variables exists and is initialized Exponential function Natural logarithm Set power of X to Y A = POW(2,3) or A=2*2*2 Base 10 logarithm X > 10 Smallest integer not less than X Largest integer not greater than X Return the lowest X Return the highest X Remainder of X/Y with the same sign as X Uppercase of string S Lowercase of string S Length of string S 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

212

IMSpost Guide

Macro Language Commands: Including Operations in Macros

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: *,/ +,AND OR =,< > highest precedence

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 = GLOBAL.TOOL END_STRING = "***)" TOOL_STRING = START_STRING + TOOL + END_STRING OUTPUT(TOOL_STRING,NEWLIN) TOOL #"

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 ** TOOL + TAB + END_STRING LOAD TOOL #" + TAB +

IMSpost Guide

213

Macro Language Commands: FINAL Macro

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)

214

IMSpost Guide

Macro Language Commands: FINAL Macro 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.

IMSpost Guide

215

Macro Language Commands: FINAL Macro 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.

216

IMSpost Guide

Macro Language Commands: Macro Statements

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

IMSpost Guide

217

Macro Language Commands: ASSIGN Statements

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) ASSIGN("B",CLDATA.2) ASSIGN("C",CLDATA.3)

A = 200 B = 175 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)

218

IMSpost Guide

Macro Language Commands: CASE Statements 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 variables 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 CLDATAN.1 = 1.0 CLDATAN.2 = "CLW" CLDATAM.0 = 2 CLDATAM.1 = "ABC"

1 value is statement (counts # of values in statement) 1st value in statement 2nd word in statement (DIR = "CLW") 2 words in statement (counts # of words in statement) 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.

IMSpost Guide

219

Macro Language Commands: CLREAD Statements

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 "statement" occurrence

stay/return

how many

Return value indicating the number of lines read, from the current line, until search was successful. Value of 0 indicates statement was not found. The formal parameters of the statement to read ahead for. 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. 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. 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:

220

IMSpost Guide

Macro Language Commands: CUT Statements


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,TOOL.ORIGIN) CUT(PART,TOOL.CENTER) CUT(PART,TOOL.TIP)

Cut PART component with tools (rotary head) defined pivot point. Cut PART component with spindle face. Cut PART component with tools center point. 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

filename instring

This statement would take the data that was predefined through the Report feature and add it to a file named tooltable.htm. Name of the file. 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.

IMSpost Guide

221

Macro Language Commands: GETAPT Statements 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

222

IMSpost Guide

Macro Language Commands: HOOK Statements

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 name2 expr place

FLAG

The unique name for the hook. The APT command or macro activated by the hook. An optional conditional expression to be evaluated to TRUE or FALSE. 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. 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 IMSpost Guide 223

Macro Language Commands: IF Statements

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.

224

IMSpost Guide

Macro Language Commands: OPTIMIZE Statements

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.

IMSpost Guide

225

Macro Language Commands: OUTPUT Statements


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

MODE.name

MODE.MODAL.name

MODE.name.subname

(such as,
MODE.MOTION.LINEAR)

Outputs both register name and value according to its format. 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. 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. Same as above but only if not MODAL or the last output is different from this function. (Modality is checked.) 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. 226 IMSpost Guide

Macro Language Commands: PRINT and DISPLAY Statements


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)

IMSpost Guide

227

Macro Language Commands: PRIORITY Statements


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

228

IMSpost Guide

Macro Language Commands: ROUND Statements

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 executedit 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 RUN ( GLOBAL.PART_PATH ) " + "c:\MILL\MAZAK\TEST.APT"

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) SEQNO(OFF) SEQNO("O")

Same as CALL(SEQNO/ON). Same as CALL(SEQNO/OFF). Changes the sequence letter address to O (such as O1535 G0 Z1200). The letter O must exist in the Register Table. 229

IMSpost Guide

Macro Language Commands: SETAT Statements

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 I,J,K "MOVE" "REGISTER" "NOREPORT" "NOHOOK"

Usually the given part coordinate, given in the APT GOTO statement. Usually the vector of the tool, relative to the part, given in multiaxis (>3) moves. (optional) Moves the machine to the required coordinate. (optional) Updates the related registers with the new values. (optional) Instructs IMSpost to not report any warnings or errors as a result of this SOLUTION. (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.

230

IMSpost Guide

Macro Language Commands: SOLUTION Statements 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.Y SOLUTION.Z SOLUTION.I SOLUTION.J SOLUTION.K SOLUTION.EXIST

Solution calculated for this X. Solution calculated for this Y. Solution calculated for this Z. Solution calculated for this component of the tool vector along X axis. Solution calculated for this component of the tool vector along Y axis. Solution calculated for this component of the tool vector along K axis. 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 SOLUTION.name_VALUE SOLUTION.name_INCREMENT SOLUTION.name_CHANGE

Current position of this axis before moved by this solution. New suggested value to move to. Incremental move (from last position). 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 SOLUTION.X_VALUE SOLUTION.X_INCREMENT SOLUTION.X_CHANGE SOLUTION.Y_CURRENT SOLUTION.Y_VALUE SOLUTION.Y_INCREMENT SOLUTION.Y_CHANGE SOLUTION.LINEAR_AXIS SOLUTION.ROTARY_AXIS SOLUTION.LINTOL_LINEAR SOLUTION.LINTOL_ROTARY SOLUTION.LINEAR_MOVE SOLUTION.ROTARY_MOVE SOLUTION.TOTAL_MOVE

Current position of this axis before moved by this solution. New suggested value to move to. Increment move. Need to move: Yes/No. Current position of this axis before moved by this solution. New suggested value to move to. Increment move. Need to move: Yes/No. Number of linear axes that move for this solution. Number of rotary axes that move for this solution. Maximum distance from the straight line within this solution. Maximum angle distance from the plane within this solution. Length of the linear move. Length of rotary move in system units (INCH/MM). 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.

IMSpost Guide

231

Macro Language Commands: SOLUTION Statements 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.MATRIXB1[1] SYSTEM.MATRIXC1[1] SYSTEM.MATRIXA1[2] SYSTEM.MATRIXB1[2] SYSTEM.MATRIXC1[2] SYSTEM.MATRIX1A[3] SYSTEM.MATRIX1B[3] SYSTEM.MATRIX1C[3] SYSTEM.MATRIX1A[4] SYSTEM.MATRIX1B[4] 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 1.0 0.0 0.0 0.0 1.0 0.0 0.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

232

IMSpost Guide

Macro Language Commands: SOLUTION Statements 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 I,J,K name

Next motion point. Vector of tool at this point (X,Y,Z). 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

SYSTEM.LINTOL_LINEAR SYSTEM.LINTOL_ROTARY SYSTEM.MAX_STEP

SYSTEM.MAX_LINTOL_STEP

Controls multi-axis linearization routine. The SOLUTION first checks whether SYSTEM.LINTOL = 1 (if 0, no linearization check is made). Specifies the linear deviation (if 0.0, no check is made). This is linearization for the linear axes only. Specifies the angular deviation (if 0.0, no check is made). This is the multi-axis angular deviation for rotary motion. 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 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 SOLUTION.LINTOL_LINEAR SOLUTION.LINTOL_ROTARY SOLUTION.X[1] SOLUTION.Y[1] SOLUTION.Z[1] SOLUTION.I[1] SOLUTION.J[1] SOLUTION.K[1] SOLUTION.X[n] SOLUTION.Y[n]

Number of break moves. The result linear deviation. The result angular deviation. X coordinate of the first breakpoint. Y coordinate of the first breakpoint. Z coordinate of the first breakpoint. I component vector of the first breakpoint. J component vector of the first breakpoint. K component vector of the first breakpoint. Last coordinate of the last breakpoint. Last coordinate of the last breakpoint.

IMSpost Guide

233

Macro Language Commands: SOLUTION Statements


SOLUTION.Z[n] SOLUTION.I[n] SOLUTION.J[n] SOLUTION.K[n]

Last coordinate of the last breakpoint. I component vector of the last breakpoint. J component vector of the last breakpoint. K component vector of the last breakpoint.

In addition, the points of each axis variable name are returned:


nameX[1] nameY[1] nameZ[1] nameI[1] nameJ[1] nameK[1] nameX[1] nameY[1] nameZ[1] nameI[1] nameJ[1] nameK[1]

X coordinate of first the breakpoint. Y coordinate of first the breakpoint. Z coordinate of first the breakpoint. I component vector of the first breakpoint. J component vector of the first breakpoint. K component vector of the first breakpoint. X coordinate of the last breakpoint. Y coordinate of the last breakpoint. Z coordinate of the last breakpoint. I component vector of the last breakpoint. J component vector of the last breakpoint. 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. 234 IMSpost Guide

Macro Language Commands: SOLUTION Statements Additional LINTOL solution variables are:
SOLUTION.LIMIT_X SOLUTION.LIMIT_Y SOLUTION.LIMIT_Z SOLUTION.SAFE_X SOLUTION.SAFE_Y SOLUTION.SAFE_Z SOLUTION.OUT_X SOLUTION.OUT_Y SOLUTION.OUT_Z SOLUTION.LIMIT_I SOLUTION.LIMIT_J SOLUTION.LIMIT_K SOLUTION_NUMBER_LIMIT SOLUTION.NUMBER_FINAL

Specifies the machines XYZ position at the rotary limit.

Specifies the feed out retraction position.

Specifies the rapid out retraction position.

Specifies tool orientation at the rotary limit position.

Determines which motion to use to reach machines rotary limit. 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 SYSTEM.#_OF_RECORD SYSTEM.RADIUS SYSTEM.DIRECTION

One of the three given plane option. The arc lays in this plane (for example, "X.Y"). Number of quadrants in this arc. This must be between 1 to 5. If it is 0, no solution is found. Radius of the given arc. Interpolation direction: 1 is CCLW, -1 is CLW.

IMSpost Guide

235

Macro Language Commands: SOLUTION Statements


SYSTEM.LENGTH SYSTEM.START_ANGLE SYSTEM.END_ANGLE SYSTEM.DELTA_ANGLE SYSTEM.X_START SYSTEM.Y_START SYSTEM.X_END SYSTEM.Y_END SYSTEM.X_CNT_TO_START SYSTEM.Y_CNT_TO_START SYSTEM.X_CNT_TO_END SYSTEM.Y_CNT_TO_END SYSTEM.X_CFG_CENTER SYSTEM.Y_CFG_CENTER

Length of arc. Angle of start point (to +X axis if in the XY-plane). Angle of end point (to +X axis if in the XY-plane). Angle between END_ANGLE to START_ANGLE. X coordinate of the start point. Y coordinate of the start point. X coordinate of the end point. Y coordinate of the end point. Distance along X (if in the XY-plane) from the center of the arc to the start point. Distance along Y (if in the XY-plane) from the center of the arc to the start point. Distance along Y (if in the XY-plane) from the center of the arc to the end point. Distance along Y (if in the XY-plane) from the center of the arc to the end point. Center information along X (if in the XY- plane) according to SYSTEM.CIRCTYPE 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: 1: 2: 3: 10: Absolute coordinate of center. Distance from start to center. Distance from center to start. Unsigned distance from center to start. Linearize circular output.

236

IMSpost Guide

Macro Language Commands: SOLUTION Statements

SOLUTION Statements: Format 4


SOLUTION(CIR2LIN/"MOVE","REGISTER") "MOVE" "REGISTER"

(optional) Moves the machine to the required coordinate. (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 completedin 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") Check that solution exists for the given IF (SOLUTION.#_OF_RECORD > 0) WHILE (SOLUTION.#_OF_RECORD) SOLUTION(CIR2LIN/"MOVE","REGISTER") OUTPUT(MODE.MOTION.LINEAR,NEWLIN) ENDWHILE

arguments. Loop until all moves completed. Call the solution for the next move. Generate linear move of this point.

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

IMSpost Guide

237

Macro Language Commands: SORT Statements 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.Q SOLUTION.ANGLE

Solution vectors component of the X axis. Solution vectors component of the Y axis. 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 (Gcodes), 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)

238

IMSpost Guide

Macro Language Commands: SPLIT Statements


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

IMSpost Guide

239

Macro Language Commands: SPRINT Statements

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 o x u c s f Convert to decimal Convert to unsigned octal Convert to unsigned hexadecimal Convert to unsigned decimal (integer) Single character Designates a text string 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: :%-10s: :%20s: :%-20s: :%20.10s: :%-20.10s :%.10s :hello, world: :hello, world: : hello, world: :hello, world : :hello, wor :hello, wor: : : hello, wor:

Right justified Left justified Right justified, 10 characters Left justified, 10 characters 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.

240

IMSpost Guide

Macro Language Commands: STREXT Statements

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)

IMSpost Guide

241

Macro Language Commands: TOKEN Statements 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 N2 N3 N4 LOAD TOOL 10 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.

242

IMSpost Guide

Macro Language Commands: USER STATEMENTS

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.

IMSpost Guide

243

Macro Language Commands: WHILE Statements

Notes

244

IMSpost Guide

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 CLDATAN.0 CLDATAN.1 CLDATAN.LEFT.MINOR.0 CLDATAN.LEFT.MINOR.1 CLDATAN.RIGHT.MINOR.0 CLDATAN.RIGHT.MINOR.1 CLDATAN.[#] CLDATAN.LEFT.MINOR.[#] CLDATAN.RIGHT.MINOR.[#] CLDATAM.0 CLDATAM.1 CLDATAM.LEFT.MINOR.0 CLDATAM.LEFT.MINOR.1 CLDATAM.RIGHT.MINOR.0 CLDATAM.RIGHT.MINOR.1. CLDATAM.[#] CLDATAM.LEFT.MINOR.[#] CLDATAM.RIGHT.MINOR.[#] Description

Parameter 0 is the count of CLDATAN input values. Parameter(s) 1 to n are the actual input values. LEFT.minor.0 is the count of values left of minor. LEFT.minor.1 to n are the actual values left of minor. RIGHT.minor.0 is the count of values right of minor. RIGHT.minor.1 to n are the actual value right of minor. Values 1n can be written using the array format. Parameter 0 is the count of CLDATAM input values. Parameter(s) 1 to n are the actual input minor words. LEFT.minor.0 is the count of minor words left of minor. LEFT.minor.1 to n are the actual minor words left of minor. RIGHT.minor.0 is the count of minor words right of minor. RIGHT.minor.1 to n are the actual minor words right of minor. Minor words 1n can be written using the array format.

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 CLDATA.2 CLDATA.3 CLDATA.4 = = = = DEEP FEDTO -.125 INCR

IMSpost Guide

245

Macro Language Variables: CLREAD Variables


CLDATA.5 CLDATA.6 CLDATA.7 CLDATA.8 CLDATA.9 = = = = = 12.5 MMPM 2000 RAPTO 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 CLDATAN.0 = 3 CLDATAN.1 = 1.0 CLDATAN.2 = 5.0 CLDATAN.3 = 3.0

3 values + 2 minor words.

CLDATAM.0 = 2 CLDATAM.1 = "LENGTH" CLDATAM.2 = "OSETNO" CLDATAN.RIGHT.LENGTH.0 CLDATAN.RIGHT.LENGTH.1 CLDATAN.RIGHT.OSETNO.0 CLDATAN.RIGHT.OSETNO.1 = = = = 1 5.0 1 3.0

One value between LENGTH and OSETNO. One value after OSETNO.

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 CLREADN.0 CLREADN.1 CLREADN.LEFT.MINOR.0 CLREADN.LEFT.MINOR.1 CLREADN.RIGHT.MINOR.0 CLREADN.RIGHT.MINOR.1 CLREADN.[#] CLREADN.LEFT.MINOR.[#] CLREADN.RIGHT.MINOR.[#] CLREADM.0 CLREADM.1 CLREADM.LEFT.MINOR.0 CLREADM.LEFT.MINOR.1 CLREADM.RIGHT.MINOR.0 Description

Parameter 0 is the count of CLREADN input values. Parameter(s) 1 to n are the actual input values. LEFT.minor.0 is the count of values left of minor. LEFT.minor.1 to n are the actual values left of minor. RIGHT.minor.0 is the count of values right of minor. RIGHT.minor.1 to n are the actual values right of minor. Values 1n can be written using the array format. Parameter 0 is the count of CLREADM input values. Parameter(s) 1 to n are the actual input minor words. LEFT.minor.0 is the count of minor words left of minor. LEFT.minor.1 to n are the actual minor words left of minor. RIGHT.minor.0 is the count of minor words right of minor. IMSpost Guide

246

Macro Language Variables: Component Model Example


Variable CLREADM.RIGHT.MINOR.1 CLREADM.[#] CLREADM.LEFT.MINOR.[#] CLREADM.RIGHT.MINOR.[#] Description

RIGHT.minor.1 to n are the actual minor words right of minor. Minor words 1...n can be written using the array format.

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 Type Mount Motion Shape Direction

Component ID (from the component tree). Table, Head, Part, Tool, Static, and Fixture. How the component is attached to another. Does component drive a machine axis? If so, enter axis. Components shape. This can be a cube cone or cylinder. Direction in which the cylinder or cone is pointed.

IMSpost Guide

247

Macro Language Variables: COMPONENT Variables

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 COMPONENT.UNIT Description

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 COMPONENT.name.MOTION COMPONENT.name.SHAPE

Specifies what component it is attached to. For example:


COMPONENT.TOOL.MOUNT = "HEAD"

Specifies what machine register is affected. For example:


COMPONENT.TOOL.MOTION = "Z"

Specifies the component shape as "CUBE", "CYLINDER", or "CONE". For example:


COMPONENT.PART.SHAPE = "CUBE"

The following variables apply only for cube shapes.


Variable COMPONENT.name.SIZE.LENGTH Description

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

248

IMSpost Guide

Macro Language Variables: COMPONENT Variables 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 COMPONENT.MOTION.name.HORIZONTAL COMPONENT.MOTION.name.INTO COMPONENT.MOTION.name.VERTICAL Description

Specifies the horizontal direction vector. For example:


COMPONENT.MOTION.Z.HORIZONTAL = 0.0

Specifies the into direction vector. For example:


COMPONENT.MOTION.Z.INTO = 0.0

Specifies the vertical direction vector. For example:


COMPONENT.MOTION.Z.VERTICAL = 1.0

Additional variables are:


Variable COMPONENT.MOTION.name.VALUE Description

Move components to an absolute machine position. For example:


COMPONENT.MOTION.Z.VALUE = 2500

COMPONENT.MOTION.name.MINIMUM COMPONENT.MOTION.name.MAXIMUM COMPONENT.MOTION.name.LIMITMIN

Specifies the minimum machine limit. For example:


COMPONENT.MOTION.Z.MINIMUM = -20.

Specifies the maximum machine limit. For example:


COMPONENT.MOTION.Z.MAXIMUM = 4500.

Controls minimum machine limit check (0 = Off, 1 = On). For example:


COMPONENT.MOTION.Z.NAME = 1

IMSpost Guide

249

Macro Language Variables: COOLANT Variables


Variable COMPONENT.MOTION.name.LIMITMAX Description

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 GLOBAL.COOLANT_BLOCK GLOBAL.COOLANT_DEF = 'MIST' MODE.COOLNT.MIST : M7 MODE.COOLNT.FLOOD : M8 MODE.COOLNT.OFF : M9 Description

= 0 Outputs coolant on a block itself. = 1 Outputs with the next motion block. Default coolant condition. MODE/GROUP and FUNCTION attached to the MIST coolant. MODE/GROUP and FUNCTION attached to the FLOOD coolant. MODE/GROUP and FUNCTION attached to the coolant is off.

An example input, output result is:


COOLNT/MIST COOLNT/FLOOD COOLNT/OFF M7 M8 M9 MODE.COOLNT="MIST" MODE.COOLNT="FLOOD" MODE.COOLANT="OFF"

250

IMSpost Guide

Macro Language Variables: CUTCOM (Cutter Compensation) Variables

CUTCOM (Cutter Compensation) Variables


The macro variables used by this dialog, with default settings and description, are as follows:
Variable GLOBAL.CUTCOM_BLOCK = 1 GLOBAL.CUTCOM_REG = "D" MODE.CUTCOM.LEFT : G41 MODE.CUTCOM.RIGHT : G42 MODE.CUTCOM.OFF : G40 Description

Outputs CUTCOM in a block itself or the next motion block. Offsets the register used with cutter diameter compensation. MODE/GROUP and FUNCTION attached to the leftside compensation. MODE/GROUP and FUNCTION attached to the right-side compensation. 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 GLOBAL.CYCLE_USER1 = "" GLOBAL.CYCLE_USER2 = "" GLOBAL.CYCLE_USER3 = "" GLOBAL.CYCLE_USER4 = "" GLOBAL.CYCLE_OTHER = "" GLOBAL.CYCLE_CFORM = 0 Description

GLOBAL.CYCLE_DFORM = 0

GLOBAL.CYCLE_BLOCK = 0 GLOBAL.CYCLE_REG4 = "P" GLOBAL.CYCLE_REG3 = "R" GLOBAL.CYCLE_REG2 = "Q" GLOBAL.CYCLE_REG1 = "Z" MODE.CYCLE.OFF="G80"

User defined cycle type name. User defined cycle type name. User defined cycle type name. User defined cycle type name. Additional code to be output on cycle block. 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 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 0: Cycle off in block itself 1: Cycle off on next motion block Register used for cycle dwell value. Register used for clearance plane value. Register used for peck increments; used in DEEP and BRKCHP cycles. Register used for cycle depth value. MODE/GROUP + FUNCTION attached to cycle off. 251

IMSpost Guide

Macro Language Variables: FEED (Feedrate Definition) Variables


Variable MODE.CYCLE.DRILL="G81" MODE.CYCLE.FACE="G82" MODE.CYCLE.DEEP="G83" MODE.CYCLE.TAP="G84" MODE.CYCLE.REAM="G85" MODE.CYCLE.BORE="G86" MODE.CYCLE.BAKBOR="G87 MODE.CYCLE.MANBOR="G88" MODE.CYCLE.STPBOR="G89" MODE.CYCLE.BRKCHP="G73" MODE.CYCLE.LHTAP="G74" MODE.CYCLE.USER Description

MODE/GROUP+ FUNCTION attached to cycle drill. MODE/GROUP+ FUNCTION attached to cycle drill with dwell (spot drill). MODE/GROUP+ FUNCTION attached to deep drilling cycle. MODE/GROUP+ FUNCTION attached to tapping cycle. MODE/GROUP+ FUNCTION attached to reaming cycle. MODE/GROUP+ FUNCTION attached to boring cycle. MODE/GROUP+ FUNCTION attached to back boring cycle. MODE/GROUP+ FUNCTION attached to manual boring cycle. MODE/GROUP+ FUNCTION attached to bore stop cycle. MODE/GROUP+ FUNCTION attached to breakchipping cycle. MODE/GROUP+ FUNCTION attached to left-hand (reverse) tapping cycle. MODE/GROUP+ FUNCTION attached to user defined cycle.

An example input, output result is:


CYCLE/DRILL, 0.5, IPM, 72, 0.4, 0.4 GOTO/1,2,3 GOTO/4,5,3 CYCLE/OFF G81 X1. Y2. Z2.5 R3.4 F72. X4. Y5. G80 MODE.MOTION=CYCLE MODE.CYCLE="DRILL"

MODE.CYCLE=OFF

FEED (Feedrate Definition) Variables


The macro variables used by this dialog, with default settings and description, are as follows:
Variable GLOBAL.FEED_BLOCK = 1 GLOBAL.FEED_REG = "F" GLOBAL.FEED_MM_MIN = 5.3 GLOBAL.FEED_INCH_MIN = 4.4 GLOBAL.FEED_MM_REV = 3.3 GLOBAL.FEED_INCH_REV = 2.4 Description

0 = output codes on a block itself 1 = next motion block Register used for feed rate value. Digit format for MM/MINUTE format. Digit format for INCH/MINUTE format. Digit format for MM/REVOLUTION format. Digit format for INCH/REVOLUTION format.

252

IMSpost Guide

Macro Language Variables: FUNCTION Variables


Variable GLOBAL.FEED_INV_TIME = 4.2 GLOBAL.FEED_PROG = 100.000000 MODE.FEED.MINUTE (G94) Description

MODE.FEED.REVOLUTION (G95) MODE.FEED.INVERSE (G93)

Digit format for inverse time feed programming. Default feed rate value. MODE/GROUP+ FUNCTION attached to per minute feed mode. MODE/GROUP+FUNCTION attached to per revolution feed mode. MODE/GROUP attached to inverse time feed mode.

An example input, output result is:


UNIT/MM FEDRAT/220.245 GOTO/100,0,0 UNIT/INCHES FEDRAT/23.245 GOTO/4,5,6 X4. Y5. Z6. F23.25 G1 X100. G70 REGISTER.F.VALUE = 23.245 F220.2 G71 REGISTER. F.VALUE = 220.245

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 FUNCTION.name.NAME Description

Name of the G/M code. For example:


FUNCTION.M3.NAME = "M13"

FUNCTION.name.MODAL

This variable is useful for changing the name of a function For code modality enter "Y" for modal; enter "N" for nonmodal. For example:
FUNCTION.M3.MODAL = "Y"

FUNCTION.name.MODE FUNCTION.name.USE

MODE variable that could be associated with the code. 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 FUNCTION.name.END FUNCTION.name.BLOCK

Enter 1 if code is output by itself. If code is output with other codes, enter 0. Enter 1 if the controller acts on code immediately. Enter 1 if code is output by itself, or enter 0 if output with other code. 253

IMSpost Guide

Macro Language Variables: Geometry Functions 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) VECPROD(VECTOR,VECTOR) V1 = VECTOR(1,1,0 V2 = VECTOR(0,0,1) V5 = VECPROD(V1,V2)

V1 = VECTOR(0.707107,-.207107,0

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 VECLEN (VECTOR) L1 = VECLEN(V2) 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 Return length of predefined vector.

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)

254

IMSpost Guide

Macro Language Variables: Geometry Functions

VECANG
VECANG returns the angle between two specified vectors.
ANG = VECANG(0,0,1,1,0,1) ANG = VECANG(VECTOR,VECTOR) ANG = VECANG(V10,V12 VECANG (POINT,POINT) ANG = VECANG(P12,P13)

ANG = 45 Returns angle of 2 predefined vectors. Returns angle of 2 predefined points.

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) VECPERVEC

B=1 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) 255

IMSpost Guide

Macro Language Variables: Geometry Functions

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)

256

IMSpost Guide

Macro Language Variables: Geometry Functions

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)

IMSpost Guide

257

Macro Language Variables: Geometry Operations

Geometry Operations
You can combining math operations (+,-,*,/) with predefined geometry definitions.
Combination POINT + POINT Description

Adding two predefined points.


P1 = P2 = and if: P3 = then: P3 = POINT(100,100,20) POINT(10,20,15) P1 + P2 POINT(110,120,35) POINT(100,100,20) POINT(10,20,15) P1 - P2 POINT(90,80,5) POINT(100,100,20) VECTOR(0,0,1) P1 + V1 POINT(100,100,21)

POINT - POINT

Subtracting two predefined points.


P1 = P2 = and if: P3 = then: P3 =

POINT + VECTOR

Adding a predefined point to a predefined vector.


P1 = V1 = P2 = then: P2 =

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 = V2 = V3 = then: V3 = VECTOR(1,2,3) VECTOR(1,0,0) V1 - V2 VECTOR(0,2,3)

258

IMSpost Guide

Macro Language Variables: Geometry Operations


Combination VECTOR * VECTOR Description

Multiplying two predefined vectors.


V1 = V2 = V3 = then: V3 = VECTOR(1,2,3) VECTOR(1,0,0) V1 * V2 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 = M2 = M3 = then: M3 = MATRIX(0,0,1,3,1,0,1,5,0,1,0,5) MATRIX(0,0,1,0,0,1,0,0,0,0,1,0) M1 * M2 MATRIX(

MATRIX / MATRIX CIRCLE * MATRIX

Dividing two predefined matrices. 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)

IMSpost Guide

259

Macro Language Variables: Geometry Assignments

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 POINT(X,Y,Z) Description

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; VECTOR(POINT) P1.Y = 20; P1.Z=400

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

260

IMSpost Guide

Macro Language Variables: Geometry Assignments


Assignment VECTOR(LINE) Description

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) LINE(LINE)

Specify starting and ending points.


L1 = LINE(1,2,3,4,5,6)

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

IMSpost Guide

261

Macro Language Variables: Geometry Assignments


Assignment CIRCLE(POINT,POINT,R) Description

CIRCLE(POINT,VECTOR,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 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 = C1.X C1.I C1.R CIRCLE(3,4,0,0,0,1,5) = 3 C1.Y = 4 C1.Z = 0 = 0 C1.J = 0 C1.K = 1 = 5

PLANE(I,J,K,CONST) PLANE(PLANE)

CONST specifies the translation origin point.


PL1 = PLANE(0,0,1,3)

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.

262

IMSpost Guide

Macro Language Variables: Geometry Assignments


Assignment PLANE(POINT,POINT,POINT) Description

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 MATRIX(A1,A2,A3,B1,B2,B3, C1,C2,C3)

Specify all 12 values.


M1 = MATRIXI(0,0,1,3,1,0,1,5,0,1,0,5

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)

IMSpost Guide

263

Macro Language Variables: Geometry Assignments


Assignment MATRIX(POINT,CONST,POINT, CONST,POINT,CONST Description

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)

264

IMSpost Guide

Macro Language Variables: Geometry Assignments


Assignment LINE_DIST_PARREL Description

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)

IMSpost Guide

265

Macro Language Variables: Geometry Assignments


Assignment PNTONPLN Description

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) PNT_LINE_INTRSC

I = 1 for true condition; I = 0 for false condition 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

VECPERVEC

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 Returns vector that is perpendicular to specified vector. Syntax is:
VECPERVEC(VECTOR) VECPERVEC(I,J,K)

For example: 266 IMSpost Guide

Macro Language Variables: MACHINE Variables


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 MACHINE.name.TYPE Description

MACHINE.name.LIMITMIN MACHINE.name.LIMITMAX MACHINE.name.FEEDRATE MACHINE.name.INCR

MACHINE.name.HORSPOWER MACHINE.name.MINIMUM MACHINE.name.MAXIMUM MACHINE.name. MACHINE.name.REPORT MACHINE.name.TOOL

= "LINEAR" for linear axis = "ROTARY" for rotary axis. This variable cannot be changed within the macro language. It can only be read. = 1 Check against minimum limit = 0 Do not check = 1 Check against maximum limit = 0 Do not check Maximum allowable federate. For example: MACHINE.Z = 3000 Axis output as incremental: =0 for No =1 for Yes Contains specified horsepower. Minimum limit. For example:
MACHINE.Z.MINIMUM = -20.0

Maximum limit. For example:


MACHINE.Z.MAXIMUM = 3000.0

Current absolute machine position. For example:


MACHINE.X = 0.0

=0 Output to error file =0 Do not move axis to home position during tool changes = 1 Move axis to home position for tool changes 267

IMSpost Guide

Macro Language Variables: MODE Variables


Variable MACHINE.name.RTCP MACHINE.name.LOCK MACHINE.name.LOCKL MACHINE.name.LOCKR MACHINE.name.HOME Description

= 0 Do not use RTCP mode for rotary motion = 1 Use RTCP mode for rotary motion =0 Enable axis =1 Lock axis (for all motion) =0 Enable movement along linear axis =1 Disable movement along linear axis =0 Enable movement along rotary axis =1 Disable movement along rotary axis 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 MACHINE.name.ABSOLUTE MACHINE.name.DELTA MACHINE.name.VALUE

Specify minimum increments necessary for movement (default = 0). Current absolute machine position. For example:
MACHINE.X.ABSOLUTE = 0.0

Delta motion for axis. For example:


MACHINE.Z.DELTA = 5

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 MODE.MOTION MODE.MOTION MODE.MOTION MODE.MOTION = = = = = "POSITION" (G0) "LINEAR" (G1) "CLW" (G2) "CCLW" (G3) "CYCLE" ; See MODE.CYCLE below

268

IMSpost Guide

Macro Language Variables: MODE Variables


MODE.PLANE = "XY" (G17) MODE.PLANE = "ZX" (G18) MODE.PLANE = "YZ" (G19) MODE.ABSINCR = "ABS" (G90) MODE.ABSINCR = "INCR" (G91) MODE.MACHINE MODE.MACHINE MODE.MACHINE MODE.MACHINE MODE.MACHINE MODE.MACHINE MODE.MACHINE = = = = = = = "REWIND" (M30) "RESET" (G92) "STOP" (M0) "OPSTOP" (M1) "END" (M2) "DWELL" (G4) "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 = coordinate MODE.SYSTEM = MODE.SYSTEM = MODE.SYSTEM = MODE.SYSTEM = MODE.SYSTEM = "COORD1" system "COORD2" "COORD3" "COORD4" "COORD5" "COORD5" (G54) ; Used to specify a preset work (G55) (G56) (G57) (G58) (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)

IMSpost Guide

269

Macro Language Variables: MODE Variables


MODE.MOVE = "CUTTING" (G64) MODE.SKIP MODE.SKIP MODE.SKIP MODE.SKIP = = = = "ON" (G31) "MULTI_1" "MULTI_2" "MULTI_3" = = = = "ORIENT" (M19) "CLW" (M3) "CCLW" (M4) "OFF" (M5)

MODE.SPINDLE MODE.SPINDLE MODE.SPINDLE MODE.SPINDLE MODE.COOLNT MODE.COOLNT MODE.COOLNT MODE.COOLNT MODE.COOLNT

= = = = =

"MIST" (M7) "FLOOD" (M8) "THRU" (M52) "AIR" (M47) "OFF" (M9)

MODE.FEED = "MINUTE" (G94) MODE.FEED = "REVOLUTION" (G95) MODE.FEED = "INVERSE" (G93) MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE MODE.CYCLE = = = = = = = = = = = = = = "OFF" (G80) "DRILL" (G81) ; feed in, rapid out "FACE" (G82) ; feed in, dwell, rapid out "DEEP" (G83) ; extended drilling cycle "TAP" (G84) ; feed in reverse spindle, feed out "BORE" (G85) ; feed in, feed out "REAM" (G86) ; feed in, dwell, feed out "BAKBOR" (G87) ; back boring cycle "MANBOR" (G88) ; manual retraction "STPBOR" (G89) ;stop spindle rotation at depth of hole "BRKCHP" (G73) ; extended drilling cycle "LHTAP" (G74) ; reverse tapping "FINBOR" (G76) ; offset tool at depth and retract "USER" ; user defined cycles "LEFT" (G41) "RIGHT" (G42) "OFF" (G40) "3D"

MODE.CUTCOM MODE.CUTCOM MODE.CUTCOM MODE.CUTCOM

= = = =

MODE.MIRROR = "ON" (G51.1) MODE.MIRROR = "OFF" (G50.1)

270

IMSpost Guide

Macro Language Variables: REGISTER Variables

REGISTER Variables
Each register that is defined in the Register Format Table, contains the following descriptions:
Variable REGISTER.name.NAME REGISTER.name.VALUE REGISTER.name.UNIT REGISTER.name.UNITI REGISTER.name.UNITO REGISTER.name.DIGIT REGISTER.name.LEFT REGISTER.name.RIGHT REGISTER.name.MINIMUM REGISTER.name.MAXIMUM REGISTER.name.LEADING Description

Name of letter address. For example:


REGISTER.X.NAME="X"

Current value in register. For example:


REGISTER.S.VALUE = 2000

MM or INCH Unit (mm or inch) for input. For example:


REGISTER.X.UNITI = "MM"

Unit (mm or inch) for output. For example:


REGISTER.X.UNITO = "MM"

Number format definition. For example:


REGISTER.S.DIGIT = 4.0

REGISTER.name.TRAILING

REGISTER.name.DECIMAL REGISTER.name.FORMULA

Number of whole numbers in format. Number of decimal places in format. Minimum allowable value (this is a controller number and not a machine limitation). See MACHINE Variables. Maximum allowable value (this is a controller number and not a machine limitation). See MACHINE Variables. How to output leading zeros: "N" for No, "Y" for Yes, or 1 through 4 to specify a minimum of leading zeros to output. 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. Character to be used for decimal point. For example:
REGISTER.X.DECIMAL="."

Unique formula for register. For example:


REGISTER.T.FORMULA = "?+100"

REGISTER.name.SIGN REGISTER.name.ZERO REGISTER.name.LIMITMIN

(T-code = tool number + 100) Output + sign: "N" for No or "Y" for Yes How to output value of zero. For example:
REGISTER.Z.ZERO="0.0"

REGISTER.name.LIMITMAX

REGISTER.name.INCREMENT

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 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 = "N" for output axis as absolute = "Y" for output axis as incremental 271

IMSpost Guide

Macro Language Variables: REGISTER Variables


Variable REGISTER.name.TABLE REGISTER.name.MODAL REGISTER.name.LAST REGISTER.name.CHANGE REGISTER.name.DELTA REGISTER.name.ABSOLUTE REGISTER.name.INITIAL REGISTER.name.BEFORE REGISTER.name.AFTER REGISTER.name.DECCHAR REGISTER.name.INTDEC REGISTER.name.SPACE REGISTER.name.REPORT REGISTER.name.ONCE REGISTER.name.RESOLUTION REGISTER.name.INAME Description

Name of table that register is associated with. Is register modal: "N" for No or "Y" for Yes Last or previous value in register. Did register change? 0 = No or 1 = Yes Delta difference from current and last values. Absolute value for register. Initial value of register at start-up. Specify characters to be output before registers value. Specify characters to be output after registers value. Specify character to output for decimal point. For example:
REGISTER.X.DECCHAR = "."

Output a decimal point with an integer: "F" for register format, "Y" for Yes, or "N" for No Output space between letter and value: 0 = No or 1 = Yes Report to log file if value out of limits: 0 = No or 1 = Yes Force out the current value: 0 = No or 1 = Yes Set minimum resolution. Enter number of decimal places. 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.

272

IMSpost Guide

Macro Language Variables: SPINDLE Variables

SPINDLE Variables
The macro variables used by this dialog, with default settings and description, are as follows:
Variable GLOBAL.SPINDLE_BLOCK = 1 GLOBAL.SPINDLE_REG = "S" GLOBAL.SPINDLE_DIR = 'CLW' GLOBAL.SPINDLE_RPM = 100.000 GLOBAL.SPINDLE_DEF = 'CLW' MODE.SPINDLE.CLW : M3 MODE.SPINDLE.CCLW : M4 MODE.SPINDLE.OFF : M5 Description

0 = Output on a block itself 1 = Output codes with next motion Register used for spindle speed value. Current spindle direction. Default spindle speed at startup. Default spindle direction at startup. MODE/GROUP+ FUNCTION attached to spindle clockwise rotation. MODE/GROUP+ FUNCTION attached to spindle anti-clockwise rotation. MODE/GROUP+ FUNCTION attached to spindle is off.

An example input, output result is:


SPINDL/1200,CLW GOTO/1,2,3 G1 X1. Y2. Z3. S1200 M3 REGISTER.S.VALUE=1200 MODE.SPINDLE="CLW"

SYSTEM Variables
SYSTEM variables are:
Variable SYSTEM.ACCURACY SYSTEM.ADD_APT_TO_ISO Description

Number of digits of accuracy for internal calculations. 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 SYSTEM.ADD_LENGTHX SYSTEM.ADD_LENGTHY SYSTEM.APTCARD SYSTEM.APT_LINE SYSTEM.APT_RLINE SYSTEM.ARCFIT_EXACT SYSTEM.ARCFIT_MAXRAD

Machine axis that tool length is added to (Z). Machine axis that tool length is added to (X). Machine axis that tool length is added to (Y). APT card in IBM360/370 CLFILE. The current APT line command read from the file or from the test dialog. In case of using CLREAD, this variable holds the last statement read by the CLREAD command. ARC-FIT ends point must be on arc. ARC-FIT maximum radius.

IMSpost Guide

273

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.ARCFIT_MINANG SYSTEM.ARCFIT_MINRAD SYSTEM.ARCFIT_POINTS SYSTEM.ARCFIT_TOLRAD SYSTEM.ARCFIT_TOLPLN SYSTEM.AUTO_RETRACT SYSTEM_AUTO_RETRACT_ANGLE Description

ARC-FIT minimum angle. ARC-FIT minimum radius. ARC-FIT minimum number of points (must be greater than 3). ARC-FIT maximum tolerance allowed from arc radius. ARC-FIT maximum tolerance allowed of each point from arc plane. 0 = Disable AUTO_RETRACT 1 = Enable AUTO_RETRACT 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

SYSTEM.AUTO_RETRACT_SAFE SYSTEM.AXIS[n] SYSTEM.BEST_SOLUTION SYSTEM.BEST_START_COMMAND SYSTEM.BEST_START_REPEAT SYSTEM.BEST_END_COMMAND SYSTEM.BEST_END_REPEAT SYSTEM.BLOCK_BEGLINE SYSTEM.BLOCK_ADD SYSTEM.BREAK_LINE_A SYSTEM.BREAK_LINE_COUNT

Delta retraction distance. Refer to the Auto retract option on the Multi-axis dialog. See Machine > Multi-axis > Multi-axis Setup. When using the AUTO_RETRACT feature (see Machine Multi-Axis), this variable holds the clearance distance. n = 1 thru 15 for a list of motion axis names. =1 Activate (one-shot). This is the best start-up position for a 5-axis machine APT word to be used for the beginning boundary for the best-solution look-ahead process. Number of times to locate the start boundary (default = 1). APT word to be used for the ending boundary for the best-solution look-ahead process. Number of times to locate the end boundary (default = 1). Holding the variable from the Tape Format Output at the start of each block. Holding the variable from the Tape Format Output at the end of each block. Linear break; angle to the next position. Number of points in linear break.

274

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.BREAK_LINE_COND[1] SYSTEM.BREAK_LINE_COND[2] SYSTEM.BREAK_LINE_COND[3] SYSTEM.BREAK_LINE_COND[4] SYSTEM.BREAK_LINE_COND[5] SYSTEM.BREAK_LINE_CUR_F SYSTEM.BREAK_LINE_CUR_S SYSTEM.BREAK_LINE_EXP[1] SYSTEM.BREAK_LINE_EXP[2] SYSTEM.BREAK_LINE_EXP[3] SYSTEM.BREAK_LINE_FED[4] SYSTEM.BREAK_LINE_FED[5] SYSTEM.BREAK_LINE_L1 SYSTEM.BREAK_LINE_L2 SYSTEM.BREAK_LINE_MUL[1] SYSTEM.BREAK_LINE_MUL[2] SYSTEM.BREAK_LINE_MUL[3] SYSTEM.BREAK_LINE_MUL[4] SYSTEM.BREAK_LINE_MUL[5 SYSTEM.BREAK_LINE_SPD[1] SYSTEM.BREAK_LINE_SPD[2] SYSTEM.BREAK_LINE_SPD[3] SYSTEM.BREAK_LINE_SPD[4] SYSTEM.BREAK_LINE_SPD[5] SYSTEM.BREAK_LINE_X[0] SYSTEM.BREAK_LINE_X[1] SYSTEM.BREAK_LINE_X[2] SYSTEM.BREAK_LINE_Y[0] SYSTEM.BREAK_LINE_Y[1] SYSTEM.BREAK_LINE_Y[2] SYSTEM.BREAK_LINE_Z[0] SYSTEM.BREAK_LINE_Z[1] SYSTEM.BREAK_LINE_Z[2] SYSTEM.BUFFER Description

Condition expression for Line 1 in the Linear Equation Formula. Condition expression for Line 2 in the Linear Equation Formula. Condition expression for Line 3 in the Linear Equation Formula. Condition expression for Line 4 in the Linear Equation Formula. Condition expression for Line 5 in the Linear Equation Formula. Linear break; feed value. Linear break; spindle rpm value. Linear break; break expression one. Linear break; break expression two. Linear break; break expression three. Linear break; break expression four. Linear break; feed expression five. Linear break; length of line to the current point. Linear break; length of line from the current to the next point. Linear break; reps for the first break expression. Linear break; reps for the second break expression. Linear break; reps for the third break expression. Linear break; reps for the fourth break expression. Linear break; reps for the fifth break expression. Linear break; spindle speed expression one. Linear break; spindle speed expression two. Linear break; spindle speed expression three. Linear break; spindle speed expression four. Linear break; spindle speed expression five. Linear break; X last position. Linear break; X current position. Linear break; X next position. Linear break; Y last position. Linear break; Y current position. Linear break; Y next position. Linear break; Z last position. Linear break; Z current position. Linear break; Z next position. This flag is set to 1 if there is output pending in the output buffer. 275

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.BUFFER_APT Description

SYSTEM.CIRCKIND

SYSTEM.CIRCLE_ANGLE SYSTEM.CIRCLE_CENTER_X SYSTEM.CIRCLE_CENTER_Y SYSTEM.CIRCLE_CENTER_Z SYSTEM.CIRCLE_MAX_CHORD

SYSTEM.CONTROLLER_RTCP SYSTEM.COORD_RTCP

SYSTEM.CIRCLE_RADIUS SYSTEM.CIRCLE_SIGN SYSTEM.CIRCLE_TOLER SYSTEM.CIRCLE_ANGLE

Read and store the APT file in the buffer before execution. 0 = No or 1 = Yes 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 Letter address that represents the angle of the endpoint (IMS Controller Emulator only). Enter letter address for circle center along X axis (I). Enter letter address for circle center along Y axis (J). Enter letter address for circle center along Z axis (K). 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. Controls use of RTCP option (if RTCP is not in the CUT statement). 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 Enter letter address. Output negative sign for circle center (can be NO or YES). Tolerance for linear approximation. 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 SYSTEM.CIRCLE_CENTER_X

SYSTEM.CIRCLE_CENTER_Y

Holds the name of the register specifying the RADIUS of arcs command for the IMS Controller Emulator. Holds the name of the register specifying the CENTER usually along the X axis of arcs command for the IMS Controller Emulator. Holds the name of the register specifying the CENTER usually along the Y axis of arcs command for the IMS Controller Emulator,

276

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.CIRCLE_CENTER_Z Description

SYSTEM_CIRCKIND

SYSTEM.CIRCTYPE SYSTEM.CLDATA SYSTEM.CLDCARD SYSTEM.CLFILE SYSTEM.CODE_SPACE SYSTEM.COMPATIBLE

SYSTEM.CON_DELMEMORY SYSTEM.CON_MEMORY SYSTEM.CON_NOBLOCKS SYSTEM.CON_TOOLLIFE SYSTEM.CONTROLLER_AUTO_ LINTOL SYSTEM.CONTROLLER_AUTO_ LINTOL_STEP SYSTEM.CONTROLLER_RTCP SYSTEM.COORD_RTCP

Holds the name of the register specifying the CENTER usually along the Z axis of arcs command for the IMS Controller Emulator. 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) Variable containing current circular interpolation output format (1 - 6). Input file type processing. CAM system represented by integer. CLDATA card in IBM360/370 format. Part (APT/CL) name and path name where the part file resides. Output space between codes: 0 for No or 1 for Yes 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. Value in kilobytes required for the start and end strings added for file breakup. Value in kilobytes of the number of bytes that can be output into a file before a new file is started. Size of file based on the number of blocks. Size of file based upon the tool life. If not 0, the controller keeps the tool tip on a straight line when the rotary axis moves. Step angle used for keeping the tool tip on a straight line with rotary motion. Controls use of RTCP option, when RTCP does not exist in the CUT statement. 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.

IMSpost Guide

277

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.CURVE_TOLER Description

SYSTEM.CUTCOM SYSTEM.CUTCOMLEN SYSTEM.CUTCOM_LENGTH SYSTEM.CUTCOM_LENGTHX SYSTEM.CUTCOM_LENGTHY SYSTEM.CUTCOM_OFFSET SYSTEM.CUTCOM_X_NAME SYSTEM.CUTCOM_Y_NAME SYSTEM.CUTCOM_Z_NAME SYSTEM.CUTTER_DIAM SYSTEM.CUTTER_LEN SYSTEM.CUTTER_RAD SYSTEM.CYLINDER

SYSTEM.DATE SYSTEM.DIGITS SYSTEM.DIGITS_IJK

Specify curve tolerance (default = 0). If greater than 0, system performance could be slower for 5-axis machining based on this value. Enter current cutter compensation mode. CUTCOM length status: "OFF" or "ON" Enter length value. Contains the value used in tool length compensation along X. Contains the value used in tool length compensation along Y. Defines the radius of the tool for contact point calculation. Name of register representing X-axis coordinate in 3D cutter compensation. Name of register representing Y-axis coordinate in 3D cutter compensation. Name of register representing Z-axis coordinate in 3D cutter compensation. Contact point diameter for the corner radius cutter. Contact point length for the corner radius cutter. Contact point radius for the corner radius cutter. 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. Current date. Number of digits of accuracy to be used for internal calculations of XYZ only (default is 4). Minimum factor to be used when truncating IJK vectors. For example:
SYSTEM.DIGITS_IJK = 4

SYSTEM.DISPLAY_RETURN SYSTEM.END_FILE SYSTEM.ERROR SYSTEM.FEED SYSTEM.FEED_LAST SYSTEM.FEEDRATE SYSTEM.FEEDRATE_NAME SYSTEM.FILE_LINES_COUNT

This instructs IMSpost to truncate IJK vectors to the 4th decimal place (default = 0, no truncation factor). Return from display dialog (default is 30 seconds). When ISO output is written to multiple output files, output this string at the end of each new output file. Number of errors reported to the log file. Current feed rate used for machine time calculations. Last feedrate used for the acceleration/deceleration application. Current feed mode. Register name for feed value. Contains number of lines written to the ISO file.

278

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.FILE_SIZE Description

Holds the current size of the ISO output file (bytes). For example:
SYSTEM.FILE_SIZE/1024 = kbytes

SYSTEM.FORCE4AXES

SYSTEM.FORCE_WAY SYSTEM.GET_ISO_LINES SYSTEM.GRAPHIC SYSTEM.GRAPHIC_STEP SYSTEM.GRAPHIC_WAIT SYSTEM.GOTO_SOLUTION

SYSTEM.HELICAL SYSTEM.INV_TIME_FORMULA SYSTEM.ISO_APT_COMP

SYSTEM.I SYSTEM.IO SYSTEM.J SYSTEM.K SYSTEM.LINEFIT_TOLER SYSTEM.LINTOL_TYPE

SYSTEM.LINTOL_TOOL_LENGTH SYSTEM.LINTOL SYSTEM.LINTOL_DIRECTION

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. Holds the variable from the Machine Multi-Axis setup solution condition. Defines the number of previous ISO blocks to retrieve from the output buffer. Show moves in the graphic module: 0 for No or 1 for Yes Longest move step when showing the moves. Delay time in seconds when showing the moves in the graphic module. 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. Helical interpolation allowed: 0 for No or 1 for Yes Contains the formula to be used for inverse/time feed number calculation. = 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). Last given I value in GOTO and CIRCLE solutions. Input/Output status variable (0 or 1). Last given J value in GOTO or CIRCLE solutions. Last given K value in GOTO or CIRCLE solutions. Maximum tolerance allowed of each point from the line. 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. Not supported at this time. Reserved for future use. Multi-axis LINTOL condition: 0 = Off or 1 = On Force GOTO solution to use the same solution as in the previous LINTOL solution. 279

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.LINTOL_LINEAR SYSTEM.LINTOL_ROTARY SYSTEM.LINTOL_TOOL_LENGTH SYSTEM.LINTOL_ROTARY SYSTEM.LIN_ROT_INV_TIME SYSTEM.LIN_INV_TIME SYSTEM.LIST SYSTEM.LOCAL[n] SYSTEM.LISTFILE SYSTEM.MAT1F[n] SYSTEM.MAT2F[n] SYSTEM.MATRIX1 Description

SYSTEM.MATRIX2

SYSTEM.MATRIX1A[n] SYSTEM.MATRIX1B[n]

Multi-axis linearization value (linear axes). Multi-axis angular deviation value (rotary axes). Tool length for linearization tolerance calculation. Multi-axis angular deviation value (rotary axes). = 1 Activate inverse time feed formula for motion that contains both linear and rotary motion. = 1 Activate inverse time feed formula if motion contains linear motion only. Output statement should write to list file: 0 = No or 1 = Yes Local coordinate system offset values (n = 1 15). Name of list output file. System matrix variable ( n = 1 15). System matrix variable ( n = 1 15). 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 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 Specify the MATRIX1 value for row A, column n; where n can be 1 through 4. Specify the MATRIX1 value for row B, column n; where n can be 1 through 4. IMSpost Guide

280

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.MATRIX1C[n] SYSTEM.MATRIX2A[n] SYSTEM.MATRIX2B[n] SYSTEM.MATRIX2C[n] SYSTEM.MAXCIRC SYSTEM.MAX_CSS SYSTEM.MAXMOVE Description

SYSTEM.MAX_GCODE SYSTEM.MAX_MCODE SYSTEM.MIRROR[n] SYSTEM.MOVE

SYSTEM.MTIME SYSTEM.MTIME_CUT SYSTEM.MTOOL_TIME SYSTEM.MULTAX SYSTEM.MOVE

SYSTEM.NORMALX SYSTEM.NORMALX_LAST SYSTEM.NORMALY

Specify MATRIX1 value for row C, column n; where n can be 1 through 4. Specify MATRIX2 value for row A column n; where n can be 1 through 4. Specify MATRIX2 value for row B column n; where n can be 1 through 4. Specify MATRIX2 value for row C column n; where n can be 1 through 4. Enter maximum arc angle per block (90, 360). Maximum constant surface speed. For IMS Controller Emulator only: Enables you to split one move into a series of smaller moves. Maximum number of G-codes in one block (0 for no limit). Maximum number of M-codes in one block (0 for no limit). n can be 1 thru15 representing each of the programmable machine axes. For IMS Controller Emulator only: Each time a machine motion is detected, this variable will be set to non-zero. Machine time (includes tool changes, dwells, and positioning). Machine cut time. Tool cut time. Multax processing flag. 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. Component along the X axis normal to the surface (for calculating the tip point from contact). Previous component along X axis normal to the surface (for calculating tip point and 3D cutter compensation). Component along the Y axis normal to the surface (for calculating the tip point from contact).

IMSpost Guide

281

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.NORMALY_LAST Description

SYSTEM.NORMALZ SYSTEM.NORMALZ_LAST

SYSTEM.NUMMOVES SYSTEM.NURBS_ANGLE SYSTEM.NURBS_DEVIATION SYSTEM.NURBS_ORDER SYSTEM.NURBS_TOLER SYSTEM.NURBS_TOLER_ANG SYSTEM.NURBS_TYPE

SYSTEM.OFFSET[n]

SYSTEM.OUT_APT_TO_ISO SYSTEM.OS SYSTEM.OPSKIP SYSTEM.OVERLAP_ANGLE SYSTEM.PAGE SYSTEM.PLANE SYSTEM.PLANE_X SYSTEM.PLANE_Y SYSTEM.PLANE_Z SYSTEM.PMAPT

Previous component along the Y axis normal to the surface (for calculating the tip point and 3D cutter compensation.) Component along the Z axis normal to the surface (for calculating the tip point from contact). Previous component along the Z axis normal to the surface (for calculating the tip point and 3D cutter compensation). Specify minimum number of points for converting GOTO points to an arc. Angular value used to break up splines. Angular deviation value to start the new curve based on angle sharpness. Nurbs maximum order between 2-4. Nurbs tolerance. Nurbs tolerance band for IJK vectors. 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. n can be 1 thru15 representing an offset for each of the programmable machine axes. = 1 Output APT statement to machine code file = 0 Do not output (default). Operating system (WIN, VMS, or UNIX). Not in use at this time. = 1 Allow overlap angle of rotary axes limits. Output listing page number. Current plane in effect (XY). Register name applied to XY plane (X). Register name applied to YZ plane (Y). Register name applied to ZX plane (Z). (Special for Prelude Mfg.) Generate debug commands as APT statements.

282

IMSpost Guide

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.POLAR SYSTEM.POLARA SYSTEM.POLARR SYSTEM.POLAR_CENTER_X SYSTEM.POLAR_CENTER_Y SYSTEM.POLAR_CENTER_XNAME SYSTEM.POLAR_CENTER_YNAME SYSTEM.PRJFILE SYSTEM.RAD_CSS SYSTEM.RAPID_INV_TIME Description

SYSTEM.ROT_INV_TIME SYSTEM.RTCP SYSTEM.SAVE_ISO_LINES SYSTEM.SCREEN SYSTEM.SEQNO SYSTEM.SEQNO_INCR SYSTEM.SEQNO_ON

SYSTEM.SHORT_WAY_METHOD

SYSTEM.SPIN SYSTEM.SOL_NUMBER_LIMIT SYSTEM.SOL_NUMBER_FINAL

SYSTEM.SOLUTION_NUMBER

For IMS Controller Emulator only: Use polar coordinates. For IMS Controller Emulator only: Polar coordinate angle. For IMS Controller Emulator only: Polar coordinate radius. For IMS Controller Emulator only (not IMSpost). For IMS Controller Emulator only (not IMSpost). Register name applied to X center of polar coordinate. Register name applied to Y center of polar coordinate. Name of project file. Maximum CSS radius. 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. = 1 Activate inverse time formula if motion only contains rotary motion. Used in 5-axis tool length calculations: 0 = Off or 1 = On. Specify number of ISO blocks to retrieve from the output buffer. Write OUTPUT commands to the terminal (not active). Contains the last sequence number. Sequence number increment value. Controls sequence block output: 0 = SEQNO is Off 1 = SEQNO is On 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. For IMS Controller Emulator only: The current spindle speed. 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. Force multi-axis SOLUTION type in LINTOL processing.

IMSpost Guide

283

Macro Language Variables: SYSTEM Variables


Variable SYSTEM.SPINDLE SYSTEM.SPINDLE_NAME SYSTEM.START_END_RAD SYSTEM.STR_FILE SYSTEM.SURFACE Description

SYSTEM.TABLE_FILES SYSTEM.TAPE SYSTEM.TAPEFILE SYSTEM.TAPE_LENGTH SYSTEM.TIME SYSTEM.TIME_CALCULATION

SYSTEM.TIP_CONTACT

SYSTEM.TOOL_LENGTH SYSTEM.TOOL_LENGTHX SYSTEM.TOOL_LENGTHY SYSTEM.TOOL_LENGTHZ SYSTEM.TOOL_WITH

SYSTEM.VERSION SYSTEM.WARNING SYSTEM.X SYSTEM.X_ARC_CENTER SYSTEM.X_ARC_CENTER_LAST

Current spindle speed. This is used for machine time calculations. Register name for spindle speed value. Maximum deviation allowed between start/end to the circle center (0.0 to ignore). When ISO output is written to multiple output files, output this string at the start of each new output file. 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) Number of exterior table files to read in ( default = 0). Output statement should write to NC file: ON" or "OFF" Path and name of the ISO output file. Length of tape characters. Current time. = 0 Do not update system machine time (SYSTEM.MTIME) = 1 Update system machine time Tool tip/contact options: 0 for input tip = output tip 1 for input contact = output contact 2 for input contact = output tip Variable containing the tool length value that will be used when necessary in MULTAX calculations. Contains tool length value that may be used in various MULTAX calculations. Contains tool length value that may be used in various MULTAX calculations. Contains tool length value that may be used in various MULTAX calculations. 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) Software version. Number of warnings reported to the log file. Last given X value in GOTO or CIRCLE solutions. Current circle center along X. Previous circle center along X.

284

IMSpost Guide

Macro Language Variables: TOOL CHG (Tool Change) Variables


Variable SYSTEM.X_ARC_DIR SYSTEM.X_ARC_DIR_LAST SYSTEM.X_LAST SYSTEM.Y SYSTEM.Y_ARC_CENTER SYSTEM.Y_ARC_CENTER_LAST SYSTEM.Y_ARC_DIR SYSTEM.Y_ARC_DIR_LAST SYSTEM.Y_LAST SYSTEM.Z SYSTEM.Z_ARC_CENTER SYSTEM.Z_ARC_CENTER_LAST SYSTEM.Z_ARC_DIR SYSTEM.Z_ARC_DIR_LAST SYSTEM.Z_LAST Description

Current arc direction along X. Previous arc direction along X. Previous X value calculated from GOTO or CIRCLE SOLUTION record. Last given Y value in GOTO and CIRCLE solutions. Current circle center along Y. Previous circle center along Y. Current arc direction along Y. Previous arc direction along Y. Previous Y value calculated from GOTO or CIRCLE SOLUTION record. Last given Z value in GOTO or CIRCLE solutions. Current circle center along Z. Previous circle center along Z. Current arc direction along Z. Previous arc direction along Z. 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 GLOBAL.TOOLCHG_LREG = "H" GLOBAL.TOOLCHG_TREG = "T" GLOBAL.TOOLCHG_SPINOFF = 0 GLOBAL.TOOLCHG_COOLOFF = 0 GLOBAL.TOOLCHG_TIME = 0.1 MODE.MACHINE.TOOLCHG : M6 GLOBAL.TOOLCHG_FORCE_OUTREG Description

Tool length compensation register name. Tool number register name. Cancel spindle before tool change: 0 = no or 1 = yes Cancel coolant before tool change: 0 = no or 1 = yes Machine time (in minutes) required to change the tool. This is used for time calculations. MODE/GROUP+ FUNCTION attached to tool change function. Force out specified registers after tool change.

An example input, output result is:


LOADTL/100,ADJUST,20 M5 M9 T100 M6 (If GLOBAL.TOOLCHG_SPINOFF=1) (If GLOBAL>TOOLCHG_COOLOFF=1) FUNCTION.M6.USE "T" REGISTER.T.VALUE = 100 REGISTER.H.VALUE = 20 SYSTEM.MTIME = SYSTEM.MTIME + GLOBAL.TOOLCHG_TIME

IMSpost Guide

285

Macro Language Variables: TOOL CHG (Tool Change) Variables

Notes

286

IMSpost Guide

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

You might also like