# Local Variables

## Classic Control - Mill 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.

Local variables range between #1 and #33. A set of local variables is available at all times. When a call to a subroutine with a G65 command is executed, local variables are saved and a new set is available for use. This is called nesting of local variables. During a G65 call, all new local variables are cleared to undefined values and any local variables that have corresponding address variables in the G65 line are set to G65 line values. Below is a table of the local variables along with the address variable arguments that change them:

 Variable: 1 2 3 4 5 6 7 8 9 10 11 Address: A B C I J K D E F H Alternate: I J K I J Variable: 12 13 14 15 16 17 18 19 20 21 22 Address: M Q R S T U V Alternate: K I J K I J K I J K I Variable: 23 24 25 26 27 28 29 30 31 32 33 Address: W X Y Z Alternate: J K I J K I J K I J K

Variables 10, 12, 14- 16 and 27- 33 do not have corresponding address arguments. They can be set if a sufficient number of I, J and K arguments are used as indicated above in the section about arguments. Once in the macro subroutine, local variables can be read and modified by referencing variable numbers 1- 33.

When the L argument is used to do multiple repetitions of a macro subroutine, the arguments are set only on the first repetition. This means that if local variables 1- 33 are modified in the first repetition, then the next repetition will have access only to the modified values. Local values are retained from repetition to repetition when the L address is greater than 1.

Calling a subroutine via an M97 or M98 does not nest the local variables. Any local variables referenced in a subroutine called by an M98 are the same variables and values that existed prior to the M97 or M98 call.

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.