20 Custom Macro

For the rules of character outputs, see instruction BPRNT.

For the output of variable values, the numbers of decimal integers and fractions must be specified, in which the variable is to be out put. The digits have to be specified in square brackets [ ]. The condition 0 < c + d < 9 must be fulfilled for the specification of digits. The procedure of outputting the digits begins with the most significant digit. In outputting the digits, the negative sign (-) and the decimal point (.) will also be output with the respective ISO codes. If parameter PRNT=0, a space code will be output in the position of the + sign and the leading zeros; each zero is output with code 0 after the decimal point (if any). If parameter PRNT=1, the + sign and the leading zeros will not be output; if the decimal point is defined, the zeros behind it will be output. Otherwise, neither the decimal point nor any of zeros will be output.

If d=0, the decimal point will be output; if c only is specified, even the decimal point will not be output either.

A vacant variable will be output with code 0.

At the end of data outputting, the control will automatically output a line feed character (LF).

Example:

DPRNT [ X#130 [53] Y#500 [53] T#10 [2] ]

#130=35.897421

 

 

35.897

 

#500=–150.8

 

 

 

–150.8

 

 

#10=214.8

 

 

 

15

 

 

 

Output of data with PRNT=0:

7 6 5 4 3 2 1 0

1 1 0 1 1 0 0 0

--- X

1 0 1 0 0 0 0 0

--- Space

1 0 1 0 0 0 0 0

--- Space

1 0 1 0 0 0 0 0

--- Space

1 0 1 0 0 0 0 0

--- Space

0 0 1 1 0 0 1 1

--- 3

0 0 1 1 0 1 0 1

--- 5

0 0 1 0 1 1 1 0

--- Decimal Point (.)

1 0 1 1 1 0 0 0

--- 8

0 0 1 1 1 0 0 1

--- 9

1 0 1 1 0 1 1 1

--- 7

0 1 0 1 1 0 0 1

--- Y

0 0 1 0 1 1 0 1

--- Negative Sign (–)

1 0 1 0 0 0 0 0

--- Space

1 0 1 0 0 0 0 0

--- Space

1 0 1 1 0 0 0 1

--- 1

0 0 1 1 0 1 0 1

--- 5

0 0 1 1 0 0 0 0

--- 0

0 0 1 0 1 1 1 0

--- Decimal Point(.)

1 0 1 1 1 0 0 0

--- 8

0 0 1 1 0 0 0 0

--- 0

0 0 1 1 0 0 0 0

--- 0

1 1 0 1 0 1 0 0

--- T

1 0 1 0 0 0 0 0

--- Space

1 0 1 1 0 0 0 1

--- 1

0 0 1 1 0 1 0 1

--- 5

0 0 0 0 1 0 1 0

--- Line Feed (LF)

194

Page 194
Image 194
NCT Group 2000M, 99M manual 194