Conditional Expressions

Classic Control - Lathe Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue

In the Haas control, all expressions set a conditional value. The value is either 0.0 (FALSE) or the value is nonzero (TRUE). The context in which the expression is used determines if the expression is a conditional expression. Conditional expressions are used in the IF and WHILE statements and in the M99 command. Conditional expressions can make use of Boolean operators to help evaluate a TRUE or FALSE condition.

The M99 conditional construct is unique to the Haas control. Without macros, M99 in the Haas control has the ability to branch unconditionally to any line in the current subroutine by placing a P code on the same line. For example:

N50 M99 P10 ;
branches to line N10. It does not return control to the calling subroutine. With macros enabled, M99 can be used with a conditional expression to branch conditionally. To branch when variable #100 is less than 10 we could code the above line as follows:
N50 [#100 LT 10] M99 P10 ;

 

In this case, the branch occurs only when #100 is less than 10, otherwise processing continues with the next program line in sequence. In the above, the conditional M99 can be replaced with

N50 IF [#100 LT 10] GOTO10 ;

 

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.

Feedback