Address Substitution

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

The usual method of setting control addresses A-Z is the address followed by a number. For example:

G01 X1.5 Z3.7 F.02 ;

sets addresses G, X, Z, and F to 1, 1.5, 3.7, and 0.02 respectively, and thus instructs the control to move linearly, G01, to position X = 1.5 and Z = 3.7 at a feed rate of 0.02 inches per revolution. Macro syntax allows the address value to be replaced with any variable or expression.

The previous statement can be replaced by this code:

%
#1=1 ;
#2=0.5 ;
#3=3.7 ;
#4=0.02 ;
G#1 X[#1+#2] Z#3 F#4 ;
%

The permissible syntax on addresses A-Z (exclude N or O) is as follows:

<address><-><variable>
A-#101
<address>[<expression>]
Z[#5041+3.5]
<address><->[<expression>]
Z-[SIN[#1]]

If the value of the variable does not agree with the range of the address, then the usual control alarm results. For example, this code results in an invalid G code alarm because there is no G143 code:

%
#1= 143 ;
G#1 ;
%

When a variable or expression is used in place of an address value, the value is rounded to the least significant digit. If #1=.123456, then G01 X#1 would move the machine tool to .1235 on the X Axis. If the control is in the metric mode, the machine would be moved to .123 on the X axis.

When an undefined variable is used to replace an address value, that address reference is ignored. For example:

(#1 is undefined) ;
G00 X1.0 Z#1 ;

becomes

G00 X1.0 (no Z movement takes place) ;

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