28
Getting Started with the PostHASTE Postprocessor Gibbs and Associates 323 Science Drive Moorpark, CA 93021 October 2003

Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

  • Upload
    ngodien

  • View
    271

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Getting Startedwith the PostHASTE

PostprocessorGibbs and Associates

323 Science DriveMoorpark, CA 93021

October 2003

Page 2: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

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

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

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

© 2003 Gibbs and Associates. All rights reserved. The Gibbs logo, GibbsCAM, GibbsCAM logo, Virtual Gibbs, Gibbs SFP, MTM, Hole Wizard, SolidSurfacer, and “Powerfully Simple. Simply Powerful.”are either trademark(s) or registered trademark(s) of Gibbs and Associates in the United States and/or other countries. Windows is a registered trademark of Microsoft Corporation in the United States and other countries. All other brand or product names are trademarks or registered trademarks of their respective owners.

Acknowledgements:

Written by Paul Andrews

Thanks to Bill Gibbs and Wil Gaffga for their input and assistance.

Printed in the United States of America

Modified: October 24, 2003 1:30 pm

Page 3: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Table of Contents ❖

i

Table of Contents

GETTING STARTED WITH THE POSTHASTE POSTPROCESSOR 1

What this manual contains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2For more information… . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2

INSTALLING & RUNNING POSTHASTE 3

What is PostHASTE? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4To run PostHaste… . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4Using PostHaste for the first time & Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5

Setting up AutoOpen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6Caution - Running PostHaste “again” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7

FORMATTING BASICS 8

How PostHaste works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9Overall structure of the template file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

Complete 4 axis mill format template.*. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10Details regarding the various template sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11Comments in the format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16

EXAMPLE: MODIFYING THE TOOLCHANGE SEQUENCE 17

GO FOR IT! 19

OVERALL SYSTEM CONFIGURATION 21

The PostHaste.CFG or Post.INI file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22

RECOMMENDED FORMAT FILE EXTENSIONS 24

Page 4: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

GETTINGSTARTED WITH

THE POSTHASTEPOSTPROCESSOR

Page 5: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Getting Started with the PostHASTE Postprocessor

CHAPTER 1

: Getting Started with the

PostHASTE Postprocessor

WHAT THIS MANUAL CONTAINS This manual will help you…

• Install and run PostHASTE for the first time and configure it for your own use, and

• Learn the basic concepts of making formatting changes.

This manual will guide you through your first time use of PostHASTE which may require a small amount of ‘setup’. (Andwe do mean small. It typically takes less than 3 minutes.)

In this manual, we will only be dealing with post formats for 3 and 4 axis milling (.pM3 and .pM4 files) and 2 axis turning(.pT2 files).

FOR MORE INFORMATION…If you need to learn more details about modifying postprocessor format templates, then (after making sure that you firstunderstand the basic formatting concepts explained in this manual) please refer to the PostHASTE Formatting ReferenceManual.

TIP

For installation instructions, first see the document called The Great 3-Minute Post-Processor Installation.

2

Page 6: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

INSTALLING &RUNNING

POSTHASTE

Page 7: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Installing & Running PostHaste

CHAPTER 2

: Instal l ing & Running

PostHaste

WHAT IS POSTHASTE?PostHASTE (sometimes referred to as “the post” for short) is a software system that translates your CAM system’s toolmotion output (CL files) into ‘NC program’ (text or ‘ASCII’) files to drive NC or CNC machines. PostHaste can createprograms in any of these formats:

EIA standard: EIA programs are the most common type of machine control files; they typically use G, X, Y, Z, T and/or Mcodes (among others) for various machine movements and functions.

‘Conversational’: Conversational programs are usually somewhat similar to EIA programs, but typically have words or phrases(such as ‘LINE’ or ‘ARC’) in place of the standard letter codes.

Tab-sequential (or “columnar”): These types of programs are not very common anymore, but are sometimes needed for older(e.g. ‘Bandit’) or less expensive (such as Emco-Maier) machines. These programs have the various numerical valuesarranged in columns (instead of using a letter); the location (or spacing) of the numbers within each line determines thesignificance of the value. For example the first column may be an X position, the second column the Y position, and so on.

INSTALLATIONIf you haven’t already, we recommend that you install PostHaste as instructed in the document called The Great 3-MinutePost-Processor Installation. That will take you through setting up PostHaste for your initial use. (However, if you hadtrouble setting up the AutoOpen feature, there are more details on that in the section below.)

TO RUN POSTHASTE…Actually running PostHaste (generating an NC program file) is very simple.

Although the dialogs are very simple, you may want to refer to the section below for important information regarding:

- folders and

- setting up the PostHaste’s AutoOpen feature (which will open your finished NC program in the editor of your choice oncethe posting is complete).

TIP

Throughout this manual,

Mandatory steps that you must perform are written in bold underlined text.

Bold text is used to emphasize important information.

4

Page 8: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Installing & Running PostHaste

USING POSTHASTE FOR THE FIRST TIME & SETUPTo run PostHaste, just double-click the PostHaste icon wherever you see it (in the GS folder, from the Startmenu, or on your Desktop).

This will activate PostHaste, and may also bring upother “information” dialogs like this…

…if this happens, then answer the questionsappropriately. (These are dialogs that the postautomatically presents to you in order to getinformation required to create the finished NCprogram.)

Then, one of two things will happen:

- You will either see your finished NC program appear in an editor window,

OR…

- You will see this AutoOpen message:

If you DO see your NC program in an editor(that is, you do NOT see the above message),then your system is already set toautomatically open your program files –Congratulations! You do NOT need to gothrough the Setting up AutoOpen sectionfollowing.

5

Page 9: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Installing & Running PostHaste

SETTING UP AUTOOPENThe dialog above appears if Windows does not know what application should be used to open your finished NC program.This should only happen the very first time you create an NC program with PostHaste – if you follow these instructionsto set up the AutoOpen feature:

• After you press OK on the above dialog, a window like the one below will appear that contains your finished NCprogram:

• Just double-click your NC program in the above window,and you will be presented with this dialog to let you choosethe application you want to use for editing your NCprogram files:

• Fill in the “Description” field (you may put in anydescription you like), then use the scroll bar to find theapplication you want to use to view or edit your NCprograms. (You may use your favorite editor, WordPad -whatever you like!), then double-click on the application.

Your program will then appear in that editor – and you’re done!

Important note re AutoOpen and Windows' File AssociationsBy setting up your system’s Windows' File associations, you canset the AutoOpen feature to open a file with any application youchoose ( - a communications package, for instance, to send a NCprogram to one of your machines).

If, at a later time, you want to change your system'sWindows' File associations, you can do this by…

1. Open Windows Explorer

2. Click the Folder Options choice in the View menu.

6

Page 10: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Installing & Running PostHaste

(In Windows 2000 and XP, the Folder Options choice is in the Tools menu.)

The Open With dialog shown above should appear.

3. Find and select the file extension you wish to change and hit the REMOVE button.

4. Close the dialog.

5. In Windows Explorer again, just double-click the desired file and you will be taken once again to the Open With dialog,where you may choose any application you like.

CAUTION - RUNNING POSTHASTE “AGAIN”If you’ve run PostHaste, then you’ve seen the main PostHaste window as shown below.

The four buttons along the bottom are pretty self explanatory, but you do have to be careful about one thing – the PostAgain button.

!

If you hit Post Again while your editing window is still open from the previous run, then the code in your editor may NOT be updated to reflect any changes that you made the second time you ran the post.

We highly recommend that you close your editor before “posting again”. That way, when the post ‘AutoOpens’ the file, it will indeed be your new code – not the code ‘left over’ in the editing window from a previous run.

7

Page 11: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

FORMATTINGBASICS

Page 12: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics

CHAPTER 3

: Formatting Basics

This section will familiarize you with the basics of working with PostHaste formatting template files.

HOW POSTHASTE WORKSPostHaste gets all of the configuration information for each machine from a format template file (which we usually refer asthe format or the template).

All you have to do to change a machine program format is to modify the contents of the corresponding template file. Thiscan be done easily with any word processor or text editor – just like editing an NC program.

As a matter of fact, the formatting templates look very much like NC programs. We designed the post this way to be as easyas possible for NC programmers to modify.

OVERALL STRUCTURE OF THE TEMPLATE FILEAs you take a look at the template on the next page, you will notice that…

• …the first line in the template starts with the word NAME.

(All templates must start with a NAME line to identify the controller & machine name.)

• …all of the formatting information that PostHASTE requires is placed in the format template file in these 3 basic areas:

1. The address (letter) formats

2. Commands & Switches

3. The “Sequences”

Take a look at the sample template on the next page and get familiar with these areas – you will notice that they are quitedifferent from each other and quite easily distinguishable from each other.

!The next page shows a complete 4 axis milling format template. We highly recommend that you make a printout (or hard copy) of the template on the following page and keep it handy so you can easily refer to it while you’re learning about PostHaste.

9

Page 13: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics

COMPLETE 4 AXIS MILL FORMAT TEMPLATE.*Again, we highly recommend that you make a hard copy of this page and keep it for reference.

* Note: 3 axis formats are exactly the same except that they don’t have the code shown in italics (most notably, the Indexsequence and RotAngle variable).

name Haas 4 axis Vertical machining center

- Section 1 - Letter formatting -

O >4 (O can be up to 4 digits.)N >4G >2 (G can be up to 2 digits.)

X ->3.>4 (All these letters are formatted Y ->3.>4 to allow a minus sign, then up Z ->3.>4 to 3 digits before the decimal, I ->3.>4 and up to 4 digits after.)J ->3.>4Q ->3.>4R ->3.>4P ->3.>4A ->4.>4 Limit -8000 8000 (For Rotary axis.)F >3.1K ->3.>4H >2 D >2 T >2M >2S >4

- Section 2 – Commands & Switches -

ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85Sequence#s N 0 1 1 Char, Freq, Inc., First

HCode X (Axis letters.)VCode YDcode ZFeedCode F

Feed G1 (Motion G codes.)Rapid G0Cw G2Ccw G3

CtrCode I J (Circle info… )CtrIncremental? Y ByQuadrants? N

Comment ( ) (Comment start / end. )Spindle 3 4 5 (M codes: Cw, Ccw, Off )Coolant 8 9 7 (M codes: On, Off, Mist.)DComp 41 42 40 (G codes: Left, Right, Off )

RotaryFeed F[InvTime] Rotary feed rateFeedType G 95 94 93 IPR, IPM, InvTime

- Section 3 - The NC code sequences -

(First, the sequences for program startup, toolchanges, rotary rapid [index] moves, cutter diametercompensation and program end…)

StartCodeO[Program#]G91G28 X2 Y-2 Z-2G90End

1stToolChangeN[Block] T[Tool] M6G0 G40 G80 G[Work] X[H] Y[V] A[RotAngle]G43 Z[D] H[Lcomp] M[Direct] S[Speed]M[Cool]End

ToolChange (Secondary tool changes.)M9G28 G49 Z0 S100N[Block] T[Tool] M6G0 G40 G80 G[Work] X[H] Y[V] A[RotAngle]G43 Z[D] H[Lcomp] M[Direct] S[Speed]M[Cool]End

Index X (How to rapid w/ rotary motion.)G0 Z[ILevel] G[Work] X[H] Y[V] A[RotAngle]Z[D] End

Infeed (Apply cuttercomp)G1 Z[D] F[Plunge]G[Side] X[H] Y[V] D[DComp] F[FRate] end

Outfeed (Remove cuttercomp)G1 G40 X[H] Y[V] Z[D]End

EndCode G0 G28 G49 Z0 S100G28 G91 X0 Y0 A0 T[Tool1] M6G90 M30End

(Now, the sequences for the drilling cycles…)

Drill - Feed in, rapid out.G81 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

Peck - Peck Drill (full tretract)G83 X[H] Y[V] Z[D] Q[Step] R[RLevel] F[FRate] end cancel

ChipBreak - Peck Drill (partial tretract)G73 X[H] Y[V] Z[D] Q[Step] R[RLevel] F[FRate] end cancel

Tap - Tapping.G84 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

LTap - L. handed tapping.G74 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

Ream - Feed in, feed out.G85 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

Bore - Feed in, stop, orient, rapid out.G86 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

Back - Back bore cycle.G87 X[H] Y[V] Z[D] R[RLevel] F[FRate] end cancel

Cancel (Code used to cancel the drill cycles.)G80end

10

Page 14: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

DETAILS REGARDING THE VARIOUS TEMPLATE SECTIONSThis section briefly describes what these do. Please take a look at the sample template (you did make a hard copy of theprevious page, right?) while you read the following; doing this will greatly help you get a good idea of how the template fileworks.

The Name lineWhen you edit a template file, you willnotice that the word NAME is the firstthing in the format. The NAME line startsthe description of each machine format.Without a NAME line, you don’t have aformat. Sorry - that’s just the way it is.

NOTE: Some template files have morethan one machine format in them. This iswhy the Name line is so important – theName line is what separates differentformats within the same template file. Ifyou happen to run a template that as morethan one format in it, then PostHaste willpresent a list like this so that you canchoose which machine (within the sametemplate) that you want to generate code for.

After the required NAME line, the remainder of each format can be broken into 3 sections (as described in brief below).These 3 sections look basically the same from one machine format to the next, so the easiest way to create a new NC codeformat is to copy an existing machine format template, then alter it to fit your needs.

The Letter formatting section This section of the format lists the letters that can be used in your format - in the order that they will appear in the linesof machine program code - and the exact formatting of the numerical values that accompany each letter. Here’s an excerptfrom the letter format section of a Fanuc template:

% 00 ‘Letter alone’: No digits before the decimal, no decimal, and no digits after the decimalO >4 ‘O’ can have up to 4 digits, no decimal…N >4 … and the same for ‘N’.G >2 G can have up to 2 digits (again, no decimal).X ->3.>4 X can have minus sign, up to 3 digits before, up to 4 after decimal.Y ->3.>4 (And the same for Y.)

The sample above shows only the most basic type of numeric formatting: that is, specifying…

!When formatting a template that has more than one machine in it, you must be very careful to make sure that you are editing the section of the template file that actually applies to the machine format you want to edit. So be careful to always make sure that you are editing the section under the proper Name line!

! When reading letter formatting lines, read the ‘arrow’ character ‘>’ as meaning ‘up to’.

11

Page 15: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

– the number of digits possible before and after the decimal

(by the numbers that you see on each line), and

– whether or not there will be an actual decimal point (.):

(notice the X and Y lines have a decimal point, the others do not.)

– whether or not a minus sign is allowed (notice the ‘-‘ on the X and Y lines)

There are many more things that you can do with letter formats – you can learn about these in the PostHaste FormattingReference Manual.

The Commands & Switches sectionAfter the letter formats, there is typically a page or two full of Commands and Switches such as…

ModalGs 0 1 2 3 73 74 76 80 81 82 83 84 85 List of modal G code valuesSequence#s N 0 1 1 Char, Freq, Increment, Start First#? N Output Line # on first line?Last#? N Line # on first line?HCode X ‘Horizontal’ axis letter VCode Y ‘Vertical’ axis letterDcode Z Depth’ axis letterFeedCode F This is the letter that accompanies feed rates.…

But, what’s a Switch?

Any word that you see in the templates followed by a question mark (such as First#? and Last#? above) are calledswitches because they refer to various code conditions that can be turned ‘on or off ’ (like a switch) simply by placing aY or N after the switch.

…The various commands and switches tell the post basic information that is used commonly in many areas of the finalmachine program. Armed with a little common sense, you should get a pretty good idea of what these do as you lookthrough them. (Again, please refer to the PostHaste Formatting Reference Manual to learn more about all of the availablecommands.)

In the mean time, however, there are a few that we should probably introduce you to…

!

…but there is one more thing that is very important that may not be obvious: whether or not there are mandatory leading and/or trailing zeroes. This is controlled by the ‘arrow’ (>) character:

As mentioned above, the arrow character means ‘up to’, so leaving out the arrow ‘forces’ there to be mandatory leading or trailing zeroes. For example some older machines may require…

X ->34 This will format X to have no decimal and trailing zeros: an X value of -1.5 will appear as X-15000

…and for a really old machine that requires leading and trailing zeroes AND a plus or minus sign use…

X +-34 … so an X value of 1.5 will appear as X+0015000

12

Page 16: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

Arc formatting commands & switches We have found that the commands related to arc formatting are the ones that people have to deal with quite commonly, sowe’ll explain a bit about them here. (They are shown in here with their most common settings:)

Cw G2Ccw G3ByQuadrants? N Break arcs at quadrant boundaries?CtrCode I J Can be ‘I J’ or ‘R’ or ‘I J R’CtrIncremental? Y Are I and J incremental from arc start point?\

These commands (along with properly formatted X, Y, I and J letters) are all that is usually needed for PostHaste to knowhow you want the arc codes to appear – at least on most relatively modern machines.

For most folks, though, the above commands are all that’s needed. Here is some information on the ones that may not becompletely obvious…

ByQuadrants?

Some machines can only handle arc motions that are 90 degrees or less. If that is the case on your machine, then followByQuadrants? with the letter Y (or ‘yes’). This will cause PostHaste to break all arcs at quadrant boundaries.

Note: ‘ByQuadrants? Y’ should also be used if you are using the ‘CtrCode R’ setting in your format (as the R method of arccenter calculation becomes ambiguous if arcs over 180 degrees are allowed). Which brings us to a discussion of CtrCode.

CtrCode

CtrCode designates the letters used to indicate the center point of an arc. It can be followed by one, two, or three letters – themost common settings are shown here:

CtrCode I J Use 2 letters to show that you want the arc center designated by its X and Y axis locations

CtrCode R 1 letter causes only the arc radius to be programmed. (Note: ‘ByQuadrants? Y’ must be used for this to work!)

CtrCode I J R Yes, there are machines that require both center XY values and a radius. (Go figure…) For those, use 3 letters.

CtrIncremental?

Set this to N if the center of arcs need to be indicated with absolute values (measured from the program origin rather thanthe start point of the arc).

The Sequences The sequences constitute the true ‘template’ portion of the format; the sequences specify exactly where all of the words(such as G1, M6 and X-3.25) appear in the final program.

!However, there are many machines whose arcs do not follow ‘relatively modern’ standards, so you may need more artillery for those. In that case, then see the CwCode and CcwCode sequences in the PostHaste Formatting Reference Manual. (These sequences let you custom-build arc motion blocks – line by line and word by word.)

!Please note that for turning formats (.pT2 files) CtrCode should typically be…

CtrCode I K 2 letters indicating H (horizontal) and D (depth) axis letters (Corresponding to X and Z)

13

Page 17: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

As you have seen in the complete format sample in section “Complete 4 axis mill format template.*” on page 10 (that youprinted out?) – the sequences look similar to an NC program, and they exactly describe the placement of all of the codethat is required to perform all of the individual machine functions.

There are sequences to describe every portion of a finished machine program (and more!).

The most commonly edited sequences The ones you will probably edit the most commonly are listed in the following table. Take a minute or two to look at thesequences in the hardcopy of the sample that you made (from the section Complete 4 axis mill format template.*) andcross reference it to the table below so that you understand how the sequences listed below describe all of theseparate functions listed in the right hand column:.

Sequences used for drilling cyclesAfter the sequences mentioned above, the most commonly edited sequences are probably the drilling (or ‘point to point’cycle) sequences. They are…

There are a lot of options on drilling cycles, so we’re not going to go into them in any detail here; but, as usual, you can getdetailed information on these (and all other) sequences in the PostHaste Formatting Reference Manual.

These sequences ... ...contain the code required ...

StartCode - for the very start your NC program

1stToolChange

- to get the first tool into the spindle (if required),- turn on the spindle and coolant, and - position (rapid) the tool to the first XY location in the job, then- rapid down to the ‘initial clearance plane’(Note: This sequence generally gets executed immediately after StartCode)

ToolChange - to change from one tool to another (e.g. turn coolant off and retract Z)- and then perform all of the same functions as 1stToolChange (for every tool after the first one.)

EndCode …at the very end of the program

Sequence name: What it does: Typical G codes:

Drill ‘Straight’ drilling (Feed in, Rapid out, with or without Dwell)* G81 and/or G82*

Ream ‘Feed in, Feed out’ G85

Peck Peck Drilling – ‘full out’ retract between pecks G83

ChipBreak ‘partial retract’ peck drilling G73

Tap Tapping G84

LTap Left-handed tapping G74

Bore ‘Find boring’: Feed in, stop, orient, rapid out G76

Back Back-boring cycle G87

Cancel Cancels all drilling cycles G80

14

Page 18: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

Things to watch out for when working with sequences:

Of course, you have already noticed that in the PostHaste template, the ‘number’ can also be a [variable]…

…which, of course, brings us to the next topic.

Using [Variables]In almost all of the sequences, you see variables such as [Program#] or [H] or [Tool]. This is because of the fact that inalmost all of the sequences, changing numerical values must be assigned to the various letters. Since numerical values thatget assigned to any given letter vary from program to program (and from place to place within a program), they are calledvariables.**

Now, don’t let the word variable scare you; variable simply means: “A word that takes the place of a number”. Let usexplain it this way:

There is a reason for (or description of ) every value of an NC program that you create; we are simply showing the“reason” instead of the value itself. For instance: an X value on a mill generally indicates a HORIZONTAL POSITION; sowe simply abbreviate it as the letter H... “H” is the variable that indicates “horizontal position”. Therefore, to indicate thatyou want the X to appear followed by the current horizontal position, then simply put X[H] where you want that to appearin your sequence.

The different letters in your NC program generally have a specific “reason for existence”, so we simply match the “reason”to the letter. Another example: the letter T usually indicates a “tool number”, so we’ve created a variable called “TOOL” tospecify the tool number. You will see it used in the ToolChange sequence like this: T[Tool]

See... that wasn’t so scary, now was it?

For a complete list of variables and what they do, see the PostHaste Formatting Reference Manual - Appendix A.

That appendix lists all of the variable names (and the values to which they refer) that we can use instead of numbers whendescribing the sequences. Because there are so many types of values that can be used in an NC program there are several

!

• Please note that, just like a standard NC program, each ‘word’ is always a letter followed by a number.

Please note that this is true - even if you want to output just a single character with no number – as is usually the casewith the percent sign (usually found in StartCode). Since a number must always follow every letter in everysequence - like this…

%0

…then to prevent the zero from actually appearing in the code, we format the letter (in this case the %) up inthe letter format section of the template to ‘suppress’ the numeric output like this:

% 00 (No digits before the decimal, no decimal, and no digits after the decimal)

• A single space must separate all words. Make sure not to accidentally use 2 spaces – this turns the rest of theline into a comment! (See the section “Comments in the format” on page 16 re use of comments.)

* Most formatting templates in the library do NOT support Dwell or G82 on Drill cycles – but it can easily be added; This is one of the simple ‘copy and paste’ changes that we have supplied for you in the QuickClips.txt file. You should take a moment to get familiar with the capabilities we have provided in the QuickClips.txt file; take a look (open it with any editor) – youmay find some very useful items there.** Variables is a term that we’ve borrowed from the world of computer programming. Please forgive us; we’ll try not to do this type of thing too often

15

Page 19: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Formatting Basics ❖

pages of variables listed there. It’s rather a long list (which you certainly do not need to memorize!), but you may want to“skim” it, just to get an idea of what’s available. That appendix is intended to be used for reference when you need it.

COMMENTS IN THE FORMATYou’ve probably already noticed that there are ‘comments’ in the templates.

There are 2 ways that you can enter comments into PostHaste templates:

1. For short (one line or less than one line) comments…… simply type 2 or more spaces (then type your comment after the spaces), or

2. For longer (multiple line) comments where it becomes inconvenient to use leading spaces, you may instead use theNotes: and EndNotes commands; put Notes: on the line before your comments and EndNotes on a line after them.(Make sure that you don’t forget the colon [:] at the end of the word Notes:. If you omit the colon, it won’t work!)

Here’s a sample section from a template that shows both types of comments (we’ve underlined the coments to make themeasier to see…)

Name Fanuc 6M, Shizuoka B6V

Notes: Format formed by Fred Farkle for Farmer Frank’s Fabulous Fat Free French FriersFeb. First, ’55.(All of these lines are comments because of the NOTES: line above and the ENDNOTES line below.) EndNotes

This line is a comment because of the leading spaces.

O >4 Program numberN >4 Line numbers

You can have as many Notes:/EndNotes comment sections as you’d like in your template. Notes:/EndNotes and ‘indented’ comments may also be used inside sequences.

!We HIGHLY recommend that you make liberal use of comments! Comments take only a few seconds to write, but could save you hours of time and frustration later when you need to make changes to your format! This is especially true when you’re doing something unusual, and ALWAYS (!) when you’re using ‘user variables’ such as [Val1], [Val2], etc. (Read about user variables in the PostHaste Formatting Reference Manual.)

!NOTE: Since PostHaste will ignore anything on the line that has 2 or more adjacent spaces before it… be careful not to accidentally “comment out” part of the actual formatting information by mistakenly entering 2 spaces in place of 1!

16

Page 20: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

EXAMPLE:MODIFYING THE

TOOLCHANGESEQUENCE

Page 21: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Example: Modifying the ToolChange sequence ❖

CHAPTER 4 : Example : Modifying the

ToolChange sequence

To get a feel for how to make changes, let’s make two changes that people commonly do in their tool change sequences(1stToolChange and ToolChange): we’ll move a few codes to different locations as shown in this sample (codes in bold arebeing moved):

So… we simply make the corresponding changes in the 1stToolChange sequence:

Please notice the ‘one for one’ correspondence between the template lines (in the table immediately above) and the actualcode output (in the first table).

The changes we want to make: What the code looks like now: …and how we want it to look:

We want the M6 on its own line - after the Tool #… N1 T1 M6G0 G40 G80 G54 X1.6 Y3.45G42 Z0.1 H1 M3 S2500

N1 T1 M6G0 G40 G80 G54 X1.6 Y3.45 M8

Our coolant pump is old – we need the M8 earlier. M8 G42 Z0.1 H2 M3 S2500

What we do to make the change: The original sequence: …We simply make it look like this:

Click the mouse just before the M6 and press enter (to move the M6 downto its own line)

1stToolChangeN[Block] T[Tool] M6G0 G40 G80 G[Work] X[H] Y[V]G43 Z[D] H[Lcomp] M[Direct]S[Speed]

1stToolChangeN[Block] T[Tool] M6G0 G40 G80 G[Work] X[H] Y[V] M[Cool]

‘Cut’ the M[Cool] here and ‘paste’ it onto the G0 line. M[Cool]End

G43 Z[D] H[Lcomp] M[Direct] S[Speed]End

18

Page 22: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

GO FOR IT!

Page 23: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Go for it! ❖

CHAPTER 5 : Go for it !

With just what you have read so far in this manual and some common sense, you can now probably configure PostHASTEfor most of your code requirements - because we designed the template to be rather self-explanatory. In other words: youmay not have to read the formatting reference manual in order to get the job done.

So go ahead - open up a template (with any text editor) and have at it!

! Don’t forget to first make a backup copy of any templates that you work on!

20

Page 24: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

OVERALL SYSTEMCONFIGURATION

Page 25: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Overall System Configuration ❖

APPENDIX A : Overal l System

Configuration

THE POSTHASTE.CFG OR POST.INI FILEThe PostHaste.CFG file (or, for you SurfCam users, the Post.INI file) allows you to configure some overall operationalcharacteristics of PostHaste. It is similar in layout to the commands and switches section of the format template, in thateach valid line in the .cfg file starts with a single command word, followed by one or more parameters. The valid commandsare shown in the charts below.

This first chart lists the most commonly used commands:

Command What it does Notes

Format Indicates the file name extensions for the format template file(s) andtells PostHaste in which folder to find them.

The FORMAT line is REQUIRED.

InDrive Similar to Format, the InDrive line designates the default folder and fileextension for incoming CL files.

OutDrive … Similar to the above, but designates the folder and the file extensionfor the finished NC program file.

If this line is omitted, then the final program file will be created in thesame folder as the incoming CL file and have the .NCC extension.(Also see the note re AutoOpen? below.)

Ignore … Use this to tell PostHaste to completely ignore certain CL records.Example: Ignore INDIRVNote: Ignore commands are processed AFTER Convert commands.

You may place many Ignore commands in the .cfg file. NOTE: You can also use this command in your formattemplate(s)! IGNORE commands in your template affects only themachine in the template. IGNORE commands in the CFG file affect ALLmachines.

Convert … Allows you to “convert” incoming CL records by effectively performing a“search and replace” on all lines as they are read from the CL file -BEFORE they are processed by the format template. Example: Convert ‘MOVARC’ to ‘CIRCLE’Note: Convert commands are processed BEFORE Ignore commands.

You may have many CONVERT lines in the .cfg file.This same command is also available in the format template, but is mostcommonly used in the .cfg file because in most cases, you want ALL ofyour posts to do the same “conversions” of CL data. Putting the Convertcommand(s) here in the .cfg file - once - keeps you from having torepeat the same Convert commands in all of your different formattemplates.

22

Page 26: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Overall System Configuration ❖

This second chart lists the commands that are not changed or used as often as those in the chart above. Once you set them,you will probably never need to change them.

Command What it does Notes

Logging? N The “N” (no) tells the post to NOT create a PostHaste.LOG file.(Inhibiting the .log file may help the post run slightly faster.)

If this line is omitted (or if you use “Y”), then the post WILL create aPostHaste.LOG file (the equivalent of “Logging? Y”).PostHaste generates a POSTHASTE.LOG file (in the same folder as yourPostHASTE.exe file). This file is a "debugging" aid that helps you see exactlywhat incoming CL data caused each line of NC code to be output. This file isessentially a "merging" of the incoming CL data and the outgoing NC code. By looking at this file (in any text editor), you can see exactly which CLrecords produced each line of NC program. (The incoming CL lines arenumbered for your convenience.)NOTE: This file is overwritten each time you run the post, so if you want tosave it, you will either have to rename it or move it to another folder.

CloseWindow? Y “Y” tells PostHaste to automatically close the main PostHastedialog window as soon as it has completed posting the current file.

If this line is omitted (or if you use “N”), then the main PostHaste window willremain on the screen, allowing you to choose another posting or editing taskby pressing any of the task buttons (e.g. the Post Again or Edit Template orExit buttons).

AutoOpen? N The “N” (no) tells the post to NOT open the NC program file after ithas been created. See section 1.1.1 for more information onPostHaste’s AutoOpen feature.

For the AutoOpen feature to work properly, the OutDrive line (seeabove) must be a complete path name (including the drive letter).

AptDrillAbs? Follow this with “Y” (yes) if the CYCLE records in the CL files youuse store the CLEAR, RAPTO and FEDTO values as ABSOLUTEvalues. (NOTE: This is NOT the ISO standard for APT CL files, butsome systems do it this way [such as Hurco], so this “switch” allowsPostHaste to process those types of CL files properly.)

If this line is omitted, PostHaste will interpret the CLEAR FEDTO values as“incremental from the hole top” (the equivalent of “AptDrillAbs? Y”) - whichis the ISO standard for APT CL files.(Note: In the ISO standard, RAPTO [the “R level”] is measured incrementally,DOWN from the calculated CLEAR level.)

EOL If the incoming CL file is NOT stored in “PC standard End Of Line”format (CR and LF characters after each line), then indicate theASCII value of the that is used as the ‘End of Line’ (EOL) character.

UNIX systems use the LF (linefeed) character by itself, which is ASCIIcharacter number 10. So, for example, you would use this line: EOL 10

FontSize Add a FontSize command like the one below if the characters in thePostHASTE main window and prompts are too small or too large. FontSize –13(Note: This is the 'default' size that is used if you do not have aFontSize command. )We have noticed that you can use either positive or negative valueshere; make the number 'farther from zero' to make the fontslarger.

PostHaste sends the FontSize number directly to Windows through a WindowsAPI call; in other words, the font size is controlled directly by Windows. We suspect that 'minus' font sizes indicates 'points' (72 points per inch), andpositive values indicate 'pixel height' (in other words, -13 creates larger textthan 13) … but we're not sure of the details on this.You can change the font size 'on the fly': While PostHaste is running, just edityour .cfg file and change the number. Then save the .cfg file. You willimmediately see the effect of the changes you make when you hit the postagain button.

FontName If you don't like the default font ('MS Sans Serif'), you can enteranother one in quotes here like this: FontName 'Terminal'Make sure that you use a valid font name that is installed on yoursystem, and that you do NOT misspell the font name!

Using FontName to indicate another font ('Terminal' or some other) is usuallyrequired for asian ('double-byte') or other language fonts to display theproper character set.

23

Page 27: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

RECOMMENDEDFORMAT FILEEXTENSIONS

Page 28: Getting Started with the PostHASTE-Postprocessor · getting started with the posthaste postprocessor 1 what this manual ... example: modifying the toolchange sequence 17 go for it

Recommended Format File Extensions ❖

APPENDIX B : Recommended Format Fi le

Extensions

The file name extensions in the table below can be used in the Format line of your PostHaste.cfg file. The numbers in thefile name extensions indicates the number of axes supported by the template.

Machine type Format template file name Extensions

Milling .pM3 to .pM5 (for 5 axis)

Turning .pT2 to .pT4

Mill/Turn (mUltifunction machines) .pU2 to .pU5

Flame or Plasma .pF2 ...

Laser .pL2 ...

Punch Press .pP2

Water jet .pW2 ...

Wire EDM .pE2 ...

25