Mitsubishi QD51 Programming Manual page 517

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Format character
"."
• A decimal point is inserted. A decimal point can be
• If a format string is placed following a decimal point,
• 0 is displayed for redundant digits in the decimal
• If the number of decimal places in the format string
• If the number of digits of a numeric value exceeds
"+"
If this character is specified at the beginning or end of
the format string, the sign (+ or -) of the value is
displayed before or after a numeric value,
respectively.
"-"
If this character is specified at the end of the format
string, a negative sign (-) is displayed after a negative
numeric value.
"**"
If these characters are specified at the beginning of
the format string, * is displayed at leading spaces of a
numeric value. ** reserves an area for two digits, in
the same way as "##."
"\\"
• If this character is specified at the beginning of the
• It is not allowed to specify \\ for a numeric value in
"**\"
• If these characters are specified at the beginning of
• **\ reserves an area for three digits, but only one
11 - 347
Function
inserted at any place in the format.
the corresponding digits are always displayed.
part.
is smaller than the number of digits in the decimal
part of a numeric value, the numeric value is
rounded to the specified digit and displayed.
the number of digits in the format as a result of
rounding up the numeric value, % is displayed
before the rounded numeric value.
format string, \ is displayed immediately to the left
of a formatted numeric value. \\ reserves an area
for two digits, but only the space for one digit
among them is used for \.
exponential format.
the format string, * is displayed at the leading part
and \ is displayed immediately before the number.
digit among them is used for \.
MELSEC-Q
Example
PRINT USING " ##.##" ;.78
0.78
OK
PRINT USING " ##.##" ;78
78.00
OK
PRINT USING " ##.##" ;78.125
78.13
OK
PRINT USING " .##" ;.999
%1.00
OK
PRINT USING " +##.#" ;–68.9
–68.9
OK
PRINTUSING " +##.#" ;24
+24.0
OK
PRINT USING " ##.#+ ;–55
55.0–
OK
PRINT USING " ##.#-" ;–70.1
70.1–
OK
PRINT USING " **#.#" ;12.39
*12.4
OK
PRINT USING " **#.#" ;765.1
765.1
OK
PRINT USING " \\###.#" ;456.7
\456.7
OK
PRINT USING " **\##.##" ;2.34
***\2.34
OK
(Continued on the next page)
11 - 347

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents