EasyManuals Logo

Haas Mill User Manual

Haas Mill
217 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #105 background imageLoading...
Page #105 background image
98
Macros
96-8000 rev R June 2007
Unconditional Branch (GOTOnnn and M99 Pnnnn)
In the Haas control, there are two methods of branching unconditionally. An unconditional branch will always branch
to a specified block. M99 P15 will branch unconditionally to block number 15. The M99 can be used whether or not
macros is installed and is the traditional method for branching unconditionally in the Haas control. GOTO15 does the
same as M99 P15. In the Haas control, a GOTO command can be used on the same line as other G-codes. The
GOTO is executed after any other commands like M codes.
Computed Branch (GOTO#n and GOTO [expression])
Computed branching allows the program to transfer control to another line of code in the same subprogram. The
block can be computed as the program is running, using the GOTO [expression] form. Or the block can be passed
in through a local variable, as in the GOTO#n form.
The GOTO will round the variable or expression result that is associated with the Computed branch. For instance, if
#1 contains 4.49 and GOTO#1 is executed, the control will attempt to transfer to a block containing N4. If #1
contains 4.5, then execution will transfer to a block containing N5.
The following code skeleton could be developed to make a program that ads serial numbers to parts:
O9200 (Engrave digit at current location.)
;
(D=Decimal digit to engrave);
IF [[#7 NE #0] AND [#7 GE O] AND [#7 LE 9]] GOTO99;
#3000=1 (Invalid digit)
;
N99
#7=FIX[#7] (Truncate any fractional part) ;
;
GOTO#7 (Now engrave the digit) ;
;
N0 (Do digit zero)
...
M99
;
N1 (Do digit one)
;
M99
;
N2 (Do digit two)
;
...
;
(etc.,...)
With the above subroutine, you would engrave digit five with the following call:
G65 P9200 D5;
Computed GOTOs using expression could be used to branch processing based on the results of reading hardware
inputs. An example might look like the following:

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Haas Mill and is the answer not in the manual?

Haas Mill Specifications

General IconGeneral
Travels X AxisVaries by model
Travels Y AxisVaries by model
Travels Z AxisVaries by model
Spindle SpeedVaries by model
Spindle MotorVaries by model
Table SizeVaries by model
Rapid Traverse RatesVaries by model
Tool CapacityVaries by model
Max Cutting RateVaries by model
Spindle TaperVaries by model

Related product manuals