Cvd; A Double Precision Real Number ) - Mitsubishi QD51 Programming Manual

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS

CVD

Function
• Converts a character string, which was converted by the MKD$ function, back to a double
precision real number.
CVD ( <character string expression> ) [, S] )
Syntax
character string expression
A#=CVD(MD$)
Examples
B#=CVD(MD$, S)
• The CVD function converts the character string, which was converted by the MKD$
Description
function, back to the original numeric value.
• Since all the data, which is written into the random access file, has to be a character string,
a double precision real number is converted into an 8-byte character string by the MKD$
function before written into a file. Conversely, the 8-byte character string has to be
converted back to the original double precision real number when this data is read from
the file and to treat as a real number. The CVD function is used for this purpose.
• The CVD function can convert only the character string, which was converted by the MKD$
function, into a double precision real number. If other character stings are specified in
<character string expression>, normal data will not be returned or an "Illegal function call"
error occurs.
• The data, which was converted to a character string by the MKD$ function, can be used for
the data communication in addition to writing to a random access file.
• When the [, S] option is specified, the character string subject to the conversion is
rearranged as follows, then converted it into a double precision real number.
11 - 38
ConVert to Double
• • • •
• • • •
• • • •
Original character string
L
1)
Lower word
H
2)
L
3)
Higher word
H
4)
L
5)
Lower word
H
6)
L
7)
Higher word
H
8)
REMARK
See the MKD$ function.
Specify the character string that was converted by
the MKD$ function.
Converts the character string (MD$), which was
converted by the MKD$ function, back to the original
double precision real number and assigns it to A#.
After replacing the contents of the character string
MD$, converts it back to the original double precision
real number and assigns it to B#.
8)
7)
6)
5)
4)
3)
2)
1)
MELSEC-Q
Converts into a double
precision real number.
#
11 - 38

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents