Formatted Output

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

The DPRNT statement allows the programmer to send formatted text to the serial port. Any text and any variable can be printed to the serial port. The form of the DPRNT statement is as follows:

DPRNT [ <#nnnn[wf]>... ] ;

DPRNT must be the only command in the block. In the previous example, is any character from A to Z or the letters (+,-,/,*, and the space). When an asterisk is output, it is converted to a space. The <#nnnn[wf]> is a variable followed by a format. The variable number can be any macro variable. The format [wf] is required and consists of two digits within square brackets. Remember that macro variables are real numbers with a whole part and a fractional part. The first digit in the format designates the total places reserved in the output for the whole part. The second digit designates the total places reserved for the fractional part. The total places reserved for output cannot be equal to zero or greater that eight. These formats are illegal: [00] [54] [45] [36] /* not legal formats */

A decimal point is printed out between the whole part and the fractional part. The fractional part is rounded to the least significant place. When zero places are reserved for the fractional part, then no decimal point is printed out. Trailing zeros are printed if there is a fractional part. At least one place is reserved for the whole part, even when a zero is used. If the value of the whole part has fewer digits than have been reserved, then leading spaces are output. If the value of the whole part has more digits than has been reserved, then the field is expanded so that these numbers are printed.

A carriage return is sent out after every DPRNT block.

DPRNT[ ] Examples

Code Output
N1 #1= 1.5436 ;
N2 DPRNT[X#1[44]*Z#1[03]*T#1[40]] ;
X1.5436 Z 1.544 T 1
N4 DPRNT[] ;
(no text, only a carriage return)
N5 #1=123.456789 ;
N6 DPRNT[X-#1[35]] ;
X-123.45679 ;

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.