Assignment Statements

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.

Get a translated PDF Download Continue

Assignment statements let you modify variables. The format of the assignment statement is:

=

The expression on the left of the equal sign must always refer to a macro variable, whether directly or indirectly. This macro initializes a sequence of variables to any value. This example uses both direct and indirect assignments.

% O50001 (INITIALIZE A SEQUENCE OF VARIABLES) ; N1 IF [#2 NE #0] GOTO2 (B=base variable) ; #3000=1 (Base variable not given) ; N2 IF [#19 NE #0] GOTO3 (S=size of array) ; #3000=2 (Size of array not given) ; N3 WHILE [#19 GT 0] DO1 ; #19=#19-1 (Decrement count) ; #[#2+#19]=#22 (V=value to set array to) ; END1 ; M99 ; %

You could use the above macro to initialize three sets of variables as follows:

% G65 P300 B101. S20 (INIT 101..120 TO #0) ; G65 P300 B501. S5 V1. (INIT 501..505 TO 1.0) ; G65 P300 B550. S5 V0 (INIT 550..554 TO 0.0) ; %

The decimal point in B101., etc. would be required.

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