EasyManuals Logo

Haas VF Series Operator's Manual

Haas VF Series
564 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 #380 background imageLoading...
Page #380 background image
380
MACROS
96-8000
June 1999
This format is traditionally used for conditional assignment statements such as:
IF [#590 GT 100] THEN #590=0.0 ;
Here, 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 conditioned so that we could write something like:
IF [#1 NE #0] THEN G1 X#24 Y#26 F#9 ;
This executes a linear motion only if variable #1 has been assigned a value. You might try something like this:
IF [#1 GE 180] THEN #101=0.0 M99 ;
This says that if variable #1 (address A) is greater than or equal to 180, then set variable #101 to zero and
return from the subroutine.
Here is an example of an IF statement that branches if a variable has been initialized to contain any value.
Otherwise, processing will continue and an alarm will be generated. Remember, when an alarm is generated,
program execution is halted.
N1 IF [#9NE#0] GOTO3 (TEST FOR VALUE IN F) ;
N2 #3000=11(NO FEED RATE) ;
N3 (CONTINUE) ;
Iteration/Looping (WHILE DO END)
Essential to all programming languages is the ability to execute a sequence of statements a given number of
times or to loop through a sequence of statements until a condition is met. Traditional G coding allows this with
the use of the L address. A subroutine can be executed any number of times by using the L address.
M98 P2000 L5 ;
This is limited since you can not terminate execution of the subroutine on condition. Macros allows more
flexibility with the WHILE-DO-END construct. The syntax is as follows:
WHILE [<conditional expression>] DOn ;
<statements> ;
ENDn ;

Table of Contents

Other manuals for Haas VF Series

Questions and Answers:

Question and Answer IconNeed help?

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

Haas VF Series Specifications

General IconGeneral
Machine TypeVertical Machining Center
ControlHaas CNC Control
Z-Axis Travel20-30 inches (varies by model)
Y-Axis Travel16 - 30 inches (varies by model)
Spindle Motor20-30 hp (depending on model)
Tool Capacity20-40 tools (varies by model)

Related product manuals