posthaste for gibbscam 2005 - format reference manual

132
 50408g PostHASTE Postprocessor Formatting Reference Manual Have you seen Appendix E? IF NOT, YOU SHOULD! Please see page 119 now. What is this m anual and who is it for ? This is the second of two manua ls written for Post  HASTE  – it contains detailed information regarding the Post  HASTE  formatting templates. This manual was written for people who are already familiar with the basic concepts covered in the manual entitled Getting Started with PostHASTE. If you haven't already, please read (or review) that manual. What is Post HASTE? Post  HASTE  (sometimes referred to as “the post” for short) is a software system that translates your CAM system's tool motion output (CL files) into 'NC program' text (or 'ASCII') files to drive NC or CNC machines. PostHaste can create programs in a ny of these formats:  EIA (sometimes referred to as 'ISO') standard: EIA programs are the most common type of machine control files; they typically use G, X, Y, Z, T and/or M codes (among others) for various mach ine 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 some or all of the standard letter cod es.  Tab-sequential (or “columnar”): These types of programs are not very common anymore, but are sometimes needed for older (e.g. 'Bandit less expensive (such as Emco-Maier) machines. The se programs have the various numerical values arranged in columns (instead of using a letter); the location (or spacing) of the numbers within each line determines the significance of the value. For exa mple the first column may be an X position, the second column the Y position, and so on. Limitations of Post HASTE Some machines do not use the above conventions and therefore PostHaste may not be suitable for use i n generating  NC programs for them; a mong them are some Brother and older Mazak ('Mazatrol' language) machines and several others. If you have any doubt as to whether or not PostHaste is suitable for your machine, then call us; we will be able to help you determine its suitability. If it is not, then you may either purchase a postprocessor that has been customized to the specific machine, or get as close to it as possible by configuring PostHaste, then editing the NC code (using a text editor) to suit your machine exactly.

Upload: iphoneicandiart

Post on 14-Jan-2016

86 views

Category:

Documents


2 download

DESCRIPTION

PostHASTE Post Processor manual for GibbsCAM

TRANSCRIPT

Page 1: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 1/132

50408g

PostHASTE Postprocessor

Formatting Reference ManualHave you seen Appendix E? IF NOT, YOU SHOULD! Please see page 119 now.

What is this manual and who is it for?

This is the second of two manuals written for Post HASTE  – it contains detailed information regarding thePost HASTE  formatting templates.

This manual was written for people who are already familiar with the basic concepts covered in the manualentitled Getting Started with PostHASTE. If you haven't already, please read (or review) that manual.

What is PostHASTE?

Post HASTE  (sometimes referred to as “the post” for short) is a software system that translates your CAM

system's tool motion output (CL files) into 'NC program' text (or 'ASCII') files to drive NC or CNCmachines. PostHaste can create programs in any of these formats:

•  EIA (sometimes referred to as 'ISO') standard:EIA programs are the most common type of machine control files; they typically use G, X, Y, Z, T

and/or M codes (among others) for various machine movements and functions.

•  'Conversational':

Conversational programs are usually somewhat similar to EIA programs, but typically have wordsor phrases (such as 'LINE' or 'ARC') in place of some or all 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 less expensive (such as Emco-Maier) machines. These programs have the variousnumerical values arranged in columns (instead of using a letter); the location (or spacing) of the

numbers within each line determines the significance of the value. For example the first columnmay be an X position, the second column the Y position, and so on.

Limitations of PostHASTE

Some machines do not use the above conventions and therefore PostHaste may not be suitable for use in generating

 NC programs for them; among them are some Brother and older Mazak ('Mazatrol' language) machines and several

others. If you have any doubt as to whether or not PostHaste is suitable for your machine, then call us; we will be

able to help you determine its suitability. If it is not, then you may either purchase a postprocessor that has been

customized to the specific machine, or get as close to it as possible by configuring PostHaste, then editing the NC

code (using a text editor) to suit your machine exactly.

Page 2: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 2/132

Table Of Contents

What is this manual and who is it for? ........................................................................................i

What is Post HASTE ? ..................................................................................................................i

Limitations of Post HASTE ..........................................................................................................i

1. POSTHASTE BASICS......................................................................................................1

1.1 How PostHaste works.............................................................................................................. 1

1.2 Template file extension naming conventions..........................................................................1

2. FORMAT TEMPLATES - THE BASICS............................................................................2

2.1 Overall structure of the template file......................................................................................2

First - the NAME line................................................................................................................2

The address (letter) formats .......................................................................................................2

Commands and 'Switches'..........................................................................................................3

Basic rules regarding commands ............................................................................................................... 3

The “Sequences” .......................................................................................................................3

2.1.1 Comments in the format...................................................................................................... 4

3. THE LETTER FORMATS..................................................................................................5

C__ (the COLUMN number - used only for columnar programs - see examples later).........................6

S_ (the “Spaces” number - used only for columnar programs - see examples later) ...............................6

+ (the plus sign) ..........................................................................................................................................6

- (the minus sign) ........................................................................................................................................ 6

> (the “up to...” sign) ..................................................................................................................................6

A numeral (in the above example the number: 3) .....................................................................................6

. (a decimal point) ....................................................................................................................................... 7

> (the “up to...” sign [again]) .....................................................................................................................7

A number (in the above example the number: 4) ......................................................................................7

x - the OUTPUT character. ........................................................................................................................7

The OUTPUT character for COLUMNAR style programs:.....................................................................7

3.1 Advanced letter formatting .....................................................................................................8

3.1.1 Suppression of a letter (“numbers only” output) ..................................................................8

3.1.2 Letter format modifiers .......................................................................................................8

Add __......................................................................................................................................................... 8

DivBy _ and DivInto _ ......................................................................................................................... 9

Force............................................................................................................................................................ 9

Page 3: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 3/132

Inc 10

IncFrom _.................................................................................................................................................. 10

Limit __ __................................................................................................................................................ 10

Clamp __ __.............................................................................................................................................. 10

Mod __...................................................................................................................................................... 11

Modal ........................................................................................................................................................ 11

Mult __...................................................................................................................................................... 11

 No-Opt ...................................................................................................................................................... 12

Sub __ ....................................................................................................................................................... 12

3.1.3 How Letter Format Modifiers are used together.................................................................12

Hierarchy of Modifiers: ...........................................................................................................13

 Notes re “LIMIT checking”: .................................................................................................... 14

Regarding IncFrom:.................................................................................................................14

4. COMMANDS AND 'SWITCHES' .................................................................................... 15

What's a Switch?......................................................................................................................15

4.1 List of Commands and Switches (the ones that are not used inside sequences) ................15

 Note: See section 5.3 for commands that are used only inside of sequences. ............................ 15

We have listed all of the commands and switches in this section in alphabetical order, except for... .. 15

4.1.1 Ask ...................................................................................................................................16

How to make the  Ask  repeat..................................................................................................................... 17

4.1.2 AskPeckClear?.................................................................................................................. 17

4.1.3 ByDiameter? (lathe only) ..................................................................................................17

4.1.4 Comment ..........................................................................................................................18

4.1.5 Convert .............................................................................................................................18

4.1.6 Coolant .............................................................................................................................19

Examples:................................................................................................................................19

4.1.6.1 Using [Cool] in an IF statement .............................................................................19

4.1.7 DComp .............................................................................................................................19

4.1.8 Drive................................................................................................................................. 20

4.1.9 Each..................................................................................................................................20

4.1.10 EOB ('End Of Block' characters)....................................................................................20

4.1.11 EOF ('End Of File' characters)........................................................................................21

4.1.12 Feed and Rapid ..............................................................................................................21

4.1.13 FeedType.......................................................................................................................21

4.1.14 First#?............................................................................................................................21

4.1.15 HCode, VCode, DCode and FeedCode...........................................................................21

Page 4: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 4/132

4.1.16 HCode2, VCode2, and DCode2 .....................................................................................22

4.1.17 Inc/Abs ..........................................................................................................................22

4.1.18 Inch/MM........................................................................................................................22

4.1.19 Incremental? ..................................................................................................................22

4.1.20 Ignore ............................................................................................................................23

4.1.21 Leading0s?.....................................................................................................................23

4.1.22 LocalOutput? .................................................................................................................23

Important! Make sure your [Work] numbers match! ................................................................24

4.1.23 ModalGs ........................................................................................................................24

4.1.24 ModalLetters..................................................................................................................24

4.1.25 Notes: / EndOfNotes (or EndNotes) ...............................................................................25

4.1.26 Rename..........................................................................................................................26

4.1.27 ReturnPlane or RetPlane ................................................................................................26

4.1.28 RevSigns........................................................................................................................274.1.29 RoundToQuad?.............................................................................................................. 27

Automatic 'round center to startpoint' feature..........................................................................................27

4.1.30 RevTurret2?................................................................................................................... 28

4.1.31 Sequence#s ....................................................................................................................28

4.1.32 Spaces?..........................................................................................................................29

4.1.33 SpeedType (lathe only) ..................................................................................................29

4.1.34 Spindle...........................................................................................................................29

4.1.35 SpliceSubs?....................................................................................................................29

4.1.36 Thread ...........................................................................................................................29

4.1.37 TLAxisEnabled? ............................................................................................................ 30

4.1.38 Tolerance.......................................................................................................................30

4.1.39 Tools..............................................................................................................................30

4.1.40 UpperCaseComments?................................................................................................... 31

4.1.41 Verbose?........................................................................................................................ 31

4.1.42 Work..............................................................................................................................31

4.1.43 WorkDefault ..................................................................................................................32

4.1.44 ZRestart? .......................................................................................................................32

4.2 Arc processing commands and switches............................................................................... 33

4.2.1 ArcPlane ...........................................................................................................................33

Using the [ArcPlane] variable in an ArcCode sequence .........................................................................34

4.2.2 Cw and Ccw......................................................................................................................35

4.2.3 CtrCode.............................................................................................................................35

Page 5: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 5/132

4.2.4 CtrCode>180 and CtrCode360 ..........................................................................................35

4.2.5 CtrIncremental?.................................................................................................................36

4.2.6 ByQuadrants?....................................................................................................................36

4.2.7 Helical?............................................................................................................................. 36

4.2.7.1 Helical arcs - Handling special cases......................................................................36

So, what value is output with the K? ....................................................................................................... 37

What if you want some other K value?.................................................................................................... 37

4.2.8 MaxRad ............................................................................................................................38

4.2.9 MinRad............................................................................................................................. 38

4.2.10 MinArc ..........................................................................................................................38

4.3 Special commands for Columnar style formats....................................................................39

4.3.1 Spaces............................................................................................................................... 39

4.3.2 Dummy.............................................................................................................................39

5. THE “ SEQUENCES” ...................................................................................................... 40

5.1 Using Variables:.....................................................................................................................40

For a complete list of variable names and descriptions, see Appendix A. .................................41

5.2 The Sequence Descriptions....................................................................................................42

5.2.1 The standard sequences .....................................................................................................42

5.2.1.1 StartCode...............................................................................................................42

5.2.1.2 1stToolChange.......................................................................................................43

5.2.1.3 ToolChange ...........................................................................................................44

5.2.1.4 Infeed ....................................................................................................................44

5.2.1.5 OutFeed.................................................................................................................44

5.2.1.6 EndCode................................................................................................................45

5.2.2 Canned Cycles ..................................................................................................................46

5.2.2.1 Two ways to output canned cycles: 'canned' and 'longhand'....................................46

You may “mix and match” your drilling cycle methods......................................................................... 46

5.2.2.2 Cancel ...................................................................................................................47

“End cancel” vs. “End” ............................................................................................................................ 47

The 'Cancel' sequence............................................................................................................................... 47

5.2.2.3 Peck drilling (The Peck and ChipBreak cycles)......................................................47

…but what if my machine does not have a Peck or ChipBreak cycle?.................................................. 48

5.2.2.4 Advanced canned cycle control..............................................................................48

5.2.3 Controlling 'modality' - the “Force?” option ......................................................................49

5.2.4 Additional sequences for special purposes.........................................................................50

Page 6: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 6/132

5.2.4.1 Sequences for custom and multi-line movements LineCode, RapidCode and ArcCode(CwCode, CCWCode) ................................................................................................................50

Important notes regarding ArcCode (and CwCode and CcwCode):.......................................................51

LineCode and RapidCode sequences.......................................................................................................51

5.2.4.2 AutoThread (used for lathe only) ...........................................................................51

[TParams] variable ..................................................................................................................52

"Individual" thread parameter variables available...................................................................................52

5.2.4.3 Index (used for machines with rotary axes) ............................................................53

... for machines with ONE rotary axis ......................................................................................53

Which letter should I use on my INDEX line? / Do I need the minus sign?......................................53

INDEX definition when rotary axis on CAD model does not match machine orientation.................... 54

... for machines with TWO (or more) rotary axes.....................................................................54

5.2.4.4 Stop .......................................................................................................................54

Handling ‘Optional Stop’ (OPSTOP) CL records...................................................................................55

5.2.4.5 Upon, UponRec & Cycle sequences.......................................................................55

Upon .......................................................................................................................................55

The Every, PreScan and Unique modifiers.............................................................................................. 56

The Relate option for 'Upon ... Unique'  sequences: ................................................................................ 57

UponRec and Cycle .................................................................................................................58

Using variables with UponRec or Cycle to handle the incoming values.................................... 60

Cycle (using variables) ............................................................................................................60

More UponRec and Cycle examples.........................................................................................61

5.2.5 CallMe and Call (User-defined sequences and 'reusing' sequences) ..................................61

5.3 Commands that can be used inside of sequences.................................................................. 62

5.3.1 Call ...................................................................................................................................62

5.3.2 Comments......................................................................................................................... 63

5.3.3 If, Else and EndIf ..............................................................................................................63

5.3.4 File....................................................................................................................................64

What the File commands can do for you.................................................................................................64

How to use the File commands................................................................................................................ 64* Important notes re the Alias and Empty commands... ..........................................................................66

5.3.4.1 'File' usage example: Creating a 'tool list' at the top of the program........................ 67

5.3.5 NoEol and EOL.................................................................................................................68

5.3.5.1 EOL.......................................................................................................................68

5.3.6 Set.....................................................................................................................................69

5.3.6.1 Limitations of SET commands............................................................................... 70

Page 7: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 7/132

6. WORK FIXTURE OFFSETS (G54, ETC.): HOW THEY [WORK] ................................. 71

The 3 issues (in the format template) that control Work offsets................................................71

Work offsets "in a nutshell" .....................................................................................................71

But, what if you DON'T want work offsets in your NC programs?...........................................72

Handling 'non-standard' work offsets (G54.1 P_ , G15 H_ ... etc.)............................................72

Details, details, details... ..........................................................................................................72

The Work  line ........................................................................................................................................... 73

The WorkDefault  line ............................................................................................................................... 73

The [Work] variable (used in the sequences) .......................................................................................... 73

Changing [Work] offsets between drilling cycles................................................................................... 74

Getting rid of redundant G54 (et al) codes .............................................................................................. 75

7. SPECIAL FEATURES .................................................................................................... 76

7.1 Using Equations (mathematical operations)......................................................................... 77

7.1.1 Mathematical symbols and functions................................................................................. 77

Hierarchy of operations & use of parentheses ..........................................................................78

7.2 Suppressing line numbers and outputting blank lines .........................................................78

Suppressing line numbers ........................................................................................................78

Outputting blank lines..............................................................................................................79

7.3 'Text output' and text {variables} .........................................................................................79

7.3.1 Direct ('hard-coded') text output ........................................................................................79

7.3.2 Regarding use of 'quotes' (and outputting quotes in your code)..........................................80

7.3.3 Using {text variables} .......................................................................................................80

7.3.4 Important information regarding text and text variables:....................................................81

7.4 “Search and Replace”............................................................................................................ 81

Avoid 'double-replacements'!...................................................................................................82

The NoComment option...........................................................................................................82

The ALL option........................................................................................................................83

7.5 If / Else Logic .........................................................................................................................84

Logical operators ('Equals', 'Greater than', etc.)........................................................................85

Testing 2 conditions: Using AND and OR with IF ....................................................................85

7.6 Outputting subs (subprograms), and the automatic 'multiple part' program feature .......85

7.6.1 Basic Fanuc setup example................................................................................................86

7.6.2 Automatic multiple part programs .....................................................................................86

7.6.2.1 Sub numbering ......................................................................................................87

Page 8: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 8/132

7.6.3 Sequences, variables and switches used for subs................................................................88

7.6.3.1 SubCall sequence...................................................................................................88

7.6.3.2 SubStart, SubEnd, and Between sequences ............................................................88

7.6.3.3 [Sub], [SubLine] and [Times] (sub variables).........................................................89

7.6.3.4 Switches used to control subs ................................................................................89

SpliceSubs? switch ...................................................................................................................................89

7.7 The  PostHaste.log file (for “debugging”) ..............................................................................90

Inhibiting the log file for faster processing............................................................................... 91

8. “ SPECIAL CASE” TACTICS & NOTES.........................................................................93

8.1 Concerning incremental / absolute output and the [IncMode] variable.............................. 93

8.2 How to format “P1=” type codes........................................................................................... 94

8.3 'Block deletes' on multi-part sub calls ..................................................................................95

9. APPENDIX A - LIST OF VARIABLES ..........................................................................96

Categories of variables ............................................................................................................96

The variables... ........................................................................................................................97

9.1.1.1 Variables that apply to movements in general ........................................................98

9.1.1.2 Variables that can be used to format arc movements ............................................101

9.1.1.3 Variables related to “point-to-point” Drilling cycles ............................................ 102

9.1.1.4 Variables set from the Tool or Tool Change information ..................................... 104

9.1.1.5 Variables used for subroutines or subprograms ....................................................107

9.1.1.6 Text Variables .....................................................................................................107

9.1.1.7 Prompted Variables .............................................................................................108

9.1.1.8 Variables used for Wire EDM posts..................................................................... 109

9.1.1.9 General Purpose (Misc.) variables .......................................................................110

10. APPENDIX B - LIST OF “ RETIRED” FUNCTIONS.................................................... 112

11. APPENDIX C - APT-CL RECORDS RECOGNIZED.................................................... 113

CL records IGNORED by PostHaste: .................................................................................... 113

CL records recognized by PostHaste:.....................................................................................114

12. APPENDIX D - HANDLING ROTARY AXES.............................................................116

Definitions: .............................................................................................................................................116

12.1 [RotAngle] vs. [AAxis], [BAxis] and [CAxis] ...............................................................116

Page 9: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 9/132

12.2 Where do the actual rotary angle values come from?..................................................116

12.2.1 MULTAX data.............................................................................................................116

12.2.2 Coordinate system (CS or CSYS) data .........................................................................117

12.2.3 TLAXIS record data.....................................................................................................117

TLAxisEnabled? switch.......................................................................................................................... 118

12.2.4 ROTATE, ROTHED or ROTABL records...................................................................118

The VertCSame? switch.........................................................................................................118

13. APPENDIX E - WHAT'S NEW WITH POSTHASTE  AND THIS MANUAL? ............ 119

Page 10: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 10/132

Page 11: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 11/132

1. PostHASTE Basics

Post HASTE  is basically a translator that reads CL (“Cutter Location”) tool path data and outputs it

according to a formatting template that you can easily modify.

Post HASTE  operates quite simply - it usually only prompts you for two things...

the CL file to open and -  (optionally) which machine format file you want to use.

...Post HASTE will then generate the NC program and save it according to the information you enter inresponse to the prompts.

This manual discusses how to modify the format templates to suit your needs.

1.1 How PostHaste works

PostHaste gets all of the configuration information for each machine from a format template file. (In the

context of this manual, we will refer to it as either simply the 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. This can be done easily with any word processor or text editor.

The primary purpose of this manual is to explain how to modify the template(s) to achieve the desired 

output for 3 and 4 axis milling and 2 axis lathes. (Other instruction manuals are available for Mill-Turnmachines [that is, lathes with live tooling] and 5 axis milling machines.)

1.2 Template fi le extension naming conventions

We recommend using the file name extensions (the three characters that typically follow the period in a file

name) in the chart below to differentiate between format files for various types of machines.

The numbers in the extensions indicates the number of supported axes.

Extension(s) Machine type(s)

.pM2 to .pM5   Milling (2 axis to 5 axis machines)

.pT2 to .pT4   Turning (Lathes) - 2 to 4 axis

.pU2 to .pU5 mUltifunction (Mill-Turn) machines - 2 to 5 axis.

.pL2 to .pL5   Laser...

.pF2...   Flame or plasma

.pP2...   Punch presses

.pE2 wire EDM

.pW2...   Water jet

Page 12: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 12/132

2. Format templates - the basics

This section will familiarize you with the overall structure of the format file.

We highly recommend that while reading the following information, that you also load a format templatefile into the editor of your choice so you can follow along on your screen.

2.1 Overall structure of the template fi le

 Now, all of the formatting information that PostHASTE requires is placed in the format template file inthese 4 basic areas:

1. The NAME line

2. The address (letter) formats

3. Commands and switches

4. The “Sequences”

The following four sections briefly describe what these do Please take a look at a template file (on your 

screen) while you read the following; doing this will greatly help you get a good idea of how the templatefile works.

First - the NAME line

When you edit a template file, you will notice that the word NAME is the first thing in the format. The

NAME line starts the description of each machine format. Without a NAME line, you don't have a

format. Sorry - that's just the way it is.

After the required NAME line, the remainder of the template 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 easiestway to create a new NC code format is to copy an existing machine format template, then alter it to fit your 

needs.

The address (letter) formats

This lists the letters that can be used in your format - in the order that they will appear in the lines of 

machine program code - and the exact formatting of the numerical values that accompany each letter.

Here's an excerpt from the letter format section of a Fanuc template:

O >4 O can be up t o 4 di gi t s, no deci mal .N >4G >2 G can be up t o 2 di gi t s, no deci mal .X - >3. >4 X can have mi nus si gn, up t o 3 bef ore, up t o 4 af t er deci mal .

 Y - >3. >4

When you're ready to learn all about letter formatting, see section 3.

Page 13: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 13/132

Commands and 'Switches'

After the letter formats, there is typically a page or two full of commands such as...

Modal Gs 0 1 2 3 73 74 76 80 81 82 83 84 85Sequence#s N 0 1 1 Char , Freq, I ncrement , St ar t

HCode XVCode Y

FeedCode F

Spaces? Y Spaces bet ween wor ds?

...Commands like the above tell the post basic information that is used commonly in many areas of the final

machine program. (You may see section 4.1 to learn more about all of the available commands and switches.)

Basic rules regarding commands

PostHaste expects to find the commands and switches written in a particular way; therefore any

modifications that you make to the file must be done in STRICT ADHERENCE to the rules outlined here.

As you have already seen (on the NAME line); this is the kind of structure that PostHASTE expects to find 

in the format:

-  a command word (such as “name”), then

-  a SINGLE SPACE (to separate the word from the following instructions), then

-  the parameters (letters, numbers or other specific words) pertaining to that particular command. If 

there is more than one parameter, then the parameters are always separated by a single space.

 Note: As you will see below, you must always be careful to not use more than one space between

 parameters. If you do, then you will turn the remainder of the line into a 'comment' that PostHaste will

ignore.

The “ Sequences”

The sequences describe where all of the words (letters and numbers) appear in the final program. They look similar to an NC program, as these sequences show:

St art CodeO[ Pr ogr am#]G90End

1st Tool ChangeN[ Bl ock] T[Tool ] M6G0 G40 G80 G[ Wor k] X[H] Y[ V]G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ]End

Dr i l lG81 X[ H] Y[ V] Z[ D] R[ RLevel ] F[ FRate] F. i n, R. out .end cancel

Cancel

Page 14: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 14/132

G80

end

. . .

EndCode

G28 G49 Z0 S100

G28 G91 X0 Y0 T[ Tool 1] M6

G90 M30

End

There are sequences to describe every portion of a finished machine program. You can get more

information on sequences in section 5.

Please note that again, all of the words in the sequences must be separated by a  single space.

2.1.1 Comments in the format

 NOTE: PostHaste will IGNORE ANYTHING ON THE LINE THAT HAS 2 OR MORE

ADJACENT SPACES BEFORE IT - this allows you to put comments in the file in either of these

2 easy ways:1. Simply move the cursor a few spaces past the end of a command line, then type your 

comment.

2. Type any comment on its own line - just make sure that the line has some leading spaces.

We HIGHLY recommend that you make liberal use of comments! They take only a few

seconds to write, but could save you many minutes (or hours!) of frustration later when you need to make changes to your format!

CAUTION: BE CAREFUL NOT TO ACCIDENTALLY “COMMENT OUT” part of the actualformatting information by mistakenly entering 2 spaces in place of 1!

Page 15: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 15/132

3. The Letter Formats

This is a series of lines that each start with a specific character (usually a letter) followed by some numbers

and signs. This is a list of all of the characters that your NC machine needs (and in the order that they willappear on any line of NC code). Add, change and/or delete letters and/or instructions so that they are

arranged in the order that they appear in a line of NC code and are formatted according to the followinginformation (if you look at the templates you will see something like these).

Helpful hint: When reading the letter formats, the arrow (>) means “up to”.

/ 00

% 00

“00” (“No digits before the decimal, no decimal, then no digits after”) is the format for any character that you wish toappear by itself (that is, with no numbers) - which makes it perfect for describing the percent sign (%) or “block delete” (/)characters, as it does in these examples.

N >4 N address: (NO - sign allowed,) up to 4 characters (no decimal).

X - >3. >4 X address: - sign allowed, up to 3 places before the decimal, a decimal, then up to 4 digits after.

F >32 F address: (NO - sign allowed,) up to 3 places before the decimal, (NO decimal,) then 2 digits after. The post will addtrailing zeros; thus a F value of -2.0 will be output as F200

G 2 G address:always 2 digits; a G value of 0 will be output as G00

R +- >24 R address: + sign is mandatory (unless the value is negative, in which case the '-' will appear), up to 2 places before the(invisible) decimal, then 4 after (adds trailing 0s such that an R value of 1.5 becomes R+15000).

You can see that the formatting options above gives you a lot of flexibility and are relatively self-explanatory.

(Note: The examples above do not show any of the “advanced character formatting” that can be done - asdetailed in section 3.1.)

NOTE: You can also format lower case letters. PostHaste will accept characters with ASCII values

 between 33 (!) and 122 (z). (The exclamation point [!] is a special case - read about it below in thesection entitled “Suppressing line numbers and outputting blank lines” - section 7.1.)

Page 16: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 16/132

The “maximum” possible letter format is something like this:

? C__ S_ +->_.>_ x

...where the “?” is the character (usually a letter) to be formatted, the “blanks" (_) can be any numeral, and the “x” is an optional character (or a set of empty quotes, like “”. Empty quotes here suppresses the output

of the letter altogether. See section 3.1 [ Advanced letter formatting] for more on this.)

Here's what each of the characters in the formatting lines do:

C__ (the COLUMN number - used only for columnar programs -see examples later)

The number following the C notes the Column number at which this word starts. Note that there is a space

after the number to separate this information from the next part of the line. (Note: There are specialcommands [Spaces and Dummy] that are needed for columnar style programs - read about them in section

4.3: Commands and Switches.)

S_ (the “ Spaces” number - used only for columnar programs - see examples later)

The numeral after the S determines how many spaces this word will take in the NC block. (Note: There arespecial commands [Spaces and Dummy] that are needed for columnar style programs - read about them insection 4.3: Commands and Switches.)

+ (the plus sign)

This causes PostHaste to output a + sign on the number if it is not negative. It must be the first formatting

character in this line of your file if used at all.

- (the minus sign)

As would be expected, this causes PostHaste to output a - (“minus”) sign on the number if it IS negative. It

must be the next formatting character if a - sign is ever to be used for this character address.

> (the “up to...” sign)

This (actually the “greater than” sign) is supposed to be an arrow that means that the number of digits

 before the decimal point can be “up to N places” (where the N is the next number on the format line[explained below]) and causes NO LEADING ZEROS TO BE OUTPUT in this address. IF THIS ARROW

IS LEFT OUT, THEN THE POST WILL ADD LEADING 0s so that the number of digits before thedecimal will always be the following number...

 A numeral (in the above example the number: 3)

If the above “up to” arrow is used then this is the MAXIMUM number of digits that may appear before the

decimal point.

If the above “up to” arrow is NOT used then this is the number of digits that will ALWAYS appear before

the decimal point.

Page 17: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 17/132

. (a decimal point)

The presence of the decimal point in the line here will indicate that this address requires a decimal point.

Conversely; if this character is absent, then it will not be output in the NC code. You can also useCOMMAS (,) instead of decimal points - this is common for use with European machine tools.

> (the “up to...” sign [again])

Just like above; this arrow means that the number of digits AFTER the decimal point can be “up to N

 places” (where the N is the next number on the format line [explained below]) and causes NO TRAILINGZEROS TO BE OUTPUT in this address. IF THIS ARROW IS LEFT OUT, THEN THE POST WILL

ADD TRAILING 0s so that the number of digits after the decimal will always be the following number...

 A number (in the above example the number: 4)

This is always a single digit that indicates the number of digits available AFTER the decimal point:

If the above “up to” arrow is used then this is the MAXIMUM number of digits that may appear after the

decimal point.

If the above “up to” arrow is NOT used then this is the number of digits that will ALWAYS appear after 

the decimal point.

x - the OUTPUT character.

If for any reason you wish to have a letter placed in the NC program INSTEAD of the one that is actuallydescribed by the formats, you may place this letter here. This comes in handy when for instance, the same

letter must be formatted differently when it is used in different places. Case in point is the Bridgeportmilling control: any negative Z value with a minus (like “Z-1.5”) is usually BELOW the Z0 point, but in

the case of drilling cycles, no minus sign is required for the Z! Here are the lines that you can put in your format to accommodate this condition:

Put these 2 lines in the “letter formats” section:

Z - >3. >4A >3. >4 Z

A canned cycle description should look like this:G81 X[ H] Y[V] A[ D] F[ FRate]  |

In this case a normally unused letter (A) is called in the drilling cycles, but the format line of the letter Aends with “ Z” so that a Z will actually come out in the NC code. It will also appear WITHOUT a minus

sign (because of the absence of the “-“ in the “A” format line).

In other words, the post formats for A, but outputs a Z. This is only one example of how this can be

used; the possibilities are endless!

  The OUTPUT character for COLUMNAR style programs:

This output character designation works slightly differently when you are formatting a COLUMNAR style

 program (remember as mentioned above; the SPACES line designates a format as columnar); IF NOOUTPUT CHARACTER IS SPECIFIED, THEN A SPACE WILL BE OUTPUT IN PLACE OF THE

LETTER INSTEAD OF THE LETTER ISTELF. (That's why in the examples above the T is repeated at theend of the T format line, and also why the note for the K address says that no letter will appear in the NC

 program; because there is no K repeated at the end of the format line.)

Page 18: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 18/132

 Note: There are special commands [Spaces and Dummy] that are needed for columnar style programs -read about them in section 4.3: Commands and Switches.

3.1 Advanced letter formatting

In addition to the “basic” formatting options described above, there are some other things you can add to

the end of a letter format line to achieve many other operations. Here is a list of them:

3.1.1 Suppression of a letter (“numbers only” output)

You can suppress the output of a letter by putting a set of empty quotes after the letter format (where you

would usually place the “output character”). For example, this line could be used to put “Line numbers” inthe program without the “N” preceding them:

N >4 ' '

This would cause the resulting program to look like this: instead of this:  1 O12 N1 O12

  2 G0 G28 X0 Y0 Z0 N2 G0 G28 X0 Y0 Z0  3 T1 M6 N3 T1 M6

3.1.2 Letter format modifiers

Letter formats can also have specific modifiers assigned to them for the purpose of Limit checking,

conversion factors (MODulo, SUBtraction, MULTiplication and/or ADDition by any value[s]), Modal

and Force attributes (read below) and 2 different types of “Incremental” designation: INC and IncFrom.

These modifiers can simply be appended to the end of any “Letter format” line (as shown in the variousexamples in the discussion below).

 Note: - You can ADD or MULT by a LETTER, not just a number. We had originally planned to let youADD or MULT a variable, but this way is much better because the letter you add or mult can be assigned to

different variables at different times (and in turn, even IT can be made incremental, and have any other letter added, multed... etc), so it is infinitely more flexible.

This is a quick list of how they work (the “_” in the headings below represents a number or letter that the

modifier requires):

 Add __ 

Follow ADD with any number or variable that you want to add to the initial word value. The example

 below adds .1 to all Z values:Z - >3. >4 Add . 1

As you might suspect, negative numbers can be used to effectively “subtract” a number from a particular word - in this case we're now subtracting .1 from the Z values:

Z - >3. >4 Add - . 1

You can use the Add  option to add variables as well as numbers to your program values. This is handy for using on some milling machines that require that the RLevel value be added to the Z value for drilling. Just

assign a substitute letter to be used to output the drilling Z and add the RLevel variable like this:C >3. >4 Z Add [ RLevel ]

Page 19: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 19/132

Although you can easily add variables to your values, you can't subtract them in this way because the postwon't recognize “-[RLevel]”. To handle this problem, we've given you the Sub modifier below...

DivBy _ and DivInto _ 

These are modifiers that allow you to use division in 2 different ways:

-  DivBy _ ...divides the letter's value by some other number or variable before outputting.

If you want to divide the letter's value BY some number or variable, then use DivBy.

The following example will divide all X values by 2:X - >3. >4 DivBy  2

...Resulting in the code "X12." being output as "X6.0"

-  DivInto _ 

...divides the number or variable following DivInto into the letter's value before outputting it.

As an example, to output the pitch on a tapping cycle you would format the letter to return the

RECIPROCAL of the [Step] value by dividing the value INTO 1 (e.g. "1/pitch") like this...

Q - >3. >4 DivInto  1

...then simply use Q[Step] in the TAP sequence. This would result in "Q20." being output for a 1/4-20 tap,

for instance.  ___ 

Like all letter math modifiers, DivInto and DivBy...

  - can be followed by numerical constants, other variables or other letters.

  - should NOT be used on N (line) numbers. (You can get around this to SOME extent by adding the line

"each N[Block]" to your format...)

  If the use of either of these modifiers results in an attempted "division by zero", then...

-  the user will be warned 

-  the letter value will be left 'unmodified' (the division will not take place), and 

-  the post will continue.

Force

Always forces the appearance of the word (or just the letter if used in conjunction with MODAL.)

Example: This is used commonly in Heidenhain conversational formats, where a particular letter (such as

'R') must appear (by itself) on every line, but a number only appears when the value has changed.

R - >3. >4 Modal Force

Page 20: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 20/132

Inc

The value of this word will be output as an increment from its last absolute value. (Last abs. value is

subtracted.) Example:

X - >3. >4 I nc

IncFrom _ 

Specifies another letter: The LAST absolute value of THAT letter will be subtracted from the value of thisword.

Example: Some controls require that the Z value for drilling be measured incrementally from the R value.

In those cases, use this format:

z - >3. >4 Z IncFrom   R

(NOTE: In this case, make sure that the R is processed BEFORE the z, otherwise the Z output will beincremental from the LAST value of R instead of the current value.)

Limit __ __ 

Follow this with 2 numbers: the minimum and maximum limits. A warning message will appear if the toolmotion file causes the letter to be outside the specified range. When the warning message appears, the user 

will have the option to continue or abort. (If the user chooses to continue, the 'bad' number WILL appear inthe output.)

 Note: A single letter may not be formatted using Limit  and  Clamp. You may only use one of these on each

letter format.

Clamp __ __ 

Similar to Limit  above, follow this with 2 numbers to indicate the minimum and maximum allowable

values of the letter being formatted. Unlike the  Limit action, the post will not output a warning, but it will'clamp' the output value so that numbers larger than the 'upper clamp' value will be output AS the 'upper 

clamp' value. Likewise; values smaller than the lower clamp value will be output AS the lower value.

Examples:

The number would

normally be outputthis way,

but the letter is formatted

like this,

...so it actually appears

in the code like this:Why?

F9523. 4 F >4. >3 Cl amp 1 8000 F8000. 0Because i t i s over the

upper limit  ( 8000) , i ti s output as F8000.

S22 S >4 Cl amp 50  9000 S50I t i s below the lowerlimit  ( 50) so i t i s

out put as S50.This is especially helpful when formatting the feed rate letter (especially if used for 'inverse time feed rate',

where very short movements can produce very large F values).

 Note: A single letter may not be formatted using Limit  and  Clamp. You may only use one of these on each

letter.

Page 21: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 21/132

Mod __ 

This is the mathematical modulo function which returns the 'remainder' of a division operation. This is used

commonly for machines that have a rotary axis with a 'numerical limit' of 360, but can be used for other things as well.

Here are simple examples that show how the Mod  function affects the output of various values:

  0 mod 360 = 0

  1 mod 360 = 1  320 mod 360 = 320

  360 mod 360 = 0  361 mod 360 = 1

  410.03 mod 360 = 50.03  720 mod 360 = 0

  725 mod 360 = 5

  -45 mod 360 = -45

  -360 mod 360 = 0  -363.41 mod 360 = -3.41

...etc.

(Please note that the Mod  function also works the same regardless of whether the incoming value is a positive and negative numbers.)

Here is an example of how to use the Mod  modifier in your template:

To format the letter A properly for a 4 axis mill to get this output (when the rotary table keeps turning thesame direction as it approaches, then continues past the '360 degree' boundary)...

. . .

X. 1 A-356.0

X. 2 A-358.0

X. 3 A0.0

X. 4 A-2.0

X. 5 A-4.0

. . .

... use the 'modulo' function on the letter A like this:

A ->3. >3 Mod 360

Modal

Causes a word to be suppressed (not output at all) unless its value has actually changed since the last timethe letter was output.

(Note: This has exactly the same effect as listing the letter in the ModalLetters command line.

See section 4.1.24 for information on the ModalLetters command.)

Mult __ 

Just like the Add modifier, follow MULT with any number or variable that you would like to multiply by

the initial word value. This example “doubles” the X value by multiplying by 2:X - >3. >4 Mul t 2

For example, the sign of a number can be reversed by multiplying it by -1 like the letter X shown here:X - >3. >4 Mul t - 1

Page 22: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 22/132

Also, the mult modifier can be used to “divide” a number by using the reciprocal of that number. For instance, a number can be “divided by 2” by simply “multiplying by 1/2” like this:

X - >3. >4 Mul t . 5

No-Opt

Code "zero optimization" can be overridden with the No-Opt  modifier.

By default, when the post outputs a "0" value along with "floating point" words (such as "X ->3.>4"), it

suppresses the decimal point so that the output appears as "X0" instead of "X0." . This can save asignificant amount of code in a long program. If, however, you want to prevent this optimization from

taking place, you can add the "No-Opt" modifier onto any letter in the letter format section like this:

X - >3. >4 No- Opt

This will cause a zero value to be output as "X0.".

(Remember, upper or lower case doesn't matter on the modifiers.)

Sub __ 

As you would expect, follow Sub with any number or variable that you want to SUBTRACT from theinitial word value. The example below subtracts 1.5 from all X values:

X - >3. >4 Sub 1. 5

Even though you could do the same thing by Add ing “-1.5”, you can't use the Add  to subtract variables -

that's why we've given you the Sub option. Here's how we could subtract the RLevel variable from the Zvalue (if we wanted to):

Z - >3. >4 Sub [RLevel ]

(Remember to use [brackets] when specifying variables.)

One of the nicest by-products of this modifier is the ability to make any letter's value "incremental" from

any other variable. For example, if we wanted the letter W to be output incremental from the current X(horizontal position) value, we could format it in this way :

W - >3. >4 Sub [ H]

3.1.3 How Letter Format Modifiers are used together 

Sometimes, you must use more than one modifier to get the results you want.

As an example...

Giving the MODAL modifier will prevent PostHaste from repeating the same values on later lines if thevalue of that letter has not changed. Some conversational machines require the letter to be output by itself 

(without the numerical value) if the value has not changed, such as the “R F M” required on all moves bythe Heidenhain conversational format. In these cases, add the FORCE parameter AND the MODAL

 parameter (the order does not matter) like this:X >3, >4R >2 Modal For ceF >31 Modal For ceM >2 Modal Force

Page 23: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 23/132

 Notice that no “Modal” modifier need be given to X. This is because the post assumes that certain codes(including the HCode, VCode, DCode, and FeedCode - usually X, Y, Z, and F) are modal. If you want any

of them NOT to be modal, then add a “ModalLetters” line (somewhere after the letter formats) to changethe default “modality” of these (and any other) letters. Read more about the ModalLetters command below.

Any letter(s) can be designated as incremental simply by using the INC modifier. For example, thefollowing letter formats tell the post to output only the Z axis movements as incremental, while outputting

absolute X and Y values:N >4

G >2X - >3. >4 Y - >3. >4Z - >3. >4 I ncI - >3. >4

  ...

The sample formatting lines below could be used for a Bridgeport milling post set up to output in Metric

mode from American (SAE) dimensioned geometry. For metric, we simply multiply the X,Y, and Z values by 25.4 (the “inch-to-metric” conversion factor).

Furthermore, the 2 lines below allow 2 different “Z” formats: one that allows negative numbers (for 

contour milling), and another used for drilling. Z values used in drilling (“canned”) cycles on a Bridgeportmachine can have no minus sign, and are measured incrementally down from the RLevel point. So, wehave a normal Z format line for contour milling, and we also format another letter (in this case “A”) to

output a non-signed incremental Z value with 2.54 mm ADDed to compensate for a .1” RLevel level. (If adifferent vertical clearance value is used when designing the tool motion, then you must change this value

to match. For example, if you used .05” for the “rapid down” clearance, then use 1.27mm as the “additive”in the post.)

The “Limit” values used in these examples are arbitrary - your machine may be quite different.Z - >3. >4 Li mi t - 150 125 Mul t 25. 4A >3. >4 Z  Li mi t 0 150 Mul t 25. 4 IncFrom   Z

  | |

 Notice: any “output letter” used Use “IncFrom” to indicateMUST follow the numeric formatting letters measured incrementally

BEFORE Mult, Add, Limit and/or Inc. from another letter.

After the “output letter”, the order of the rest of the modifiers (Mult, Add, Modal, Force, Limit, IncFrom

and Inc) makes no difference. For example, formatting the “secondary Z” using the line below would resultin exactly the same NC program, even though the modifiers are in a completely different order:

A >3. >4 Z  I ncFromZ Mul t 25. 4 Li mi t 0 150  |

 Notice: again, the “output letter” (Z) is BEFORE the modifiers.

Hierarchy of Modifiers:

There is a hierarchy to the order  in which the numerical functions (Mult, DivBy, DivInto, Add, Sub,

Mod, Inc, IncFrom and  IncSign) and Limit checks are performed (regardless of the order they are placed in the format):

-  First, the original value is multiplied by the multiplier,

-  DivBy or DivInto are applied next,

-  then addition and  subtraction are performed,

Page 24: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 24/132

-  modulo is then applied (to the total so far)

-  the result is then checked against the limit values.*

-   Next, the result is converted to incremental (if Inc or IncFrom is present)

-  finally, the sign ( + or - ) of the resulting value is altered by IncSign.

* Note that the limit is checked before the value is made incremental. This has the effect of checking the

original “absolute” value (not the resulting incremental value) against the limits.

Notes re “ LIMIT checking” :

•  Limits are not checked on phrases that are the result of a “Replace” statement. In other words, if you

inadvertently replace a phrase with another that is beyond a limit, then no warning will appear.

•  Limit values are Absolute! In other words, even if the letter is incremental, PostHaste will keep track of the absolute value of the letter, and warn if the absolute position values indicated by the “Limit”

 parameter have been exceeded.

Regarding IncFrom:

Always remember (as mentioned in the discussion above) that the value of any word modified byINCFROM is affected by the CURRENT value of the “IncFrom” letter. This means that if a letter is

incremental from another letter on the same line of code, THE “INCFROM” LETTER (Z in theexamples here) SHOULD BE CALLED FIRST! This means that, of the 2 sample lines below, ONLY

THE SECOND WOULD PRODUCE THE PROPER RESULT. This is because PostHaste processesthe words in the order they appear * on the line. So in the first line below, it gets to the A value

BEFORE the Z has been set to the RLevel value, so in this case the A value would be output asmeasured incrementally from whatever the Z value was BEFORE this line was processed.  Wr ong: G81 X[ H] Y[V] A[ D] Z[ RLevel ] F[ FRate]  Ri ght : G81 X[ H] Y[V] Z[ RLevel ] A[ D] F[ FRate]

* Remember that the order that the words appear in the sequences does NOT control the order that theyappear in the resulting code: that is determined by the order the letters are listed in the “letter format”

section of the Template.

Page 25: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 25/132

4. Commands and 'Switches'

Commands and “switches” are used by PostHaste to describe certain aspects of the code for your machine.

These commands and switches are usually placed in the template after the letter format section and before

the sequences. These are all explained in detail in this section of the manual.

 Note: There are also other commands that are used only inside of sequences; those are not  discussed here – see section 5.3 for those.

What's a Switch?

Any word that you see in the templates followed by a question mark (such as RevTurret2? or First#?) arecalled “switches” because they refer to various code conditions that can be turned on or off with a “YES or 

 NO”. This is done simply by placing a Y or N after that switch. Watch for switches in the descriptions below.

4.1 List of Commands and Switches(the ones that are not used inside sequences)

Note: See section 5.3 for commands that are used only inside of sequences.

In the format template, any of the needed commands or switches should be listed AFTER the letter 

formatting section, and BEFORE the first sequence. The order in which they are listed in your format is

usually not important. (Any exceptions to this will be noted in the corresponding sections below.)

We have listed all of the commands and switches in this section in alphabetical order, except for...

...commands and switches relating to the following topics, which are discussed in the sections noted here:

Topic: Discussed in section:

 Arcs 4.2

Columnar style formats 4.3

Subprograms (or Subroutines) 7.6

Commands that are used inside of sequences 5.3

Page 26: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 26/132

4.1.1 Ask

Use of this command allows you to have PostHaste ask you a question when it runs - the number you typein response to the question then sets the value of any variable you choose. Any variable can be used, but

care must be taken to not overwrite a variable that has been set from the tool motion file (unless, of course,that is what you really want to do).

Here's a simple example that changes the output at the end of your program from an M30 to an M99, based on the value that the post asks you:

Ask [  Val1] ' Ent er 30 f or a mai n pr ogr am, 99 f or a sub. ' ' 30'

EndCodeM[  Val1] ( Out puts M30 f or mai n pr ogr amor M99 f or a sub. )End

The three parameters after the “Ask” are...

-  The variable to set (Remember, there are 20 “unused” variables named Val1 to Val20 that you can use

that are not normally set from an incoming tool motion file).

-  the first quoted phrase specifies the exact wording of the prompt.

-  the second quoted phrase specifies the default answer.

The variable can then be used later in any sequence portion of the format to output a numerical value with

any letter.

Here are some examples of how you may use ASK in the template. First, you place any needed ASK 

statement(s) in your template like this:Ask [ Val 2] ' What i s X CLEARANCE di ameter f or cut of f ?' ' 4. 5'Ask [Val 3] ' Cut of f Spi ndl e Speed: ' ' 200'Ask [Val 1] ' What i s Z val ue f or cut of f ?' ' - 3'

Then, you access the “asked” variable(s) in a Sequence, as in this example of an automated “cutoff” cycle

in the ENDCODE section of a lathe format:EndCodeG0 Z. 2 { Rapi d t o t ool change posi t i on }G28 U0 W0 M9 T[ Last Tool ] { Cancel Of f set f or LAST t ool . }/ 0 M0G50 X0 Z0 T1200 M[ Cool ]G96 S[  Val3] M[ Di r ect ] { Val 3 i s Cut of f Spi n. SpeedG0 Z[  Val1] X[  Val2] T1212 { Cut of f Z, X: Val 1, 2

G1 X0 F. 003G0 X[ Val 2] { Cl ear t o di am.G28 U0 W0 T1200/ 0 M99M30End

When PostHaste runs, a prompt dialog (like the one pictured here) will appear for each “Ask” question. You can just

 press ENTER to use the optional default value (in this case4.5), or enter any other number you wish.

Page 27: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 27/132

Warning:

Any time you add (what you think is) a 'new' variable to a post, make sure that that variable is NOT

being used for some other purpose in the post already! Before adding a new variable, ALWAYS do a

“Search” to make sure that you don't mistakenly re-use a variable that is being used for something else.Making this mistake can result in VERY strange output - and a big mess to “debug”!

How to make the  Ask repeat

You can have PostHaste ask any question just once per run, or make it ask the question(s) every time a

certain sequence is output. For instance, if you want a question to be asked every time a tool is changed

(for example), then simply place the Ask line(s) inside the ToolChange sequence. The same holds true

for any sequence. This comes in handy, for instance when formatting for a wire EDM to ask the user for different “burn” settings every time an INFEED (Cuttercomp application) move is made.

If you would like a particular question asked only once per run, then simply place the ASK line

somewhere NOT within any sequence. (By the way, ASK lines are permissible within an IF structure.)

Whatever value the user enters in response to each question will become the value of the specified variableuntil that variable is ASKed again, or until that variable is reset by something in the incoming tool motion

file. (Remember: if you use Val1 to Val20, then they normally won't be reset by incoming tool motion

[unless they are placed on a Cycle or UponRec definition line].)

4.1.2 AskPeckClear?

Setting this switch to Y tells PostHaste ask you for the peck clearance ([PeckClear] variable) value. If your 

machine supports this parameter in its peck drilling cycle, then after each peck the tool will rapid down intothe hole to this distance from the current bottom before it starts feeding in on each subsequent peck. If you

set this switch to N , then PostHaste uses .050 as this value.

 Note: if the Peck drilling sequence has “none” in it, the “longhand” peck drilling cycles will use this value

in the discrete movements that are generated.

Instead of having the post ask  you for this value, you may 'hard-code' a particular value into your 

tempate(s) by using a Set  cd like this:

Set [ PeckCl ear ] t o . 03

4.1.3 ByDiameter? (lathe only)

This is a “switch” that you may use for LATHE work to indicate how the vertical movements aredesignated on your lathe. The X values on most lathes must be given as work DIAMETER, but some allow

you to use RADIUS values. If yours uses DIAMETRIC X values, the put a Y (for YES) after ByDiameter 

like this:ByDi amet er ? Y

If your lathe operates on RADIUS values for X then put N (for NO):ByDi amet er ? N

Page 28: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 28/132

4.1.4 Comment

The Comment  command indicates the character(s) that mark the beginning and end of 'comments' that themachine will display on the screen, but otherwise ignore. On most modern controls, comments must be

enclosed in parentheses, so the Comment command will look like this:Comment ( )

(Notice the spaces!) Some machines do NOT need a “end” comment character; in this case, just indicate

the comment START character:Comment '

(Machines that use only a “comment start” character will ignore anything in the block that starts with thecomment character.)

Other machines may require more that a single character to start and end comments, like Heidenhaincontrols, which we can also format by using this Comments command:

Comment ( MSG, )

If your machine does not accept comments at all, then you need to disable the Comment  command line

(by either completely deleting it, or placing a few leading spaces in front of the line so that PostHasteignores that line). Since the Comments command is what tells the post which characters to output before &

after any comments, the post logic is set up such that if there ARE no comment characters, then the postwill output no comments, so all comments (PPRINT records) found in the CL file will be ignored.

 NOTE: Do NOT confuse the Comment command discussed above with the Comment  s command that is

used inside of sequences (to tell the post exactly where to put the comments in the code). See section 5.3.2for information on the Comments command.

4.1.5 Convert

This works very much like the Replace command – except that it works on incoming CL records – that is,before the CL data is processed by the post. There are many uses for this command – limited only by your 

imagination. Here are a few ways that we've used it:

-  Convert 'unrecognized' CL records into something that will be usable by the post. Example:Conver t ' PI ERCE / OFF' t o ' RAPI D'

-  Delete unneeded words or phrases in the incoming CL records. Example:Convert ' TOOL NAME : ' t o ' '

-  Use Convert in conjunction with an UponRec sequence to process incoming records in a 'non-standard'way. Example:

Conver t ' APPLY / LASER' t o ' APPLY / 1' Set Val 1 f l ag f or l aser , or . ….Conver t ' APPLY / PUNCH' t o ' APPLY / 0' Reset i t t o 0 f or Punch mode.

Uponr ec Appl y [ Val 1] Val 1 = l aser f l ag.i f [ Val 1] = 1G25 e5 Repl ace ' e05' wi t h ' ( LASER OFFSET) '! 0 M44! 0 M45endi f end

-  'Un-comment' an incoming comment in the CL file so that you can actually use data that was stored inthe CL file as a comment. Example:

Page 29: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 29/132

Convert ' $$- > CSYS' t o ' CSYS'

You can use the Convert command multiple times.

 NOTE: Like the Ignore command (below), Convert can be used either in the format template file, or in thePostHASTE.CFG file. (Put Convert commands in your .CFG file for CL records that you want all of your 

 posts to use that same conversion, or put it in the template file[s] when you only want certain posts to perform the conversion.)

 Note: In templates that use Convert  and  Ignore commands, the Convert  operation will be performed beforethe Ignore command.

4.1.6 Coolant

Similarly to the Spindle command, the Coolant  command is followed by the numerical values for the “Mcodes” for the various available coolant modes.

Examples:

  For APT-CL versions of PostHaste:Cool ant 8 9 7 50 M val ues: On, Of f ,  Mist*, Hi pr essur e ( Thr u) On

* Note: If no “mist” coolant option is available on your machine, then put in the same M value that you areusing for flood [ON] coolant so that at least you will get coolant into the NC program if you mistakenly

choose MIST instead of FLOOD in your CAM system.

4.1.6.1 Using [Cool] in an IF statement

The [Cool] variable can be used in an IF statement, but you have to test its "Ordinal" value (0,1,2,3 etc.),

not the "M" value (8, 9, 7, 88 etc.), as you might think at first glance.

We did this so you can see if ANY coolant is 'on' by testing like this:I F [ Cool ] > 0 . . .

The value of the [Cool] variable - in the context of an IF statement – is shown below:•  Flood = 1 ( If [Cool] = 1 ... ) *

•  Off = 0 ( If [Cool] = 0 ... etc. ) *

•  Mist = 2

•  THRU or HIGH = 3

4.1.7 DComp

The 3 values following the DCOMP command correspond to the machine's three diameter offset directions:

Left, Right, and Cancel, respectively.

DComp 41 42 40 Lef t , Ri ght & Cancel G val ues

In a template that uses the above DComp line, the [Side] variable (usually used in an InFeed  sequence likethis: G[ Si de] ) will return a 41 when the CL file has a CUTCOM / LEFT record active, and 42 when a

CUTCOM / RIGHT record is active.

Page 30: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 30/132

4.1.8 Drive

The  Drive command specifies the folder and, optionally, the extension of the final NC code file. Thisallows you to route the NC code files for different machines into different directories with (optionally)

different extensions. (If DRIVE is not used, the NC code file will end up in same folder as the incoming CLfile, and it will have the default .NCC extension.)

If, for example, you would like to re-route the output into a different directory (in this case the C:\Acro-1

directory), then use the DRIVE line as follows:

Dr i ve C: \ Acr o-1\ or Dr i ve C: \ ACRO- 1\

 NOTES:

-  Make sure that you include the proper drive letter (in this case the "C:"). If you omit the drive letter,the  AutoOpen feature will not work correctly.

-  You can use 'network' drives if you like. (example: “S:” )

-   Note that if you are specifying only the folder (not the extension), then the last character MUST be

a backslash (\), because the post simply appends this parameter verbatim onto the front of thefinished NC code file name (since file names must be separated from the folder name by a

 backslash).

You can also use the DRIVE parameter to specify a different file name extension, as in this example:

Dr i ve C: \ Acro- 1\ *. ABC

This will cause the file to be output with the .ABC extension instead of the default .NCC.

Another possibility is to put the NC code files for all of your different machines into the same directory, butuse different file name extensions for each machine. You can do this by using the same path (folder) name

in the  Drive commands for each machine format, but specifying a different extension for each.

4.1.9 Each

Use this command when you want a certain code to be output on each line of your NC program. It can be

followed by a letter or a variable as in these examples:

Each $0 or Each S[Speed]

4.1.10 EOB ('End Of Block' characters)

Use of the EOB (End of Block) command allows you to designate exactly what characters are output at the

end of each line (block) of your NC program in place of the standard "Carriage Return" (CR) and LineFeed (LF) characters (ASCII values 13 and 10). This is done by listing the ASCII values of the desired 

characters after "EOB" (separated by spaces, as usual).

For example, if you want a semicolon (;) instead of the LF, then your EOB command will look like this:

EOB 13 59

...because 13 is the ASCII value of the CR and 59 is the semicolon character.

You can have up to 20 numbers (ASCII characters) in your EOB "word".

Page 31: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 31/132

4.1.11 EOF ('End Of File' characters)

Use this command in the same way as the EOB command above to designate any special "End of File"characters you would like. This comes in handy if you need to output non-standard characters that can't be

easily formatted in the EndCode section.

Remember also that the last line of your program will include the standard CR,LF (unless you change it

with EOB as mentioned earlier), so the actual characters at the end of your file will be the 'EOB' PLUS the

EOF characters.

4.1.12 Feed and Rapid

The Feed and Rapid lines indicate the exact letter and numerical value that cause the machine to start

moving in 'feed' and 'rapid' modes, respectively. In the templates you will see a line that says:Feed G1

That's because on the machines we use here a G1 indicates that a move at the specified feed rate is going to

 be programmed in this block.

Likewise, the line...

Rapi d G0...describes the NC word that causes a rapid move to take place.

Some machines do use G1 for ALL linear moves (regardless of 'feed' or 'rapid' mode) and simply use a highfeed rate to move the machine in 'rapid' mode, so you could use something like this if you want:

Rapi d G1 F1000

(Note: as of this writing, the Rapid line will accept two words [as shown immediately above], but the Feed 

line accepts only one.)

4.1.13 FeedTypeThis line lists the letter and the possible values of the NC word that indicates the type of value that willcontrol the spindle speed: RPM and CSS (constant surface speed). The most common format for this is...

FeedType G 95 94 93 ( Val ' s f or I PR, I PM, ' I nver se t i me' )

“Inverse time” is normally used only with 4-axis versions of the milling post-processor: it changes the feed 

rate (usually F) code to output the reciprocal of the number of seconds required to complete the currentmovement.

4.1.14 First#?

This switch indicates whether or no you want a Sequence (block) number on the 1st line of your program. If

you do, then follow FIRST#? with a Y (YES). If not, then use N (NO).

4.1.15 HCode, VCode, DCode and FeedCode

These commands are followed by the CHARACTER that corresponds to their function (the H, V, and D inthe 1st 3 commands stand for Horizontal, Vertical, and Depth, respectively). For standard milling, these

characters are almost always X, Y, Z, and F. For standard turning work: HCode is Z, VCode is X, and theFeedCode is usually F (DCode [depth] is not used for turning).

Page 32: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 32/132

4.1.16 HCode2, VCode2, and DCode2

Just like the HCode, VCode, and DCode designations, these allow you to designate the letters used (for 2-turret lathes only) to indicate movements of the 2

nd  turret (in the case that they are different from the letters

used for the 1st turret). For instance, the Fanuc/Miyano lathe (with the drilling axis) uses a B for all

movements of the drilling axis, so we put the following line in our format template (and make sure in the

CAM system that all drilling is done on turret # 2):HCode2 B

Then (when using turret number 2) PostHaste will automatically use output B instead of Z.

(Make sure you add the letter you use to the list of letter formats.)

 NOTE: The RevTurret2? switch can be used to automatically reverse the sign of X axis value. Read about

it in section 4.1.30

4.1.17 Inc/Abs

This line indicates the letter and numerical values that set incremental or absolute programming mode onthis NC machine. You should include the following line in your template:

I nc/ Abs G 91 90

... so the post will be able to detect that you have switched output modes.

This is an absolute necessity if you want to include any absolute code (G90) in an incremental (G91)format program, and vice-versa.

Including a G91 or G90 word in any sequence (in formats using the “Inc/Abs G 91 90” line) will cause theoutput of the HCode, VCode, DCode, and Rotary axis code (the one preceding any reference to

[RotAngle]) to be output in an incremental or absolute fashion, respectively. You can also use the[IncMode] variable (read about this below) in place of the 90 or 91 to read and output the mode directly

from the tool motion file like this: G[IncMode] .

4.1.18 Inch/MM

The two numbers following this parameter indicate the value of the letter that switches the machine intoINCH and MM programming, respectively. These values will can be accessed in the sequences through use

of the [UnitMode] variable. The post automatically assigns 70 or 71 to [UnitMode] - so you only need touse the "Inch/MM" line if you want different values. (Typically, a word like "G[Unitmode]" would be used 

in the StartCode sequence to set the units of measurement for the entire program.)

I nch/ MM 70 71

4.1.19 Incremental?

Setting this switch to "Y" tells the post that when the post starts outputting the code, that you want it to bein incremental mode. The default mode of the post is "N". Be aware, however, that if you have codes

within the sequences that change to absolute or incremental (usually G90 and G91), that those codes willcause the post to switch modes regardless of the "Incremental?" setting. See the "Inc/Abs" parameter for 

the actual incremental or absolute codes that have been specified in your template.

Page 33: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 33/132

4.1.20 Ignore

This command can be used to tell the post to “ignore” certain records in the incoming CL file. Examples:I gnore I NTOLI gnore PI TCH

You can use this command multiple times.

 NOTE: Like the Convert  command (above), Ignore can be used either in the format template file, or in the

PostHASTE.CFG file. (Put Ignore commands in your .CFG file for CL records that you want all of your  posts to ignore – put it in the template file[s] when you only want certain posts to ignore certain records.)

4.1.21 Leading0s?

Many older controls require a “leading zero” on numbers whose absolute value is less than 1 (for instance

X-0.5 as opposed to X-.5). For compatibility purposes, the default method of output for PostHaste is to

add the leading zeroes. If you want to inhibit the leading zeros, then set this switch to N .

 Note: this command is also helpful if you just want to produce somewhat more 'compact' code.

4.1.22 LocalOutput?

If the following 3 conditions exist, then you will need to use the LocalOutput? switch and set it to 'Y'

to tell the post to output your NC program so that all XYZ output is relative to the 'local' (current)

coordinate system (CS or CSYS):

1.  When you are posting for machines with rotary axes AND...

2.  your CL files include CSYS (coordinate system) data, AND...

3.  you are using work offsets (the [Work] variable - G54, G55, etc) to set a different origin location on

each face of the part.

When CSYS data is being used to determine the rotary angles, then using this setting will cause the post torotate and/or shift the incoming XYZ values as needed (which are stored in the CL file in 'world'

coordinate space) per the CSYS data from the CL file, so that the coordinates output to the NC program

will match the 'local' ([Work]) origin.

By default (if you do not have this switch in your template), it is the equivalent of ' Local Out put ? N',

and all locations (regardless of rotary angle) will be output from the same origin. They will be rotated 

(only) about the center line of rotation - but not 'shifted' to match the CSYS.

 NOTE: Since CSYS data is usually stored in CL files as a 'comment' like this...

  $$- > CSYS / . . . , . . . , . . .

... you must also include a Convert line in the template (or PostHaste.CFG file), to get rid of the commentmarker (the '$$- > ' ) and enable the post to read the CSYS data from 'comment' lines in the CL file.

Example:

Convert ' $$- > CSYS' t o ' CSYS'Local Out put? Y

Page 34: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 34/132

Important! Make sure your [Work] numbers match!

If your post uses LocalOutput? Y , then you must make sure that each machining operation in your

CAM system has the proper [Work] number assigned to it! If your system has a place to assign work offset numbers to each operation, then do so carefully - to make sure that you always assign the same work 

offset number to operations that are done on the same face. If your system does NOT have this capability,then you should set up the post to assign these numbers properly.

For example, Some CAM users cannot directly enter a Work/Fixture Offset (WFO) number directly in their CAM system, but they may want to set the work offset number according to the Coordinate System (CS)

number, so when you change CSs, the post automatically outputs a matching G54, G55 etc. You may do so by including a Convert line and a matching Upon sequence in your template (you may put the Convert line

in your PostHaste.CFG file to simplify your templates):

Convert ' $$- > CS NUMBER' t o ' WORK / '

UponRec WORK [ Wor k]Add 53 t o [ Wor k]end

 NOTE: the above example only works for cam systems that include this ‘commented’ cs record in the CL

file!This will assign G54 to CS number 1, G55 to CS number 2, etc.

(Note: In lieu of using the Upon WORK  sequence above, you can instead format a special letter for use with[Work] (and add 53 to it in the 'letter format' section):

g  >2 G Add 53 Format the letter...

. . .

 Work g ...(don't forget your Work  command!)...

. . .I ndex XZ[ I l evel ]

X[ H] Y[ V] B[ Rot Angl e] g[Work]+53 ...and make sure you use the proper letter.

. . . ( Not only in Index, but wherever [Work] is used!)

4.1.23 ModalGs

This is simply a list of all of the G values that are “modal”: this means that any G code in this list willremain in effect (and not be repeated) until another G code from this list is output. This prevents, for 

instance, a G1 from being output on every line when there are consecutive linear moves. G values thatshould appear on this line are G codes for any “movement” commands: linear, rapid, circular, and “canned”

cycle G values. Example:

Modal Gs 0 1 2 3 73 74 80 81 82 83 84 85 86 87

4.1.24 ModalLetters

For most machines, certain letters are modal - that is, they are not output unless their value has changed .

The letters that most  machines allow to be modal are:

-  the ones listed in the HCode, VCode, DCode, and FeedCode commands (Usually X, Y, Z, and F).

-  The one used in conjunction with the [RotAngle] variable (Usually A or B).

Page 35: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 35/132

-  The one used in conjunction with the [RLevel] variable (usually “R”) inside the canned cyclesequences (such as Drill, Peck, Tap, Ream, etc.)

If a different letter is used with RLevel in different cycles, then the LAST one listed in the format is theonly one that will be repeated on secondary holes.

When any of the canned cycles mentioned above are defined in the normal way (as in the example below),PostHaste will output optimized code (the program with the least number of codes) for all points following

the first one. For instance - if you define the Drill cycle this way...

Dr i l lG81 X[ H] Y[V] Z[ D] R[ RLevel ] F[ Fr ate]end cancel

... then all points after the first (which will be on the G81 line) will only include the X, Y, Z and “RLevel”

(usually “R”) words whose values have CHANGED - because all of these values are assumed to be modal(unless, of course, you override this with the method described above).

However, the modality of these (and other) letters can be set by using the  ModalLetters command. Forinstance, if you do NOT want the “RLevel” value to be modal (therefore causing it to be output on every

line of a standard canned cycle), use the “ModalLetters” list, and leave the “R” out of it as shown here:

Modal Let t ers X Y Z FOr, if you want another letter to be output only when it has changed (Q, for example), it can be added to theModalLetters line like this:

Modal Let t ers X Y Z F R Q

4.1.25 Notes: / EndOfNotes (or EndNotes)

These commands can be used to 'comment out' an entire section of your template. This is helpful when youwant to...

write a large amount of comments in your template, or -  temporarily disable a large amount of your template information.

Example:

 Notes:

 The l i ne above causes Post Hast e t oi gnore al l of t hese l i nes. . .unt i l t he ' EndNot es' or ' EndOf Not es'word i s f ound at t he begi nni ng of a l i ne( l i ke t he l i ne bel ow) .EndOfNotes

You can use Notes: / EndOfNotes as many times as you would like in your templates, either inside or outside of sequences.

 Notes:

•  Don't forget the colon (:) following Notes:

•  Either of the words EndOfNotes or EndNotes may be used – they are interchangeable.

Page 36: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 36/132

4.1.26 Rename

This command allows you to make up any name you want to use for any variable. (Some people callthis capability "user-defined variables".)

It is most commonly used to replace the names of the standard 'user' variables (Val1 to Val20) with namesthat are more descriptive. We commonly rename the 'Val...' variables because PostHaste never

'automatically' sets the [Val1] to [Val20] values from information coming in from the CL data - they

are safe to use for any purpose you like without fear of interference by the CL data or PostHaste'sinternal workings.

(However, you can also use Rename to 'override' the name of any other variable as well.) Here are some

examples:

Rename [ Val 9] t o [ ModeOf Pr evi ousOp]Rename [Val 20] t o [Dr i l l i ngHasAl r eadySt ar t ed]

Rename [ LComp] t o [XMul t i pl i er]   ( << Note: This is NOT recommended! See NOTES below. )

 NOTE!Care must be taken to NOT use a variable that is one of the 'automatically prompted' variables ([Work], [EndH], [EndV], [MaxRPM], [Program#], [ToolH], [ToolV], [ToolD], [WorkH], [WorkV] and 

[WorkD]), because if you Rename one of those, the post will still prompt you as if you were using the

original variable. (See section 9.1.1.7 for more information on the prompted variables.)

2nd

  NOTE!Another thing you have to watch out for when renaming variables other than [Val1] to [Val20]is that the value of almost all of the other variables can be affected by data coming in from the CL file .

This means that if you use a variable besides Val1 to Val20 like this...  Rename [ LComp] t o [XMul t i pl i er]

...your [XMultiplier] variable will be set to the incoming tool length compensation number whenever

a new tool is described in the CL file!

With the above said, it is certainly OK to simply change the name of a variable that you don't like if you

expect to continue using that variable for its original purpose. For example, this would make sense:

Rename [ LComp] to [ LengthCompensationNumber]

...however, most of the time, you will want to rename the user variables ([Val1] to [Val20]) instead - for thereasons stated above.

See section 9.1.1.8 for more information on the user variables [Val1] to [Val20].

4.1.27 ReturnPlane or RetPlane

Use either one of these commands (they are interchangeable) to give you control over what codes areoutput to indicate “Initial plane” or “Rapid plane” designation on canned cycles.

PostHaste can output a G98 or G99 in any canned cycle depending on which “retract mode” you wish touse: Initial plane or Rapid plane, respectively. Just add the following line to your template:

Ret ur nPl ane 98 99 ( 98 = I ni t i al pl ane, 99 = Rapi d pl ane. )

Page 37: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 37/132

The actual code (G98 or G99) can be placed wherever you want it by simply accessing the [RetPlane]variable. For example, it may be added to any canned cycle sequence like this:

Dr i l lG81 G[ RetPl ane] X[ H] Y[V] Z[ D] R[ RLevel ] F[ FRate]end cancel

4.1.28 RevSigns

This is a list of characters that need to have their signs reversed. For instance; many lathes are set up so

that positive X values indicate locations closer to the FRONT of the machine; in this case you would use aline like this:

RevSi gns X I

(Remember the I value for circle center designation corresponds to the X axis!) Some screw machines (theCitizen F10, for example) are set up so the Z+ direction is TOWARDS the spindle; so for that we use

RevSi gns Z K 

As many values as you like may be placed on this line, so nothing is to prevent you from indicating any

amount of letters to be reversed.

4.1.29 RoundToQuad?

This switch allows you to turn off the post's automatic 'round center to startpoint' feature that can causesome machines to display 'arc endpoint out of tolerance' errors.

Before we can explain why you would use this switch, we must first explain PostHaste's automatic 'round center to startpoint' feature...

 Automatic 'round center to startpoint' feature

This feature automatically 'moves' the center point of an arc so that it lines up with the arc startpoint if 

either (X or Y) dimension of the start point is within twice the Tolerance setting (typically .0002”) of 

the center X or Y. This rounding eliminates very short arcs that may appear in the code when the start

 point is very close to (but not quite on) the quadrant boundary. (Many machines have a problem processingvery short arcs, so this feature 'rounds them out' so that these short arcs are eliminated from the code.)

This rounding happens automatically when both of the following conditions are true:

1.  when the ByQuadrants? switch is set to Y .

2.  when either (X or Y) dimension of the start point of an arc is within twice the 'Tolerance' setting(typically .0002”) of the center X or Y.

For example; if the Tolerance value is set to .0001, then......if an arc start point X is 1.2002, and the center point X is 1.2000, the center point X will be 'moved' to

1.2002, and the arc will then be processed and output accordingly.

So why use the  RoundToQuad? switch?

Page 38: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 38/132

Some machines are exceptionally sensitive to mismatches between the arc start/center/endpoints.Sometimes, the rounding discussed above can cause these machines to stop in an 'endpoint out of tolerance'

(or equivalent) error condition when programmed with an I/J center point. Other machines can even start

cutting in an erratic manner - damaging your part, cutting tool, fixturing and/or machine. If your 

machine is like this, then you can inhibit the 'center point rounding' feature add the following line to your template:

RoundToQuad? N I nhi bi t s ' r ound arc cent er t o quad' f eat ur e.

A better solution...

If your machine is that sensitive to I and J rounding errors, then we highly recommend that you program

the arcs with an R value instead of I and J! (That is, if your machine accepts 'R' style arcs.) Using 'R'

style arcs will cause the machine to calculate its own arc center points and eliminate many arc

problems. To do this, your template would include these lines...

ByQuadrant s? YCt r Code R

...and then you would not use the “ RoundToQuad? N” switch.

4.1.30 RevTurret2?

This switch is used for turning; it is set if you want the signs of the 'vertical' values (usually X and I)

reversed for the 2nd  turret. This is very common on twin turret lathes because the turrets work on opposingsides of the center line; in this case turn ON this function like this:

RevTur r et2? Y

If this function is not needed, then use an N or simply leave this line out of your template.

4.1.31 Sequence#sThis line contains all information to tell PostHaste how to put “Block numbers” in the NC program. Thereare 4 pieces of information required and placed in order on this line:

•  The “Character”: the first character after the command is the 1

st CHARACTER of the “block number”.

Usually this is an N.

•  The “Frequency”: A number here indicates HOW OFTEN a block number is placed on a line. If you

want one on every line, then use 1. If you want one on every other line, then use 2. If you want one onevery 5

th line, then use 5...etc. (Using a frequency of 0 will cause the block numbers NOT to be

automatically placed on a line; PostHaste will only put them where they are requested - on a toolchange line, for instance (this will be explained in sections 4 and 5 below).

•  The “Increment”: This number by which the block number itself is incremented before the block number is output again. Using the value of 10 will create block number in the block address itself to be

10 greater than the last block number (like N10 N20 N30 ...etc).

•  The “Start value”: This is simply the value of the very first block number that appears in the code;

numbers after the first are determined by the start value plus a multiple of the “Increment” (above).

Page 39: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 39/132

4.1.32 Spaces?

Note: Do not confuse the “Spaces?” switch with the “Spaces” command that is used for columnar formatsas iscussed in section 4.3.1 !

Use the “Spaces?”switch if you want to suppress between-word spaces in the finished NC program:

Spaces? N

The default state of PostHaste is to put a single space between each NC word for clarity, which is theequivalent of...

Spaces? Y

Examples:

Typical code (spaces between each word): G1 X1. 2 Y2. 3 Z3. 4 F54. 5

Spaces removed (using Spaces? N  ): G1X1. 2Y2. 3Z3. 4F54. 5

 Note: Even if you use Spaces? N , spaces will not be removed from comments (see Comment  above).

4.1.33 SpeedType (lathe only)

Similar to FeedType (above), this line lists the letter and the possible values of the word that indicates the

type of value that will control the spindle speed: RPM and CSS (constant surface speed). The mostcommon format for this is...

SpeedType G 97 96 ( RPM and CSS G codes )

4.1.34 Spindle

The SPINDLE command is followed by 3 NUMBERS: the numbers that correspond to CLOCKWISE(usually M3), COUNTER-CLOCKWISE (usually M4) and spindle STOP (usually M5).

4.1.35 SpliceSubs?

This switch would only be used (set to 'N') if these 2 conditions exist:

•  your template supports the use of subroutines,

•  AND you want the subroutines to be output in a separate file from the 'main' portion of the program

See section 7.6.3.4 for details.

4.1.36 Thread

This command is used for lathe formats only. It indicates the word that is used (in place of a standard 

linear move word like G1) to perform a single threading pass. It is typically G32 or G33 as in this example:

 Thread G33

This will cause the post to simply output a G33 on every threading pass.

Page 40: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 40/132

(Note: A threading pass is output by the post when a ' THREAD / TURN' record is found in the CL file

 before a GOTO record.)

4.1.37 TLAxisEnabled?

Use the TLAxisEnabled? switch (set it to Y ) to tell PostHaste that you want to the rotary angle(s) to be

calculated from the vector (IJK) CL data found in TLAXIS records. There are several ways PostHaste can

calculate rotary angles, TLAXIS data is one of them. See section 12.2 for a complete discussion of thistopic.

TLAXIS records are ignored by PostHaste - unless you use the TLAxisEnabled? switch and set it to Y .

Examples of TLAXIS records:

 TLAXI S/ 0. 000000, 0. 000000, 1. 000000 (Tool shank pointing towards Z+ axis [Typ. A0 or B0])

  ...or...

 TLAXI S/ - 1. 000000, 0. 000000, 0. 000000 ( Tool shank t owar ds X- axi s [ Typ. B- 90] )

4.1.38 Tolerance

The default axes movement tolerance for milling and turning is .0001 (in accordance with the typical

requirements of those machines while running in INCH unit mode) and .00001 for EDM machines. Tooverride this default value, use the Tolerance command. Then PostHaste will instead round all axes values

(X, Y, Z) to the tolerance value you indicate. If your machine resolves to a value other than the defaultvalue, then it is highly recommended to set this value according to the number of decimal places in

your axes movements, otherwise errors can occur due to “buildup” of tolerances that can happen in

calculations that PostHaste must use in determining arc angles, movement distances, etc. You can also

use this to round the output if you have an oddball machine that has unusual tolerance limitations such as“resolution to .0002 or .0005”.

For example; most machines that operate in millimeters should be set to '3 places' like this:

 Tol er ance . 001

4.1.39 Tools

WARNING! This command is only used for machines with “incremental” tool changers!

WARNING: Make sure that there is no TOOLS line in any section of a format template that describes a

machine that does NOT have an “incremental” T number for tool changes! IF YOU ACCIDENTALLY

PUT (OR LEAVE) IT IN, THEN YOU WILL PROBABLY CRASH YOUR MACHINE!

The number following the Tools command is the total number of tool positions that the machine has, like

this:

 Tool s 8

This command is used only with machines that require that the T number works “Incrementally”; in other words the value of the T # is the “number of INDEXES” (from the current tool) required to reach the next

desired tool; NOT THE ACTUAL POSITION NUMBER OF THE TOOL ITSELF!

Page 41: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 41/132

These are usually very old or inexpensive machines that for example, require a “T3” to change from toolnumber 2 to tool number 5. (Get it?) The reason this command is necessary is so that PostHaste knows

what T# is needed at the end of the program to get the turret back to position number 1 (or, since thesemachines typically only index in one direction, the post needs to know the total number of tools in case it

has to index “around the corner” if you should need to get from a higher tool number to a lower one.)

So... be CAREFUL using the TOOLS command!!!

4.1.40 UpperCaseComments?

If you want to make sure that no lower case letters get into your comments, then set theUpperCaseComments? switch to Y as in the example below. This will cause PostHASTE to convert all

lower case letters in your comments to upper case.

Upper CaseComment s? Y

4.1.41 Verbose?

Setting the Verbose? switch to Y makes the post output some additional comments that may be helpful in

'debugging' your templates - or at least helping you see why there appears to be more NC code in the outputthan you think there should be - because, as of this writing, the post will output comments at the start and 

end of arcs that are 'broken' into linear moves due to any of these reasons:

1.  Polar interpolation (refer to the [PolarBreaks] variable),

2.  When the arc's radius is greater than the machine's maximum allowable radius (See the MaxRad 

command), or 

3.  When an incoming helical arc is processed by a template that does not allow helical moves (see the Helical? switch).

The 'arc break' comments that are placed in the code may look like the underlined ones shown below:

. . .(BREAKING ARC [ANGLE INCREMENT 5.32342 ]...)

G1 X. . . Y. . .X. . . Y. . .X. . . Y. . .(...FINISHED BREAKING ARC [FACETS = 68].)

. . .

4.1.42 Work

This line tells the post 2 things1 - that you want a“work offset” (or “fixture offset”) value to be put in your programs (even if one is not

 passed through the tool motion file), and...

2 - what letter to put in front of the “work offset” (or “fixture offset”) number.

Most machines use G54 for the primary offset, so the line usually looks like this...

Wor k G

...but other machines may use a different letter. (For example, Fadal machines use E.)

Page 42: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 42/132

If the work offset number is not passed through the tool motion file, then PostHaste will ask you for a work offset number. Use WorkDefault (below) to set the default work offset number.

NOTE - Proper handling of work offsets is a critical issue for proper post operation - and avoidance

of catastrophic machine crashes!

Please see section 6 for a thorough discussion of this important subject!

4.1.43 WorkDefault

If PostHaste has to ask you for the work offset number, then the value you put here will be the “default”value that shows up in the question. (That way, you will usually only have to hit the enter key.) Most users

will set this to 54, but if you have a Fadal, you'll probably want to set it to 1.

NOTE - Proper handling of work offsets is a critical issue for proper post operation - and avoidance

of catastrophic machine crashes!

Please see section 6 for a thorough discussion of this important subject!

4.1.44 ZRestart?

This switch is typically used to prevent canned cycles from being restarted if the [D] (depth) or [RLevel](R level) values change in the middle of the cycle.

PostHaste assumes that a canned cycle must be restarted if the 'Z' or 'R' value changes in the middle of thecycle. If you want to PREVENT this restart from happening, then enter the following line in the template:

ZRest ar t ? N ( t he N means ' no' )

By default (if this switch is left out of the template), when the Z or R values change during a cycle, the

cycles will be canceled (G80) if necessary, then restarted again with the new Z and/or R value(s).

In other words, leaving out the 'ZRestart? N' line (or using the line 'ZRestart? Y') will cause the followingtype of output (on a sample where the holes are all the same incremental depth, but start at different levels). Notice both the R and Z values change:

G81 X- 1. 834 Y0. 4503 Z0. 4079 R1. 0079 F4. 0

G80

G81 X- 1. 1283 Y0. 6773 Z0. 1177 R0. 7177

G80

G81 X0. 4427 Y0. 9409 Z- 0. 1445 R0. 4555

G80

Placing 'ZRestart? N' in the format will suppress the cancel and restart codes and result in this output:

G81 X- 1. 834 Y0. 4503 Z0. 4079 R1. 0079 F4. 0

X- 1. 1283 Y0. 6773 Z0. 1177 R0. 7177

X0. 4427 Y0. 9409 Z- 0. 1445 R0. 4555

G80

•   Note: Some machines can handle changing Z and R values when in incremental (G91) mode, but NOTin absolute (G90)! Beware!

Page 43: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 43/132

4.2 Arc processing commands and switches

The following sub-sections discuss the commands that tell PostHaste how to process your machine's

“circular interpolation” codes. The commands and switches are: Cw, Ccw, CtrCode, CtrCode>180,

CtrCode360, CtrIncremental?, ByQuadrants? MaxRad, MinArc, and  MinRad.

4.2.1 ArcPlane

(Note - this command only applies to milling format templates.)

Add the ArcPlane command to your milling template if you want to be able to support arcs in the ZX and YZ planes. (By default, the post supports arcs in the XY plane only.)

The ArcPlane command tells the post what codes to add to arc motions for the 3 primary (XY, ZX and YZ) planes. The corresponding codes will automatically be added to the 'standard arc output' - that is, arcs that

are output WITHOUT an ArcCode sequence. (Remember - if there is an  ArcCode sequence in your

template, then YOU are responsible for outputting the exact arc words needed.)

Example:Ar cPl ane g  17 18 19 Let t er & pl ane number s f or XY, ZX and YZ.Ct r Code I J K Codes f or X, Y and Z cent ers of arcs.

This would cause the arc output to look like this for a 1 inch radius arc in the YZ plane (assuming theCtrIncremental? switch is set to Y):

G19 G2 Y1. 0 Z4. 53 J . 7071 K. 7071

The ArcPlane command must come before the CtrCode command.

In order for the center letters to be recognize properly, ArcPlane must be listed in your template before theCtrCode command. (Otherwise the 3rd  letter will be interpreted as the 'arc radius' letter instead of the 'Z

center' letter.)

If you are using ArcPlane and there are 4 letters in your CtrCode command, the fourth letter will be

interpreted as the 'arc radius' letter.

Other details re the ArcPlane command

Also please note that the ArcPlane example above uses lower case 'g', not 'G'. We use separate letters to

 prevent the post from 'overwriting' the tracking of the G value, which would cause a G2 AND a G17 (for example) on EVERY arc move - even if they are supposed to be modal. Because of this, we also make sure

that we have a matching letter formatted for the ArcPlane:g >2 G Modal For Ar cPl ane ( G17, 18, 19)

(Of course, if you are already using the letter 'g' for something else in your template, then you may have tochoose another letter to use.)

In addition to the discussion above, the ArcPlane command tells the post ALL of the following

information:

•  If arcs are allowed in the ZX and YZ planes

•  What word is used to indicate the 3 primary arc planes(typically G17, G18 and G19 for XY, ZX and YZ, respectively)

Page 44: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 44/132

•  (Indirectly) what 'center letters' to use for arcs in all 3 planes.The actual center letters are dictated by the CtrCode command, but as mentioned above, the ArcPlane command affects how the CtrCode command interprets the center letters.

This table shows the pertinent information (based on the ArcPlane command in the example above):

Plane: Plane number * G code added to arc moves: Center codes used in arc output

XY 1 G17 I and J

XZ (or ZX) 2 G18 I and K

YZ 3 G19 J and K

The 'plane number' is just for reference here. (There is no variable in the post for this number.) Mostmachines interpret XY as the 'primary' (first) plane, ZX as the 'secondary' plane and YZ as the 'tertiary'

(third) plane.

Using the [ArcPlane] variable in an ArcCode sequence

As mentioned earlier, your machine may require non-standard code to handle arc planes, so you may need to create your own ArcCode sequence to handle it.

Below are some examples. Note that we have supplied an [ArcPlane] variable that you can use - not onlyfor outputting the plane number, but for logic ( IF ) purposes as well.

Example #1 - I, J AND K are needed to output the arcs:

Ar cCodeG[ Ar cPl ane] G[ Ar cDi r ] X[ H] Y[ V] Z[ D] I [ I val ] K[ Kval ] K[ Kval ]end

The “G[ArcPlane]” above will output G17, G18 or G19, depending on the plane.

Example #2 - The ArcPlane can be detected (using IF commands) to output special code for each plane:

Ar cCode

if [ArcPlane] = 17 ( XY Pl ane)

  . . . (Code to output XY plane arcs goes here). . .endi f 

if [ArcPlane] = 18  ( ZX pl ane)

  . . .  (Code for ZX plane arcs)...

endi f 

if [ArcPlane] = 19  ( YZ Pl ane)

  . . .  (YZ plane arc code)...endi f 

end

The number you use to test the [ArcPlane] must correspond to the numbers in your  ArcPlanecommand. In other words, if your ArcPlane command looked like this....

Ar cPl ane g 5 6 7

... then you would use the numbers 5, 6 and 7 in your  IF  lines instead of the 17, 18, and 19 in the exampleabove.

Page 45: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 45/132

4.2.2 Cw and Ccw

Just like the FEED and RAPID descriptions above, The Cw and CCW lines describe the “G code”(although it can be ANY letter) that causes circular motion like these:

Cw G2Ccw G3

Attention Lathe users:

-  Be careful; you may need to “swap” these code values like this...Ccw G2Cw G3

-  Lathe formats may also need to have the X and I values reversed with ... MULT -1. See section 3.1.2for information on the MULT letter modifier.)

4.2.3 CtrCode

This command should be followed by 1, 2, or 3 letters, depending on which method of arc center point

designation you would like to have in the NC code. This means that the significance of the letters followingCtrCode changes depending on how many you use. Here are the 3 possibilities:

Ct r Code R 1 letter means that the Radius of the arc will be assigned to the letter.

(NOTE: Machines that use this method generally cannot process arcs of greater than180º, so make sure that you use the “ByQuadrants? Y” setting when using CtrCode

with only a single letter!)

Ct r Code I J 2 letters mean that the center point of the arc will be assigned to the letters. (NOTE:

the CtrIncremental? switch [below] will cause them to be absolute or incremental).

Ct r Code I J R Using 3 letters will cause the first 2 to designate the center point, and the third to

output the radius. (And, in case you're wondering... yes, there are machines that

require all 3!)

4.2.4 CtrCode>180 and CtrCode360

These two commands let you further optimize your NC programs by allowing you to indicate different

"center codes" for 2 special cases for arcs: ones that are greater than 180 degrees, and "full circle" (360degree) arcs. Just like the original CtrCode command, you can follow these commands with one, two, or 

three letters, and they work the same way. (See CtrCode above.)

These commands come in handy when you want to optimize the code by using "R" wherever possible. The problem with most machines is that "R" can only be used for arcs with 180 or less degrees of sweep angle.Some machines allow the use of negative R values to indicate arcs of greater than 180 degree sweep, so for 

these machines you can use the CtrCode>180 command with a letter that has been formatted to bemultiplied by -1 (see example below). However, not even these machines are able to complete a 360 degree

arc (a full circle) using the R designation, so for these arcs we have to "relapse" into using I and J again -That's what our CtrCode360 is for...

In the "Letter format" section of the PostForm, we add the following line:

r - >3. >4 R Mul t - 1 Used onl y f or arcs > 180 degr ees.

Page 46: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 46/132

Then, typically farther down, we use these lines:

Ct r Code R Ar c- center words f or Ar cs <= 180 degreesCt r Code>180 r " " " " > 180 deg.Ct r Code360 I J "Ful l - ci r cl e" ar c- cent er wor ds

If only the CtrCode line is used (and the other two are not), then there is no distinction made between the 3cases of arcs - they will all be output in the same way. This is fine if you want to use I and J as arc centers.

As mentioned above in the discussion of CtrCode, if you like, you can simply use the "ByQuadrants? Y"

option to simply break all arcs into 90 degrees or less sweep. This lets you avoid all these special cases, butmay add to the length of the NC program by creating more lines of code to handle the additional arcs.

4.2.5 CtrIncremental?

The information after this command is only used if the “2 letter” codes (typically I and J [or for turning: I

and K]) are used to indicate the center point of the arc. Put Y or N after the “CtrIncremental?” command toanswer the question: “Does your machine measure the center of the arcs incrementally from the start point

of the arc?”. IF YOU INDICATE “N”, THEN THE NUMERICAL VALUES OF THE 2 “CENTER”ADDRESSES WILL BE TAKEN AS ABSOLUTE FROM THE PROGRAM ORIGIN.

4.2.6 ByQuadrants?

Many NC machines do not give you the ability to program arcs of more than 90 degrees in a single block of code. This inability of the control requires that you program the circular moves “by quadrants” by breaking

arcs at the quadrant boundaries. Thus to create a full circular move, you must program 1 block for each“quarter” of the arc (and even break it into 5 arcs if the starting point of the arc is not on a quadrant

 boundary!) If your machine has this limitation, then put a Y after the BYQUADRANTS? command. But if 

your machine allows full circle programming in 1 block, then indicate N.

4.2.7 Helical?

Unless otherwise indicated (with Helical? N ), the post assumes that your machine allows helical arc moves- which are typically nothing more than G2 or G3 blocks with a Z added such that the start and end points

are at a different Z level.

If the machine does NOT support helical interpolation, then add the following line to the template, and the

 post will break the helix into linear moves (using the chordal tolerance value indicated on the MaxRad  line

- so don't forget to add a MaxRad  command too...):

Hel i cal ? N

4.2.7.1 Helical arcs - Handl ing special cases

On helical arcs (as with all arcs), PostHaste's 'standard' arc processing only outputs 2 'center point'coordinates; the 2 letters that correspond to the arc's plane [ArcPlane] - typically I and J for arcs in the XY

 plane. (Note: even helical arcs have an implied plane - the plane perpendicular to the center line of the

Page 47: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 47/132

helix.) If you need additional code on helical arcs (for example, the Siemens 2100 control requires a K value for helixes), this will require adding an ArcCode sequence to your template.

The example below is an ArcCode sequence that will output a K value for the center (of ALL arcs) alongwith the standard I and J.

Ar cCodeG[ Ar cDi r ] X[ H] Y[ V] Z[ D] I [ I Val ] J [ J Val ] K[ KVal ]end

If you only want K values added when it's a HELICAL arc, then you can use an IF structure to only includethe K if the startpoint Z doesn't match the endpoint Z:

Ar cCodei f [ Last D] <> [ D]  G[ Ar cDi r ] X[ H] Y[ V] Z[ D] I [ I Val ] J [ J Val ] K[ KVal ] ( Adds K t o hel i xes onl y. )el se  G[ Ar cDi r ] X[ H] Y[ V] Z[ D] I [ I Val ] J [ J Val ] ( Non- hel i cal ar cs don' t get K. )endi f end

....This could become more involved if you need to support other planes (G18, G19), and even more so if 

you need Helical arcs in the other planes... you may have to add some 'plane test' logic to your ArcCode

like this:

Ar cCode

i f [ Ar cPl ane] = 17 AND [ D] <> [ Last D] ( XY Pl ane AND Hel i cal . )

  . . . (Code to output XY plane Helical arcs goes here). . .  EXI T << EXI T t he seq. here t o pr event f urt her arc pr ocessi ng.endi f 

i f [ Ar cPl ane] = 17 ( XY Pl ane, NOT Hel i cal . )  . . .endi f 

i f [ Ar cPl ane] = 18  . . .endi f 

i f [ Ar cPl ane] = 19  . . .endi f 

end

So, what value is output with the K?

For helical arcs requiring a K value, you must be sure that you are outputting the K value properly so that it

matches the machine's requirements. If your template uses...

Ct r I ncr ement al ? N

...the [KVal] variable will output the absolute Z value at the startpoint of the arc. If you want the END Z to

 be output, then simply use K[D] instead.

What if you want some other K value?

  Example 1: If you want the 'lead' of the helix to be output (the difference between the startpoint and 

endpoint Z values then you can use this:

Page 48: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 48/132

  K[ D] - [ Last D]

 Note - this is the same as outputting the incremental Z value of the endpoint - as measured from the

startpoint.*

  Example 2: If you need the "average" Z level (the Z level 1/2 way between the start and endpoints of the helical arc), you could use an equation like this: ([LastD]+[D])/2

...again, this outputs an ABSOLUTE value. If you would like to output the same point, but make it'incremental from the startpoint, then you would simply subtract [LastD] from the total* like this:

  ([LastD]+[D])/2-[LastD]

Here's how the whole sequence would look:

Ar cCodeG[ Ar cDi r ] X[ H] Y[ V] K[D]-[LastD] Z[D]  I [ I Val ] J [ J Val ] (K BEFORE Z! *)

end

* NOTE - Since the value in [LastD] gets updated IMMEDIATELY (to the current [D] value) upon [D] being output, you must check or use [LastD] in any output BEFORE [D] IS OUTPUT! This is why in the

example above we have the K value on the line BEFORE the Z value. (If we put it after Z, then [LastD]would have already been updated, and would be equal to [D].)

IMPORTANT - As mentioned in the note above, the order in which you use the [LastH], [LastV] and [LastD] in your sequences is critical! Please make sure you see the section 9.1.1.1 (in Appendix A) for

important information regarding these variables before you attempt to use them.

4.2.8 MaxRad

This line has 2 parameters: the first tells the post the maximum radius arc that your machine can handle,

and the second is a "chordal deviation" value for breaking arcs that are over the maximum radius into aseries of linear movements that approximate the arc.

If your machine cannot handle arcs over 99 inches in radius, then the following command will cause thosearcs to be broken into linear moves, holding a tolerance of +/-0.005 from the original arc. Example:

MaxRad 99 . 005

4.2.9 MinRad

Arcs that have a radius less than this value are output as a single linear movement. Example:

Mi nRad . 001

4.2.10 MinArc

Arcs that are less than this distance (from start point to end point) are output as a single linear movement.

Example:

Mi nAr c . 001

Page 49: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 49/132

 NOTE: This does not apply to 360 degree arcs (full circles), of course.

4.3 Special commands for Columnar style formats

 NOTE: The following two commands (Spaces and Dummy) are used only in columnar style (or “tab-

sequential”) programs. You may skip reading about them if you have no such requirements.

4.3.1 Spaces

The number on the “SPACES” line is used ONLY IN COLUMNAR STYLE PROGRAMS (like theEMCO or TAB SEQUENTIAL format in the example template file) and determines the length of 

EVERY line of the program - since every line in these types of formats must have the same length.This line MUST appear in the template before the letter formats (below) for each format that uses

this programming style, otherwise the words will not be placed correctly in the NC program.

 Note: Do not confuse the Spaces command with the Spaces? switch!

4.3.2 Dummy

If you would like a character to appear at the end of each line of a COLUMNAR style program (so the

operator will be able to see exactly where the end of the line is), then put it after the DUMMYcommand. This command is optional for columnar output, anc you will definitely NOT use the

DUMMY line if the format you are making is NOT columnar. Like the spaces command above, thiscommand must be placed in the template before the letter format section.

Note: Do NOT use this command if the communication software you are using cannot “strip” the

dummy character when tranmitting the program to your machine. (If you are using UpLink  to

transfer your program to the machine, then make sure that the ASCII value of this character appears inUpLink's CONFIG.NC file [after DUMMY] to make sure that UpLink  does NOT send this character 

out as part of the program.)

Page 50: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 50/132

5. The “ Sequences”

After the Name line, the Letter format  section and the Commands and Switches are out of the way, the rest

of the lines in the template (described below) are ones that PostHaste uses to set up different NC programcode “sequences”. These are sections of the template that mimic portions of the actual final NC program,

and they describe the bulk of how the program actually appears.

In the sequences, the basic sections of NC code that appear in specific places in the NC program are

described easily and visually; simply edit the sequences so that they look the way you want your final

code to appear.

We have set up PostHaste so that you can specify the 7 basic code sequences: the StartCode,

1stToolChange, ToolChange (see example on theright), Infeed (“cutter-comp on”), OutFeed (“cutter-

comp cancel”), EndCode, and the “Canned cycles”

(drilling, reaming, tapping, etc.) sequences. There are

some other sequences available that are used for 

special purposes, they are discussed in the sections below as well.

 Tool Change ( Secondar y t ool changes)M9 . . . cool ant of f .G0 G28 G91 Z0 . . . Ret r act i n Z.N[ Bl ock] T[ Tool ] M6G0 G90 G[ Wor k] X[ H] Y[ V]G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ] T[Next Tool ]

End

As you can see from the ToolChange sequence shown above, in addition to codes that look identical to

finished NC code (such as M9 and G91), there are some other ones where the letter is followed by avariable instead of a number (like N[Block], T[Tool] and X[H]). This is a very important subject, and we'll

discuss it now.

5.1 Using Variables:

Overview:

As you saw in the sample sequence above, the sequences make use of “variables” that indicate what kind  of 

value is assigned to the various letter addresses. We have endeavored to make the names of the variablessuch that their significance is quite obvious. For example, we use the variables [H], [V] and [D] for the

horizontal, vertical and depth position (respectively) on 3 axis milling machines, so you see these variablesused almost exclusively in conjunction with the X, Y and Z letters. For a complete list of variable names

and descriptions, see Appendix A.

Details:

In almost all of the sequences, variables must be used to indicate numerical values that you would like the post to put into your NC program.

Don't let the word “variables” scare you; VARIABLE simply means: “A word that takes the place of a

number”. Let me explain it this way:

Page 51: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 51/132

There is a reason for (or description of ) every value of an NC program that you create; we are simplyshowing the “reason” instead of the value itself. For instance: an X value on a mill generally indicates a

HORIZONTAL POSITION; so we simply abbreviate it as the letter H... “H” is the VARIABLE thatindicates “horizontal position”. Therefore, to indicate that you want the X to appear followed by the current

horizontal position, then simply put X[H] where you want that to appear in 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. For instance, the letter T usually indicates a “tool number”, so we'vecreated a variable called “TOOL” to specify 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 variable names and descript ions, see Appendix A.

Appendix A lists all of the variable names (and the values to which they refer) that we can use instead of 

numbers when describing the sequences. Because there are so many types of values that can be used in an NC program there are several 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. Appendix Ais intended to be used for reference when you need it.

In the following sections, we'll discuss the specific uses of the NC program sequences themselves. As youwill see, variables play a big part in what goes on in the sequences.

Page 52: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 52/132

5.2 The Sequence Descriptions

The sequences are described in the template by simply giving…

…the sequence name (on its own line)…   StartCode

then the line(s) of formatted NC “code” (and/or other commands, as discussed in section 5.3 )…%0O[Program#]

then the word END on its own line (whichof course marks the END of the sequence).

End 

The sequences in the list immediately below are “standard” sequences which are common to all machine

 program formats. After this list, there are other sequences that are used for special cases such as canned (point-to-point) cycles, subroutines and machines that require unusual coding for “standard” movements

such as rapid moves, feed moves and arc moves.

5.2.1 The standard sequences

These are the “standard” sequences - common to all machine program formats...

5.2.1.1 StartCode

This is the sequence that lets you format the sequence of blocks at the very start of your NC program. Takea look at these excerpts to get an idea of how this works.

For the Mitsubishi M0:

St art CodeL[ Pr ogram#]/ 0 G91

/ 0 G28 X2 Y-2 Z- 2End

The 1st line contains the program “header”: the program identification letter followed by the program #

(which is asked of the programmer automatically when you use of the Program#  variable in your 

format).

The next line is a G91 command (to put the machine into “incremental” mode for the next line...

The 3rd  line is a simple way to have these machines make sure that they are in “home” position - theG28 moves the tool (with the X, Y, and Z values included) 2 inches (incrementally) away from its

current position (in each axis), then returns to machine home.

The slashes (/) are for a “block skip” or “block delete” code.

These lines appear in the program like this:

L123/ G91/ G28 X2. 0 Y- 2. 0 Z- 2. 0

Note that t he sl ashes have no numbers accompanyi ng t hem because t hei r sl ashcharact er i s f ormat t ed f or no numer i c out put :

Page 53: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 53/132

  / 00 (0 digits before the decimal, NO decimal, and 0 digits after)

For the Fanuc 3000C:

St art CodeG17 G40 G80 G91G45 X0 H62G45 Y0 H63End

The 1st line is an “initialization” line that sets the work plane (G17), cancels diameter compensation and

canned cycles (G40 and G80), and puts the machine into incremental programming mode (G91).

The next 2 lines set the X and Y work offsets (using offset registers 62 and 63 for X and Y offset,

respectively).

5.2.1.2 1stToolChange

 Now pay attention: This is the sequence that covers ALL THE CODE AFTER THE START CODE THATIS REQUIRED TO GET AND POSITION THE 1

ST TOOL FOR THE START OF THE 1

ST CYCLE.

 Notice that many variable references such as [Direct], [LComp], and [Work] can (and should) be used here.

For the Mitsubishi M0...

1st Tool ChangeN[ Bl ock] T[Tool ] M6G0 G90 G[ Wor k] G40 G80 X[H] Y[ V]G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ]End

The 1st line of the sequence actually does the tool change (...T1 M6).

The 2nd 

 line rapids into the X and Y position (still at tool change Z level) for the next cycle whilemaking sure that the incremental programming mode, diameter compensation, and canned cycles have

 been canceled (G90,G40,G80)

The 3rd  line applies the length compensation and rapids to the current Z level (which is the clearance

 plane; the CAM system puts that into the D variable of the positioning move).

The last line turns on the coolant.

You should notice that the tool change procedure shown below for the Fanuc 3000C is significantly

different, but PostHaste allows you to create that format just as easily!

Here's an excerpt from the template showing the 1stToolChange sequence for the Fanuc 3000C:

1st Tool ChangeS[Speed]G91 G45 Z0 H[ LComp] M[ Di r ect ]G90 G92 X0 Y0 Z1 M[ Cool ] Thi s l i ne set s Z0 exact l y 1' bel ow t he t ool .G0 X[ H] Y[ V]Z[ I Level ]End

Important note re the 1st ToolChange and ToolChange sequences:

Page 54: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 54/132

These sequences are “triggered” by THE FIRST RAPID MOVE IN THE CL FILE FOLLOWING A

CHANGE IN THE TOOL NUMBER - NOT by the CL record that changes the tool number itself.

In other words, when reading the CL file, the 1stToolChange or ToolChange sequences will NOT be output

immediately after the tool number changes (typically with a TOOL or LOADTL record); THE POSTWILL WAIT UNTIL THE NEXT RAPID MOVE IS READ FROM THE CL FILE before outputting the

1stToolChange or ToolChange sequences.

This means that ANY COMMENTS IN THE CL FILE PLACED BETWEEN THE LOADTL and the

RAPID/GOTO records WILL APPEAR  BEFORE THE 1stToolChange or ToolChange SEQUENCES(unless the Comments command is used - see section 5.3.2).

5.2.1.3 ToolChange

This should be much like the above sequence except that it should first include the block(s) required toretract the spindle (or tool) to tool change position. Here's a sample from the Mitsubishi format:

 Tool ChangeG91 M9 The 1

st 2 lines turn off the coolant...

G28 G44 Z0 S100 ...and home the Z axis.

N[ Bl ock] T[ Tool ] M6G0 G90 G40 G80 X[ H] Y[ V]G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ]End

Please see the “Important note re the 1st ToolChange and ToolChange sequences” just a few paragraphsabove.

5.2.1.4 Infeed

The purpose of this sequence is to describe the code that your machine needs to apply tool radius

compensation (a.k.a. 'cuttercomp'). This is usually only 2 blocks: 1 to plunge the tool down to cuttingdepth, then 1 to feed the tool towards the part surface - applying diameter compensation if the machinerequires it.

This sequence gets output on the first GOTO record following a CUTCOM/ON (or CUTCOM/LEFT or CUTCOM/RIGHT) record from the CL file.

A sample from a Fanuc format:

I nf eedG1 Z[ D] F[ Pl unge]G[ Si de] X[H] Y[ V] H[ DComp] F[ FRate] ( appl y cut t ercomp)end

5.2.1.5 OutFeed

This is the code that typically feeds the tool away from the part surface (removing diameter compensation).

This sequence gets output on the first GOTO record following a CUTCOM/OFF record.

Out f eedG1 G40 X[ H] Y[V] ( r emove cut t er comp)Z[D]end

Page 55: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 55/132

5.2.1.6 EndCode

These are the last line(s) of code that appear in an NC program. They should include block(s) to remove

any length compensation and retract the spindle (or tool) into tool change (or program starting) position, afinal tool change (if you so desire), and the program stop code (usually M2 or M30)...

EndCode

G91 G0

G28 G44 Z0 S100

G28 X0 Y0 M5

M30End

Page 56: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 56/132

5.2.2 Canned Cycles

The “canned cycle” sequences format the NC code for the canned cycle (or: “point-to-point”) operationssuch as drilling, tapping, or boring.

* The sequence names that fall into this category are:

-  Drill and Ream  “Feed in, rapid out” and “Feed in, Feed out” cycles.

-  Bore and Back  “Fine boring” (with spindle orient) and “Back boring” cycles

-  Tap and LTap  Tapping and Left-handed tapping cycles.

-  Peck and ChipBreak “Full out” and “partial retract” peck drilling cycles.

There is also a Cancel sequence, which typically causes a G80 to appear on the line following the finalhole of the cycle; we will discuss details on this below.

5.2.2.1 Two ways to output canned cyc les: 'canned' and 'longhand'

Most canned cycles (all drilling cycles except Peck and ChipBreak) can be configured in 2 different ways:

 1. Accessing the machine's “canned” (or “fixed”) cycle functions (as shown here)...

Dr i l lG81 X[ H] Y[V] Z[ D] R[ RLevel ] F[ Fr ate]end cancel

 2. ...or “roll your own” longhand drilling cycles by describing individual machine motions (using feed 

and rapid moves, spindle and feed controls...etc.). as shown here:

 TapG0 X[ H] Y[V] Posi t i on over hol e,Z[ RLevel ] move down t o R l evel ,G1 Z[ D] F[ Fr ate] f eed down,

Z[ RLevel ] M4 r ever se spi ndl e, f eed up t o R l evel ,G0 Z[ I Level ] M3 f or war d spi ndl e, r api d up t o i ni t i al l evel .end

All of the lines in the longhand format (described immediately above) must be repeated for each point

location in the cycle. In this case there is no Cancel sequence needed, that's why there is no 'cancel'

included on the End  line of this example. (The section below discusses more details regarding this.)

You may “ mix and match” your drill ing cycle methods...

Remember: you can format any canned cycle in either of the ways described above. Therefore if your machine has a built-in drilling cycle, but no reaming cycle, then you would use method #1 for the drilling,

 but construct the reaming cycle yourself as shown above in method #2.

 * The AutoThread cycle is not covered in this section because it is not a 'point to point' (holemaking) cycle. Read about

 AutoThread in section .

Page 57: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 57/132

5.2.2.2 Cancel

“ End cancel” vs. “ End”

Please notice in the 'Drill' example (#1) above that the END line has the word CANCEL on it, and that the'Tap' example (#2) does NOT use a CANCEL on the END line. This is because the first type ('canned'

machine cycle) requires a “canned cycle cancel” code (typically G80), and the 'roll your own' drillingcycles do NOT require the cancel code. Here's why:

Adding cancel to the end  line of a canned cycle description actually tells the post TWO things:

-  ...to only output the cycle description ONCE - for the first hole only;

subsequent holes will be drilled by outputting only the needed X, Y, Z and R value(s) for each hole. (See the ZRestart? switch [section 0] if your machine doesn't like Z and/or R values on

subsequent holes in a canned cycle.)

-  ...to output the Cancel sequence after the final hole of the cycle.

If there is NO cancel on the cycle's end  line ...

-  ...then all of the line(s) described in the sequence will be output for every hole in the cycle, and

...the Cancel sequence will not  be output after the final hole.

The 'Cancel' sequence

The Cancel sequence lets you describe the code required to tell the machine to stop making holes and 

return to normal (non-canned cycle) machining. Most machines require just a single line with a G80 to dothis - as shown here (but of course you may use as many words or lines as your machine requires):

CancelG80end

 NOTE: As mentioned above, the Cancel sequence will only be output at the end of a cycle if the originalcycle description is ended with 'end cancel'. So... if you have “hand-built” a cycle with individual moves,

make sure that you do NOT have a cancel on the cycle's end  line. This way, your hand-built cycle will NOT output the cancel sequence after it's done with the last hole.

5.2.2.3 Peck dri lling (The Peck and ChipBreak cycles).

The Peck drilling (“deep hole drilling” or “chip clearing”) and ChipBreak cycles are usually formatted 

much like other drilling reaming cycles, with the addition of the Step variable, to indicate the peckingincrement. Here is an example typical of Fanuc controls:

Chi pBr eakG73 X[ H] Y[V] Z[ D] R[ RLevel ] F[ FRate] Q[ St ep]end

Page 58: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 58/132

…but what if my machine does not have a Peck or ChipBreak cycle?

Some older machines do not have these cycles. Since peck drilling cannot efficiently be described using the

'roll your own' method described earlier, we have designed one into PostHaste that will synthesize the peck drilling (or chip breaking) cycle by automatically building the required “feed and rapid” moves - typically

G0 and G1. (The actual codes depend on what you put into the FeedCode, Feed  and Rapid  commands.)

To get this peck drilling cycle on a machine that does NOT have a built-in peck drilling cycle, just include

these lines in the template in place of the peck drilling cycle description that may be there already:

PeckNoneEnd

Likewise, a “Chip breaker” (or “partial retract”) drilling cycle can be simulated automatically by the post:Chi pBr eakNoneEnd

Using the above sequences, PostHaste will automatically generate feed and rapid moves as needed to

 perform the corresponding types of drilling operations.

5.2.2.4 Advanced canned cyc le control.

As you learned in the section above, PostHaste will automatically output the secondary holes (after the firsthole of the canned cycle) with the HCode, VCode and DCode and RLevel (usually, X, Y, Z and R) words

only.

If you want PostHaste to use letters other (or fewer) than those four, then you must define the subsequent

lines of the cycle as well, as shown in the example below which will use U, V and W in place of the normalX, Y and Z:

Dr i l l 1

G81 X[ H] Y[V] Z[ D] R[ RLevel ] F[ Fr ate]U[ H] V[ V] W[ D]end cancel

The “1” after the “Drill” command means that only the 1st line will appear at the start of the cycle, and the

remaining lines (the “U...” line) will be repeated at every subsequent hole.

The number placed on the DRILL (or Tap... etc) line of any canned cycles specifies the number of 

non-repeating (“first hole”) lines. This means that you can create formats for “canned” drilling cycles thatrequire MORE than 1 line of code to start the cycle, or require more than 1 line of code per hole. In the

example format below, the machine requires 5 lines to set up the cycle and drill the first hole, and 2 lines (a position line AND an “M99” line) to drill each subsequent hole.

By starting the DRILL cycle with the DRILL 5 line (instead of just DRILL)...

DRI LL 

5 G81 ... These 5 lines

P1... (ONLY) appear 

P2... for the

X[H] Y[V] F600 FIRST HOLE 

 M99 of the cycle...

X[ H] Y[ V] ... These 2 l i nes ar e r epeat ed f orM99 every hol e AFTER t he f i r st .END

Page 59: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 59/132

5.2.3 Controlling 'modality' - the “ Force?” option

As you probably already know, the term modal refers to the property of certain codes that makes them“stay in effect until changed”. For instance, the code that indicates linear motion (G1 on most controls)

stays in effect without being repeated on each line - so this means that the G1 code is modal. Feed rates(usually F) are modal in most machines as well - they make it this way so you don't have to keep repeating

the F code on each movement line.

You've already read above how to specify which letters are modal and which aren't (either by using themodal modifier in the “Letter formatting” section, or by using the ModalLetters command). These tacticscontrol the overall modality of any or all letters you wish. However, at least one control manufacturer has

seen fit to muddy the waters by setting up their controls so that the modality of certain letters changes

depending on context. To handle this curve ball, we have given you the ability to control whether or not the

modality of the modal letters is checked in each individual sequence.

The "FORCE?" switch/modifier may be added to all sequences (including the "point to point" cycles

[which are DRILL, REAM, BORE, BACK, TAP, LTAP, PECK, and the custom CYCLE sequence]). Youcan use this option to either tell PostHaste to...

•  ...honor the modality of the modal letters (suppress unchanged values) within the sequence by using...  For ce? N

•  ...or to force all words to be output -regardless of their modality by using...

  For ce? Y

For instance, if you want all letters to be output on every arc, use the "Force" modifier on the ArcCode linelike this:

Ar cCode For ce? Y. . .end

F.Y.I - The Force? option can also be added to the Cancel, Index, Upon, Uponrec and Cycle sequences. If added to sequences that use other parameters, it must be placed AFTER all of the other parameters as in

these examples:I ndex X Z Force? Y

Upon [ t ool ] Force? Y

UponRec Li f t Z [ I Level ] [ RLevel ] [ Val 1] Force? Y

Cycl e Fr ed 2 [ Val 1] [ Val 2] [ Val 3] [ Val 8] Force? Y

--- “Altered States” ---

Because of “popular demand”, we have set up the default state of different sequences differently. For instance, we have set up movement commands (linear, circular and rapid motion) to honor modality (in

other words, to not repeat values that haven't changed), but we've set up the default state of the ToolChangesequence (among others - see below) to repeat all values so that the machinist can start running his program

from any tool change without worrying whether or not the machine will have all the information it needs tostart correctly from that point. The 3 paragraphs following list all of the sequences by their default state:

The default state of these sequences is "Forced" (the equivalent of "Force? Y"):StartCode, 1stToolChange, ToolChange, SubStart, SubEnd, SubCall, Index, Cancel, EndCode.

All canned cycles (Drill, etc.) are the equivalent of "Force Y" for the 1st hole, but then are "modal" for thesubsequent holes (the equivalent of "Force? N").

All other sequences are modal (the equivalent of "Force? N") - Rapid, LineCode, Infeed & Outfeed,ArcCode.

Page 60: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 60/132

5.2.4 Additional sequences for special purposes

5.2.4.1 Sequences for custom and mult i-line movementsLineCode, RapidCode and ArcCode (CwCode, CCWCode)

 Note: The CwCode and  CcwCode sequences have been 'retired' (by the addition of the ArcCode sequence)as of 10/2001; we have listed them in the header above since many older templates use them. We

recommend that if you are using a template that has them, replace them with a single ArcCode sequence asdescribed in this section.

These sequences let you 'override' the post's standard method of outputting all of the various movements

(arcs, feed moves and rapid moves).

Some machines just don't get it. You give it a perfectly respectable piece of NC code like “G2 X1. Y1. J1.”

and they choke. Formatting for 'non-standard' movement output with other post-processors has always beena nightmare. But not with PostHaste, which lets you configure the movement codes any way you want by

using the RapidCode, LineCode and ArcCode sequences (along with other features of the post, like“search and replace”, and the advanced character formatting options mentioned earlier).

Remember: Since these sequences completely take over ALL corresponding movements, you areresponsible for formatting them to account for ALL codes and conditions needed (feed rates, “G0”, “G1”,

spindle [Speed] changes, etc).

For example, let's say you want each arc movement to output 3 lines of code like these examples:

Clockw ise ar c: Coun terc lockw ise ar c: notes:

ARC CW ARC CCW

X0 Y1. 0 X0 Y1. 0 << Absolute center point

G2 X1. 0 Y1. 0 G3 X1. 0 Y1. 0 << End point

To achieve the above output, simply place the following ArcCode sequence in your template:

Ar cCodeq[ Ar cDi r ] ( q wor d wi l l be ' r epl aced' - see bel ow. )X[ I Val ] Y[ J Val ]G[ Ar cDi r ] X[ H] Y[ V]end

r epl ace ' q02' wi t h ' ARC CW'r epl ace ' q03' wi t h ' ARC CCW'

Of course, you must make sure that the letter “q” has been formatted (in the “letter format” section of thetemplate) to output the leading 0 by using a line like this...

q 2

...and also make sure your CtrIncremental? switch is set to N like this...Ct r I ncr ement al ? N

That's it! Remember the quoted phrases used in the Replace line are case-sensitive, so in the first line of the

sequence, make sure that you are using any word that is NOT used elsewhere in the format.

Page 61: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 61/132

Important notes regarding ArcCode (and CwCode and CcwCode):

To output the center point in absolute mode as in the example above, make sure that you set your 

CtrIncremental? switch to N so that [IVal] and [JVal] get output as absolute values (not incremental, asthey would with CtrIncremental? Y ).

Likewise, for the [ArcDir] variable to function properly, you must make sure that your CW and CCWcommands are used correctly as well. The Fanuc standard would be...

Cw G2

Ccw G3...but you may, of course, use any letter and number your machine requires.

LineCode and RapidCode sequences

Similarly to ArcCode, you may use the LineCode and  RapidCode sequences to format linear (feed) and 

rapid movements. Examples:

Li neCodeG1 X[ H] Y[V] Z[ D] F[ Fr ate] ( St andard l i near move)end

Rapi dCodeG0 X[ H] Y[ V] Z[ D] S[Speed]end

5.2.4.2 AutoThread (used for lathe only)

Many lathes support one or more types of 'canned' threading cycles. One of the ones most commonly used 

is a G76 cycle. Some machines require this to be a single line of code, and others require 2 lines. These oneor two lines contain all information needed for the machine to create all of the threading passes.

Below is a "2-line" example for a Fanuc 0T controlled lathe:

. . .  Let t er f or mat s. . .A 60 P ( Used f or TParams)P >34Q - >34q >4 QR - >3. >4r - >3. >4 R Mul t - 1. . .

AutoThread Automat i c t hread canned cycl eG76 A[ TPar ams] Q[ VBi t e] R[ VLeave]G76 X[ V] Z[ H] P[Dept h] Q[ Peck1] r [ Taper] F[ Fr ate]

end

 Note: Even though the NC machine requires a P number for TParams, in this example the TParams isassigned to the "A" letter address that is formatted to output the letter P. (This is done by including the line

"A 60 P" in the letter formatting section of the template.) We did this in this case because the 2nd line of the format above also requires a P word (formatted for the [Depth] parameter), and it is NOT 6 digits there

- so we have to have 2 different formats that output the 2 different P words.

Page 62: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 62/132

Here's another example - this time, a single-line version used for some Fanuc controls and Haas lathes:

AutoThr eadG76 X[ V] Z[ H] K[ Dept h] F[ Fr ate] A60End

Below is a 'quick reference' chart of the variables commonly used in AutoThread cycles.

Variable Significance to machine (Fanuc 10T):

[Chams] # of lead-out threads[Depth] Total depth of thread (radius)

[FRate] thread lead

[Passes] # of finish (spring) passes.

[Peck1] Depth of 1st pass

[Pitch] The TPI value of the current thread. This is usually equivalent to “1/Lead”(Note – Pitch not usually used for metric threading.)

[StartAng] Tool tip angle

[Starts] The # of ‘starts’ a thread has.

[Step] Minimum pass depth: The passes get smaller and smaller until they reach this value, then they get no smaller.

[Taper] Differential of start diam. and end diam. (EndV-StartV)

[TipAng] The ‘infeed angle’ of the thread – usually equivalent to the angle of the tip of the threading tool.

[TParams] 6 digit code containing 3 parameters; see explanation directly below.

[VLeave] Finish stock: How much stock to leave before final pass(es)

[TParams] variable

The [TParams] (Threading Parameters) variable is used in common "AutoThreading" (G76) cycles onFanuc-style lathe controllers. It is usually output as a 6-digit "P" number that actually holds 3 different

values that use 2 digits each. Some machines need it output with a different letter, but here's an example of how it's usually formatted for Fanuc 0T controls (among others):

In an actual NC program, the A[TParams] word listed in the sequence above may end up looking like this:G76 P020360 . . .

-  The first 2 digits (02) indicates the number of finish passes ("spring passes") that are cut by the lathe

after reaching the final thread depth.

-  The 2nd 2 digits (03) is the number of the "lead-out chamfer" threads.

-  The last 2 digits indicates the "Cutting infeed angle" in this case, "60". On some lathes, these last 2 digitscan only be set to the following values: 80, 60, 55, 30, 29, or 00

(See a Fanuc Lathe manual for more details on the use of this word in your lathe threading NC programs.)

"Individual" thread parameter variables available

The variables: [Passes], [Chams], and [TipAng] allow access to the individual values available in the[TParams] variable.

Page 63: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 63/132

5.2.4.3 Index (used for machines with rotary axes)

For machines that have one or two rotary axes, this sequence dictates how the post outputs rapid moves that

include rotary axis motion. This discussion addresses only machines with one rotary axis.*

First of all, you may place an axis letter (usually X, but sometimes Y) following INDEX to indicate the

"default" rotary table orientation (using an X means that the axis of rotation is parallel to the X axis.)

IMPORTANT:

Depending on which CAM system you're using, you may need to indicate the codes necessary to make surethe tool clears the workpiece, moves in X and Y while indexing the rotary axis, then moves the tool back 

down to the desired end point of the move. (Some CAM systems can output 'dangerous' rotary motions, so be very careful!)

... for machines with ONE rotary axis

Machines that have a single rotary axis use the [RotAngle] variable.

This example will generate code that cancels the length compensation (retracting the tool to “Z home” position) before rotating, then reapplies LComp afterwards:

I ndex XG0 G49 G90 Z0X[ H] Y[V] A[ RotAngl e]G43 H[ LComp] M[ Cool ] Z[D]End

...This one just lifts the tool to the “initial plane” level:

I ndex XG0 Z[ I Level ]X[ H] Y[V] A[ RotAngl e]

Z[D]End

...and this one creates a 'direct' 4-axis simultaneous rapid move. (Only use this if you are  sure that the CLfile contains ONLY “safe” indexing movements!!!):

I ndex XG0 X[ H] Y[V] Z[ D] A[ RotAngl e]End

Which letter should I use on my INDEX line? / Do I need the minus sign?

 Note that in the examples above, the letter X is used on the INDEX line. You may use any one of these...

I ndex XI ndex X-I ndex YI ndex Y-

...depending on which axis your rotary axis is parallel to, and which way it rotates. Most 'vertical' mills will

use X or X-, most horizontal mills will use Y or Y-. (MillTurn machines will

 * For machines with 2 or more rotary axes, please see the manual entitled “Formatting 5 Axis Posts”

Page 64: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 64/132

Adding the minus (-) will reverse the sign of the rotary angle. So, if you're getting “A-90.” when you want“A90.” (for example) then just add the minus sign. (...Or remove it if it's already there.) 

INDEX definition when rotary axis on CAD model does not match machine orientation

The INDEX line will be different depending on whether the indexing axis of your CAD model actually

matches the machine's rotary axis orientation. Here are the two different conditions that the post is set up to

handle:•  Condition 1 - Model rotation axis matches machine rotation axis:

This is a standard condition (described above) where the CAD data is oriented to rotate about the X or Y

axis, and your machine does also. In the standard cases, we use "Index Y" (or Y-) for typical Horizontalmills, or "Index X" (or X-) for Vertical mills, respectively. Remember that in the 'standard' cases, the "-"

is added to the letter to reverse the sign of the rotary angles - which also effectively reversesthe direction of most rotary tables.

•  Condition 2 - Model rotation axis does NOT match the machine rotation axis:

This is sometimes done when the programmer wants to draw a complete tombstone in the CAD model -

sometimes they will lay it out so that the model is oriented to index (rotate) about the Z axis instead of theY axis. In this case, we typically use an "Index Z Y-" sequence to tell the post that the incoming data is

oriented to rotate around the Z axis while the machine actually rotates about the Y axis. Please note that

the  minus sign (-) on the Y does NOT work the same as it does in the standard setup (condition 1

above) - instead of reversing the sign of the rotary angle, in this case it indicates which direction the

tool is coming from (in the CAD model) when the tombstone is in home (B0) position. In most cases,

this will be from the "Y-" direction, so we use an Index definition like this:

I ndex Z Y-…end

 NOTE - If you use  Index Z Y (without the ‘-‘), the post will interpret B0 as being the side of the part

towards the “Y+” direction, so the B angles will be different by 180 degrees.

If you need B0 to be one of the other faces, then use the ADD modifier on the B letter format to add 

whatever additional angle you need (90, -90, etc.) to get the desired rotation, like this:

  B - >3. >3 Add 90 …

... for machines with TWO (or more) rotary axes

The way that PostHaste formats multiple rotary axes is significantly different from machines with a single

rotary axis. This topic is covered in a separate manual – the one entitled “Formatting 5 Axis Posts with the

PostHASTE Postprocessor ”. Please read about it there.

5.2.4.4 Stop

When a STOP record appears in the CL file, the Stop sequence is output. Here is a suggested layout for a

Stop sequence:

St opSet [Val 1] t o [ D] << Memori ze curr ent Z posi t i onG0 G91 G28 Z0 << Ret r act Z

Page 65: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 65/132

M0 << Execut e t he st op code.Comment sM[ Cool ] << Tur n t he cool ant and t heM[ Di r ect ] << spi ndl e back on, t henG0 G90 Z[ Val 1] << Return Z t o curr ent posi t i on.end

Handling ‘Optional Stop’ (OPSTOP) CL records

While the post does have a Stop sequence (that is dedicated to the handling of STOP records in the CL dataas mentioned above), we do not  have a dedicated sequence to handle OPSTOP records. You may handle

these (as well as any CL record that you may encounter) by using the generic UponRec sequence.

Here's how you would trap and output code for an optional stop (OPSTOP) record in the CL file.

UponRec OPSTOPM1

Comment s (Note - the Comments line isn't required, but might be a good idea...)

end

For more details on how the UponRec sequence works, please read the section immediately below re theUpon, UponRec & Cycle sequences.

5.2.4.5 Upon, UponRec & Cycle sequences

The discussion directly above (re OPSTOP records) brings up an important point; rather than us designing

dedicated sequences for every possible CL record (which would be a never-ending chore), we have instead designed 3 simple ‘generic’ sequences to allow you to…

•  handle any CL record that you may ever encounter, and/or 

•  ‘trap’ and output code whenever any variable is updated (typically by data coming in from the CL

file).

Giving you the ability to handle these conditions yourself frees us at Ground Support to spend our time

developing other features, rather than being bogged down by continual addition of an unending list of dedicated sequences and conditions.

These 3 sequences are very handy – they allow you to handle many unusual situations. In a nutshell...

Upon is used to set any variables, output any desired code, or execute

 particular post commands whenever a particular [variable] is

updated.

UponRec and Cycle let you handle non-standard or custom records in the CL file.(Similar to Upon, you may use these sequences to set any variables,

output any desired code, or execute any post commands.)

All three of these sequences can be used to override PostHaste's 'default' manner of handling any variablesor incoming CL records.

The sections below discuss the details pertaining to the Upon, UponRec and  Cycle sequences.

Upon

You can use the Upon & UponRec sequences to output a sequence of blocks whenever a particular 

variable is updated by the CL (incoming tool motion) file. It can be used as in the following example:Upon [ Wor k]

Page 66: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 66/132

G[ Wor k]X[ H] Y[V] Z[ D]end

The variable after the UPON (in this case [Work]) is called the “trigger” variable.

In this example, when the [WORK] variable is CHANGED, it “triggers” this sequence to be executed. By

default, if the value of [Work] has NOT changed, then no action will occur. Also, even if the value has been changed, the action will NOT occur if the next line or sequence to be output already has that

variable in it - because PostHaste expects that sequence to handle it instead.

Important note: Standard Upon sequences (those that do NOT use the Every or Unique modifiers) are

 not executed immediately – they are output (only if needed) just before the next sequence is output. Inother words, the post waits until it is time to output the next sequence (whatever it is) before it executes the

Upon sequence(s). We do this to prevent 'double output' of particular codes. A good example of this is whathappens if you use Upon [Cool]...

It is common that the coolant status would be different (on vs. off) when using different tools. It is lesscommon that the coolant setting would change in between cutting operations using the same tool – but

since you may want your post to handle that situation, you might include an Upon [Cool] sequence likethis:

  Upon [ Cool ]  M[ Cool ]  end

If the post output that sequence immediately, then you would get an extra (unneeded) coolant command (M8 or M9) just before a tool change is output, so the post 'waits' until it has to output the next sequence

and then checks that sequence to see if the 'trigger' variable (in this case, [Cool]) is in it:

  If the [Cool] variable is in the upcoming sequence (as it usually is in the ToolChange sequence),

  then the Upon [Cool] sequence is not output.

  If the [Cool] variable is not in the upcoming sequence (as it isn't  in a typical RapidCode sequence),  then the Upon [Cool] sequence is output.

In this example, the Upon [Cool] sequence would be output before rapid moves (if the coolant status haschanged), but not before a typical ToolChange sequence (because a typical ToolChange sequence contains

a [Cool] variable).

The Every, PreScan and Unique modifiers

As discussed above, the standard Upon sequence is only executed...

  when the value changes AND

  the upcoming sequence does NOT include the trigger variable.

There are, however 3 modifiers that you can use with the Upon sequence to change that behavior: Every,PreScan and Unique. Using any of these 3 modifiers will result in the Upon sequence being executed immediately (that is, without checking the next upcoming sequence for the existence of the trigger 

variable).

  Use the Every modifier if you want to force the output of the sequence every time the variable is

updated - even if the value has NOT been changed (in other words, every time the CL file [or your template] updates the variable – even if it is updated with the same value that is already stored in

that variable). Do this by adding the word 'Every'  before the variable as in this example:

Page 67: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 67/132

Upon every  [ Wor k]  . . .  . . .End

(Remember - the capitalization of the letters in commands and variable names doesn't matter.However, the NC “words” ARE case-sensitive, so don't put “g0” in a sequence if you really want

“G0”.)

 

The PreScan modifier is used when you want to output code (or set variables or execute postcommands) when the post is in its 'prescan' phase – which it does under certain conditions. (The post knows when it needs to do a 'prescan' of the CL file, so you don't have to worry about that

yourself.)

Upon Prescan  [ Tool ]! 0 O[ Val 1] T[Tool ] M6G0 X0 Z10 M0G1 Z1 F. 75 M0Add 10 t o [ Val 1]end

 Note that the PreScan version of the Upon sequence has rather limited usefulness – the trigger variable can only be one that is actually read from the CL file in its (limited) prescan phase: [Tool],[Depth], [ILevel] or [RLevel]

  The Unique modifier will cause the Upon sequence to be output only when the value of the

trigger variable is updated to a unique (or 'new' one) – that is, only when the variable is set to a

value that it has never been set to before.

Furthermore, the Unique modifier requires the use of a letter to 'format' the variable to (the B in the

example below). This allows you much more control over what happens, because all of the letter formatting options can be used to determine what qualifies as 'unique'. For example, if the letter B

(the one associated with the trigger variable) uses the MOD 360 (modulo) modifier, then a[RotAngle] of 390 degrees will result in the same output as 30 degrees, so even though the variable

value is different, the Upon Unique sequence below will be output only on the first one.

This can be used to...

o  create tool lists (because you don't want to add a 'repeated' tool to the list), or...

o  create 'rotary axis indexing subroutines' as in this example:

Upon Unique  B[ Rot Angl e] Cr eat e t he i ndexi ng subs i n f i l e # 1.Fi l e On 1 Onl yo[RotAngl e]

M11G90 G00 B[ Rot Angl e] M10G10 G55 x999. 999 y999. 999 z999. 999M99Fi l e On Mai n Onl yend ( end Upon Uni que B[ Rot Angl e] )

The Relate option for 'Upon ... Unique' sequences:

Sometimes, you need to have 2 different values (variables) in your post related to each other. A good example of this would be to relate the [Work] variable to the [RotAngle] variable so that corresponding

Page 68: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 68/132

work offset (G54, G55, etc.) value is output according to the side of the part that you are currentlymachining. (Of course, some CAM systems output the [Work] data in the CL file whenever an indexing

motion takes place, but some do not. The Relate option gives us a way to handle problems that arise

when the CAM system does not already give us properly 'related' data in the CL file .)

The example below relates the [Work] variable to the [RotAngle] variable, so that whenever a particular face of the part (B angle) is accessed, the post automatically updates the [Work] variable* so the same

[Work] value (G54, G55, etc.) is always active* whenever that face is being machined.

  Whenever a "new" B angl e i s f ound, cal cul ate a new [ Work] of f set val ue  and RELATE i t t he RotAngl e f or each f ace:Upon Unique  b[RotAngle]  RELATE [Work] Add 1 t o [ Face#] << I ncrement t he ' f ace counter ' andSet [ Work] t o [ Face#] +53 << cal cul ate t he r el ated [ Work] val ue.end

* Please note that the Relate function causes the [Work] variable to be automatically updated - not output!The actual outputting of the G54, G55, etc. would be controlled in some other area of the post. In the case

of example above, it would probably be output in an Index or ToolChange sequence (because that's whereB axis indexing moves are typically output). The Relate function (in this case) simply makes sure that

whenever the [RotAngle] variable is changed, the post will automatically change the value in the [Work]

variable to 'keep the work offset in synch' with the [RotAngle] changes.(Note: The [Face#] variable in the example above is a 'user defined' variable that has been created with the Rename function. See section 4.1.26 for details on using the Rename command.)

UponRec and Cycle

These are similar to the Upon sequence, but these are triggered when the post reads a particular CL record.

These let you...

-  handle 'user-defined', non-standard or special-purpose CL records and cycles.

-  override the way that the post handles any CL records.

Before we get into explaining all of the details, let's just take a look at a quick example...

If you want to output an 'optional stop' (typically M1) code whenever an OPSTOP record appears in the CL

file, you would simply add this to your template:

UponRec OPSTOPM1

Comment s (Note - the Comments line isn't required, but might be a good idea...)

end

In the simplest form of an UponRec sequence (as shown above), all you need to do is to make sure that the

word following UponRec matches the actual name of the record that is coming in from the CL file.

The above is the simplest form of an UponRec sequence, as there is no actual numerical data being passed 

in from the CL file.

Here are some more examples that show how to handle records that pass numerical data...

--- Excerpt from CL file: ---  . . .  ETHEL/ 10. 01, 20. 02, 30. 03  CYCLE/FRED, 1. 1, 2. 2, 3. 3, 4. 4, 5. 5, 6. 6, 7. 7, 8. 8

Page 69: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 69/132

  GOTO / 1. 000, 2. 031, 0. 000  GOTO / 2. 000, 0. 844, 0. 000  GOTO / 3. 000, 2. 031, 0. 000  GOTO / 4. 000, 0. 844, 0. 000  CYCLE/OFF

  . . .

--- Excerpt from template file: ---  . . .  UponRec Ethel  [ Val 8] [ Val 9] [ Val 10]

  G67 X[ Val 8] Y[ Val 9] Z[ Val 10]  end

  CYCLE FRED  3 [ Val 1] [ Val 2] [ Val 3] [ Val 4] [ Val 5] [ Val 6] [ Val 7] [ Val 8]  G88 X[ Val 1] Y[Val 2] Z[ Val 3]  G89 X[ Val 6] Y[Val 7] Z[ Val 8]  G67 X[ H] Y[ V] Z[D]  G67 X[ H] Y[ V] Z[D]  end cancel  . . .

... When you run PostHaste with the above CL data and template sections, this code will appear:

  . . .  G67 X10. 01 Y20. 02 Z30. 03 < Thi s l i ne i s f r omt he ETHEL r ecor d/ sequence,  G88 X1. 1 Y2. 2 Z3. 3 < These are f rom the FRED cycl e.  G89 X6. 6 Y7. 7 Z8. 8 <  G67 X1. Y2. 031 Z0 <  G67 X2. Y0. 844 <  G67 X3. Y2. 031 <  G67 X4. Y0. 844 <  G80 <  . . .

 Note: Even though the "ETHEL" and "CYCLE/FRED" records are adjacent to each other in our example,

there is no additional relationship between them. (Much like it was in the original "I Love Lucy"... :-)You can use UponRec and Cycle sequences to "trap" CL records BEFORE they get to the post's "standard"

 processing. This lets you overrride PostHaste's processing of any standard records. Examples:

•  …to prevent LOADTL records from being processed by the post's internal tool change routines, use

an "UponRec Loadtl" sequence: your UponRec sequence will take precedence over the ToolChange

sequence (and therefore prevent the ToolChange sequence from being output).

•  If the "CYCLE/DRILL..." data in your CL file is NUMERIC ONLY (in other words, it does NOT

follow the normal text conventions for drilling cycles [FEDTO, RAPTO, etc.]), you can process

them by using a "Cycle Drill" statement in your PostForm file. This will prevent the post's standard  DRILL sequence from running and causing errors due to the non-standard portions of your 

CYCLE/DRILL records coming from the CL file.

As you may have noticed from the examples above, the template file is not case-sensitive when it comes to

CL record names - the terms LOADTL and LoadTl are identical as far as the template is concerned.

 Note - Make sure that the name of the record you use in the UponRec line is spelled exactly the same as the

actual name of the record in the CL file.

Page 70: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 70/132

Using variables with UponRec or Cycle to handle the incoming values

First of all, you probably noticed in the examples above that the UponRec and Cycle lines include some

variables, such as [Val1], etc. These variables store the specific values that are read from the incoming CLrecord.

Matching variables t o values.

For best results, the number of variables in the template should match the number of values coming in fromthe incoming CL record. If, however, there is a mismatch, NO ERROR MESSAGE WILL BEGENERATED.

•  If the number of variables is LESS than the number of values provided in the CL record, then all of the variables you have specified will get set according to the values, and the "leftover" incoming

values will be ignored.

•  If the number of variables is MORE than the number of values in the CL record, then the extra

variables will get set to zero.

By the way, "what's a VARIABLE and what's a VALUE?"The term "variable" refers to variables in the Postform file, such as [H] or [Tool] or [Val3]. (This is truethroughout this manual, so we're telling you nothing new here.)

The term "value" refers to a single numeric value (for example, the X position or a tool number) coming infrom the CL file.

Cycle (using variables)

Use the CYCLE  sequence to format a custom point-to-point (a.k.a. 'drilling') cycle. This means that you

want to process a series of GOTO lines that follow a particular record in the CL file. Each GOTO

will be interpreted as a point, just as in all other standard cycles (such as DRILL, PECK, TAP, etc.), untilthe CYCLE/OFF statement is reached.

Except for the following special conditions, all of the rules that apply to standard drilling operations also

apply to the CYCLE sequence - so you may want to review the "Canned Cycle" section of the manual (and especially the 'Advanced canned cycle control' information in section 5.2.2.4).

The minimum requirement for a CYCLE sequence is just the word CYCLE followed by another word - thatword being one that is not a standard APT cycle (such as DRILL, PECK, BORE, etc.) as in this example:

CYCLE FRED. . .. . .

end cancel (NOTE: The "cancel" is optional.)

You may also use up to 10 variables (or none at all), as well as the "Force?" option - as shown in the

example below.

 NOTE: If you use variables, then you MUST include the number of non-repeating 'first hole' lines

immediately after the custom cycle name (the number 0 in the example below):

CYCLE FRED 0 [ Val 1] [ St ep] [ RLevel ] [ . . . ] For ce? Y

Page 71: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 71/132

If you mistakenly omit the 'first hole' number, then you will probably get an error message when you runthe post like "the number of setup lines in the CYCLE line exceeds the number of lines in the cycle". This

is because PostHaste will interpret the internal value of the variable [Val1] (which happens to be 190)instead of a valid number.

If you're not clear on what that number does, then again, please review the section entitled "Advanced canned cycle control" (section 5.2.2.4).

More UponRec and Cycle examples

Here is a use of UponRec (combined with a Convert  command) to process incoming APPLY  records in a

'non-standard' way:

Conver t ' APPLY / LASER' t o ' APPLY / 1' Set Val 1 f l ag f or l aser .Conver t ' APPLY / PUNCH' t o ' APPLY / 0' I gnore: Appl y / Punch

Uponr ec APPLY [ Val 1] ( Val 1 = ' l aser on' f l ag. )i f [ Val 1] = 1  G25 e5 Repl ace ' e05' wi t h ' ( LASER OFFSET) '  M44  M45endi f end

Similarly, the Cycle sequence can be used to process any APT-CL CYCLE records that do not match thestandard cycles that PostHaste recognizes - like the example below which processes a CYCLE / WELD

record:

Cycl e WELDG89 G99 X[ H] Y[V] Z[ D] R[ RLevel ] F[ FRate] d[ Dwel l ]end cancel

5.2.5 CallMe and Call(User-defined sequences and 'reusing' sequences)

The CallMe and Call commands allow you to create and/or 'remotely' execute any sequence from other  places in the template, thereby eliminating the need to have identical lines of code in two (or more)

different places in your template. (This is commonly used to eliminate the need to have identical linesinside the ToolChange and 1stToolChange sequences, for example.)

•  Call is used (inside any sequence) wherever you want to execute (output) any other sequence. Youcan call any standard sequence (such as 1stToolChange), or sequences that you have defined 

yourself with the CallMe command (see immediately below).

•  CallMe can be used (outside of a sequence) to create new 'user-defined' sequence(s) to be called 

('reused' or 'remotely executed') from elsewhere.

Examples

Call  can be used to execute (or 'reuse') any standard sequence

Probably the most common (and sensible) use of the Call command would be in the ToolChange sequence,since the ToolChange sequence is usually just the same as the 1stToolChange sequence - with the addition

of a few lines at the beginning.

Page 72: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 72/132

This first example calls (executes) the 1stToolChange sequence from inside the ToolChange sequence

(after the first few lines have turned off the coolant and retracted the tool):

1st Tool Change T[ Tool ] M6G[ Work] G0 X[ H] Y[V] S[ Speed] M[ Di r ect ]G43 Z[ D] H[ Tool ]M[ Cool ]End

 Tool ChangeM9G0 G28 G91 Z0

Call 1stToolChange  << This single line takes the place of repeating the 4 lines found above in 1stToolChange.

End

CallMe can be used to create your own (a 'user-defined') sequence

 Note: Sequences that you create (with the CallMe command) do not get executed (output) until they areCalled from somewhere else in the template via a Call command.

CallMe DoSpeedI f Changed  << Creates the “DoSpeedIfChanged ” sequence.I f [ Val 1] <> [ Speed]  S[ Speed] NoEol  Set [ Val 1] t o [Speed]EndI f 

End (Note that CallMe sequences end with “End”, just like any other sequence.)

Rapi dCode

Call DoSpeedI f Changed. << Calls (outputs) the DoSpeedIfChanged  sequence.

G0 X[ H] Y[ V] Z[ D]End

5.3 Commands that can be used inside of sequences

As mentioned earlier, there are some commands that are used only inside the sequences. They will bediscussed here. (Commands that cannot be used in sequences are discussed in section 4.)

The commands described in this section are listed in alphabetical order.

5.3.1 Call

Call is used (inside any sequence) wherever you want to execute (output) any other sequence (including

sequences that you have defined yourself with the CallMe command). See section 5.2.5 for more details onCall (and how to create your own sequences with CallMe).

Page 73: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 73/132

5.3.2 Comments

The Comments command dictates exactly where comments will appear in the output. It can be used inany sequence, but it makes the most sense to put it in the 1stToolChange, ToolChange and RapidCode

sequences as in the examples below. (When working with 4 axis mill formats, then you should also includeone in your Index sequence.)

 Note: The Comments command replaces the earlier [CommentDelay] variable. We highly recommend that

you update any templates that you may have that use the [CommentDelay] variable so that they instead usethe (much better) Comments command.

When the template includes a Comments command, PostHaste will 'store' all comments coming in from theCL file (the PPRINT records) until a Comments command is found while processing the output. (Before

this command was available in PostHaste, the 'operation and/or tool change comments' would typicallyappear in the code before the ToolChange sequence started – which resulted in the comments appearing too

early in the code. This means that on most machines, the comments would scroll off the top of the screen by the time the tool change [M6] was executed.)

 NOTE: Because the post now 'stores' the comments coming in from the CL file until a Comments commandis executed, it is very important that you include a Comments command in all applicable sequences

(1stToolChange, ToolChange, RapidCode [and Index, when applicable]). If you do not do this, then thecomments for several operations may appear 'stacked up' in the same place in the code!

So, if your format includes RapidCode and/or Index sequences, make sure that there are Comments

 commands in them!

Examples:

Rapi dCode Rapi d moves w/ NO r ot ar y.Comments

G0 X[ H] Y[ V] Z[ D]end

1st Tool Change Fi r st t ool changeG0 G[ Wor k] G40 G80 G90 B0 T[ Tool ] M6Comments

G90 G0 X[ H] Y[ V]G43 Z[ D] S[Speed] M[ Di r ect ] H[ LComp]End

 Tool Change Secondary t ool changesM9g28 g91 Z0 T[ Tool ] M6Comments

G90 G0 G[ Wor k] X[H] Y[ V]G43 Z[ D] S[Speed] M[ Di r ect ] H[ Lcomp]End

5.3.3 If, Else and EndIf 

Please see section 7.5 ( If / Else Logic ) on page 84 for a discussion of this topic.

Page 74: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 74/132

5.3.4 File

In short, the 5 types of File commands give you control over both multiple output streams (or files) and multiple output styles that can either be routed into individual (or multiple) output files, or reorganized (in

any order) into a single file. (If you didn't understand that, it's OK - it can be complicated. We'll explain below...)

What the File commands can do for you

The File commands lets you route any or all selected lines of output data (generated by the sequence lines)

into one or more separate output files simultaneously. Then, you can either leave the output distributed among the individual files. or, if you like, you can merge some or all of the files back together into a single

(or even more than one) final output file.

This not only gives you a high degree of control over how the final output file(s) are handled, but also over 

how the CL data gets processed; you can process the same section of CL data in several different ways,

and then have the resulting output appear in multiple (different) locations within the same final

program file (or in separate files).

For example, it enables you to do these types of things (in addition to many more)...

Post the same CL data in several ways, then either - 'channel' the output of the different kinds of processing into different files, or - 'join' the separate files into a single finished NC program.

  Example: to create a 'tool list' at the top of your programs.

-  'Break' the code into 2 or more files.

(e.g. due to machine 'line number' limitations.)

-  'Sort' the post's output into several separate files

Example: every operation (or the motion for each tool) can be output to its own file.

-  Post programs for multiple machines simultaneously.

Create multiple output files for machines that require more than one file to perform a machining job.

You can temporarily use up to 100 individual output files simultaneously in addition to the 'main' file. (You

can actually create more than 100 files, but you can read or write only 100 of them simultaneously.)

The  main file is the 'usual' final program file that the post creates when you don't use any  File

commands (usually named the same as the incoming CL file, but with the .NCC extension).

How to use the File commands

Per the usage examples in the table below, the word File is always followed by 2 parameters:- the 1

st parameter is one of the six 'options' (Alias, Empty, Off , On, Insert or Edit), and then

- a file number.

The file number can be...

- a number from 1 to 100 (inclusive) or - a [variable] or an equation that evaluates to an integer from 1 to 100 (inclusive), or 

- it can be the word 'Main'. (This lets you control the 'main' output file.)

At this point, since you can only specify file by its number (not its 'name'), you may be wondering how to

create a file with a specific name... that's what the File Alias option is for. Read about it (and all of the other options) in the table below.

Page 75: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 75/132

Notes re the table below:

1.  The File command options are listed in the order that they are most likely to be used.

2.  Remember - in the examples here, the 1 can instead be a [variable] or equation or the word  Main .

Option Usage examples Purpose

 Alias * File Alias 1 'This file.txt' ...or...File Alias [Val19] 'This.txt' ...or...File Alias [Tool]+5 {CLName} '.cmd'  ...or...?

Use this only  if you want to indicate a specific file name that you want to use as an'alias' of the file number indicated. That is all that this command does. (It does not 'empty'the file or turn it on or off.)

From then on, simply use the file number (in this case, 1 ) for any Empty, On, Off, Edit or Insert operations; the post automatically keeps track of the actual file name. (This preventsyou from having to have the file name text in multiple locations in your template [whichcould lead to lots of confusion in the case of file names that are based on variables!].)

Note: If you just want to use a 'temporary' file (and you don't care what its name is),then do NOT use the File Alias command.

Because the Alias option does  nothing but substitute a name for the file number , youwill almost always follow every File Alias _ command with a matching...

-  File Empty _  command (to create a new, empty file) or a

File Insert _  command (to read the contents of a certain file into the other filesthat are 'on' [see 'File On' below]).

---The first example on the left will cause any subsequent operations on file 1 to actuallyoperate on the file called This file.txt  instead of the ..\Temp\1 file.

 As you can see from the other examples on the left, the file name can be a 'hard-coded filename' or a {text variable} or any combination of 'hard-coded text', {text variables} and even[Numeric variables].

Numeric variables (such as [Tool] or [RotAngle]) will be formatted to output the 'simplest'text that represents the number – no leading or trailing zeroes, no trailing decimalpoints – regardless of any number formatting used elsewhere in the template. ( Examples:0 or 1 or 180 or .5 )

Note: If you don't specify a folder, the file will be created in the same folder as your mainoutput file.

Note: Don't use the Alias option more than once per file number (because this will

'overwrite' the file) – unless you first use the Insert option to 'copy' its contents into another file(s).

Empty * File Empty1  ...or...File Empty [Tool] ...or...File Alias [Val3]+1  ...or...?

Empty creates a file that is initially empty; use Empty when you just need to use a'temporary' file and you don't care what its name is . For example, when you just needto store some output that will be 'inserted' back into the main (or other) file later.

Note: Since the Empty option only uses a number (it doesn't let you specify a file name), itwill create a file called (in this case) 1  (with no extension - in the ..\Temp folder underneaththe folder that PostHaste.exe is in).

NOTE: You MUST use Empty when you want to start wit h a 'fresh' (empty) file. If youdo NOT use Empty (i.e. if File ON 1 is executed before File Empty 1 ), then you will beappending information to the (existing) .. \Temp \1 file!

Page 76: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 76/132

Option Usage examples Purpose

On File On 1 ...or...File On Main ...or...File On [Tool]

Note: Using the 'Only” option:

File On 1 Only  ...or...File On MainOnly  ...or...File On [Tool] Only

Use the ON option when you want to start (or resume) outputting data to a specific filenumber. Any sequence lines executed after a File On _ command is executed will be outputto the file number specified (as well as any other files that are also in the 'on' state) untilthe post executes a corresponding File Off _ command. (The file will also be turned off if a'File On... ONLY' command is processed for any other file number [see “the ONLY option”below].

Note: The 'Main' file is ON by default when the post starts p rocessing, so if you don'twant it on to start with, then you must turn if off with a File Off Main  command in your 

StartCode sequence. (Or, you can use a 'File On... ONLY' command to turn on 'only' someother file – thus turning off the main file.)

  The “ ONLY” option:

You should make it a habit to use the ONLY option whenever applicable in your FILE ONcommands. Adding 'ONLY' to the end of t he l ine turns of f al l o ther fi les , leaving 'only'the specified file in the 'on' state. (This eliminates the need for mos t FILE OFFcommands, which makes your template much cleaner looking and easier tounderstand .) In other words, use the ONLY option when you only want 1 file on at a time.(Obviously, if you need more that one file on at a time, you would NOT use ONLY.)

Off  File Off 1 ...or...File Off Main ...or...File Off [Val12]+[Sub] ...

This is the opposite of the ON option: use the OFF option when you want to stop includingthe upcoming code in a certain file (or files). This condition also persists until a File ON _command is processed for the same file number.

Insert File Insert 1 ...or...

File Insert [Val4]

Use this to copy the contents of any file into any other file(s) that are ON. See the EndCodesequence in the 'tool list' example below (section 5.3.4.1) for a good example of how this isdone.

NOTE: If you don't turn OFF a file before you 'insert' it into another, the post willautomatically turn it off first – to prevent it from attempting to 'insert into itself'. (After theINSERT operation, the file will be left in the OFF condition.)

Edit File Edit 1 ...or...File Edit [Tool]

This option causes the post to 'execute' the file – which in most cases should result in itbeing opened by an editor (such as WordPad, NotePad or Microsoft Word, etc.)

Depending on how you have your system's Windows' File associations set up, this couldcause a file to be opened in any application you choose ( - a communications package, for instance, to send a NC program to one of your machines). To set up Windows' Fileassociations, use Windows Explorer and go to the Folder Options choice in the View menu.

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

You may have multiple File Edit _ commands in your post, and you can even 'edit' thesame file number more than once – but only if you use File Alias commandsexecuted somewhere between the File Edit  commands so th at the file number is'reassigned' to different file names - so that you are not trying to 'edit' the samephysical file more than once.

NOTES:

1.  This command will NOT execute the file unless PostHaste's AutoOpen feature isenabled. (See the 'AutoOpen?' switch in the PostHaste.CFG file [Appendix A of theGetting Started manual].)

2.  Since the AutoOpen feature automatically opens the 'main' file, you will never need to use the command File Edit Main

* Important notes re the Alias and Empty commands...

1.  The Alias and Empty commands do NOT turn a file on.

- Alias does nothing more than associate a file name with a file number, and 

- Empty simply empties a file and get it ready for use later in the process.  (You must specifically give a File On _ command to start outputting to any file.)

2.  The Empty and Alias commands cannot be used with 'Main' file. The post automatically creates anempty 'main' (final program) file (just as it always does when you are not using File commands).

Page 77: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 77/132

5.3.4.1 'File' usage example: Creating a 'too l list ' at the top of theprogram.

This example template excerpt in the chart below uses 'temporary' files to process 2 parts of the output,then merges them (in EndCode) back into the main output file - to output a final file that starts with a 'tool

list' (consisting of the 'operation comments' that are in the CL data) like this:%

O123

( TOOL # 1 )

( T1 - 1/ 4 REM - RUFF 1 HOLE FOR PI N)( TOOL # 5 )

( T5 - 1/ 4 FEM - FI N 1 HOLE FOR PI N)

( TOOL # 4 )

( T4 - 1/ 4 REM - RUFF 5 OD CUTOUTS)

( TOOL # 5 )

( T5 - 1/ 4 FEM - FI N. 5 OD CUTOUTS)

( TOOL # 9 )

( T9 - 5/ 8 45 DEG. 1- FL. CHAM. - CHAM 6 CUTOUTS [PGM AT . 060 DI AM] )

G17 G40 G80 G90

 T1 M6

. . .

 Note: For brevity, the example below doesn't show the entire template - only the applicable sequences.

  ...

Replace 't' with '(TOOL # ' << For 'Tool #' comment.

StartCode

%0 << These 2 lines go into the 'main' file, by default.

O123

File Empty 1 << File 1 will be the tool list.

File Empty 2 << File 2 is the 'bulk' of the program.

File on 2 Only   << Turn on the 'bulk of the pgm. code' file

G17 G40 G80 G90

End (StartCode)

1stToolChange

T[Tool] M6

File on 1 << Turn on the 'tool list' file to get the

t[Tool] )0 (TOOL # _ ) comment and the

Comments op comments, then

File off 1 turn off the 'tool list' file.M[Direct] S[Speed]

G0 G54 X[H] Y[V]

G43 Z[D] H[Lcomp]M[Cool]End

ToolChangeM9

G49 Z0 M5

T[Tool] M6

File on 1 << Turn on the 'tool list' file to get the

t[Tool] )0 (TOOL # _ ) comment and the

Comments  op comments, then

File off 1 turn off the 'tool list' file.M[Direct] S[Speed]

G0 X[H] Y[V]

G43 Z[D] H[Lcomp]

M[Cool]

End

EndCode

File On Main Only   << Finally, turn on the main (_.NCC) file,

(Note that this turns OFF the 'bulk' fil e [#2]).

File Insert 1 then append the Tool list, andFile Insert 2 the rest of the code into the main file.

M9 continue outputting the 'end program' lines...

G90 G0 G49 Z0 M5

X0 Y0

M30

%0

End

 Note: The example above is an excerpt from the Tool List.pm3 file that is included in the standard postformat library.

Page 78: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 78/132

5.3.5 NoEol and EOL

Using NoEOL allows you to build a single line of output code (in a 'piece by piece' fashion) by 'stringingtogether' two or more sequence lines from your template. (In other words, when you want to create a single

line of output code from MORE than a single sequence line.)

The NoEOL (literally, “NO End Of Line”) command suppresses the 'end of line' characters that PostHaste

automatically outputs at the end of each code sequence line.

(Note - These are unique commands, as they are the only ones that can be used in a sequence on the sameline as other output codes. All of the other commands [such as Comments, File, IF and  Set ] are always onlines by themselves and don't generate any output code.)

Here's an example of how you might use NoEol. In this case - a combination punch press with a laser head - the user wanted a G61 to appear on the first cutting move, but only if the machine was in 'laser' mode (not

 punching). Here's how we did it: (Only the applicable sections of the template are shown, alsodemonstrating the Convert and  UponRec commands.)

Convert "APPLY / LASER" to "APPLY / 1"  For Val 2 l aser f l ag.Conver t "APPLY / PUNCH" t o "APPLY / 0" I gnor e: Appl y / Punch

Uponrec Apply [Val2] Val2 = 'laser on' flag.

end

 Tool ChangeG0 H[ H] Y[ V]if [Val2] = 1 (Laser)

  M64 ' ( LASER ON) '  M66  G4 p100 M68

  G61 NoEOL  << NoEOL 'delays' the output of G61 to put it on the NEXT line! (1st cutting laser move).

endi f   End ( Tool Change)

5.3.5.1 EOL

Use this command (somewhere after  NoEol command[s] are used) if you need to show where you want aline to be ended. You will NEVER need to use this command unless the last word that you want to be output 

on the line is accompanied by a NoEol command. (In other words, EOL cannot  be used to output blank lines. Use the exclamation point for outputting blank lines - see section 0 for details on that.)

Below is a good example of how the EOL command is used (along with some NoEol commands, of course). In this example, we want to prevent PostHaste from 'repeating' the first XY location in a drill cycle

(where the machine requires that the XY location is on a separate line from the rest of the drilling code).Since PostHaste treats all codes for the first hole of a drilling cycle as non-modal, the first XY position in

the cycle is redundant (because PostHaste also always generates a rapid move to the XY position above thefirst hole location before a drill cycle is started). We use the following lines inside the Drill sequence to

suppress the (redundant) XY location of the first hole :

Set [ Val 1] t o 0 Val1 is a flag for 'X or Y has been output'.

i f [ H] <> [ Last H] If X has changed, then

  X[ H]  NoEol  Output it (with no EOL), and 

  Set [ Val 1] t o 1 set the 'has been output' flag.

endi f 

Page 79: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 79/132

i f [ V] <> [ Last V] Same for Y...

  Y[ V]  NoEol  Set [ Val 1] t o 1endi f 

i f [ Val 1] = 1 If X or Y has been output, then

  Eol  output the EOL to end the line.

Endi f 

 Note: If we had left out the EOL section above, then the X and/or Y would be placed on the next  line of code (because of the  NoEOL commands on the X and Y lines), instead of being output on their own line.

5.3.6 Set

Set  is a command that can be used inside a sequence (only) to set (or 'assign') the value of any variable.

There are any number of reasons you may want to do this - it's limited only by your imagination. One of themost common uses is to use it in conjunction with “If/Then/Else” logic to control the output of certain

codes. (See section 7.5 for information on the use of “If/Then/Else” logic.)

Example:In this first example, we have a machine that uses a G code to dictate any one of 5 spindle speed ranges(from G65 to G69). We will SET [Range] to the proper spindle range. We show it here in the

1stToolChange sequence, but you'd also put it in the ToolChange and RapidCode sequences as well.(We've added blank lines to the examples for clarity - they don't affect operation of the post...)

1st Tool ChangeG0 G90 G80 G40 G17 T[ Tool ] M6

SET [Range]  t o 65 Thi s l i ne set s t he "under 1000 RPM" spi ndl e r ange.

i f [ Speed] > 1000 Thi s I F st r uct ur e set s t he r ange i f t he SET [Range]  t o 66 speed exceeds t he 1st gear r ange.endi f 

i f [ Speed] > 2000 . . . and we do i t agai n, one I F/ SET st r uct ur e f or SET [Range]  t o 67 each r ange you want .endi f 

i f [ Speed] > 3000 SET [Range]  t o 68endi f 

i f [ Speed] > 4000 SET [Range] t o 69

endi f 

G[Range]  M[ Di r ect ] S[ Speed] This line actually outputs the code.

G0 G[ Wor k] X[ H] Y[ V]G43 Z[D] H[ Lcomp]M[ Cool ]End ( end of 1st Tool Change)

Page 80: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 80/132

Another Example:

If your machine requires the spindle to be stopped before gear changes, then we will need to set up the

RapidCode sequence to stop the spindle if a gear change is needed. (Remember, RapidCode is used whenyou want to override the post's default way of handling rapid moves.) To detect if a gear change is needed,

we'll use the SET feature to "memorize" the previous range, then use an IF statement to compare the previous range to the new range. If it's different, then we'll stop the spindle before outputting the new speed 

range code.

First of all, add the Set line in the following example AS THE LAST LINE (just before the "end") in the1stToolChange and ToolChange sequences...

1st Tool Change ( do t he same i n your Tool Change sequence. ). . .M[ Cool ]Set [Val2] to [Range] ( Thi s ' memor i zes' t he spi ndl e r ange i n [ Val 2] . )End ( end of 1st Tool Change)

...this will cause Val2 to "memorize" the spindle range that was just output. (You'll also notice that this will become the last line of the RapidCode sequence shown below...)

 Now, Add IF structures to the RapidCode sequence to make it look like this:

Rapi dCode. . . ( We di dn' t bother showi ng al l t he same r ange codes t hat. . . were al r eady shown i n t he above exampl e, but i n a r eal. . . f or mat t hey shoul d be her e. )

i f [ Speed] > 4000 ( These 3 l i nes are t he same as i n t he above  SET [ Val 1] t o 69 exampl e - t hey set t he hi gh r ange. . . )endi f 

  v- - - THESE LI NES ARE ADDED TO CHECK FOR SPI NDLE STOP - - - V

if [Range] <> [Val2] If range has changed, then

 M5 M5 to stop the spindle before...

endif

G[ Val 1] M[ Di r ect ] S[ Speed] . . . t he gear change.G0 X[ H] Y[ V] Z[ D] The r api d movement i s out put her e.Set [Val2] to [Range]  Finally, memorize the gear range again

  for the next time around.

END ( end of Rapi dCode)

5.3.6.1 Limitations of SET commands

You may have up to 200 Set  commands per machine format. (That's a LOT – if you think you need more,

then there's probably a much better way to create the output that you need, so take a minute to re-think your strategy.) Here are the rules regarding Set  commands (as you've already seen in the examples above):

-  the first parameter must be any [variable]; the second can be a variable, a numeral, or an equation.

-  the two parameters are separated by the word "to" (upper, lower or 'mixed' case doesn't matter)

-  Set commands are only allowed inside of sequences.

Page 81: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 81/132

6. Work Fixture Offsets (G54, etc.):how they [Work]

Because they drastically affect overall positioning of your machine as well as individual movements, work 

offsets (including usage of the [Work] variable) are taken very seriously by the post. Having wrong or missing work offsets could easily cause you to crash your machine! For this reason, when it comes to

outputting work offsets, PostHaste...

•   NEVER ignores them,

•   NEVER "makes them up",

•  ALWAYS outputs ALL work offset changes, and 

•   NEVER leaves room for ambiguity.

The only way PostHaste WON'T output them is if you set up your format template AND your tool path

data to specifically NOT use them. (The details of how to do this are also discussed below.)

The 3 issues (in the format template) that control Work offsets

There are 3 things in the template that affect how and when the work offsets are output. (They are listed and described briefly here, and discussed in more detail below.)

•  Factors 1 and 2 are usually found in the "miscellaneous parameters" area of the template: you canhave lines that start with WORK or WORKDEFAULT as in the examples here:

Wor k G - This tells the post what letter to use for work offsets.

WorkDef aul t 54 - If the post asks you for an offset, this will be the

  default value shown..

•  The third factor is the use of the [Work] variable in the code sequences. Using the [Work] variableANYWHERE may also affect the way work offsets changes are output EVERYWHERE ELSE in

your program. Read about the [Work] variable below.

Work offsets "in a nutshell"

If you want work offsets to appear in your programs, then all you really need is to either...

•  Use the [Work] variable in your 1stToolChange and ToolChange sequences. This will allow you

to control EXACTLY where the first "G54" appears. (Subsequent offset changes will

automatically be output wherever needed - with whatever letter you placed before [Work] -usually G.)

  OR...

•  Put a "Work G" (or equivalent) line in your format. (We recommend putting it in 'section 2' of 

your template - among the other commands & switches.) This will tell the post to just put themwherever they're really needed (...and to prompt you for offset numbers if they aren't in the CL

data).

(Also, we recommend that if you want the "default" work offset to be something other than 54, then add a

WorkDefault line to your format.)

Page 82: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 82/132

That's it.

But, what if you DON'T want work offsets in your NC programs?

To completely eliminate work offsets from appearing in the code, you must do 2 things:

1. Eliminate all reference to work offsets in your template file - that is, make sure that you are

 NOT using the Work or WorkDefault  command, and make sure that you are not using the [Work]

variable in any of your sequences.

2. Do NOT allow any work offset numbers (other than ZERO) into your tool path data (CL file).

 NOTE: If you have done step number 1 (eliminated 'work' from your PostForm), but your tool path (CL)

data still contains non-aero work offset numbers, THE POST WILL DISPLAY AN ERROR MESSAGE

AND ABORT! (Because work offsets are just TOO important to leave to ambiguity!)

Handling 'non-standard ' work offsets (G54.1 P_ , G15 H_ ... etc.)

Many machines now support 'extended work offsets' or require the use of work offsets that do not follow

the traditional 'G54 to G59' scheme. Here are some examples...Fanuc 'extended offsets': up to P48 or beyond:

  G54.1 P1 G54.1 P2 G54.1 P3 ... etc.

Siemens style work offsets:

  G15 H1 G15 H2 G15 H3 ... etc.

Fortunately, most of these can be supported by the use of a single Replace command coupled with a unique

letter. Here's a good way to do it:

First, in the letter formats, add a unique letter (that will only be used for work offsets): p >3 The letter that will be 'replaced'

 Next, add the Replace command that will replace the p with all of the code needed, up to the actual

work offset number:Replace 'p' with 'G54.1 P'

Then add the related work offset commands in the 'commands and switches' section: Work p

 WorkDefault 1

Finally, in the sequences, always use the unique letter (in this case, p) for your work offsets:... p[Work] ...

In the case of the Siemens post, we would do the same as the above with the exception of the Replacecommand, which would read:

Repl ace ' p' wi t h ' G15 H'

Details, details, details...

 Now, the logic behind how PostHaste actually DOES all of this dirty work (and exactly how it affects your finished programs) may still be a bit of a mystery to you. If you want to know "everything you ever wanted 

to know about how PostHaste handles work offsets but didn't really know what to ask", then read on - all of the gory details about each of these factors is discussed below - including, of course, their effect on the

finished programs.

Page 83: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 83/132

If you're not that ambitious, then just remember that the information is here if you should ever need it...

The Work line

In the 'miscellaneous parameters' section of the template , the Work line does 3 things.

1. It tells the post that there must be work offset codes placed into the finished program.  (Whether

or not the [Work] variable is ever used in any sequences.)

By default, the post puts the work offset into rapid moves. (This is a modal function - it will onlyoutput it - once - after every change in the [Work] value.) NOTE: IF YOU USE A RAPIDCODESEQUENCE, YOU WILL BE OVERRIDING THE POST'S AUTOMATIC WORK OFFSET

OUTPUT. So... make sure that you include a "G[Work]" (or equivalent) in any RapidCodesequence that you use.

2. It tells the post what letter to place before the work offset when it is necessary to output one. The post will automatically put in the code whenever the work offset is CHANGED somewhere in the

 job. The G54 (or equivalent) will appear on the line with the next X,Y and/or Z movement (rapid OR feed move).

  Please note that Use of the "Work G" line will NOT tell the post to output the work offset at the beginning of the program - to control the exact location, we recommend that you put a G[Work] (or 

equivalent) somewhere in your 1stToolChange and ToolChange sequences.

3. Finally, it tells the post that if, while reading from the CL data, a movement is found before the

work offset value has been set, to ask you for the work offset number to use. (See"WorkDefault" below.)

The WorkDefault line

The number on the WorkDefault line is simply the default value that you see when the post asks you toenter a work offset number. If you do not  have a WorkDefault line, the default will be 54 (as it is the first

work offset number in most popular milling controllers). NOTE: Most Fadal users will want to use "Work E" and "WorkDefault 1" - which will correspond to an E1

code being placed in your programs (upon your approval).

 Note: Whatever the default number is, the post will NEVER put the "default" work offset into your code

"automatically" - it will always ask you for the value first (that is, again, if there is NOT one in theincoming CL data).

The [Work] variable (used in the sequences)

The [Work] variable lets you determine exactly where the work offset codes should be placed in your 

finished program. As mentioned above, we recommend that you put them in your 1stToolChange and ToolChange sequences, like the example here:

  1st Tool Change  T[Tool ] M6  M[ Di r ect ] S[ Speed]

  G0 G[Work]  X[ H] Y[ V] <<< Here's the G[Work]

  G43 Z[D] H[Lcomp]  M[ Cool ]  End

Page 84: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 84/132

NOTE: The [Work] variable also performs exactly the same functions as the "work g" line discussed

above - the letter before the first  [Work] variable in your machine format becomes the letter that the postwill output if the work offset is changed later in your program. Understanding that, you will realize that this

means that if you use a [Work] variable in your format, that you don't need a "Work G" line (asmentioned above in the "in a nutshell" section).

Changing [Work] offsets between drilling cycles.

Even though the G[Work] is automatically output in the post's 'default' rapid moves, normally you won'tsee G54's (et al) between drilling cycles. This is because most machines don't require rapid moves between

drilling cycles, so PostHaste does NOT output them by default. (Hence you normally won't see G54's beingoutput between drilling cycles.)

HOWEVER, adding [Work] changes between drilling cycles is very straightforward; just add G[Work] toyour drilling cycles.

EXAMPLES:

Choose either one of these easy methods:

1. To get a "G54" on the G81 line, simply add G[Work] to your "G81" line like this:

Dr i l l

G[Work] G81 X[ H] Y[V] Z[ D] R[ RLevel ] F[ FRate]

End

This will result in outputting your drilling like this:

G54 G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0

G80

G55  G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0

G80

. . .

2. To get the G54 BEFORE your "G81" line, Add G[Work] on its own line like this...

Dr i l l

G[Work]

G81 X[ H] Y[V] Z[ D] R[ RLevel ] F[ FRate]

...which will result in drilling like this:

G54

G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0

G80

G55

G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0

G80

. . .

Page 85: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 85/132

Getting ri d of redundant G54 (et al) codes

Sometimes, when you have used the [Work] variable in several places in your template, you may get

redundant G54s (as you might if you have [Work] in your ToolChange sequence and you used the abovemethods of outputting G54 between drilling cycles) like this:

 T2 M6

G0 G90 G54  X2. Y2. S6000 M3 <<< This G54 is output by the ToolChange sequence...

G43 Z1. H2 M8

G54 <<< ...and this G54 is output by the Drill sequence.G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0G80

G55

G81 X2. Y2. Z- 0. 2 R0. 05 F30. 0G80. . .

If you want to get rid of the redundant G54 (on 1st drill cycle after ToolChange), then simply use a

different letter for WORK, and format that letter to output a modal G. These lines from a sample templateshow how we used a lower case "g" to do the job:

g >2 G Modal  <<< Add this line to the 'letter format' section,

 Work g <<< Add this line to the 'commands and switches' section,

 Tool Change T[ Tool ] M6M[ Di r ect ] S[ Speed]

g[Work]  G0 X[ H] Y[V] <<< Check ALL of your sequences; use g[Work] here...

G43 Z[D] H[ Lcomp]M[ Cool ]End

Dr i l l

g[Work] G81. . . <<< ...and here. (AND everywhere else [Work] is used!)end cancel. . .

 Note: If you use this tactic, make sure that you always use the proper letter  (in this case 'g')

with [Work] - throughout your format.

Page 86: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 86/132

7. Special features

This section lists special features of PostHaste that help in formatting for various conditions. These features

include...

•  using equations (including Mathematical symbols and functions) in your templates

• 

outputting text directly (and the use of text variables)

•  suppressing line numbers on individual lines and outputting blank lines

•  the “Search and replace” function

•  “If / Else Logic” to control the output of certain lines of code

•  Outputting subs (subprograms or subroutines), and the automatic 'multiple part' program feature

•  the PostHaste.log file, which helps you 'debug' your template

Page 87: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 87/132

7.1 Using Equations (mathematical operations)

Instead of simple numbers or variables, you may use equations in any area within any sequence wherever 

you would like to output or reference values that are based on mathematical relationships between 2 or 

more variables and/or numbers.In the following places, you may use equations:  - To 'output' a numeric value following any formatted letter inside any sequence

  - As the 'second parameter' in a Set  command   - in a File Alias command 

Here are some examples (the equations are in bold type):

St art CodeSet [ Val 2] t o [Program#]+53. . .

 Tool ChangeFi l e Al i as 1 ' SUB' 7999+[Tool] ' . NCC'. . .

G0 X[H]/2  Y[ V] (Note that the equation follows the letter X; the letter X is NOT part of the equation.)

. . .

Li neCode

X[H]*cos([RotAngle])  Y[V] Z[ D] (the asterisk * does a 'multiply' function)

end.

 Needless to say, there are many things that you can do with equations - the possibilities are endless...

...But you must be careful not to attempt 'impossible' or 'undefined' mathematical operations.

Examples: The following equations would yield an 'undefined' result (and cause an error):

  3. 1416/ [ H] (when [H] is zero, this would cause a 'divide by zero' failure.)

  atan([V]) (when the value [V] is zero, the 'arc tangent' function fails as well.)

7.1.1 Mathematical symbols and functions

You may use any of the mathematical symbols and functions in the tables below.

First, the mathematical symbols:

Symbol Meaning Example Notes:

* multiply X2*[H] Outputs X with 'double' the normal [H] value.

/ divide X[H]/2 Cuts the X value in half by dividing by two. (Be careful NOT to divide by zero!)

+ add D[Tool]+20  A handy way to offset your Diameter Offset number by 20 (or any number)

- subtract X[H]-8.03 Subtracting is a simple way of making a value 'incremental' from another! In thiscase the value output would be the [H] dimension 'measured incrementally fromX8.03'.

^ 'raise to the power of' Y[H]^2 'to the power of 2' means 'squared'.

Page 88: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 88/132

... and the functions. Please note that functions always use parentheses - put any value (or other equation)inside the parentheses, and the function returns the corresponding numerical value.

Function Meaning Example Notes:

abs( ) Absolute value Zabs([D]) You might use this in a Bridgeport drilling operation where Zvalues do not need the minus sign.

sqrt( ) Square root Rsqrt(sqr([H])+sqr([V])) Outputs R with the 'polar' distance from the origin to the currentXY (HV) position

sqr( ) Square (raise to the power of 2) (See above)

sin( ) Sine Ysin([Sweep]) Outputs the letter Y with the sine of the current arc's 'sweepangle'

cos( ) Cosine

tan( ) Tangent

asin( ) Arc Sine (Inverse sine) Casin([H]/[Val2]) Outputs the letter C with the angle that is the 'arc sine' of [H]divided by [Val2].

acos( ) Arc Cosine (Inverse cosine)

atan( ) Arc Tangent (Inverse Tangent) Aatan([V]/[H]) Outputs the letter A with the 'polar angle' from the origin to thecurrent XY (HV) position. Use an IF structure to keep thisfrom being executed when [H] or [V] are zero!

ln( ) Natural Logarithm

log( ) Logarithm

Hierarchy of operations & use of parentheses

You can do quite advanced calculations, and all calculations are done in 'standard hierarchical order':functions first, multiplication and division next, addition & subtraction last.

You may use parentheses to control the hierarchy of processing - as in this example:

 Y([V]+2)*tan([CAxis]) The parentheses result in adding 2 to [V] before multiplying by tan([Caxis]).

Without the parentheses, the multiplication would be done first, then the addition.

7.2 Suppressing line numbers and outputting blanklines

PostHaste regards the exclamation point “!” as a special character that can be used for 2 purposes...

Suppressing line numbers

First, it can cause the post to suppress line numbers as in the 'Program#' line of this example:

St art Code!0  O[ Pr ogram#] '!' Suppresses N number...

G90!0 '!' by itself causes blank line in output.

G54End

Page 89: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 89/132

This causes the first four lines of the NC program to look like this:O1234N1 G90

N2 G54

To achieve the desired effect, the exclamation point must be the first character on the line, so to use it for 

these purposes, you must have this line as the first line of the letter format section:! 00

Outputting blank lines

Also, if placed on a line by itself , the exclamation point will cause a blank line to be output (as in the

 blank line in between the G90 and G54 lines in the example above). If, for instance, you would like a blankline to appear at every tool change (to make it easier to see them in the program), you could do it this way:

 Tool ChangeM9G28 G49 Z0!0 << A blank line will appear here.

N[ Bl ock] M6G0 G40 G80 G[ Wor k] X[H] Y[ V]G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ]End

7.3 'Text output' and text {variables}

There are several things that you can do to process or output text. In our context, 'text' means any

information that does NOT fall into the strict adherence to the EIA standard of 'a letter followed by

a number'. Examples of text are: 'ABC' or 'TOOL DEF' or 'CYCLE83'There are quite a few different functions of the post that have to do with text...

•  You can output text directly by simply placing it within any sequence, enclosed in 'single quotes' or 

“double quotes”. This is called 'hard-coded' text, or 'direct text' output. (See examples below.)

•  You can use text and text variables (see below) to...

- specify file names and - output comments based on file names and other text information from the CL file.

The following sections discuss some of the possibilities.

7.3.1 Direct ('hard-coded') text output

To include text in your programs, just enclose the desired text in 'single quotes' or “double quotes”. You

can use either one, but the starting and ending quotes must match. In other words 'this is bad” because

the start quote is a single quote and the end quote is a double quote. Having mismatched quotes in your

template will cause problems. (We will discuss this in more detail below.)

Examples

1. If you would like to put your company name at the top of each program, then you could do so like this:

Page 90: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 90/132

Put this in your template... ...to get NC code output like this:

StartCode

“ %”

O[Program#]

'(PROGRAM BY FRED FARKLE FOR XYZ INC.)'

end

%

O123

(PROGRAM BY FRED FARKLE FOR XYZ INC.)

2. If your machine requires a series of characters or 'man-readable' words to start a drilling cycle (for example, “MCALL CYCLE83” instead of “G83”) then you can simply enter the text directly in your sequence like this:

Put this in your template... ...to get NC code output like this:

Peck

'MCALL CYCLE83' X[H] Y[V] Z[D] R[RLevel] F[FRate]

end cancel

MCALL CYCLE83 X1.11 Y2.22 Z-3.33 F20.

To output text that includes quotes (in other words, if you need to output “quote marks” into your  program), see the Notes regarding use of 'quotes'  discussion and examples under “Search and Replace”

(section 7.4) below.

7.3.2 Regarding use of 'quotes' (and outputting quotes inyour code)

When working with older formats, you may see "double quotes" instead of 'single quotes'. This is OK,PostHaste accepts either type of quote marks. We do this so that you can include quote marks inside the

actual text phrases. Just make sure of 2 things:

  1. If you use either type of quote character inside the phrase, use the other  type of quote at the start and 

end of the phrase, and 

  2. that you start and end the phrase with the same type of quote mark!

Examples: Notes:"Thi s ' phrase' i s l egal . " Single quotes are allowed within a double-quoted phrase.

' So i s t hi s. ' Normal.

"Thi s one won' t be a probl em, and" Use double quotes when you need to have a single quote (like “won't”) in the text.

' t hi s one i s "OK", t oo. ' Double quotes are OK inside a single-quoted phrase.

"But THI S one i s bad, ' Starts & ends with different quote types.

' t hi s one i s BAD al so, " Starts & ends with different quote types.

' and t hi s one won' t wor k ei t her . ' The wordwon't includes a single quote (an apostrophe). To fix this problem, use

"double quotes" to surround the phrase instead of 'single quotes'.

7.3.3 Using {text variables}

Text variables are the only variables that do not output numeric data - they output text. You can instantly

tell the difference between a text variable and a numeric variable by the type of bracket that is used: Numeric variables have [square brackets] and text variables have {curly brackets}. Since these output text

(not numeric values), they cannot be associated with a letter (as numeric variables always are, e.g.

Page 91: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 91/132

“M[Cool]”). Text variables may be simply output as 'free-standing' text (that is, without a letter in front of it). In other words, you would NOT do this:

G{Par t No} << This is NO GOOD!

Examples

  1. If you want a comment in your NC program that shows the name of the template file, you may includeone of these in your StartCode (or any other) sequence:

Sample template lines: Sample output:

' ( ' {Templ at eName} ' ) ' N20 ( Fanuc 6T Gener i c)' ( ' {Templ at eName} {Templ at eExt} ' ) ' N20 ( Fanuc 6T Gener i c. pT2)

  2. Text variables and/or numeric variables can also be used (with or without quoted phrases) to constructfile names in the File Alias command like this:

Fi l e ALI AS 1 {CLPat h} ' YASDA\ O' [ Sub] +[ Val 6]

 Note that you can use numeric variables (in the above example [Sub] and [Val6]), and you can even use

equations ([Sub]+[Val6]) when building the file alias.

7.3.4 Important information regarding text and text variables:

There is a wide range of things that you can do with text and text variables, as well as some capabilities and limitations you need to know about.

See section 5.3.4 for more details on the File commands, including File Alias.

See section 9.1.1.6 (in Appendix A) for a list of all text variables.

7.4 “ Search and Replace”

Lines like the following ones (which are used in some of the older Heidenhain 'conversational' formats) can

 be added to the template to “Replace” certain phrases with others.

Repl ace ' G2 ' wi t h ' DR-r epl ace "G3 " Wi t h ' DR+ 'REPLACE ' T' WI TH "TOOL DEF "

 Notice that both the phrase to be replaced AND the new phrase are enclosed in quotes. This is necessary inorder to be able to search and replace phrases with embedded spaces (such as “TOOL DEF”). Unlike most

other areas of the template, PHRASES WITHIN QUOTES ARE ALWAYS CASE SENSITIVE! So, don'tuse “g3” when you really want to search for “G3”. (The words REPLACE and WITH, however can be

upper, lower, or any mixture of cases as in the example above.)

Also, if you were paying attention, you noticed that some of the phrases in the example above use 'single

quotes' and some used “double quotes”. This is fine as long as each phrase starts and ends with the same

kind of quote marks. See section 7.3.2 regarding use of quotes.

Page 92: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 92/132

  How Search & Replace works

Each line of outgoing NC code will be scanned as many times as there are “Replace” lines in the machineformat, and if a “replace” phrase is found, it will be replaced ONLY ONCE (unless you use the ALL option

discussed below), then the post will go on to scan the same line again for the NEXT “Replacement”.

Example:

Using the Replace commands shown above, the line...

 

G2 T1 G2 X0

...would end up being output as:  DR- TOOL DEF 1 G2 X0

(Notice that the second G2 is NOT replaced because it was found [and replaced] earlier in the line.)

Since the search and replace happens on a “per line” basis, it CANNOT be used to replace end-of-linecharacters, and cannot be used to “join” two lines into one. (To effectively 'join' two lines, see the NoEOL

command in section 5.3.5.)

Sometimes, “Search and replace” works TOO good... notice also, that spaces within the search phrase can

 be used to prevent unwanted replacements. In the first example, if we had used a “G2” and “DR-“ (without

the trailing spaces), it would cause all “G28” words to end up as “DR-8” !

 Avoid 'double-replacements'!

Also, if more than 1 “replace” line is used in a format, THEY ARE PERFORMED IN THE ORDER THAT

YOU SPECIFY THEM! This means that there is a possibility that you can inadvertently “double-replace”.

Example of 'double-replacement' ( don't do this!):

  If the following replace lines are used in this order...REPLACE ' T' WI TH ' TOOL DEF'REPLACE ' D' WI TH ' DI AM. '

...then the “D” in “TOOL DEF” will be replaced with “DIAM. “ and will cause “T1” to be changed to“TOOL DIAM. EF 1” instead of “TOOL DEF 1”.

To prevent 'double-replacements' from happening, just reverse the order of the “Replace” lines so the D isreplaced BEFORE the T.

 NOTES:

Limits are not checked on phrases that are the result of a “Replace” statement. In other words, if youinadvertently replace a phrase with another that is beyond a particular limit, then no warning will

appear.

The size of the “Search phrases” (the 1st quoted phrase in a “Replace” line) is limited to 16 characters,and the “Replace” phrase (the 2nd  quoted phrase per line) is limited to 70 characters.

The NoComment option

If you want to prevent a 'replacement' from occurring within program comments, then add the word  NoComment to the end of the Replace line like this:

Repl ace ' A' wi t h ' A- ' NoComment s

Page 93: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 93/132

  Notes re  NoComment:

-  You may use either NoComment or NoCommentS : the post will figure it out either way.

-  Reminder: As always, the Replace command (still) only acts ONCE per line.

-  The NoComment option will only prevent the FIRST comment on the line from having a 'replace'

 performed. In other words, if there is MORE THAN ONE COMMENT on the line, the second 

comment will not be 'protected' from the replace. (This shouldn't raise any problems; I can't remember the last time I saw a line of code with more than one comment on it...)

-  The NoComment option may be used in conjunction with the All option below. (The options may be

listed in either order.)

The ALL option

Unless you use the All option, a Replace command is only performed once per line of output. This meansthat if you have more than one occurrence per line of something that needs to be replaced, just add the

word ALL to the end of the Replace line like this:

Repl ace ' _ ' wi t h ' ' Al l

As mentioned above, the All option may be used in conjunction with the NoComment option like this:

Repl ace ' , ' wi t h ' , ' Al l NoComment s

  Or:Repl ace ' X' wi t h ' X- ' NoComment s Al l

 NOTE: Since the All option causes the replacement process to repeat until all occurrences are replaced, be

careful not to create an 'infinite loop' with your Replace...All commands. This happens when your 'new'

 phrase contains the 'old' phrase like this...  Repl ace ' 99' wi t h ' 999' Al l

... 99 becomes 999, which gets 'replaced' again and becomes 9999, then 99999, then 999999, etc. ad infinitum.

If left unchecked, this would continue until all memory and disk space have been consumed, followed by acrash of your PC's operating system. (Suffice it to say that infinite loops are a bad thing...)

Fortunately, we limit the post's 'replace... all' to 100 repetitions – more than enough to get your job done, but far less than would ever cause any problems on your computer. PostHaste gives you a warning (and 

then aborts) if a Replace is repeated more than 100 times on any line of code.

Page 94: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 94/132

7.5 If / Else Logic

IF, ELSE and ENDIF statements can be used to cause PostHaste to either allow or disallow any lines in anysequence based on the mathematical relationship between any 2 variables and/or constant values.

Here's a sample of a ToolChange sequence that uses if/then logic in 2 different places - first, to controldual-range spindle speed (M41, M42), then again to suppress the “pre-indexing” in the last tool change.

(blank lines have been added for clarity to separate the "logic" sections from the rest of the sequence):

 Tool ChangeM9G28 G49 Z0 S100N[ Bl ock] M6

  This 'IF' structure sets the 'gear range' (M41 or 42):

if [Speed] > 500

  G0 G40 G80 G[ Wor k] X[H] Y[ V]  M42else

  G0 G40 G80 G[ Wor k] X[H] Y[ V]  M41endif

G43 Z[ D] H[ Lcomp] M[ Di r ect ] S[Speed]M[ Cool ]

This one suppresses pre-indexing of the last Tool:

if [NextTool] <> [Tool1]

  T[ Next Tool ]endif

End

...as you can see from the example above…

 

either one or both of the 2 values on the if  line must be a [variable]. It can even be a variable that isset from an ASK statement - letting you give the operator a set of processing "options"... let your 

imagination run wild!

•  The lines 'inside' the IF structure may be indented. (Note: They may be indented one space only! If 

more than one leading space is used, that line will become a 'comment' - ignored by PostHaste!)

Here are the actual “rules” that apply to the if / then logic:

The  IF  line must have a variable or a number followed by a 1 or 2-character “logical operator”, then

another variable or number. As usual, all items must be separated by a single space. The optional  Else lineand the required  Endif  line do not use any "parameters". Here are some sample "If" lines:

I F [Val 1] = 2I f [ Tool ] > 24i f [ speed] <= 500

(Note: Just as with all variable, sequence and command names, please notice that the capitalization of thewords If, Else and EndIf doesn't matter.)

Page 95: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 95/132

Logical operators ('Equals', 'Greater than', etc.)

This is a list of the legal logical operators that can be used on the if  line:

Operator Meaning> “Greater than”

< “Less Than”= “Equals”

<> “does not equal”<= “is less than or equal to”

>= “is greater than or equal to”

Other limitations that apply to the use of logic:

•  IF can only be used within a sequence or canned cycle.

•  An ENDIF line is required (even if there are no more lines after ENDIF within that sequence).

•  The ELSE line is optional.

•  The IF, ELSE and ENDIF lines must have at least 1 line of "code" between them.

 

IF statements cannot be nested.

•  You are limited to 100 IF structures per template.

Testing 2 conditions: Using  AND and OR with IF

You can use the words  AND and OR to make an  IF  function test for 2 conditions at a time as in thefollowing examples:

i f [ Tool ] > 5 OR [ Val 1] = 1  . . . do these l i nes . . .ENDI F

i f [ Last Hol e] <> 1 AND [ SpeedType] < 97  . . . do these l i nes . . .ENDI F

7.6 Outputting subs (subprograms), and theautomatic 'multiple part' program feature

PostHaste can output NC program subroutines or subprograms (we will refer to these as 'subs'...) for either 

of two reasons:1.  To automatically create subs to achieve 'multiple-part programs'

(where each tool's motion is put into a separate sub, and then the 'main' program consists of toolchanges and sub calls), or 

2.  If your incoming CL data includes subs, and you simply want the post to output them accordingly.

Page 96: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 96/132

7.6.1 Basic Fanuc setup example

In either of the above cases, setting up your template to output subprograms or subroutines (commonlyreferred to as “subs”) is usually quite simple. (We also give you ways to handle quite a few variations from

the 'basic' setup shown in this example.) However, before getting into all of the details, here is an exampleshowing what you would add to a typical Fanuc post template to add sub support.

Just add the SubCall, SubStart  and SubEnd  sequences (and make sure the letters you need are formatted in

the 'letter format' section of your template):

SubCal l Describes the code used to call subs from the 'main' program.

G0 G[ Wor k] X[ H] Y[ V]Z[D]M98 P[ Sub]end

SubSt ar t The code that appears at the top of each sub.

O[ Sub]G0 X[ H] Y[ V]End

SubEnd The code at the end of each sub.

M99End

Between Code 'between' the last sub and the start of the 'main program' portion of the file.

O[ Pr ogram#] (See note below)

End

... that's all you have to do! PostHaste will apply these sequences whenever they are needed in the code tooutput your subs properly.

 Note: By default, PostHaste will output the subs before the main portion of the program. If you want the

subs to be output after the main portion, use the Subs1st? switch (discussed below).

7.6.2 Automatic multiple part programs

This is an exceptionally useful feature of PostHaste, as many CAM systems do not do a good job of 

 producing compact NC programs for 'multiple part' setups... PostHaste will do it for you.

If your template contains the above sequences, PostHaste will automatically generate a multiple part

 program if there are no subs found in the CL file.

When PostHaste creates a multiple part program, it creates a sub for each tool's motion. Therefore if your 

 job uses 9 tools, there will be 9 subs generated. (If any tool is repeated later in the job, another sub will bemade for that section of the program as well.) PostHaste then produces a 'main' program that (after each

tool change) calls the tool's corresponding sub at each work offset. The number of work offsets will

match the number of parts. This is an important point, because you are limited to the number of parts

by the number of work offsets that are available on the machine.

When a multiple part program is being generated, the post will ask you the following questions:

•  “How many parts are there?”

Remember - you are limited by the number of available work offsets.

Page 97: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 97/132

•  “What is the first work offset number?”

Work offsets will 'increment up by one' for each part. If you indicate 54 as your first offset, the first

 part will be G54, the second part will be G55, and so on. (You may use G55 or G56 [etc.] as the'first' offset if you like - but just remember that by doing so, you are reducing the total number of 

 parts you can cut because of the 'upper limit' of you available work offsets.)

•  “Do you want to 'reverse' the order of the offsets for each tool?”

On setups where several parts are spread out over the length of a machine table, there is less rapid motion required if you 'reverse' the order of the offsets. For example, the first tool would work in

the order from G54 to G59 (e.g. 'left to right'), then the second tool would start with G59 and work  back to G54 (working from right to left). This feature eliminates the 'long' rapid moves from

one end of the table to the other after each tool change, and thus reduces the overall cycle

time on the job. (The time savings are especially noticeable on jobs with 'low cutting time per tool

and a relatively large number of tools.)

7.6.2.1 Sub numbering

For multiple part programs, the [Sub] number (the 'O' number at the start of the subs) is automaticallyincremented (starting at 1) each time a new sub is output. It is usually a good idea to 'add' the sub numbers

to the [Program#] variable so that the subs will follow directly after your main program in the machine's'directory' page. In other words, if your 'main' program number ([Program#]) is 2000, you would want the

first sub to be 2001, the second 2002, etc. To do this, simply add the [Program#] to the [Sub] in your SubStart and SubCall sequences as shown here:

SubCal l Describes the code used to call subs from the 'main' program.

G0 G[ Work] X[ H] Y[ V]

M98 P[Sub]+[Program#]

end

SubSt art The code that appears at the top of each sub.

O[Sub]+[Program#]

G0 X[ H] Y[ V]

End

Page 98: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 98/132

7.6.3 Sequences, variables and switches used for subs

The output of all code related to subs is controlled in the template by using the items in the table below.

This table describes them briefly, and details follow in the next sections.

Items: Type: Notes / Description: Mandatory (for subs to be output properly)?

SubStart Sequence Code output at the start of each sub. Yes

SubEnd Sequence Code output at the end of each sub. Yes

SubCall Sequence Code required to call a sub. YesBetween Sequence Describes any code that needs to be output

between the 'main' portion of the program andthe subs.

No. (Only used for machines that require somespecial code to separate the 'main' portion of theprogram file from the 'subs' portion.)

[Sub] Variable Outputs the “O” number of the sub. Either [Sub] or [SubLine] must be used.

[SubLine] Variable Outputs the number of the N word (linenumber) of the sub. See section 7.6.3.3 for details.

Either [Sub] or [SubLine] must be used.

[Times] Variable Usually the L number on the M98 (sub call) linein Fanuc programs. See section 7.6.3.3 for details

Not needed if you are only using subs for multi-partformats.This is needed if the CL data ever indicates that a sub is to be repeated .

RenumSubs? Switch See explanation below in section 7.6.3.4 No (N is the default condition)

SpliceSubs? Switch Set this switch to 'N' if you want the subs to beoutput in a separate file (or files) from the mainprogram. See section 0 for details

No (Y is the default condition)

Subs1st? Switch See explanation below in section 7.6.3.4 No (N is the default condition)

7.6.3.1 SubCall 

sequence

The SubCall sequence shows how the subs will be called from the “Main” portion of the NC program. (See

the 'basic' example in section 7.6.1 above.)

SubCal l Describes the code used to call subs from the 'main' program.

G0 G[ Wor k] X[ H] Y[ V]M98 P[ Sub]+[ Pr ogr am#]end

7.6.3.2 SubStart, SubEnd, and Between sequences

The SubStart  and SubEnd  sequences are used to describe how the subs start and end, respectively - as

shown in the example above.

The Between sequence is used to describe any special code that should go between the subs and the main

 program code (Use the Subs1st? switch [see below] to direct PostHASTE to put the subs either before or after the “main” portion of the program).

Example:

 These sequences and switches (in addition to the SubCall, SubStart  and SubEnd  sequences in the exampleabove) are used for some Fadal formats...

Subs1st ? Y

Page 99: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 99/132

BetweenM17M30End

...because some Fadal machines require that the subroutines come before the main program and that there isa M30 between the 'subs' and the 'main'.

7.6.3.3 [Sub], [SubLine] and [Times] (sub variables)

The following variables give you control of formatting of NC programs using Sub-routines & Sub-

 programs:

The var iables: What they do:

[Sub] This is the value of the sub number, and can be used in the SubStart and SubCall sequences as in the above examples.

[SubLine] This is used in the SubCall sequence in place of [Sub] to call a sub by its “line” (sequence) or “N” number (as opposed tousing the sub number itself).

[Times] This is used to designate the number of times a sub repeats. This should only be used in the SubCall sequence as shownabove.

Here's an example of how you would use the [SubLine] and [Times] variables in your SubCall sequence:SubCal lM98 P[ SubLi ne] L[ Ti mes]end

7.6.3.4 Switches used to control subs

Here are more details on the formatting switches have been added to help you control other actions that aresignificant when using subs:

Formatting swi tches: What they do:

RenumSubs? Y Use this line to indicate that you want the sequence (N) numbers to be reset at the beginning of each sub and atthe start of the “main” program section. You may also use an N to prevent this action.

Notes:

1. If this line is not used, then the default condition is not to restart the numbers (as if you used the N option).

2. Do NOT attempt to use the Y option if you are using the [SubLine] variable (discussed above).

Subs1st? N Use this line to indicate that you want the subs to be placed after the main portion of the program - change the Nto Y to output the subs before the main program.

NOTE: If this line is not used, then the default condition is to place the subs before the main portion of theprogram (as if you had used the Y option).

SpliceSubs? N See below...

SpliceSubs? swi tch

This switch can be used to tell the post to NOT include any subroutines in the main NC program file.

Typically, when subroutines are used, PostHaste includes them in the main output (.NCC) file. To do so, it

first writes the NC code contained in each sub into a temporary file - one for each sub - then when all of thecode (for subs and the 'main' program) has been generated, PostHaste automatically 'splices' all of those

temporary files together to form the final output file. If you do NOT want the subs to be 'spliced' together with the main program, use this switch setting to prevent it:

Spl i ceSubs? N

Page 100: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 100/132

The most common reason you would use this is if you want each sub (or all subs) to be output to it's ownseparate file (instead of into the main file). In order to do this, you would need to use File commands to

control the output of the various 'subs' and 'main' portions of your code into the files of your choice. Here isan example of one way you could do this:

SpliceSubs? N Do NOT splice the subs into the main file because each sub is

   put into in separate file (example: MyPart-SUB2.DAT ).

SubCal l

File on Main only

M98 ' P' {CLName} ' - SUB' [ Sub]   << ...each sub is called by the FILE NAME of the sub (less the '.DAT').

end

SubSt ar t

File alias 1 {CLName} '-SUB' [Sub] '.DAT'  << Each sub file name based on the CL name and sub #.

Fi l e empt y 1

File on 1 only << (Each sub is written into the file named above on the File alias line.)

end

SubEndM99

File on Main only  << After each sub is completely written, make sure that you go back to writing to the main file.end

NOTE: Be careful using this switch! If you tell the post...

  Spl i ceSubs? N

...without properly routing the subs into the files you want (by using the File commands as demonstrated in

the above example), then your subroutines will simply not exist in the final NC program!

For more information on subroutines (including automatic generation of multiple-part programs) see

section 7.6.

For more information on use of the  File commands, see section 5.3.4.

7.7 The PostHaste.log file (for “ debugging” )

PostHaste generates the PostHaste.LOG file (in the same folder as your PostHaste.exe file). This file is a

"debugging" aid that is essentially a "merging" of the incoming CL data and the outgoing NC code. Bylooking at this file (in any text editor), you can see exactly which CL records produced each line of NC

 program. (The incoming CL lines are numbered for your convenience.) NOTE: This file is overwritten each

time you run the post, so if you want to save it, you will either have to rename it or move it to another folder.

The example below is an excerpt from a PostHASTE.LOG file. For your convenience, the incoming CL

lines are numbered and a blank line is placed at the end of each section of NC code that is output. Thisvisually 'groups' the code with the CL data that produced it. (Note: Shading has been added to this

document to highlight the first few sections of NC code - shading will not appear in an actualPostHASTE.LOG file.

Page 101: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 101/132

### This is the .LOG file produced during processing of c:\temp\drill.ncc.### This file lists the CL data and the NC program data produced by it.### (This file gets overwritten each time you run the post.)

O1G20 G90

3 >PARTNO / 1050-2207_WP5 >MACHIN / MILL, 016 >UNITS / INCHES7 >LOADTL / 5

11 >SPINDL / RPM, 500.00, CLW12 >FEDRAT / 100.00, IPM13 >GOTO / 0.00, 0.471000, 0.500000G70 G50 G19 H0 M9T5G0 G32G40 G80 M5 M9M6S500 M3G0 X0 Y0.471M9D5 G43 H5Z0.5

14 >CYCLE / DRILL, DEPTH, 0.093000, IPM, 5.00, CLEAR, 0.1015 >GOTO / 0.00, 0.471000, 0.400000G81 F5. R0.5 Z-0.193 G98G0 X0 Y0.471

16 >CYCLE / OFFG80……

64 >FEDRAT / 100.00, IPM65 >GOTO / -1.00, 0.906000, 1.125000G1 F100. Y0.906

66 >SPINDL / OFF

69 >LOADTL / 674 >SPINDL / RPM, 500.00, CLW

75 >FEDRAT / 300.00, IPM76 >GOTO / -1.205000, 0.00, 0.800000G70 G50 G19 H0T6G0 G32G40 G80 M5 M9M6S500 M3G0 X-1.205 Y0M9D6 G43 H6Z0.8

78 >CYCLE / BRKCHP, DEPTH, 0.137940, STEP, 0.030000, $IPM, 1.00, CLEAR, 0.00, RETURN, 0.50, $DWELL, 1.00, TIMES, 179 >GOTO / -1.205000, 0.00, 0.400000G73 F1. Q0.03 D0.05 V-0.03 R0.4 Z-0.1379 G98G0 X-1.205 Y0

80 >GOTO / -1.00, 0.471000, 0.400000X-1. Y0.471 Z0.2621

81 >GOTO / 0.00, 0.471000, 0.400000X0

……

86 >GOTO / -1.00, -0.471000, 0.400000X-1.

87 >CYCLE / OFFG80

88 >FEDRAT / 300.00, IPM89 >GOTO / -1.00, -0.471000, 0.450000G1 F300. Z0.45

90 >SPINDL / OFF92 >FINI

G31M30

This file is overwritten each time you run the post, so if you want to save it, you will either have to rename

it or move it to another folder.

“F.Y.I.” - Looking at the beginning of this log file also tells you two important things about how PostHaste

works:

1.  The StartCode (in this case, the first 2 lines of NC code) is always generated before any CL data is read.

2.  The 1stToolChange sequence is always “triggered” by the first GOTO in the CL data.

Inhibiting the log file for faster processing.

If you need to process long jobs, inhibiting the automatic generation of the .log file may help the post runslightly faster when processing. If you would like to inhibit this feature, add the following line to your 

PostHaste.CFG file:

Loggi ng? N

The “N” (no) tells the post to NOT create a PostHaste.LOG file. If this line is omitted (or if you use “Y”),then the post WILL create a PostHaste.LOG file (the equivalent of “Logging? Y”).

Page 102: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 102/132

Page 103: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 103/132

8. “ Special Case” Tactics & Notes

This section of the manual covers some tactics that you can use to achieve NC code output to match some

special cases that we've come across over the years. This section is by no means an exhaustive reference of all the things you can achieve, because the only limits are your imagination. This section is meant to help

stimulate your imagination by giving a few examples of how we've used some of the formatting “tools” inthe GS post to overcome some specific formatting problems.

8.1 Concerning incremental / absolute output andthe [IncMode] variable

The [IncMode] variable gives you a great deal of control over how the absolute/incremental codes are

 placed in your NC programs. Instead of “hard coding” a G90 or G91 in any sequence, you can useG[IncMode] . The difference is that when the tool motion file that comes from the CAM program

designates which parts of the tool motion are to be coded in incremental or absolute mode, PostHasteautomatically places the corresponding G code in the location you've specified with G[IncMode].

For the [IncMode] variable to work, the following line MUST be present in the template:I nc/ Abs G 91 90 ( I nc f i r st , t hen Abs. )

If you don't have it, PostHaste will warn you to add it before it will process the tool motion.

You can use [IncMode] in any sequence. Here are 2 examples: Tool Change T[ Tool ] M6G0 G[ I ncMode] X[ H] Y[V] [ - - - - I ncMode establ i shed at eachS[ Speed] M[ Di r ect ] t ool change. . .

G[ 43] Z[ D] H[ LComp]End

SubO[ Sub]G[ I ncMode] [ - - - - I ncMode establ i shed at each sub.end

 Note: A G90 or G91 (according to the Inc/Abs line as formatted above) will automatically appear in the NCcode whenever the mode is changed by information coming in from the tool motion file. This will NOT

happen if the [IncMode] variable is used as the “trigger” variable for an UPON sequence - because the postexpects you to have formatted your UPON sequence to handle it properly.

Page 104: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 104/132

8.2 How to format “ P1=” type codes.

If you will recall, in the very first pages of the post-processor manual, it is clearly stated that PostHaste isdesigned to output NC code such that EVERY “word” of the code is “a letter followed by a number”.

However, you can use the “replace” feature to overcome this limitation.

Here's a good example of a case where this can be done.

Some machines require drilling (and other) parameters to be output in a way that requires more than just “aletter followed by a number”. For example, look at this peck drilling cycle:

G83 X1. 0 Y2. 0 P1=. 5 P2=. 25 ( P1 i s t he hol e bot t omZ, P2 i s peck i ncrement . )

To output this, use the following lines to your template:PeckG83 X[ H] Y[V] a[D] b[ St ep]end

r epl ace ' a' wi t h ' P1='r epl ace ' b' wi t h ' P2='

Of course, you must make sure that the letters “a” and “b” have been formatted in the “letter format”section of the file by using lines like these:

a >3. >4b >3. >4

As you can see, the “replace” feature is limited only by your imagination. To see it in intensive use, look at

a “Heidenhain Conversational” format.

Page 105: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 105/132

8.3 'Block deletes' on mult i-part sub calls

In multi-part programs, it is helpful to have 'block delete' (/) characters on all sub calls except the onesoperating on the first fixture location. This way you can prove out a program on only 1 fixture (by turning

on your machine's block delete switch), then activate the other fixtures later by turning it off. Here's what

you may want such code may look (especially note the lines in bold)...

%O1 T1 M6 ( T1 - SHELL MI LL [ NO COOLANT] )N1 G0 G40 G80 G90 G54 X7. 25 Y5.G43 H3 Z0. 25 S8000 M3G54 G0 X7.25 Y5.

 M98 P2

/ G55 G0 X7.25 Y5. (All offsets except G54 have block delete...)/ M98 P2

/ G56 G0 X7.25 Y5.

/ M98 P2

/ G57 G0 X7.25 Y5.

/ M98 P2

M5G91 G28 Z0 M9 T2 M6 ( T2 - SPOT DRI LL)N1 G0 G90 G57 X8. Y13. 5G43 H1 Z0. 25 M8 S8000 M3/ G57 G0 X8. Y13.5

/ M98 P3

/ G56 G0 X8. Y13.5

/ M98 P3

/ G55 G0 X8. Y13.5

/ M98 P3

G54 G0 X8. Y13.5

 M98 P3M5. . .

If this is the kind of output that you want, then you may achieve it by simply using an IF  condition:

SubCal l Describes the code used to call subs from the 'main' program.

IF [Work] = 54

  G0 G[ Wor k] X[ H] Y[ V]  M98 P[ Sub]+[ Pr ogr am#]ELSE

  ' / '  G0 G[ Wor k] X[ H] Y[ V]  ' / ' M98 P[Sub]+[ Pr ogr am#]ENDIF

end

Please note the trailing space character inside the quotes. Remember - when text is output, the post does NOT automatically pad it with spaces, as it does the actual output 'words' (such as G0 or X[ H] ) when the

"Spaces? Y" switch is used.

Page 106: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 106/132

9. Appendix A - List of Variables

Following are lists that describe all of the variables that you can use in the sequences. Because there are so

many types of values that can be used in a machine program there are several pages of variables listed here.You certainly do not need to memorize all of the variables - they are here for your reference. (You may,

however want to just “skim” it to get an idea of what's available.)

 NOTE: You may see other variables in your template that are not listed here. This could happen in one of 2cases:

1. 'User-defined' variable names may have been created (using a Rename command - see section 4.1.26) by the person who created or modified the template.

  OR...

2. We may have missed documenting some of them in this manual! (Sorry!)

SO... If you see a variable in your template that you don't recognize from the lists below, then first

check all of the Rename lines in the template. If there is NOT a matching Rename line, then that

means we missed documenting it! If this is the case,  please notify us and we will make sure that itis added to future revisions of this manual.

Categories of variables

In the lists of variables below, there is a Category column. This is what each category means:Category Relevance

 Axis position These are the actual positions of the machines axes.

Motion attributes Various information about the movement (distance moved, feed rate, etc.)

 Arc motion Variables that are used only in processing arc motions.

Drilling Variables that are used only in processing drilling ('point to point 'canned' cycles.

Tool Change Information related to the tool change process, orattributes of the tool itself 

Prompted The values of these variables will be asked of the user when the post runs - they are generally NOT set by theincoming CL data.

Subs Variables used for calling and/or defining machine subroutines and/or subprograms.

General Variables that don't fit into any of the above categories

Page 107: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 107/132

The variables...

In addition to supplying 'categories', we have grouped the variables into separate lists according to the areas

of usage in the format. Generally, all of the variables in a list will be used in the same sequence (or related sequences).

NOTE: Within each list, the variables are listed in alphabetical order.

 NOTE:

Variables marked with asterisk (*) are probably not supported by your CAM system, so you should 

generally avoid using them. (Although you may employ them as “general use” variables by setting their values by using the Set  command within the format.)

Page 108: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 108/132

9.1.1.1 Variables that apply to movements in general

You can use these variables in any sequence that produces motion. (ToolChange, Index, RapidCode,

LineCode, CwCode, etc.)

Variable(s) Category Details Related / similar items

 AAxis, BAxis,

CAxis

Rotary

motion

The (angular) position for the rotary axes ON 5 (or more) AXIS POSTS.

(4 axis posts usually use RotAngle.)

RotAngle

 Adir, Bdir,Cdir 

Rotarymotion

Typically only available on 5 (or more) axis Mill posts (or MillTurns withmore than 1 rotary axis). The direction (0 = no rotary motion, 1 = Ccw, 2 =CW) that each rotary axis is moving on the current move (4 axis postsusually use RotAxDir .) These directions follow the ISO standard for toolrotation. (See the 5 axis Addendum manual for details on this.)

 AAxis, BAxis, CAxis,RotAxDir 

 ADist, BDist,CDist

Rotarymotion

Typically only available on 5 (or more) axis Mill posts (or MillTurns withmore than 1 rotary axis). The distance (in degrees) each rotary axis ismoving on the current move (4 axis posts usually use Dist4.)

HDist, VDist, DDist, Dist4

CPref  Rotarymotion

You maySet this variable to indicate the "preferred C value for the post tooutput whenever the machine has to do a (relatively long) rapid move(where the tool is moved into ‘'tool shank vertical’ [“I,J,K = 0,0,1”] position)

moves". This is only needed on machines with a C axis that has physicallimits; user should USUALLY set this to the 'mid-travel' value of his Caxis; this should minimize the occurence of ‘unwinds’ by setting the C axisto its ‘middle of range’. (default 0) to allow user to set

Unwind sequence

D Axis position “Depth” (Z) linear axis endpoint position of the current movement H, V, LastH, LastV, LastD

Dist4 Motionattributes

Similar to Hdist, Vdist and DDist, but this is the angular  measurement of the current rotary axis move (4 axis milling applications only).

HDist, VDist, DDist

DPM Motionattributes

The “degrees per minute” feed rate (used in rotary axis milling only). FRate, InvTime

FRate Motionattributes

Feed rate value. This outputs in the proper units (IPM, IPR, MMPM,Inverse time, etc.) as needed.

Plunge, FeedType, DPM,InvTime

H Axis position Horizontal (X) linear axis endpoint position of the current movement. V, D, LastH, LastV, LastD

HCDC, VCDCMotionattributes

"CDC" (cutter diameter compensation) vectors - used by some older Cincinnati machines. NOTE: For these to be active, the CDC commandmust first be specified in the “Commands & Switches” section of your post. Example:  CDC P Q

IVect, JVect, KVect

H2, V2 Motionattributes

(4 axis Wire EDM posts only:) These hold the X and Y positions of theendpoint of the current movement (Rapid, feed or arc) for movements onthe secondary (auxilliary) plane.

H, V, Hctr2, VCtr2

HDist, VDist,DDist

Motionattributes

These variables hold the linear distances that each axis is to travel on thecurrent move. These are SIGNED (+ or -) values: if X is moving in thenegative direction, [HDist] will be a negative value.

Dist4, MoveLength

HVector,VVector 

Motionattributes

These 2 values indicate the (vector) direction of the first completelycompensated cutting move. They are used on machines that do not have

“look ahead” ability to indicate which way the tool is going to go on themove AFTER the infeed. You will notice that they are used on theINFEED line of the Fanuc 3000C format.

InvTime Motionattributes

The reciprocal of MoveTime - “Inverse time” is a method that many millingmachines equipped with rotary axes use to determine the actual feedrate. For those machines, this value is used instead of FRate.

FRate variable, RotaryFeedcommand

Page 109: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 109/132

Variable(s) Category Details Related / similar items

IVect, JVect,KVect

Motionattributes

The 3 components of the unitized vector that describes “3D offset” - usedonly for machines that support this type of offset and where the incomingtool motion (CL) file provides this information. The post will not outputthese vectors automatically; the LineCode sequence is typically used tooutput these values if the machine needs them - as in this example:

LineCodeG1 X[H] Y[V] Z[D] I[IVect] J[JVect] K[KVect] F[Frate]end

HCDC, VCDC,

NormH, NormV, NormD

LastH, LastV,LastD,LastRotAng

 Axis position These hold the H, V and D and rotary (milling 4th axis) values that werepreviouslyoutput (typically the XYZ values of the endpoint of theprevious movement). In other words, these values typically indicate wherethe tool is immediately before the current move is processed & output.BUT THAT IS NOT ALWAYS THE CASE. READ THE IMPORTANTINFORMATION BELOW REGARDING THE USE OF THESEVARIABLES.

Beware outputt ing (and calculations using) [LastH],[LastV] or [LastD]:

Since the value in [LastD] (for example) gets updated IMMEDIATELY

(to the current [D] value) upon [D] being output, you must check or use [LastD] in any output BEFORE [D] IS OUTPUT!

This is why in the helical arc examples shown in section 4.2.7.1 we havethe K value on the line BEFORE the Z value. (If we put it after Z, then[LastD] would have already been updated, and would be equal to [D].)

The same is true wi th the variables [LastH] and [LastV].

If you need to use the value of [Last_] variables in several places in asequence, then a way that you can get around this problem is to'memorize' the [Last_] value into another variable, then use that variableinstead. Here's a good example - in this RapidCode sequence, we haveadded 'Z safety logic' to help prevent crashes, so the first thing we do ismemorize the [LastD] value:

Rapi dCodeSet [Val1] to [LastD] Memorize "From" & "to" Z val's

Set [Val2] to [D]

i f [ Val 2] < [ Val 1] Goi ng down?G0 X[ H] Y[ V] XY f i r st ,Z[ D] t hen Z.endi f 

i f [ Val 2] = [ Val 1] Same Z. . .G0 X[ H] Y[ V] Z[ D] Output XYZ t oget herendi f 

i f [ Val 2] > [ Val 1] Goi ng up:G0 Z[ D] Z f i r st ,X[ H] Y[ V] t hen XY.endi f end

H, V, D, RotAngle

MoveLength Motionattributes

This is the total distance from the start to the end of the current move,measured "as the bird flies" (not around arcs). It is essentially thehypotenuse of the "3D triangle" defined by the start and end points of thecurrent movement. (This is always a positive value.)

Hdist, Vdist, DDist

Page 110: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 110/132

Variable(s) Category Details Related / similar items

MoveTime Motionattributes

The length of time (in minutes) that the machine should take to completethe current movement. (Calculated by dividing MoveLength by the [IPM or MMPM] feed rate.)

InvTime, MoveLength,TotalCutTime, TotalCutDist

NormH,NormV,NormD

Motionattributes

These variables define the 3D compensation vector used to indicate 3Doffset direction when machining a 3D surfaces. They are ONLY set whenthey are read from the '3rd triplet' of GOTO records (after first beingactivated by a MODE or APPLY record like this):

MODE/ 3DCOMP, ON or APPLY/ 3DCOMP, ON

These variables can be used in the LineCode sequence like this:  LineCode

  G1 X[H] Y[V] Z[D] I[NormH] J[NORMV] K[NORMD] F[Frate]  end

IVect, JVect, KVect

Pitch Drilling,Threading

This is the reciprocal of the thread lead (1 / lead). Example: for a 1/4-20thread, the lead is .05, so [Pitch] = 20 (which is 1/.05). It gets set duringTAP cycles or when reading THREAD information from the CL file.

PolarAngle Motionattributes

(Typically used for MillTurn machines when milling on the face of thepart…) This is the (typically C axis) angle of the current move’s endpoint(with 0 degrees being along the X+ axis direction). This is almost alwaysused in conjunction with the PolarDist variable like this:

i f [ Mode] = 3 and [ I Vect ] < . 99 Face(Pol ar ) Mi l l i ng:G1 X[ PolarDist] Z[ D] C[ PolarAngle] F[Frate]endi f 

HOWEVER, you may usePolarDist andPolarAngle whenever you needto output the ‘polar’ location of the current move’s endpoint (or the currenthole lcation, in the case of drilling cycles);PolarDist will indicate the distance of the current endpoint from the origin,and

PolarAngle will be the angle (measured in ‘CAD standard’ method: 0degrees is “3 o’clock”…)

PolarDist, PolarBreak

PolarBreak Motionattributes

On MillTurn machines, when this variable is set to a non-zero number, thepost will break lines and arcs that are milled on the 'face' of the workpiece(typically in the XY plane) into short linear polar  (typically X,C) moves.This allows milling on the face of parts on MillTurn machines that do nothave a Y axis. If this is what you want to do, then Set [PolarBreak] to the'chordal deviation tolerance' that you want to hold on face contour millingoperations.

MaxRad command,PolarDist andPolarAngle

variables

PolarDist Motionattributes

 Almost always used in conjunction withPolarAngle – see discussion rePolarAngle  above.

PolarAngle, PolarBreak

RotAngle Axis position The (angular) position for the milling rotary axis ON 4 AXIS MILLS ONLY.(5 axis posts MUST use AAxis, BAxis and/or CAxis instead!)

LastRotAng, AAxis, BAxis, CAxis

RotAxDir  Motionattributes

Set to 1 when the milling rotary table is to move counterclockwise, and -1when clockwise.

RotAngle, Adir, Bdir, CDir 

V Axis position Vertical (Y) linear axis endpoint dimension... H, D, LastH, LastV, LastD

RLevel Motion Attributes

Vertical clearance: the lowest of the two rapid levels. (Usually the R valuein a canned cycle - mill only.)

TotalCutDist Motion Attributes

This is an ESTIMATE of the total distance the tool has traveled (so far)while in FEED mode. (Not rapid.) This is typically used in the EndCodesequence to display the overall estimated CUTTING (not including rapid)time as in this example:

EndCodeM30%0'(EST._FEED_TIME:_' t[TotalCutTime] '_MIN._[' t[TotalCutDist] '_IN.])'

End

TotalCutTime, MoveLength,FileSize

Page 111: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 111/132

Variable(s) Category Details Related / similar items

TotalCutTime Motion Attributes

This is an ESTIMATE of the total TIME (inminutes) that the tool hasspent (so far) while in FEED mode. (Does not include rapid moves.) Seeusage example immediately above.

TotalCutDist, MoveTime,FileSize

9.1.1.2 Variables that can be used to format arc movements

These variables are only used in the ArcCode sequence. (Note - in older posts, there may be CwCode and CcwCode sequences instead of a single ArcCode sequence.

Variable(s) Category Details Related / similar items

 ArcDir Arc motion The “Direction numnber” of the arc. The number is set with theCW andCCW commands. For instance, if you have the following CW andCCWcommands in your template…

Cw G2

Ccw G3

…then [ArcDir] will be 2 for clockwise arcs, and 3 for counter-clockwise. ArcDir  is typically used with the letter G (in the ArcCode sequence) likethis:

Ccw G[ Ar cDi r ] X[ H] Y[V] …

 All other variables in thischart.

 ArcPlane Arc motion See the discussion of the ArcPlane command in section 4.2.1  ArcPlane command

 ArcRad Arc motion The radius of the arc.  All other variables in thischart.

 ArcStartH, ArcStartV

 Arc motion These variables hold the horizontal and vertical coordinates, respectively,of the start point of the current arc.

H, V

EndAng Arc motion See discussion of StartAng below. StartAng

HCtr, VCtr,DCtr 

 Arc motion Absolute (X,Y,Z respectively) location of the arc center.  All other variables in thischart.

HCtr2, VCtr2 Arc motion  Absolute location of the arc center – for arcs on the ‘auxilliary’ (or secondary) plane.

HCtr, VCtr, H2, V2

Ival, Jval Arc motion The I and J values for the arc center. These will be either absolute or 

incremental (from the arc startpoint) depending on the CtrIncremental?switch setting.

HCtr, VCtr 

Normal1,Normal2,Normal3

 Arc motion These variables hold the X, Y and Z components (respectively) for the“normal” vector of the most current arc. This vector describes the ‘axle’ of the arc and is usually set to 0,0,1 for Counter Clockwise arcs and 0,0,-1for Clockwose. (Note - Unigraphics posts are exactly the opposite. SeetheUnigraphics? switch.)

IVect, JVect, KVect

StartAng,EndAng

 Arc motion Ouputs the starting and ending angles of the current arc. (Angles will bein the range of 0 to 359.999, with “3 o'clock being 0 degrees, positiveangles going ccw.)

 All other variables in thischart.

Sweep Arc motion This is used to output the span of an arc (measured in degrees). This canbe done by including it in the ArcCode (or CWCODE and CCWCODE)sequences (see below). The value output will be negative (-) for 

Clockwise arcs, and positive (+) for Counter-clockwise arcs. Therefore, if you need the output value to always be positive, then make sure that theletter you use it with is formatted with no minus sign (-). (Likewise, if youneed to reverse the sign so that CW arcs are positive sweep and CCWare negative, then use the MULT modifier to multiply the letter's value bynegative 1.)

 All other variables in thischart.

Page 112: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 112/132

9.1.1.3 Variables related to “point-to-point” Drilling cycles

Some of the sequences that these variables are used in are Drill, Peck, Tap, etc.

Variable(s) Category Details Related / similar items

Cycle Drilling See discussion of this in section 9.1.1.4 – as this variable is normallyused in ToolChange and 1st ToolChange sequences.

Tap

Dwell General Dwell time (measured in seconds) at the bottom of a hole.

LastHole Drilling This variable is automatically set to 1 when processing the last hole (and

ONLY the last hole) in a point-to-point sequence. It is usually used in anIF statement to add or remove certain codes when processing the lasthole of a drill cycle.

The following example shows how to use LastHole in an IF structure (see"If/Then Logic") to get a special code (in this case "G98") on the last hole.

Drill 5  (first 5 lines are for the 1st hole in the cycle)

if [LastHole] = 1 G81G98 X[H] Y[V] Z[D] R[RLevel] F[FRate]else G81 X[H] Y[V] Z[D] R[RLevel] F[FRate]endif 

if [LastHole] = 1 X[H] Y[V] G98else X[H] Y[V]endif 

end cancel

[Rigid]

Orient Drilling [Orient] will be set to 1 when the CL file’s CYCLE record (describing thecurrent drilling cycle) includes the minor word ‘ORIENT’ (otherwise[Orient] will be 0.)

[Rigid], [Orient]

PeckClear Drilling This is the “hole bottom clearance” distance that the post will use whengenerating peck drilling cycles. The default value is .050” unless the

 AskPeckClear? switch is set to Y (or if you use a Set command to set it toanother value). Example - for metric posts we recommend:

Set [ PeckCl ear ] t o 1

 AskPeckClear? switch (seesection 4.1.2 )

Pitch Drilling This is the reciprocal of the thread lead (1 / [Step]). Example: for a 1/4-20thread, the lead is .05, so [Pitch] = 20 (which is 1/.05).

Note; To use [Pitch], a FeedType command must be used earlier in thetemplate.

[Step]

PointH,PointV,PointD

Drilling Most drilling Canned cycles require a Z value indicating the absolute Zposition of the BOTTOM of the hole. That is why you usually see a Z[D]word in most Canned cycle descriptions. Some machines, however,require the designation of the Z level at TOP of the hole (the SURFACEof the part), rather than at the hole bottom. For those machines, use thePointD (“Point Depth”) variable instead.

PointH and Point V are useful in 5 axis posts if you need to designate theXY location of the top of the hole.

[H], [V], [D]

RetPlane Drilling The value of the return plane mode (Initial plane = G98,“Rapid plane” =G99.) The actual number output depends on the “ReturnPlane” command(read about it in the Commands & Switches section earlier).

Page 113: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 113/132

Variable(s) Category Details Related / similar items

Rigid Tapping [Rigid] is set to 1 when the cycle being processed is a rigid tap cycle. Youmay use an IF structure to output yourTAP orCancel sequencesaccordingly. Examples:

Tap 6If [Rigid] > 0G93G84 X[H] Y[V] Z[D] K[VBite] R[RLevel] F[FRate]

elseG84 X[H] Y[V] Z[D] R[RLevel] F[FRate]endif X[H] Y[V] W[RPlane]end cancel

CancelG80if [Rigid] > 0G94endif end

Note: Since [Rigid] is not reset until the start of the next cycle, it can beused in the CANCEL sequence as well as the TAP sequence.

[LastHole]

Step Drilling For PECK cycle: the “pecking” value (mill only; lathe uses SBite)

For TAP cycle: the thread “lead” (the distance from one thread peak tothe next). Note that [Step] is the reciprocal of [Pitch]; e.g. for a _-20thread ([Pitch] = 20), the [Step] value is .05 (which is 1/20)

[Pitch]

Tap Drilling See discussion of this in section 9.1.1.4 – as this is normally used inToolChange and 1st ToolChange sequences.

Tap

Page 114: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 114/132

9.1.1.4 Variables set from the Tool or Tool Change information

These variables are typically used in the ToolChange and 1stToolChange sequences. Some of them are

used other places as well.

Remenber - variables marked with asterisk (*) are probably not supported by your CAM system, so you

should generally avoid using them. (Although you may employ them as “general use” variables by settingtheir values by using the Set  command within the template.)

Variable(s) Category Details Related / similar items(variables, unless noted)

Comp Tool change info Lathe Tool compensation offset #. (Not used for milling posts.) LComp, DComp

Cool Tool change info Coolant M code value (on, off, mist). Typically M8, M9 and M7,respectively

Corner * Tool change info The “corner radius” of the tool. ToolRad, ToolDiam

Cycle Tool change info The [Cycle] variable gets set - when there is a holemaking or threading cycl e upcoming - according to the cycle type. Unlessnoted, the values listed below are for posts running in MILLmode. ADD 100 when post is in TURN (Lathe) mode: 

Note that [Cycle] is set to 0 when 'milling' (In other words, NOTdoing any drilling cycles), and 100 when in 'turning' mode (e.g.turning or grooving).

  (Lathe) threading = 107

  Drill = 13 (Remember: add 100 if in lathe mode...)

  LTap = 14

  Peck = 15

  Tap = 16

  Ream = 17

  Bore = 18

  Back = 19

  Custom1 = 21

  Custom2 = 22

  Custom3 = 23

  ChipBreak = 28

  CSink = 29

(Please note that there are 'gaps' in the numbering sequenceabove.)

SO... If you want to differentiate between MILL and DRILL cyclesin a mill post you would do something like this...

 Tool Change. . .i f [Cycl e] = 0 Mi l l i ng. . .  mi l l i ng does t hese l i nesel se  dr i l l i ng does these. . .endi f . . .end

... and the same for a turning post, except that you would add 100like this:

. . .

[Tap], [Rigid] and [Style]variables

Page 115: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 115/132

Variable(s) Category Details Related / similar items(variables, unless noted)

i f [ Cycl e] = 100. . .

DComp CRC Diameter compensation offset #. (mill only) Usually used in theInfeed sequence, but some machines like this value put in theToolChange sequences.

Lcomp, Tool, Side

Depth * Tool change info Depth of the upcoming cycle (mill only) D

Direct Tool change info M code value of Spindle direction; Cw (3) or Ccw (4) Speed, Range

FeedType Tool change info G code value of IPM (usually 95), IPR (94) or “Inverse time” (93)designator that was set in the FEEDTYPE line (described above).(mill and lathe only)

SpeedType

Flutes * Tool change info The number of flutes (cutting edges) this tool has (FYI: drillstypically have 2).

IncMode Tool change info Will output the numerical value that corresponds to incremental or absolute program output according to the “INC/ABS” line (seeabove) - typically 90 or 91 (as in 'G90' and 'G91').

INC/ABS command

LastDep * Tool change info Depth of theprevious cycle (mill only)

LastTool Tool change info The T# of the last tool used (commonly used in lathe programs tocancel compensation).

NextTool, Tool, Tool1

LComp Tool change info Length compensation offset #. (mill only) Dcomp, Tool

NextTool Tool change info The T# of the tool that is to be used AFTER the current tool.(Usually used to pre-select a tool for machines equipped with arm-type tool changers.)

In the program's final tool change, NextTool will be set to the firsttool number used in the program (it will be equal to [Tool1]). (SeetheToolChange sequence example at the top of section 7.5 for anexample of how to suppress 'pre-selection' of a tool in theprogram's final tool change.)

LastTool, Tool, Tool1

Plunge Machining info Plunge feed rate value (mill only). Usually used in the Infeedsequence.

FRate

ILevel Positioning Z dimension used for lateral rapid moves (mill only). RLevel

Range Tool change info Spindle range number – read from the CL file's SPINDL record(the number following the RANGE minor word)

Speed, Direct

SBite * Tool change info “Side bite”: the XY step distance for multi-pass side milling Step

SClear * Machining info Side (XY) clearance amount. (Typically the length of the 'Infeed'move [the move on which a G41 or G42 may appear to applyCRC.)

Dcomp, Side

Side CRC Cutter compensation Left/Right side value (usually 41 or 42).Usually used in the Infeed sequence.

DComp

SLeave * Machining info 'Side Leave': Amount that the current toolpath will “leave” on theside of the contour being cut (amount to leave in X/Y)

(Note: Sleave] and [Vleave] are not available with most CAMsystems.)

Vleave

Speed Tool change info Spindle speed (usually an “S” value). Direct, RangeSpeedType Tool change info G code value of RPM (97) or CSS (96) designator that was set in

the SPEEDTYPE line (described above). (lathe only)Speed, FeedType

Spindle# Tool change info The spindle number. (Only useful on lathes or MillTurns with morethan 1 spindle.)

Turret

Page 116: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 116/132

Variable(s) Category Details Related / similar items(variables, unless noted)

Tap Tool change info Use the following IF structure in your ToolChange or 1stToolChange sequences to detect an upcoming TAP or LTAPcycle:

I f [ Cycl e] = [ TAP]. . .el se. . .

endi f 

The IF line in the example above is equivalent to...

If [Cycle] = 13 OR [Cycle] = 14

... See the [Cycle] variable for the list of cycle values.

The [Tap] variable should actually be considered as a 'constant'(In other words, it is always set to the same value automatically bythe post, and you should NEVER use a 'Set' command to changeits value).

[Cycle] variable

Tool Tool change info “T” number LastTool, NextTool, Tool1

Tool1 Tool change info The T number of the 1st tool in the program; this is usually

referenced in the EndCode section to put the first tool back in thespindle (mill) or to return the turret back to tool position 1 (lathe) atthe end of the program.

LastTool, NextTool, Tool

ToolDiam Tool change info The diameter of the tool. ToolRad, Corner  

ToolRad Tool change info RADIUS value (1/2 the ToolDiam) of the current tool. ToolDiam, Corner 

Turret Tool change info This is the # of the turret now active. (Typically used in lathe or MillTurn posts only.)

  If your CAM system ever sets the [Turret] to 2, then the post willnot run unless you add the HCode2, VCode2 and/or DCode2commands to your template (to tell the post which letters you wantassigned to the 2nd turret.). Read about these commands insection 4.1.16

  Also available for  turret 2 only is the RevTurret2? switch. Readabout that in section 4.1.30

[Tool] & [Style] variables,RevTurret2? switch.

UnitMode Tool change info Will output the numerical value that corresponds to inch or MMprogramming mode according to the “INCH/MM” command. For example, if the following line is used...

I nch/ MM 70 71

...then the following code (within a ToolChange sequence, for example) will output G70 when in INCH mode, and a G71 when inMM mode.

G[ Uni t Mode]

IncMode

VLeave * Machining info 'Vertical Leave': Amount that the current toolpath will “leave” in theZ dimension for finishing with a later operation or tool. (Note:[Sleave] and [Vleave] are not applicable to most CAM systems.)

SLeave

Work Tool change /prompted (See“Details” column)

Work offset # (usually in the range of 54 to 59). The user will beprompted for the first occurrence of this value if it is not found inthe incoming CL data.

WorkDefault andWorkcommands. (See Appendix Cfor details on this topic!)

Page 117: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 117/132

9.1.1.5 Variables used for subroutines or subprograms

You will find these variables in use in the SubStart, SubEnd and SubCall sequences.

Variable(s) Category Details Related / similar items

Sub Subs This is the value of the sub number, and can be used in the SubStartand SubCall sequences.

Typical usages:

  SubStart  O[Sub ]  End

  SubCall  M98 P[Sub ] L[Times]  End

Times

SubLine Subs This is used in the SubCall sequence in place of [Sub] if the machinemust call a sub by its starting block (N) number (as opposed to usingthe sub number itself).

  SubCall  M98 P[SubLine]  End

Times Subs This is used to designate the number of times a sub repeats; it isusually used only in the SubCall sequence.

See [Sub] details above for anexample of how this is used inSubCall sequence.

9.1.1.6 Text Variables

These are the only variables that do not output numeric data - instead they output text. You can instantlytell the difference between a text variable and a numeric variable by the type of bracket that is used:

 Numeric variables have [square brackets] and text variables have {curly brackets }.

See section 7.3 for details on...

  - how to output text,  - outputting text variables and 

  - using text and text variables in the File Alias command.

Variable(s) Category Details

{Partno} Text Use this variable to access or output the text in the PARTNO CL record. (Note: You can only use thisvariable with CAM systems that output APT-CL files that include a PARTNO record.)

{CLPath} Text The 'drive and path' to the CL file. Example: C:\CLFiles\

{CL Name} Text TheCL file name only  (no path or extension) Example: Job123

{CL Ext} Text TheCL file extension  (usually 3 letters) including the 'dot' Example: .INC

{TemplatePath} Text The 'drive and path' to the format template file. Example:C:\PostHaste\Formats\

{Template Name} Text The format template file name  only (no path or extension) Example: Fanuc 15iM, LeBlond

{Template Ext} Text The template file extension  (usually 3 letters), includes the 'dot' Example: .pM3

{OutputPath} Text The 'drive and path' to the final NC program file. Example: C:\NCPrograms\Mills\LeBlond\

{Output Name} Text The final NC program file name  only (no path or extension) Example: Job123 Setup 1

{Output Ext} Text The final NC program file name extension  (usually 3 letters), includes the 'dot' Example: .NCC

Page 118: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 118/132

9.1.1.7 Prompted Variables

The values of these variables may not be set in the CL data. If you use any of these variables in your 

format, then you will be prompted to enter their value(s) when the post starts processing your code.

Variable(s) Category Details Related / similar items

EndH, EndV Prompted Position to which you would like the tool to come to rest at END of the program.

ToolH, ToolV, ToolD

MaxRPM Tool change /prompted (See“Details”column)

Maximum spindle speed limit (used with Lathe only; usually inconjunction with a G50 or G92) The user will be prompted for thefirst occurrence of this value if it is not found in the incoming CLdata.

Program# Prompted This number appears at the top of an NC program

ToolH,ToolV, ToolD

 Axis position /Prompted

Tool change position. This is typically used in a ToolChangesequence to move the tool to a particular (prompted) X, Y, and/or Zlocation before executing the tool change (M6) proper.

EndH, EndV

WorkH,WorkV,WorkD

Prompted Work origin offset coordinates (usually used with a G92 or G10command).

Page 119: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 119/132

9.1.1.8 Variables used for Wire EDM posts .

These are variables that don't really fit into any other category...

Variable(s) Category Details Related / similar items

InitPower Wire EDM ‘Initial power’ setting value (Note – this variable will be set only if the CLfile supports this function.)

Power, SparkGap, WireFeed

LowerDist,UpperDist

Wire EDM Uppoer & lower wire guide distances. Thickness

Power Wire EDM ‘Power’ setting value (Note – this variable will be set only if the CL filesupports this function.)

InitPower, SparkGap, WireFeed

SparkGap Wire EDM ‘Initial power’ value (Note – this variable will be set only if the CL filesupports this function.)

InitPower, Power, WireFeed

Thickness Wire EDM Thickness of the part. LowerDist, UpperDist

WireFeed Wire EDM ‘Initial power’ value (Note – this variable will be set only if the CL filesupports this function.)

InitPower, Power, SparkGap

Page 120: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 120/132

9.1.1.9 General Purpose (Misc.) variables

These are variables that don't really fit into any other category...

Variable(s) Category Details Related / similar items

Block General The Block (or: sequence) number. This is automatically producedaccording to theSequence#s line in the format (see above). If the

'frequency' of the Sequence#s is set to 0 (like this)...  Sequence#s N 0 1 1 1 Char, freq., inc r, start

...then N[Block] can be used to 'force' out N numbers on certain lines.

Example:N[ Bl ock] T[Tool ] M6

The exclamation point(example: !0 ) can be used to

suppress the output of blocknumbers.

EndN LatheRoughing

See discussion ofStartN below. StartN

FileSize General The number of bytes in the final NC program file (so far).   TotalCutDist

LinTol Rotaryaxes

(NOTE – 5 axis and MillTurn posts only.) Set this variable to a non-zeronumber to activate PostHaste’s “Linearization” function (that will insertextra movements to break up movements with relatively large rotaryangle changes into shorter moves to reduce tool tip gouging.). This

variable is updated by the LINTOL record in APT CL files, or can be SETby the user like this:

Set [ Li nTol ] t o . 001

LINTOL (APT CL) record

Mode General This variable is used mostly in MillTurn machine formats to determine if the operation is in milling or Turning mode.

For MillTurn posts this is typically set by theMODE or APPLY recordcoming from the CL file …

[Mode] = 1 whenTurning,... per these CL records:MODE / TURN or APPLY / TURN

[Mode] = 3 whenMilling. This occurs when these records are found:MODE / MI LL or APPLY / MI LL

For Wire EDM posts…

[Mode] = 2 when in “2 axis” mode – typically when a contour is beingcut that requires no independent movement of the UV (auxilliary or secondary) wire guide.

[Mode] = 10 when in “4 axis” (typically ‘XYUV”) mode

If  you need to set the [Mode] yourself based on certain conditions, werecommend that you follow these conventions:

Set [Mode] to 2 for “ 2D only” machining modes such as Laser,flame, 2 axis EDM, etc.

Set [Mode] to 3 for simultaneous 3 axis milling  mode.

Set [Mode] to 4 for simultaneous 4 axis milling  mode.

Set [Mode] to 5 for simultaneous 5 axis milling  mode.

Set [Mode] to 6 for ‘generic’ MillTurn mode { XZC }

Note: values of 7 to 9 are ‘reserved’ for possible future use – perhaps todifferentiate different MillTurn modes (XYZC, XZBC, XYZBC,)

MODE and TYPE commands

Page 121: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 121/132

Variable(s) Category Details Related / similar items

StartN, EndN LatheRoughing

These variables hold the “N numbers” (line numbers) of the starting andending of the ‘finish path’ that is used for lathe roughing cycles. They aretypically used in aRough sequence like this:

RoughG71 P[ StartN] Q[ EndN] U[ VLeave] W[ SLeave] …end

Stop General If a ‘full stop’ is commanded in the CL file, [Stop] will equal 0.

If an ‘optional stop’ is commanded, this will equal 1.

Taper  LatheThreading

(Lathe only.) [Taper] holds the ‘diameter difference’ between the startdiameter and the end diameter of the thread in AutoThread sequence.The taper of a thread is usually associated with the letter I or R.Example:  G76 X[ V] Z[ H] P[Dept h] Q[ Peck1] I [ Taper] F[Frate]

Val1 toVal20

General These are general purpose 'user' variables that you can use for anypurpose you want. These variables are not set by anything in theincoming CL data (unless you specifically use them in a Cycle or UponRec sequence definition line).

When the post starts running, it always initializes these values to zero;the values of these variables can be set or changed only by using ADD,

 ASK, or SET statements or by putting them in the 'definition' (first) line of 

aCycle or UponRec sequence.

Warning: Any time you add (what you think is) a 'new' variable to a post, makesure that that variable is NOT being used for some other purpose in thepost already! Before adding a new variable, ALWAYS do a “Search” tomake sure that you don't mistakenly re-use a variable that is being usedfor something else. Making this mistake can result in VERY strangeoutput - and a big mess to “debug”!

See the Rename command(section 4.1.26) for moreinformation on defining your own names for variables.

See the Add, Ask, Set, Cycle,UponRec and IF (logic)sections for examples of how

'user' variables may be used.

Page 122: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 122/132

10. Appendix B - List of “ retired” functions.

When working with OLD post formats, use this list to find things that aren't discussed

earlier in the manual. (Functions are listed in alphabetical order.)

As Post HASTE  has advanced over many years, many of the original functions have been “retired” and 

replaced by better methods. For sake of clarity (and to reduce confusion), we discuss only the newer (better) solutions in the main sections of this manual.

HOWEVER, for purposes of “backwards compatibility”, the “old” functions still work. You may comeacross some of these functions if you happen to be working on older Post HASTE  templates. They are listed 

here for your convenience - in case you ever run across them and need to know what they do.

Remember - there are better ways to achieve the same results: so we recommend that you do NOT use the

retired functions - use instead the functions listed in the “Better to use” column of the table below.

Item,

  Retirement M/Y Better to use: Notes:

<angle brackets>9/94

[Square brackets] Square brackets are now used for variables because (1) they are easier to typebecause they require no shift key, and (2) it makes IF commands less confusing if 'lessthan' (<) or 'greater than' (>) symbols are being used.

2ndCircleCode,4/93

 ArcCode Used for arc formats that require more than one line of code. (See p. 50)

CwCode, CcwCode10/01

 ArcCode Used for arc formats that require more than one line of code. (See p. 50)

[CommentDelay]variable12/01

Comments command See section 5.3.1for details on theComments command.

CommentDelay was used in older formats to 'postpone' comments for a few lines so thatthey would appear in a more useful location in your tool changes.

Varibles: [RPlane],[VClear] and[Vbite]

11/01

[Ilevel], [Rlevel] and[Step], respectively

The names RPlane and VClear were misleading because RPlane specified the “InitialLevel” and has thus been changed to [ILevel]), and VClear specifies the “R level” (andhas thus been changed to [RLevel]). Also, 'Step' sounds better than VBite.

DCompAdd,LCompAdd  9/01

D[DComp]+20

H[LComp]+10 (etc.)

These commands were used with AuraCad/CAM product only. Since that product is nolonger available, we have removed these commands. It's easier to just 'hard-code' thisfunctionality as an equation (like D[DComp]+20) anyway.

PostForm.* files8/01

“Single machine”format template files.(Examples: *.pM3*.pM5 *.pT2 ...etc.)

One machine format per file now, please. (Too many advantages to list here.)

See Appendix B in the Getting Started  manual for naming conventions. This isimportant! (The post does certain internal processes differently depending on thetemplate file extension!)

PConfig.M file8/01

PostHASTE.cfg file Removed last vestiges of .M and .L file extensions.

[CoolantOff] variable,2/01

Just use a simple...  M9

...instead of   M[CoolantOff]

 A long time ago, one of our larger customers requested that we add this variable. Sincethen, nobody has ever used it (as far as we know), and it makes thimgs more confusing,

so it has been retired.If you really want to use it... (its value is set in the “Coolant” line) you may use itanywhere in the sequences that you want to turn the coolant off like this:  M[ Cool ant Of f ] (See, M9 IS simpler, isn't it?)

Page 123: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 123/132

11. Appendix C - APT-CL Records recognized

PostHaste automatically recognizes the APT-CL records in following list that start with the following

words or symbols.

### NOTE -THIS SECTION IS "UNDER CONSTRUCTION" - WE WILL BE ADDING

DESCRIPTIONS AND DETAILS OVER THE COMING MONTHS. THANK YOU FOR YOUR PATIENCE.

  - 3/22/04 ###

In addition to knowing which CL records PostHaste recognizes, It is probably just as important to know

which CL records PostHaste IGNORES, so the first list below is a list of CL records that PostHasteIGNORES

 NOTE: If there is a record in your CL files that is NOT on either of these lists, PostHaste will issue awarning.

HOWEVER - Remember you can always use an UPONREC sequence to...

  - cause PostHaste to 'recognize' one of the commands on the "not recognized" list, or 

  - override PostHaste's 'default' way of handling a recognized record.

CL records IGNORED by PostHaste:

(listed in alphabetical order):

AUTOPS END FINI GOHOME HEADER INTOL MACHINMCS ORIGIN OUTTOL POSMAP PSIS ROW SELECT

SEQNO TLON TOOLNO UNITS

 NOTE: Even though PostHaste ignores these records, you can override that attribute and enable them withan UponRec sequence in your template. Here's an example:

UponRec I NTOL [ Val 1]. . .end

Page 124: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 124/132

CL records recognized by PostHaste:

CL Record Name

("Major word")

Description / notes / default actions, etc.

$$ Comment marker - the post will ignore all lines that start with '$$'. HOWEVER - you MAY 'Convert' them into actualvalid records that you may process with PostHaste. (See details on the Convert command.)

 APPLY Processed the same as MODE. (SeeMODE below.)

 ARCDAT, ARCMOV Some CAM systems use these records to describe arc movements instead of the standard 'CIRCLE & GOTO' pairs.Note - the ARCMOV record must immediately follow the ARCDAT record.

CALSUB (Along with ENDSUB and DEFSUB records,) describes subroutines or subprograms.

CIRCLE Same as MOVARC

CLEARP Sets the [iLevel] value.

COOLNT Sets the [Cool] value.

CSYS Some CAM systems output these records as a comment in the CL file. To utilize CSYS records, you must add thefollowing line to your template or PostHaste.CFG file:

Conver t ' $$- > CSYS' t o ' CSYS'

If this is done, then PostHaste’s ‘default’ handling of these records is to use them to automatically calculate therotary angle(s). PostHaste also sets the variables [CSys1] to [CSys12] to the values that are in the CSYS records.

Note - You can affect the way PostHaste interprets this record by use of the InvertCSYS? switch

CUTCOM or CUTDIR Indicates [Side] - typically used in theInfeed sequence.

CUTTER  At this time, only the [ToolDiam] and [ToolRad] variables are set by PostHaste (from the number immediatelyfollowing CUTTER .

CYCLE Specifies all types of holemaking cycles, and lathe threading.

DEFSUB (Along with ENDSUB and CALSUB records,) describes subroutines or subprograms.

DISPLY Same as PPRINT (see notes re PPRINT below)

ENDSUB (Along with DEFSUB and CALSUB records,) describes subroutines or subprograms.

FEDRAT Spindle speed and mode

FROM

GOTO General XYZ position of the endpoint of a linear or circular move, or the position at the 'top' of a hole. (Also seeMULTAXI below.)

HOMEPT

INDEX Identical to the ROTATE command - see the note re ROTATE below.

INDIRV Used for arcs in CATIA...

INSERT Text in the INSERT record will be placed directly and immediately into the final NC program. (No comment markerswill be added.)

LINTOL Linearization tolerance - used in 5 axis milling applications. (This sets PostHaste’s [LinTol] variable.)

LOAD PostHaste interprets LOADTL, LOAD and TURRET identically.

LOADTL PostHaste interprets LOADTL, LOAD and TURRET identically.

MODE Processed the same as APPLY

MOVARC Same as CIRCLE

MSYS Similar to CSYS - but this is automatically interpreted as an 'inverted' CSYS. (Note - Unigraphics outputs MSYSrecords instead of CSYS, and Unigraphics does not put them in a ‘comment’, so no Convert command is needed for the post to read these records from Unigraphics CL files.)

MULTAX / ON or / OFF - indicates that upcoming GOTO records will include or exclude IJK (Tool shaft) vector dataPARTNO The text following PARTNO will be put into the {PartNo} text variable. (NO NUMERIC data will be parsed from the

incoming PARTNO text.)

PPRINT Text following PPRINT will be output in the NC program as a comment. (PostHaste processes PPRINT records thesame as DISPLY records.) You can use the comments command within your template to indicate where you wantthe comments to appear in the NC program.

RAPID Turns the next GOTO into a rapid (typically G0) move.

RETRCT

ROTATE, ROTABL or ROTHED

Used to set the rotary axis variables - typically [RotAngle] (if only 1 rotary axis on your machine) or 2 of thefollowing: [AAxis], [BAxis], [CAxis]. (PostHaste processes the INDEX command in the same way.)

Page 125: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 125/132

SET Used to set the [Work] (Work fixture offset) variable.

SPINDL Spindle speed and mode

STOP Triggers PostHaste's STOP sequence. (typically M0 or M1, depending on template formatting)

SYNCTR Used in synchronizing multiple turrets (on lathes & MillTurn machines) or multiple wire guides in 4 axis wire EDMs.

THREAD Thread turning

TLAXIS Similar to CSYS - can be used to calculate rotary angles.

TURRET PostHaste interprets LOADTL, LOAD and TURRET records identically.

Page 126: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 126/132

12. Appendix D -Handling Rotary Axes

This section of the manual lists information that you will need to understand in order to handle rotary axis

issues with PostHaste.

 NOTE - This section of the manual is 'under construction' - please excuse the temporary 'men at work' signssuch as '###' or '<<<'. Thank you.

Definitions:

 Indexing vs. Rotary Milling:

•   Indexing refers to a rapid move with rotary motion. (Rotary 'positioning' only.)

•   Rotary Milling refers to simultaneous rotation while actually cutting (that is, the rotary axis [or 

axes] are moving at the same time that the XYZ axes are moving at the cutting feed rate).

12.1 [RotAngle] vs. [AAxis], [BAxis] and [CAxis]

Generally speaking, templates for machines that have only one rotary axis (for example, 4 axis mills) use

the [RotAngle] variable. Machines with more than one rotary axis do not  use the [RotAngle] variable;instead, they use a combination of 2 or more of the following variables: [AAxis], [BAxis] and/or [CAxis]

The only exception to the above is that some machines with only a single rotary axis (most notably punch presses with a rotating tool holder) can use the [AAxis], [BAxis] and [CAxis] variables, but only when the

CAM system outputs corresponding ROTATE or ROTABL records into the CL file that contain theAAXIS, BAXIS or CAXIS parameters (see the discussion below).

12.2 Where do the actual rotary angle values comefrom?

The actual rotary angle(s) (that are output by the [RotAngle], [AAxis], [BAxis] and [CAxis] variables) arecalculated from one of the following types of CL data ( - these are listed in the order of 'most desirable'

to ' least desirable'):

12.2.1 MULTAX data

### This usually the most desirable data to use for calculating rotary angles. This data can be used for bothindexing and rotary milling. The CL file will include a MULTAX / ON record, then the GOTO records will

include 6 parameters (XYZ coordinates and an IJK vector); the IJK vector indicates the direction that thetool shaft is pointing (away from the tip).

Page 127: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 127/132

Examples:

  Typical (3 axis) GOTO records (no MULTAX data):…GOTO / 4. 6574936, - 1. 4959458, - 0. 4900000GOTO / 4. 6154199, - 1. 4861985, - 0. 4900000RAPI DGOTO / 4. 6154199, - 1. 4861985, 0. 1000000…

  MULTAX / ON record, followed by GOTO records with MULTAX (IJK vector) data:…

 MULTAX / ON << Initiates 5 axis positionining (XYZ and IJK)…

RAPI DGOTO / 4. 85985, - 1. 33816, 1. 00000, -0.0879675, -0.0000970, 0.9961233

FEDRAT / PERMI N, 200. 000000GOTO / 4. 85985, - 1. 33816, 1. 18560, -0.0879675, -0.0000970, 0.9961233

 MULTAX / OFF << Back to 3 axis (XYZ only)…

GOTO / 4. 6574936, - 1. 4959458, - 0. 4900000GOTO / 4. 6154199, - 1. 4861985, - 0. 4900000RAPI D

GOTO / 4. 6154199, - 1. 4861985, 0. 1000000…

12.2.2 Coordinate system (CS or CSYS) data

Unless special arrangements are made in the template, CSYS data can only be used for indexing or multiplesetups on a 3 axis mill – and usually cannot be used for rotary (simultaneous 4 axis) milling

Since the ‘preferred method’ of rotary axis controls is through the use of MULTAX data (see above),CSYS data is NOT  usually accessible to the post unless you specifically activate it by using a Convert

command like this:

Convert ' $$- > CSYS' t o ' CSYS'

I gnore MULTAX This line must be added to prevent redundant rotary data!

Important!!! Please note that if you are using CSYS data (by including the Convert  line above, you mustdisable the MULTAX data by including the Ignore MULTAX command in your template as well!

### ###>>> “Under construction…” – Need to discuss 'in plane rotation' and 'local coordinates'

limitations/capabilities. <<<###

12.2.3 TLAXIS record data

This is usually found in CATIA CL files, and is somewhat of a hybrid of both of the MULTAX and CSYSmethods described above. It is similar to MULTAX data because it indicates a single IJK (tool shank) unit

vector that indicates the XYZ direction from the tool tip back along the center line of the tool (towards thecenter of the spindle face). However, it is similar to the CSYS method because TLAXIS records appear 

Page 128: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 128/132

occasionally in the CL file for purposes of indexing (that is, rapid rotary positioning) rather thansimultaneous rotary machining - which requires an IJK (MULTAX) vector in every GOTO record.

Examples:

 TLAXI S/ 0. 000000, 0. 000000, 1. 000000 (Tool shank pointing towards Z+ axis [Typ. A0 and/or B0])

  ...or...

 TLAXI S/ - 1. 000000, 0. 000000, 0. 000000 (Tool shank towards X- axis [Typ. B-90])

TLAxisEnabled?  switch

TLAXIS records are ignored by PostHaste - unless you use the TLAxisEnabled? switch and set it to Y  likethis:

 TLAxi sEnabl ed? Y

12.2.4 ROTATE, ROTHED or ROTABL records

Using these records is the least desirable of the methods of obtaining rotary angle information.  It is

undesirable because the CAM system has actually calculated the rotary values, rather than letting the postcalculate them from the 'vector' (IJK) information that is used in any of the above methods (MULTAX,CSYS or TLAXIS). The problem with that is that most CAM systems do not have the kinematic

information regarding the rotary axes on your machine, so many times the CAM system outputs badangles.

With that said, sometimes this is the only information available, so alas, we must sometimes use it.Fortunately, IF  your CAM system sets these values properly, then you should have no problem.

Special attention must be paid to the way these records are handled. If any of these records include the parameters  AAXIS, BAXIS or CAXIS, then the post will correspondingly set the [AAxis], [BAxis] or 

[BAxis] variables, respectively - EVEN IF THE ANGLES BEING SET DO NOT MATCH THE ACTUAL

KINEMATICS OF YOUR PARTICULAR MACHINE. This can become very troublesome and complicated, so again, try to avoid using the ROTATE, ROTHED and ROTABL records if at all possible.

### <example> ###

The VertCSame? switch

###>>> Move this topic into the 5ax addendum. <<<###

Page 129: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 129/132

13. Appendix E -What's new with PostHASTEand this manual?

RIGHT HERE is where you can find out about the latest features of PostHaste - withouthaving to look through the entire manual!

The chart below tells you where to find out about important and/or recent changes to PostHaste and this

manual. (There are probably lots of very useful things you didn't know about PostHaste - take a minute toskim the leftmost column of the chart below. You'll learn a lot!)

 Notes:

•  For the most part, the chart is listed in order of 'newest to oldest', so whenever you get a new version of PostHaste (this manual), start reading from the top of the list to learn about the new items. (To make

sure you see all of the new items, don't stop until you reach 'familiar territory'.)

•  We have listed the items that we feel are the most important for you to know about in boldface type.

Don't miss these!

 Note: in the Doc or Feat.? Column...

•   D means that it's a documentation change (correction, addition, explanation, examples, etc),F means that it's a new feature of PostHaste.

•  (new) means that (even if it's not a new feature) it is a completely new subject in this manual, so you

might not have heard about it before. Check it out!

New Item:

Doc or 

Feat.? -mo./yr.

Notes:

Read about it

in s ection...

How Rotary Axesare output (andcontrolled by CLdata. )

D – 2/05 Important discussion for anyone processing 4 or 5 axis milling (or MillTurn)programs; the significance of the [Rotangle] and [AAxis], [BAxis] and [CAxis]variables and the following CL records: MULTAX, CSYS (Coordinate system or CS)TLAXIS, ROTATE, ROTHED, ROTABL.

 Appendix D -Handling Rotary Axes

Expandeddiscussion ondefining the (4axis) INDEX

sequence

D – 1/05 Sometimes (when programming a horizontal 4 axis machine) you may have a CADmodel that is drawn so that the part must rotate about the Z axis, but your machinerotary table actually rotates the part about the Y axis. This discussion explains howyou can define your INDEX sequence to handle that.

Subsection of 5.2.4.3

Handling ‘OptionalStop’ (OPSTOP)CL records

D – 1/05 Discussion / example of using the UponRec sequence to output code required for an ‘optional stop’ (CL OPSTOP record).

5.2.4.4

Page 130: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 130/132

New Item:Doc or Feat.? -mo./yr.

Notes:Read about itin section ...

Updated Appendix A (Variable list)with many entries.

D – 1/05  Added discussion of these variables (most of which have been available for along time, but had not yet been documented): ADir (BDir, Cdir), ADist (BDist, CDist), ArcDir, ArcPlane, CPref, FileSize, H2 (V2),HCtr2 (VCtr2), InitPower, LowerDist (UpperDist), Normal1 (Normal2, Normal3),PointH (PointV, PointD), PolarAngle, PolarDist, Power, SparkGap, StartN (EndN),Stop, Taper, Thickness, WireFeed.

 Added/improved informat ion on these variables:Mode,

The AutoThread section (Section 5.2.4.2) also now includes the variables: Starts,TipAng

 Appendix A -List of Variables

 AutoThreadsequence, relatedvariables

D - 4/04 Of special interest to lathe users; Automatic lathe threading cycle (typically G76)documented - along with use of the [TParams], [Passes], [Chams], and [TipAng]variables.

5.2.4.2

[Cycle] [Style] and[Spindle#]variables

both -04/04

 Also of s pecial in terest t o lathe users ; additional values for [Cycle] and [Style]are now available, and we have added documentation of the [Spindle#] variable.(Note: The [Spindle#] variable has been available since 1//2000, but somehow itescaped being documented! Sorry! :-o )

9.1.1.4

[Turret] variable,

RevTurret2?switch

D - 4/04 ...and even more  for l athe users; PostHaste has some special features for Multi-

turret lathes. See these sections for into on the [Turret] variable andRevTurret2?switch, respectively.

9.1.1.4

4.1.30

Verbose? switch F - 3/04 Setting this to Y makes the post output some additional comments that may behelpful in 'debugging' your templates.

4.1.41

[PolarBreak]variable

F - 7/'03 'Polar interpolation' control: For MillTurn posts, setting the [PolarBreak] value letsyou control how & when lines and arcs milled on the face of a part areconverted/broken into a series of short 'polar' (typically X,C) moves.

9.1.1.1

 Appendix added:"APT-CL records 

recognized" 

D - 3/'04 Now there is a list of t he APT-CL records that the APT version o f PostHasterecognizes automatically.

 Appendix C

Topic "WorkFixture Offsets" -moved.

D - 3/'04 This was previously "Appendix C". We felt that it deserved a chapter in the manual,so we added section 6. (Note - The contents of that section have not changed - we just moved it.)

6

TLAxisEnabled?switch

F - 2/04  Allows use of the TLAXIS record (for machines with rotary axes) to calculate rotaryaxis angles.

 Appendix D -Handling Rotary Axes (Section12.2)

RELATE option on"Upon... Unique"sequences.

F - 2/04  Allows you to relate any variable to a unique condition. For example: Relate a 'workoffset' variable to each face of your workpiece so that the post will output thecorrect work offset number that has been calculated and related to each face (A or B angle) of the workpiece

0 (see the'...Relate...'subsection)

SpliceSubs? switch F - 10/03 Lets youprevent subs from being including in the main output file. 7.6.3.4

Rename 

commandF - 10/03 User-defined variable names! The Rename command lets you to make up any

name you want - for any variable.4.1.26

WindowSize 

configurationsetting

F - 9/03 If your post window is too small (if any of the buttons are missing or only partially

visible) then you can configure the width and height (in pixels) of the mainPostHaste window.

 Appendix A of 

'Getting Started'manual

 ArcPlanecommand and[ArcPlane] variable

D - 6/03 The ArcPlane command (and optionally the [ArcPlane] variable) can be used in millformat templates to support arc output in the ZX (typically G18) and YZ (typicallyG19) planes.

4.2.1

[LastH], [LastV]and [LastD]variables.

D - 6/03  A very important discussion of these variables has been added - read about thesein section 9.1.1.1 (That is inside Appendix A - look in the left column of that table tofind the entry entitled “LastH, LastV, LastD, LastRotAng”.)

9.1.1.1

Helical arcs D - 6/03 Everything you ever wanted to know about handling helical arcs - includingexamples of some special cases.

4.2.7.1

Page 131: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 131/132

New Item:Doc or Feat.? -mo./yr.

Notes:Read about itin s ection...

LOOP structures ### Create 'loops' for controlled repetitive processing of... anything!(You can even created 'nested loops'.)

Coming soon!

Equations !  D (new!)- 4/'03

You can now follow letters with equations such as  X[H]/2   or Ycos([RotAngle])*[Val12] 

(You can also use equations in other areas, too.)

7.1

Outputting textdirectly,

{Text} variables,and other text-related functions

F -(new!)4/'03

PostHaste now features 'text output' capability. In addition to any 'hard-coded' text that can be output from within any sequences, text variables (such as {CLName}) can be used for many pu rposes including commentingand creation of specific files in sp ecific folders.

'Text' topic: 7.3List of textvariables:9.1.1.6 File 

Alias:  5.3.4

Call  (command) F -(new!)4/'03

UseCall to 'reuse' (output) any sequence from inside any other.

e.g. You can usually use this to eliminate lines in your ToolChange sequence thatare 'duplicates' of lines in your 1stToolChange sequence.

5.2.5

CallMe  F -(new!)4/'03

UseCallMe to create your own sequences! (Then use Call to output them.)

This can greatly  reduce the complexity and the number of lines needed inyour template!

5.2.5

[PeckClear] D - 4/03 'Rapid into peck' drill tip clearance 4.1.2

AND and OR usage with IF D (new) -2/03 AND  and OR  can now be used in IF  structures to test for 2 conditions at a time. 7.5

Indenting lines inan IF structure

D (new) -2/03

For more visual clarity within the template, you may indent lines within an IFstructure with a single space.

7.5

 Automat icMultiple-part 

output

D(new)- 2/03

You can easily set up your posts to automatically  generate multiple-partprograms (using subroutines and work offsets [G54, G55, etc.]) - even if you'veonly programmed a single part in your CAM system.

If you EVER need to do multip le-part setups , then READ THIS!

7.6

PostHaste.LOG  D (new) -2/03

Did you know that PostHaste creates a log file that is very helpful in 'debugging'? 7.7

LocalOutput?

switchD (new) -

3/03For machines with rotary axes, use this switch to output your XYZ data relative tothe 'local' [Work] (G54, G55, etc.) origin for each face of your part. (Restrictionsapply!)

4.1.22

[TotalCutTime],[TotalCutDist]

F - 12/02 New variables that track your total feed time and distance so far. 9.1.1.1

[MoveTime](doc. Error)

D - 12/02 Before this date, the explanation of [MoveTime] mistakenly said that it wasmeasured in seconds. It is actually measured in minutes .

9.1.1.1

MOD letter formatmodifier 

D - 10/02 TheMOD (modulo) letter format modifier makes rotary axis output possible onmachines that have a 'numerical' limit of 360 (and/or -360) on the rotary axis.

3.1.2

Coolant command,the [Cool] variable.

D - 10/02 This section of the manual was updated to clarify the use of these commands andvariables.

4.1.6

 Appendix C - Work

offset detailsD -

10/'02This manual now includes an exhaustive discussion of how PostHaste handlesWork/Fixture offsets (a.k.a. 'WFO's” and/or G54) - including details on the [Work]variable and the Work andWorkDefault commands. .

 Appendix C

TheNoComment and All options(for Replace)

F – 8/'02 NoComment prevents 'Replaces' from being performed on your comments, All 'Repeats' a replacement until all occurrences have been replaced.

7.4

Unique modifier totheUPON record

F - 8/'02 Trigger output or processes only upon finding a unique ('not previously used') valueof any variable... Can be used (for example) in a tool list to prevent duplication of tools that are used twice, or t o create unique G10 lines whenever a 'new' index(rotary position) is encountered.

0

No-Opt  letter format modifier 

D - 8/'02 Inhibits PostHaste's 'zero optimization'; this lets you output zeroes as “0.” instead of “0”

3.1.2

Page 132: PostHASTE for GibbsCAM 2005 - Format Reference Manual

7/18/2019 PostHASTE for GibbsCAM 2005 - Format Reference Manual

http://slidepdf.com/reader/full/posthaste-for-gibbscam-2005-format-reference-manual 132/132

New Item:Doc or Feat.? -mo./yr.

Notes:Read about itin section ...

Index sequence D - 8/'02 Format the output for Rapid moves that include rotary motion. Error!Referencesource notfound.

Set command D - 8/'02 Set the value of any variable to any number, variable or equation 5.3.5

 Arc-relatedvariables

D - 8/'02 To get familiar with any of these variables... ArcRad, ArcStartH, ArcStartV, HCtr, VCtr, Ival, Jval, StartAng, EndAng, Sweep

4.2

'Spindle Range'codes (tactic)

D - 8/'02 This is an example of a good 'general purpose' tactic that has many other uses –you should know how to do this!

5.3.6 (exampleof Set  usage.)

[UnitMode] D - 8/'02 Value output corresponds to the values listed with the INCH/MM command. 9.1.1.4

Tolerancecommand

D - 8/'02 Set the post's rounding tolerance (to prevent rounding errors from accumulatingwhile outputting incremental values).

4.1.37

Spaces? switch D - 8/'02 Puts spaces between words. If you didn't know about this, then read this section: 4.1.32

Each, EOB andEOF commands.

D - 8/'02 These let you specify a 'word' to be output on each line of your program as well asthe 'end of block' and 'end of file' character sequences, respectively.

4.1.9 to 4.1.11

File 

commandsF – 7/02 Many file handling functions are now available that allow you to ...

- do 'multi-pass processing'- create/edit multiple output files- create tool lists at the top of your program files... and more!

5.3.4

NoEol ( and EOL)commands

F - 2/01 NoEOL lets you join several sequence lines into a single line of output (bysuppressing the 'end of line' that PostHaste outputs after every sequence line).

5.3.5

Comments 

commandF –

12/01Gives you complete control over the exact location of your comments in the finalNC code!

5.3.1

Template fileextension namingconventions

F – 1/'02 The file extension tells PostHaste what type of machine is being formatted. What'sthe difference between a .pT2 and a .pU5 template file? Find out here.

1.2

Notes: / 

EndOfNotes  (or EndNotes)

F - 11/01 UseNotes: and EndOfNotes (or EndNotes) lines to include large blocks of comments (without having to 'indent' them), or to 'comment out' a portion of your template.

4.1.25

DivBy andDivInto

letter formatdifi

F – 7/'01 Letters can be formatted for 2 different types of Division operations. 3.1.2