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 #106 background imageLoading...
Page #106 background image
99
96-8000 rev R June 2007
Macros
GOTO [[#1030*2]+#1031];
NO (1030=0, 1031=0);
...
M99;
N1 (1030=0, 1031=1);
...
M99;
N2 (1030=1, 1031=0);
...
M99;
N3 (1030=1, 1031=1);
...
M99;
The discrete inputs always return either 0 or 1 when read. The GOTO [expression] will branch to the appropriate line
of code based on the state of the two discrete inputs #1030 and #1031.
Conditional Branch (IF and M99 Pnnnn)
Conditional branching allows the program to transfer control to another section of code within the same subroutine.
Conditional branching can only be used when macros are enabled. The Haas control allows two similar methods for
accomplishing conditional branching.
IF [<conditional expression>] GOTOn
As discussed, <conditional expression> is any expression that uses any of the six Boolean operators EQ, NE, GT,
LT, GE, or LE. The brackets surrounding the expression are mandatory. In the Haas control, it is not necessary to
include these operators. For example:
IF [#1 NE 0.0] GOTO5;
could also be:
IF [#1] GOTO5;
In this statement, if the variable #1 contains anything but 0.0, or the undefined value #0, then branching to block 5
will occur; otherwise, the next block will be executed.
In the Haas control, a conditional expression can also be used with the M99 Pnnnn format. For example:
G0 X0 Y0 [#1EQ#2] M99 P5;
Here, the conditional is for the M99 portion of the statement only. The machine tool is instructed to X0, Y0 whether
or not the expression evaluates to True or False. Only the branch, M99, is executed based on the value of the
expression. It is recommended that the IF GOTO version is used if portability is desired.
Conditional Execution (IF THEN)
Execution of control statements can also be achieved by using the IF THEN construct. The format is:
IF [<conditional expression>] THEN <statement>;
NOTE: To preserve compatibility with FANUC syntax “THEN” may not be used with GOTOn.
This format is traditionally used for conditional assignment statements such as:
IF [#590 GT 100] THEN #590=0.0 ;
Variable #590 is set to zero when the value of #590 exceeds 100.0. In the Haas control, if a conditional evaluates to
FALSE (0.0), then the remainder of the IF block is ignored. This means that control statements can also be condi-
tioned so that we could write something like:
IF [#1 NE #0] THEN G1 X#24 Y#26 F#9 ;

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